/* 跳線總機：深胡桃木外框、消光炭黑膠木面板、微氧化車削黃銅、粗織棉套跳線。不發光、不用霓虹、不用毛玻璃。
   層次（由暗到亮）：木紋、螺絲、未選中的插孔與端子壓低一階 → 選中的插孔、選中那筆的線 → 吊牌上的答案。
   面板上的模組是半透明的薄板：跳線從底下穿過看得到，標籤用膠木色描邊壓在線上面，永遠讀得到。
   版面由 patchbay.mjs 依 body[data-mode] 寫進根元素的 data-layout（desk／tab／phone）。 */

body[data-view="patchbay"], .mode-patchbay {
  --pb-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='480'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0032 0.075' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.27 0 0 0 0 0.15 0 0 0 0 0.08 0 0 0 -2.6 1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.mode-patchbay {
  --pb-walnut: #2a1810;
  --pb-bake: #18191c;
  --pb-brass: #b89758;
  --pb-brass-hi: #dcc48e;
  --pb-brass-lo: #7a6136;
  --pb-ink: #1f170c;
  --pb-ink-soft: #4a3a1c;
  --pb-silk: #e4dac6;
  --pb-silk-dim: #ada38f;
  --pb-linen: #c8bfae;
  --pb-twist: #a68c42;
  --pb-brick: #8c3b2d;
  --pb-slate: #64788f;
  --pb-paper: #f2ebdc;
  --pb-paper-lo: #e6dcc6;
  --pb-sans: ui-sans-serif, system-ui, -apple-system, "PingFang TC", "Noto Sans TC", sans-serif;
  --pb-cond: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", ui-sans-serif, system-ui, -apple-system, "PingFang TC", "Noto Sans TC", sans-serif;
  --pb-mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='m' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.85 0 0 0 0 0.8 0 0 0 0 0.72 0 0 0 0.06 -0.02'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  /* 螺絲壓低一階：比原本暗、反光小。 */
  --pb-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cdefs%3E%3CradialGradient id='b' cx='.36' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%238e8c86'/%3E%3Cstop offset='.5' stop-color='%23595955'/%3E%3Cstop offset='1' stop-color='%23262624'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='7' cy='7' r='6.7' fill='%23070707'/%3E%3Ccircle cx='7' cy='7' r='5.3' fill='url(%23b)'/%3E%3Cpath d='M3.7 9.3 10.3 4.7' stroke='%23181818' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --pb-brass-face: radial-gradient(ellipse at 78% 82%, rgba(88, 100, 66, .28), transparent 45%), radial-gradient(ellipse at 12% 30%, rgba(255, 238, 190, .22), transparent 55%), linear-gradient(176deg, #d6bd84 0%, #c3a466 28%, #b39252 62%, #a1823f 100%);
  /* 三種插孔：亮黃銅＝有對外轉出、暗銅＝有擷取但沒看到、沉頭＝沒有擷取。 */
  --pb-jack-out: radial-gradient(circle at 50% 50%, #030303 0 20%, #3a2c17 21% 25%, transparent 27%), radial-gradient(ellipse at 72% 78%, rgba(78, 92, 60, .45), transparent 42%), radial-gradient(circle at 34% 28%, #f0dca6 0, #c9a965 30%, #a5864b 58%, #6d5428 85%, #4a3819 100%);
  --pb-jack-none: radial-gradient(circle at 50% 50%, #030303 0 20%, #24160d 21% 25%, transparent 27%), radial-gradient(circle at 34% 28%, #8e664a 0, #6c4a33 32%, #4e3423 62%, #2f1f15 100%);
  --pb-jack-nocap: radial-gradient(circle at 50% 50%, #0b0b0c 0 22%, #1c1c1f 23% 100%);
  color: var(--pb-silk);
  font: 400 15px/1.4 var(--pb-sans);
  background-color: var(--pb-walnut);
  /* 木紋壓低一階：上面蓋一層半透明胡桃色。 */
  background-image: linear-gradient(rgba(30, 17, 10, .42), rgba(30, 17, 10, .42)), var(--pb-grain), linear-gradient(180deg, #2e1a11, #2a1810 45%, #22130b);
  background-size: 100% 100%, 900px 480px, 100% 100%;
  scrollbar-color: #6e5430 #1b0f09;
}
.mode-patchbay *, .mode-patchbay *::before, .mode-patchbay *::after { box-sizing: border-box; }
.mode-patchbay :is(button, a, summary):focus-visible { outline: 3px solid #f2dfa4; outline-offset: 2px; }
.mode-patchbay .pb-tagcard :is(button, a, summary, [tabindex="-1"]):focus-visible, .mode-patchbay .pb-maker :focus-visible { outline-color: #1f170c; }
.mode-patchbay .num { font-variant-numeric: tabular-nums lining-nums; }
.mode-patchbay [hidden] { display: none !important; }
.mode-patchbay .pb-live { margin: 0; top: 0; left: 0; }

/* ── 證據按鈕、未回報：膠木面上是米白字＋虛線底線 ── */
.mode-patchbay .ev {
  display: inline; padding: 0 1px; margin: 0; border: 0; border-bottom: 1.5px dashed rgba(228, 218, 198, .55); background: none;
  color: inherit; font: inherit; font-weight: 700; font-size: inherit; line-height: 1.25; cursor: pointer; text-align: left; white-space: nowrap;
}
.mode-patchbay .ev:hover { border-bottom-style: solid; border-bottom-color: var(--pb-brass-hi); }
.mode-patchbay .ev .unit { font-size: 13px; font-weight: 600; color: var(--pb-silk-dim); letter-spacing: 0; }
.mode-patchbay .socket { display: inline-block; padding: 0 6px; border: 1px dashed currentColor; border-radius: 3px; background: none; box-shadow: none; color: inherit; font-size: 13px; font-weight: 600; opacity: .85; }
.mode-patchbay .pb-plain { font-weight: 700; }
.mode-patchbay .pb-plain .unit { font-size: 13px; font-weight: 600; color: var(--pb-silk-dim); }

/* ── 外框 ── */
.pb-frame { min-height: 100%; padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.pb-rail { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.pb-maker {
  padding: 5px 26px; border-radius: 3px;
  background: var(--pb-bolt) 6px 50% / 11px no-repeat, var(--pb-bolt) calc(100% - 6px) 50% / 11px no-repeat, var(--pb-brass-face);
  box-shadow: 0 0 0 1px #3a2a12, inset 0 1px 0 rgba(255, 245, 210, .5), inset 0 -2px 3px rgba(60, 40, 10, .35), 0 3px 6px rgba(0, 0, 0, .5);
}
.pb-title { margin: 0; font: 800 19px/1.15 var(--pb-cond); color: var(--pb-ink); letter-spacing: .03em; text-shadow: 0 1px 0 rgba(255, 240, 200, .5); white-space: nowrap; }
.pb-lede { margin: 0; flex: 1 1 340px; min-width: 0; font-size: 14.5px; line-height: 1.35; color: #d9caae; }
.pb-capture { margin: 0; padding: 4px 10px; font-size: 14px; color: #d6c6a5; border: 1px solid rgba(184, 151, 88, .45); border-radius: 3px; background: rgba(10, 5, 2, .35); }
.pb-railbtn, .pb-link {
  display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: 4px; cursor: pointer;
  font: 700 14.5px/1.2 var(--pb-sans); color: var(--pb-ink); text-align: left;
  background: var(--pb-brass-face); border: 1px solid #4b3818; box-shadow: inset 0 1px 0 rgba(255, 245, 210, .5), 0 2px 3px rgba(0, 0, 0, .45);
}
.pb-railbtn:hover, .pb-link:hover { filter: brightness(1.07); }

.pb-body { min-width: 0; }

/* ── 膠木面板 ── */
.pb-board {
  position: relative; display: grid; gap: 12px 18px; padding: 18px 18px 16px; border-radius: 3px; min-width: 0;
  background:
    var(--pb-bolt) 7px 7px / 13px no-repeat, var(--pb-bolt) calc(100% - 7px) 7px / 13px no-repeat,
    var(--pb-bolt) 7px calc(100% - 7px) / 13px no-repeat, var(--pb-bolt) calc(100% - 7px) calc(100% - 7px) / 13px no-repeat,
    var(--pb-mottle), linear-gradient(180deg, #1c1d21, var(--pb-bake) 35%, #141517);
  box-shadow: 0 0 0 1px #090705, 0 0 0 4px #4d3c20, 0 0 0 5px #120a05, inset 0 2px 0 rgba(255, 255, 255, .035), inset 0 -3px 8px rgba(0, 0, 0, .55), 0 12px 26px rgba(0, 0, 0, .55);
}
.pb-board > * { position: relative; z-index: 1; min-width: 0; }
.pb-board > svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.pb-board > .pb-cords { z-index: 0; }
.pb-board > .pb-plugs { z-index: 3; }
/* 絲印字：膠木色描邊，壓在跳線上也讀得到。 */
.mode-patchbay .pb-board :is(.pb-mlab, .pb-jval, .pb-pipno, .pb-pcnt, .pb-amt, .pb-h3, .pb-caption, .pb-vname, .pb-vsig, .pb-vread, .pb-rtitle, .pb-rrows, .pb-rnote, .pb-vsock-lab, .pb-racktitle, .pb-racksub, .pb-swtext, .pb-legend, .pb-resetlab, .pb-swlabs, .pb-capnote, .pb-gatelab) {
  text-shadow: 0 0 2px #17181b, 0 0 3px #17181b, 0 0 1px #000;
}
.pb-h3 { margin: 0; font: 700 16px/1.2 var(--pb-sans); color: var(--pb-silk); }
.pb-caption { margin: 2px 0 0; font-size: 13.5px; line-height: 1.35; color: var(--pb-silk-dim); }

/* ── 金庫端子 ── */
.pb-vaults { grid-area: vaults; display: flex; flex-direction: column; gap: 14px; }
.pb-vault {
  position: relative; display: grid; gap: 5px 6px; padding: 10px 10px 8px; align-content: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "meter" "read";
}
.pb-vault, .pb-rating, .pb-strip, .pb-rack, .pb-bank { border-radius: 4px; background: var(--pb-bolt) 5px 5px / 10px no-repeat, var(--pb-bolt) calc(100% - 5px) 5px / 10px no-repeat, var(--pb-bolt) 5px calc(100% - 5px) / 10px no-repeat, var(--pb-bolt) calc(100% - 5px) calc(100% - 5px) / 10px no-repeat, rgba(255, 248, 230, .025); box-shadow: inset 0 0 0 1px rgba(184, 151, 88, .2), inset 0 1px 0 rgba(255, 255, 255, .03); }
/* 兩座金庫插座面對面：桌機上下（金庫在右下、基金在右上），平板與手機左右（金庫在右、基金在左）。 */
.pb-vault[data-v="treasury"] .pb-vsock { right: 4px; bottom: 4px; }
.pb-vault[data-v="treasury"] .pb-vrow:last-child { padding-right: 50px; }
.pb-vault[data-v="fund"] .pb-vsock { right: 4px; top: 4px; }
.pb-vault[data-v="fund"] .pb-vhead { padding-right: 50px; }
.pb-vhead { grid-area: head; display: flex; flex-wrap: wrap; align-items: baseline; align-content: center; gap: 0 8px; padding: 0 2px 0 4px; }
.pb-vname { margin: 0; font: 700 16px/1.25 var(--pb-sans); color: var(--pb-silk); }
.pb-vsig { font-size: 13px; color: var(--pb-silk-dim); }
/* 表頭面板壓暗一階：最亮的地方留給選中的插孔、線與吊牌答案。 */
.pb-meter { grid-area: meter; display: block; width: 100%; max-width: 176px; height: auto; justify-self: center; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .55)) brightness(.84) saturate(.85); }
.pb-m-case { fill: #2b2116; stroke: #745a2e; stroke-width: 2; }
.pb-m-face { fill: #e6dcc3; stroke: #5d4824; stroke-width: 1; }
.pb-m-arc { fill: none; stroke: #2a2217; stroke-width: 1.4; }
.pb-m-tick { stroke: #2a2217; stroke-width: 1; }
.pb-m-tick.major { stroke-width: 1.8; }
.pb-m-num { font: 600 10.5px var(--pb-cond); fill: #2a2217; }
.pb-m-unit { font: 700 10px var(--pb-cond); fill: #5a4a2e; }
.pb-m-needle { stroke: #141210; stroke-width: 2; stroke-linecap: round; }
.pb-m-pivot { fill: #b89758; stroke: #3d2e14; stroke-width: 1.2; }
.pb-vread { grid-area: read; margin: 0; display: grid; gap: 4px; padding: 0 4px; }
.pb-vrow { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.pb-vrow dt { font-size: 13px; color: var(--pb-silk-dim); line-height: 1.25; }
.pb-vrow dd { margin: 0; font-size: 15px; }
.pb-vrow .pb-big { font-size: 17px; }
.pb-vsock { all: unset; box-sizing: border-box; position: absolute; z-index: 2; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; }
.pb-bigsock {
  width: 44px; height: 44px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #050505 0 7px, #3a2c17 7.5px 8.5px, transparent 9px),
    radial-gradient(circle at 50% 18%, #050505 0 2px, transparent 2.5px), radial-gradient(circle at 82% 66%, #050505 0 2px, transparent 2.5px), radial-gradient(circle at 18% 66%, #050505 0 2px, transparent 2.5px),
    radial-gradient(circle at 36% 28%, #f2deaa 0, #c9a965 28%, #a3844a 58%, #6a5127 86%, #45341a 100%);
  box-shadow: 0 0 0 2px #0a0907, 0 0 0 4px #4d3c20, 0 3px 5px rgba(0, 0, 0, .7);
  filter: brightness(.82) saturate(.85);
}
.pb-vsock:hover .pb-bigsock { filter: brightness(.95); }
.pb-vsock[aria-pressed="true"] .pb-bigsock { filter: none; box-shadow: 0 0 0 2px #0a0907, 0 0 0 4px var(--pb-brass-hi), 0 3px 5px rgba(0, 0, 0, .7); }

/* 5% 上限銘板 */
.pb-rating { grid-area: rating; padding: 9px 8px 9px; display: flex; flex-direction: column; gap: 5px; align-self: end; }
.pb-rtitle { margin: 0; padding: 0 4px; font: 700 15px/1.25 var(--pb-sans); color: var(--pb-silk); }
.pb-rrows { margin: 0; display: grid; gap: 4px; padding: 0 2px; }
.pb-rrow { display: flex; flex-direction: column; min-width: 0; }
.pb-rrow dt { font-size: 13px; color: var(--pb-silk-dim); }
.pb-rrow dd { margin: 0; font-size: 14.5px; }
.pb-rrow .ev .unit { font-size: 12px; }
/* 左欄只有一個指幅寬：數字不拆，單位可以換到下一行。 */
.mode-patchbay :is(.pb-rrow, .pb-vrow) .ev { white-space: normal; }
.pb-rmore { all: unset; box-sizing: border-box; margin: 0 4px; min-height: 32px; display: flex; align-items: center; cursor: pointer; font-size: 13.5px; line-height: 1.3; color: var(--pb-silk); text-decoration: underline 1px dashed rgba(228, 218, 198, .6); text-underline-offset: 3px; text-shadow: 0 0 2px #17181b, 0 0 3px #17181b; }
.pb-rmore:hover { text-decoration-style: solid; text-decoration-color: var(--pb-brass-hi); }

/* ── 屆期總閘（依轉帳日期）：一列小按鍵，標籤寫明是哪一種屆期 ── */
.pb-fieldhead { grid-area: head; display: flex; flex-direction: column; gap: 8px; }
.pb-fieldtitle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.pb-gates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pb-gatelab { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--pb-silk-dim); }
.pb-gatelab::after { content: " ↓"; }
.pb-gate {
  all: unset; box-sizing: border-box; position: relative; display: inline-flex; align-items: center; min-height: 34px; padding: 3px 8px 3px 21px; cursor: pointer; border-radius: 4px;
  color: var(--pb-silk-dim); background: linear-gradient(180deg, #232428, #18191c 60%, #121315);
  box-shadow: 0 0 0 1px #050505, 0 0 0 2px rgba(110, 86, 48, .55), 0 2px 3px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .08s, box-shadow .08s;
}
.pb-gate:hover { color: var(--pb-silk); background: linear-gradient(180deg, #2b2c31, #1c1d21 60%, #141518); }
.pb-gate[aria-pressed="true"] { color: var(--pb-silk); transform: translateY(1px); box-shadow: 0 0 0 1px #050505, 0 0 0 2px var(--pb-brass-hi), 0 1px 2px rgba(0, 0, 0, .6), inset 0 2px 4px rgba(0, 0, 0, .6); }
.pb-gflag { position: absolute; left: 7px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #0b0b0c; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9), 0 0 0 1.5px #5d4826; }
/* 掉牌：按下時白色小牌翻下來（形狀訊號，不靠顏色） */
.pb-gate[aria-pressed="true"] .pb-gflag { background: radial-gradient(circle at 40% 35%, #fbf4e2, #d7cbb0 70%); box-shadow: 0 0 0 1.5px var(--pb-brass-hi); }
.pb-gname { font: 700 14px/1.2 var(--pb-sans); overflow-wrap: anywhere; }

/* ── 月份插孔陣列 ── */
.pb-jacks.pb-cal { grid-template-columns: 22px repeat(12, minmax(0, 1fr)); gap: 6px 2px; align-content: space-between; align-items: start; }
.pb-cal > * { grid-row: var(--r); grid-column: var(--c); }
.pb-calcol { align-self: end; text-align: center; font: 700 14px/1.2 var(--pb-cond); color: var(--pb-silk-dim); padding-bottom: 2px; border-bottom: 1px solid rgba(184, 151, 88, .25); text-shadow: 0 0 2px #17181b, 0 0 3px #17181b; overflow-wrap: anywhere; }
.pb-calyear { align-self: start; justify-self: center; margin-top: 2px; padding: 5px 2px; writing-mode: vertical-rl; transform: rotate(180deg); font: 700 14px/1.1 var(--pb-cond); color: var(--pb-ink); border-radius: 2px; background: var(--pb-brass-face); box-shadow: 0 0 0 1px #2a1e0c, 0 1px 2px rgba(0, 0, 0, .6); white-space: nowrap; filter: brightness(.8) saturate(.8); }
.pb-blank { justify-self: center; margin-top: 3px; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #26272b, #121315 70%); box-shadow: 0 0 0 1px #050505, inset 0 1px 1px rgba(255, 255, 255, .05); opacity: .45; }
.pb-cal .pb-mlab { display: none; }
.pb-cal .pb-socket { width: 28px; height: 28px; }
.pb-cal .pb-jbtn { min-width: 40px; padding: 3px 2px 2px; }
.pb-cal .pb-jval { font: 600 14.5px/1.12 var(--pb-cond); gap: 2px; letter-spacing: -.015em; }
.pb-cal .pb-jval .ev, .pb-cal .pb-jval .pb-plain { display: flex; flex-direction: column; align-items: center; text-align: center; overflow-wrap: normal; word-break: keep-all; }
.pb-cal .pb-jval .unit { font-size: 12px; }
.pb-cal .pb-none { font-size: 13px; overflow-wrap: normal; text-align: center; }
.pb-cal .pb-stub { width: 6px; }
/* 桌機月曆：小牌掛在插孔右邊那一欄（那一欄的字平常是收起來的），不佔列高；十到十二月掛到左邊，不跑出插孔區、不蓋到端子排。 */
.pb-cal .pb-uchip { position: absolute; z-index: 1; top: 40px; left: calc(100% + 3px); margin: 0; }
.pb-cal .pb-jack:is([data-m="10"], [data-m="11"], [data-m="12"]) .pb-uchip { left: auto; right: calc(100% + 3px); }
.pb-jacks { grid-area: jacks; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-content: space-between; gap: 10px 4px; padding: 4px 0; }
.pb-jack { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; transition: opacity .12s; }
.pb-jbtn { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 100%; min-width: 44px; padding: 3px 3px 2px; border-radius: 5px; cursor: pointer; }
.pb-jbtn:hover .pb-mlab { color: #fff7e4; }
.pb-socket { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--pb-jack-out); box-shadow: 0 0 0 1.5px #0a0907, 0 2px 3px rgba(0, 0, 0, .65); }
/* 未選中的插孔壓低一階；暗銅與沉頭各自更暗。 */
.pb-jack[data-st="out"] .pb-socket { filter: brightness(.86) saturate(.85); }
.pb-jack[data-st="none"] .pb-socket { background: var(--pb-jack-none); box-shadow: 0 0 0 1.5px #0a0907, 0 1px 2px rgba(0, 0, 0, .6); }
.pb-jack[data-st="nocap"] .pb-socket { background: var(--pb-jack-nocap); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), inset 0 -1px 0 rgba(255, 255, 255, .04), 0 0 0 1px rgba(0, 0, 0, .8); transform: scale(.78); }
.pb-jack:hover .pb-socket { filter: brightness(1); }
.pb-jack[data-st="nocap"]:hover .pb-socket { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), 0 0 0 1px rgba(184, 151, 88, .45); }
.pb-jbtn[aria-pressed="true"] .pb-socket { filter: brightness(1.06); box-shadow: 0 0 0 1.5px #0a0907, 0 0 0 4.5px var(--pb-brass-hi), 0 2px 4px rgba(0, 0, 0, .7); }
.pb-jack[data-st="nocap"] .pb-jbtn[aria-pressed="true"] .pb-socket { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), 0 0 0 1.5px #0a0907, 0 0 0 5px var(--pb-brass-hi); }
.pb-mlab { font: 600 14px/1.15 var(--pb-cond); color: var(--pb-silk-dim); letter-spacing: .01em; overflow-wrap: anywhere; }
.pb-jbtn[aria-pressed="true"] .pb-mlab { color: #fff3d6; text-decoration: underline 2px var(--pb-brass-hi); text-underline-offset: 3px; }
.pb-stubs { display: flex; gap: 2px; height: 5px; align-items: center; }
.pb-stub { width: 8px; height: 4px; border-radius: 1px; background: var(--cc); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .7); }
.pb-stub.g-possible { background: repeating-linear-gradient(90deg, var(--pb-twist) 0 2px, #15120e 2px 4px); }
.pb-stub.ret { background: repeating-linear-gradient(90deg, var(--cc) 0 3px, transparent 3px 5px); }
.pb-stub-more { font-size: 11px; line-height: 5px; color: var(--pb-silk-dim); }
.pb-jval { display: flex; flex-direction: column; align-items: center; gap: 1px; max-width: 100%; font-size: 15px; line-height: 1.2; }
.pb-jval .ev, .pb-jval .pb-plain { white-space: normal; }
.pb-none { font-size: 13.5px; color: var(--pb-silk-dim); font-style: italic; }
.pb-jval > * { padding: 0 2px; border-radius: 2px; background: rgba(23, 24, 27, .94); }
/* 插孔靜音：金額、沒看到、線頭只在選中、滑過、鍵盤聚焦時出現（觸控板點一下就是選中）。保留位置，不會跳版。 */
.pb-jack :is(.pb-jval, .pb-stubs) { visibility: hidden; }
.pb-jack:is(.pb-on, :hover, :focus-within) :is(.pb-jval, .pb-stubs) { visibility: visible; }
.pb-jack:is(:hover, :focus-within) { z-index: 2; }
/* 未分類小牌：斷頭短線垂到這裡。 */
.pb-uchip { margin-top: 2px; padding: 0 5px !important; font: 700 12.5px/1.4 var(--pb-cond); letter-spacing: 0; white-space: nowrap; color: #f6e2da; border-radius: 2px; background: #6e2b20 !important; box-shadow: 0 0 0 1px #2b0e09, 0 1px 2px rgba(0, 0, 0, .6); text-shadow: none !important; }
.pb-off { opacity: .32; }
/* 沒有擷取的那一段只標一次，壓在空著的那幾欄底下，箭頭指向第一個有擷取的月份。 */
.pb-capnote { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.25; color: var(--pb-silk-dim); font-style: italic; pointer-events: none; }
.pb-capnote::before { content: ""; flex: 1 1 0; min-width: 12px; height: 1px; background: repeating-linear-gradient(90deg, rgba(173, 163, 143, .45) 0 4px, transparent 4px 7px); }
.pb-capnote::after { content: "→"; font-style: normal; color: var(--pb-silk-dim); }
.pb-capnote-t { flex: 0 1 auto; min-width: 0; text-align: right; }
.pb-cal > .pb-capnote { grid-row: var(--nr); grid-column: var(--nc); align-self: end; justify-self: stretch; padding-right: 2px; }
.pb-jacks:not(.pb-cal) > .pb-capnote { grid-column: 1 / -1; }

/* ── 底座：待查端子架、撥動開關、圖例 ── */
.pb-base { grid-area: base; display: flex; flex-direction: column; gap: 8px; }
.pb-rack {
  all: unset; box-sizing: border-box; position: relative; display: grid; grid-template-columns: minmax(0, auto) minmax(90px, 1fr); align-items: center; gap: 4px 14px;
  padding: 6px 14px 6px 16px; cursor: pointer; border-radius: 4px; min-height: 50px;
}
.pb-rack, .pb-bank { background: var(--pb-bolt) 5px 5px / 10px no-repeat, var(--pb-bolt) calc(100% - 5px) 5px / 10px no-repeat, var(--pb-bolt) 5px calc(100% - 5px) / 10px no-repeat, var(--pb-bolt) calc(100% - 5px) calc(100% - 5px) / 10px no-repeat, rgba(255, 248, 230, .025); box-shadow: inset 0 0 0 1px rgba(184, 151, 88, .2), inset 0 1px 0 rgba(255, 255, 255, .03); }
.pb-rack:hover { background-color: rgba(255, 248, 230, .05); }
.pb-rack[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pb-brass-hi); }
.pb-rackhead { display: flex; flex-direction: column; min-width: 0; }
.pb-racktitle { font: 700 15px/1.2 var(--pb-sans); color: var(--pb-silk); }
.pb-racksub { font-size: 13px; color: var(--pb-silk-dim); }
.pb-hooks { position: relative; display: flex; justify-content: space-between; align-items: flex-start; height: 26px; padding: 0 2px; filter: brightness(.72) saturate(.8); }
.pb-rack[aria-pressed="true"] .pb-hooks { filter: none; }
.pb-hooks::before { content: ""; position: absolute; left: -4px; right: -4px; top: 0; height: 6px; border-radius: 3px; background: linear-gradient(180deg, #e2c98f, #b89758 45%, #6f5630); box-shadow: 0 2px 3px rgba(0, 0, 0, .6); }
.pb-hook { position: relative; top: 4px; width: 9px; height: 16px; border: 2px solid #b89758; border-top: 0; border-radius: 0 0 6px 6px; border-right-color: transparent; box-shadow: 1px 2px 2px -1px rgba(0, 0, 0, .7); }

.pb-bank { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 12px; }
.pb-basis { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 6px; flex: 1 1 300px; min-width: 0; }
.pb-sw { all: unset; box-sizing: border-box; display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px 5px 4px; min-height: 44px; border-radius: 4px; cursor: pointer; min-width: 0; }
.pb-sw:hover { background: rgba(255, 248, 230, .05); }
.pb-sw-basis { flex: 1 1 0; align-items: center; padding-right: 4px; }
.pb-lever { position: relative; flex: none; width: 22px; height: 42px; }
.pb-lever::before { content: ""; position: absolute; left: 1px; top: 11px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #111 0 3px, transparent 3.5px), radial-gradient(circle at 35% 30%, #d9c592, #a5874f 50%, #5e4723); box-shadow: 0 0 0 1px #0a0907, 0 2px 3px rgba(0, 0, 0, .6); }
.pb-lever::after { content: ""; position: absolute; left: 7px; top: 22px; width: 8px; height: 19px; border-radius: 3px 3px 4px 4px; background: linear-gradient(90deg, #6e7073, #cfcfca 45%, #7c7e80); box-shadow: 0 2px 2px rgba(0, 0, 0, .6); }
.pb-sw[aria-checked="true"] .pb-lever::after { top: 1px; border-radius: 4px 4px 3px 3px; }
body[data-motion="on"] .mode-patchbay .pb-lever::after { transition: top .12s ease-out; }
/* 動態關掉：按壓、淡入淡出這些小過場也一起拿掉（含偽元素）。 */
body[data-motion="off"] .mode-patchbay *, body[data-motion="off"] .mode-patchbay *::before, body[data-motion="off"] .mode-patchbay *::after { transition: none !important; animation: none !important; }
.pb-swtext { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pb-swname { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font: 700 15px/1.2 var(--pb-sans); color: var(--pb-silk); }
/* 開關很窄（法文「Correspondance」、葡文「Correspondência」一個字就比開關寬）：放不下的字才加連字號斷開。 */
.pb-swname > span { min-width: 0; hyphens: auto; overflow-wrap: break-word; }
.pb-swmeta { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 1.2; }
.pb-swcount { font-weight: 700; color: var(--pb-silk-dim); }
.pb-swdesc { font-size: 13px; line-height: 1.25; color: var(--pb-silk-dim); }
.pb-sw[aria-checked="false"] .pb-swtext { opacity: .55; }
.pb-sw[aria-checked="false"] .pb-swname > span { text-decoration: line-through 1.5px; }
/* 「全部跳線／只看選中的」是次要開關：排在最後、小一號、顏色淡一階。 */
.pb-sw-all { flex: 0 1 auto; align-items: center; gap: 5px; padding: 2px 6px 2px 2px; min-height: 40px; margin-left: auto; opacity: .85; }
.pb-sw-all .pb-lever { transform: scale(.78); transform-origin: 50% 50%; width: 20px; }
.pb-swlabs { display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 12.5px; line-height: 1.2; color: var(--pb-silk-dim); }
.pb-sw-all[aria-checked="true"] .pb-swon, .pb-sw-all[aria-checked="false"] .pb-swoff { color: var(--pb-silk); font-weight: 700; }
.pb-reset { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 56px; min-height: 44px; padding: 2px 6px; cursor: pointer; border-radius: 4px; }
.pb-resetcap { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #46474c, #141517 70%); box-shadow: 0 0 0 2px #0a0907, 0 0 0 3.5px #6d5530, 0 3px 3px rgba(0, 0, 0, .6); }
.pb-reset:active .pb-resetcap { transform: translateY(1px); box-shadow: 0 0 0 2px #0a0907, 0 0 0 3.5px #6d5530, 0 1px 1px rgba(0, 0, 0, .6); }
.pb-resetlab { font: 700 14px/1.2 var(--pb-sans); color: var(--pb-silk); }
.pb-legend { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.3; color: var(--pb-silk-dim); padding: 0 4px; }
.pb-legline { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.pb-leghead { color: var(--pb-silk); font-weight: 700; min-width: 2.6em; }
.pb-legitem { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.pb-legitem .pb-swatch, .pb-legitem .pb-jicon { align-self: center; }
.pb-legitem b { color: var(--pb-silk); font-weight: 700; white-space: nowrap; }
.pb-jicon { flex: none; display: inline-block; width: 15px; height: 15px; border-radius: 50%; background: var(--pb-jack-out); box-shadow: 0 0 0 1px #0a0907; }
.pb-jicon[data-st="out"] { filter: brightness(.95); }
.pb-jicon[data-st="none"] { background: var(--pb-jack-none); }
.pb-jicon[data-st="nocap"] { width: 12px; height: 12px; margin: 0 1.5px; background: var(--pb-jack-nocap); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .8), 0 0 0 1.5px rgba(173, 163, 143, .25); }

/* 線色樣本（圖例、吊牌、開關共用） */
.mode-patchbay .g-linked { --cc: #c8bfae; --ch: #ece5d6; --cw2: #8a8170; }
.mode-patchbay .g-possible { --cc: #9a8240; --ch: #cfb05a; --cw2: #17130d; }
.mode-patchbay .g-unclassified { --cc: #8c3b2d; --ch: #b9503d; --cw2: #4c1c14; }
.mode-patchbay .g-internal { --cc: #64788f; --ch: #8aa1bb; --cw2: #33404f; }
.pb-swatch { flex: none; display: inline-block; width: 26px; height: 8px; border-radius: 4px; align-self: center; background: var(--cc); box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), inset 0 2px 0 rgba(255, 255, 255, .2); }
.pb-swatch.g-possible { background: repeating-linear-gradient(90deg, var(--pb-twist) 0 4px, #15120e 4px 8px); }
.pb-swatch.ret { background: repeating-linear-gradient(90deg, var(--cc) 0 7px, transparent 7px 11px); box-shadow: none; }

/* ── PIP 端子排：未選中的端子與狀態牌壓低一階 ── */
.pb-strip { grid-area: strip; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 8px 8px; }
.pb-striphead { padding: 0 2px 2px 6px; }
.pb-striphead .pb-caption { font-size: 13px; line-height: 1.3; }
.pb-colhead { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 4px; margin: 6px 0 0 -6px; padding: 2px 0 2px 6px; font-size: 12.5px; line-height: 1.25; color: var(--pb-silk-dim); border-bottom: 1px solid rgba(184, 151, 88, .25); text-shadow: 0 0 2px #17181b, 0 0 3px #17181b; }
.pb-colhead span:first-child { padding-left: 31px; }
.pb-colhead span { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-break: anywhere; }
.pb-pips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; flex: 1; gap: 1px; }
.pb-pip { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; column-gap: 4px; padding: 0; transition: opacity .12s; }
.pb-post { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 2px 0 0; cursor: pointer; border-radius: 4px; min-width: 0; }
.pb-post:hover .pb-pipno { color: #fff7e4; }
.pb-nut {
  position: relative; flex: none; width: 26px; height: 26px;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  background: radial-gradient(circle at 50% 50%, #1a140b 0 3px, #8a6c37 3.5px 4.5px, #e2c98f 5px 6px, transparent 6.5px), linear-gradient(160deg, #ecd59c, #b89758 45%, #7a6136 80%, #5a451f);
  filter: brightness(.74) saturate(.8);
}
.pb-post:hover .pb-nut { filter: brightness(.9); }
.pb-post[aria-pressed="true"] .pb-nut { filter: none; background: radial-gradient(circle at 50% 50%, #1a140b 0 3px, #8a6c37 3.5px 4.5px, #fff1c8 5px 6px, transparent 6.5px), linear-gradient(160deg, #fff0c0, #d9bd7f 45%, #8c7040 80%, #5a451f); }
.pb-post[aria-pressed="true"] .pb-pipno { color: #fff3d6; text-decoration: underline 2px var(--pb-brass-hi); text-underline-offset: 3px; }
/* PIP-36：黑色盲塞 */
.pb-pip[data-pip="36"] .pb-nut::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #55565a, #121214 62%); box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .8); }
.pb-posttxt { display: flex; flex-direction: column; min-width: 0; }
.pb-pipno { font: 700 15px/1.15 var(--pb-cond); color: var(--pb-silk); white-space: nowrap; }
.pb-pcnt { font-size: 12px; line-height: 1.15; color: var(--pb-silk-dim); }
.pb-pinfo { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.pb-amt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; font: 15px/1.1 var(--pb-cond); min-width: 0; }
.pb-amt .ev { font-family: var(--pb-cond); line-height: 1.1; }
.pb-apl { font-size: 12.5px; color: var(--pb-silk-dim); }
/* 狀態牌：淡象牙描邊，不再整片填色；只有中途終止（磚紅）與 PIP-36（黑底）保留填色。文字照樣寫出狀態，不靠顏色。 */
.pb-plate { display: inline-block; max-width: 100%; padding: 0 6px; font-size: 12.5px; line-height: 1.2; border-radius: 2px; color: #d3c8b2; background: rgba(236, 227, 204, .07); box-shadow: inset 0 0 0 1px rgba(228, 218, 198, .26); }
.pb-plate.st-in-progress { color: #e2cf9f; box-shadow: inset 0 0 0 1px rgba(220, 196, 142, .5); }
.pb-plate.st-unreported { background: none; color: var(--pb-silk-dim); box-shadow: inset 0 0 0 1px rgba(228, 218, 198, .3); }
.pb-plate.st-attention { background: #5c2219; color: #f3dbd2; box-shadow: inset 0 0 0 1px #8c3b2d; }
.pb-plate.st-reconcile { background: linear-gradient(180deg, #2a2a2d, #0f0f11); color: #f1e6cc; box-shadow: 0 0 0 1px #8a6c37; }
.pb-plate.st-withdrawn { background: rgba(141, 138, 132, .25); color: #c9c5bd; }
.pb-pip[data-state="withdrawn"] { opacity: .55; filter: grayscale(1); }
.pb-pip[data-state="withdrawn"].pb-off { opacity: .25; }

/* ── 跳線（SVG）：線身約 4px、單層陰影；選中的那一筆變粗提亮，同組其他的變淡 ── */
.pb-cord path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pb-cord .c-shadow { stroke: rgba(0, 0, 0, .42); stroke-width: 6; transform: translate(1px, 2.5px); }
.pb-cord .c-body { stroke: var(--cc); stroke-width: 4; }
.pb-cord .c-weave { display: none; }
.pb-cord.g-possible .c-weave { display: inline; stroke: var(--cw2); stroke-width: 4; stroke-dasharray: 3 5; stroke-linecap: butt; opacity: .55; }
.pb-cord.ret .c-body, .pb-cord.ret .c-shadow { stroke-dasharray: 9 6; stroke-linecap: butt; }
.pb-cord.g-possible.ret .c-weave { stroke-dasharray: 3 12; }
.pb-cord.r-pick .c-body { stroke: var(--ch); stroke-width: 5.5; }
.pb-cord.r-pick .c-shadow { stroke-width: 8; stroke: rgba(0, 0, 0, .5); }
.pb-cord.r-pick.g-possible .c-weave { stroke-width: 5.5; opacity: .9; stroke-dasharray: 4 5; }
.pb-cord.r-dim { opacity: .34; }
.pb-cord.r-dim .c-body, .pb-cord.r-dim.g-possible .c-weave { stroke-width: 3; }
.pb-cord.r-dim .c-shadow { stroke-width: 4; }
.pb-cord.r-thin { opacity: .3; }
.pb-cord.r-thin .c-shadow { stroke-width: 3.5; transform: translate(1px, 2px); }
.pb-cord.r-thin .c-body, .pb-cord.r-thin.g-possible .c-weave { stroke-width: 2.4; }
.pb-cord.r-thin.g-possible .c-weave { stroke-dasharray: 2 3; }
@keyframes pb-dip { 0% { transform: translateY(0); } 45% { transform: translateY(4px); } 100% { transform: translateY(0); } }
body[data-motion="on"] .mode-patchbay .pb-cord.fresh { animation: pb-dip .15s ease-out; }
.pb-plug .p-collar { fill: var(--cc); stroke: #0b0907; stroke-width: 1; }
.pb-plug .p-boot { fill: #1c1815; stroke: #8f7444; stroke-width: 1.4; }
.pb-plug .p-shine { fill: rgba(255, 250, 235, .26); }
.pb-plug.r-pick .p-collar { fill: var(--ch); }
.pb-plug.r-pick .p-boot { stroke: var(--pb-brass-hi); }
.pb-plug.hang .p-boot { fill: #1c1815; stroke: none; }
.pb-plug.r-dim, .pb-plug.r-thin { opacity: .55; }

/* ── 檢驗吊牌：淺暖紙色；黃銅只留孔眼與夾子（桌機掛在右側；平板與手機是底部抽屜）── */
.pb-tagcol { position: relative; min-width: 0; }
.pb-handle, .pb-docksw { display: none; }
.pb-tagwrap { position: sticky; top: 4px; display: flex; flex-direction: column; align-items: stretch; max-height: calc(100vh - var(--mast, 52px) - 18px); }
.pb-taghook { position: relative; flex: none; height: 30px; }
.pb-taghook::before { content: ""; position: absolute; left: 50%; top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; border: 3px solid #b89758; background: #1a0e08; box-shadow: 0 2px 3px rgba(0, 0, 0, .7); }
.pb-taghook::after { content: ""; position: absolute; left: 50%; top: 13px; width: 2px; height: 22px; margin-left: -1px; background: repeating-linear-gradient(180deg, #d9cba8 0 3px, #9a8a66 3px 5px); }
.pb-tagcard {
  position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 30px 14px 16px; color: var(--pb-ink);
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%, 0 16px);
  background:
    radial-gradient(circle at 50% 14px, #1a0e08 0 5.5px, #6f5630 6px 8.5px, #e9d49d 9px 10px, #8a6c37 10.5px 11px, transparent 11.5px),
    linear-gradient(178deg, var(--pb-paper), var(--pb-paper-lo));
  box-shadow: inset 0 0 0 1px rgba(60, 40, 10, .35);
  scrollbar-color: #9a8358 transparent;
}
@keyframes pb-slide { from { transform: translateX(12px); opacity: .6; } to { transform: none; opacity: 1; } }
body[data-motion="on"] .mode-patchbay .pb-tagcard.pb-slide { animation: pb-slide .15s ease-out; }
.mode-patchbay .pb-tagcard .ev { color: var(--pb-ink); border-bottom-color: rgba(31, 23, 12, .5); }
.mode-patchbay .pb-tagcard .ev:hover { border-bottom-color: var(--pb-ink); }
.mode-patchbay .pb-tagcard .ev .unit { color: var(--pb-ink-soft); }
.mode-patchbay .pb-tagcard .socket { color: var(--pb-ink-soft); }
.pb-thead { margin-bottom: 8px; }
.pb-back { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 32px; margin: -6px 0 6px; padding: 2px 10px; border-radius: 3px; cursor: pointer; font: 700 14px/1.2 var(--pb-sans); color: var(--pb-ink); background: rgba(42, 30, 12, .08); box-shadow: inset 0 0 0 1px rgba(42, 30, 12, .4); }
.pb-back:hover { background: rgba(42, 30, 12, .14); }
.pb-tkick { margin: 0; display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 13px; font-weight: 600; color: var(--pb-ink-soft); }
.pb-tdefault { margin: 2px 0 0; font-size: 13px; font-style: italic; line-height: 1.35; color: #5a4520; }
.pb-ttitle { margin: 0; font: 800 22px/1.2 var(--pb-sans); color: var(--pb-ink); }
.pb-ttitle:focus { outline: none; }
.pb-tsubs { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.pb-tsub { margin: 2px 0 0; font-size: 14px; line-height: 1.35; color: #34280f; overflow-wrap: anywhere; }
.pb-count { font-weight: 600; }
.pb-tsmall { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--pb-ink-soft); overflow-wrap: anywhere; }
.pb-scope, .pb-termout { margin: 6px 0 0; padding: 3px 8px; font-size: 13px; line-height: 1.4; color: #3a2d12; border-radius: 2px; background: rgba(42, 30, 12, .06); box-shadow: inset 2px 0 0 #8a6c37; }
.pb-termout { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pb-addr { font-size: 14px; font-weight: 600; color: var(--pb-ink); }
.pb-pstate { margin-bottom: 4px; }
.pb-tplate { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 2px 8px; font-size: 14px; font-weight: 600; line-height: 1.35; border-radius: 2px; color: #231a0e; background: #e9e0c9; box-shadow: 0 0 0 1px #2a1e0c; }
.pb-tplate.st-in-progress { background: #efe0b4; }
.pb-tplate.st-unreported { background: transparent; box-shadow: inset 0 0 0 1px #2a1e0c; }
.pb-tplate.st-attention { background: #6e271e; color: #f8e9de; }
.pb-tplate.st-reconcile { background: #141416; color: #f1e6cc; }
.pb-tplate.st-withdrawn { background: #7d7a74; color: #121110; }
.pb-blind { flex: none; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6a6b70, #121214 62%); box-shadow: 0 0 0 1.5px #8a6c37; }
.pb-tnote { margin: 0 0 8px; font-size: 14px; line-height: 1.4; color: #2e230d; }
.pb-tsec { margin: 10px 0 0; padding-top: 8px; border-top: 1.5px dashed rgba(42, 30, 12, .3); }
.pb-tsech { margin: 0 0 6px; font: 700 14px/1.25 var(--pb-sans); color: var(--pb-ink-soft); }
.pb-kv { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 10px; padding: 2px 0; font-size: 15px; }
.pb-k { font-size: 13.5px; color: var(--pb-ink-soft); min-width: 0; }
.pb-v { text-align: right; margin-left: auto; min-width: 0; }
.pb-na { font-size: 13.5px; color: var(--pb-ink-soft); font-style: italic; }
.pb-tnone, .pb-tempty { margin: 0; font-size: 14px; font-style: italic; color: #3a2d12; }
.pb-warn { color: #6b1d12 !important; }
.pb-gsum { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; font-size: 13.5px; }
.pb-gsitem { display: inline-flex; align-items: center; gap: 5px; }
.pb-gsitem b { font-weight: 800; }

/* 答案：吊牌上最亮的一塊。 */
.pb-answer { margin: 10px 0 2px; padding: 9px 10px 10px 12px; border-radius: 3px; background: #fffbf2; box-shadow: inset 4px 0 0 var(--cc), 0 0 0 1px rgba(42, 30, 12, .45), 0 2px 4px rgba(42, 30, 12, .18); }
.pb-answer.g-possible { box-shadow: inset 4px 0 0 #15120e, inset 8px 0 0 var(--pb-twist), 0 0 0 1px rgba(42, 30, 12, .45), 0 2px 4px rgba(42, 30, 12, .18); }
.pb-anav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 4px; }
.pb-apos { margin: 0; font: 700 13px/1.3 var(--pb-sans); color: var(--pb-ink-soft); }
.pb-apos:focus { outline: none; }
.pb-apos:focus-visible { outline: 2px solid var(--pb-ink); outline-offset: 2px; }
.pb-steps { display: inline-flex; gap: 4px; margin-left: auto; }
.pb-step { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 30px; padding: 2px 8px; border-radius: 3px; cursor: pointer; font: 700 13px/1.2 var(--pb-sans); color: var(--pb-ink); box-shadow: inset 0 0 0 1px rgba(42, 30, 12, .45); background: rgba(42, 30, 12, .04); }
.pb-step:hover:not([disabled]) { background: rgba(42, 30, 12, .12); }
.pb-step[disabled] { cursor: default; opacity: .38; }
.pb-adate { margin: 0; font-size: 14px; font-weight: 600; color: #2a1f0c; }
.pb-aamt { margin: 1px 0 2px; font: 800 22px/1.2 var(--pb-sans); color: var(--pb-ink); overflow-wrap: anywhere; }
.pb-aamt .ev { white-space: normal; }
.pb-aamt .ev .unit { font-size: 14px; }
.pb-aflow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: 14px; color: var(--pb-ink-soft); }
.pb-apip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 3px 0 0; font-size: 14.5px; font-weight: 600; color: var(--pb-ink); }
.pb-apip b { font-weight: 800; }
.pb-abasis { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 5px; }
.pb-acaveat { margin: 6px 0 0; font-size: 13.5px; font-weight: 700; line-height: 1.35; color: #2e230d; }
.pb-anote { margin: 4px 0 0; font-size: 13px; line-height: 1.35; color: var(--pb-ink-soft); }
.pb-ago { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pb-go { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 34px; padding: 3px 10px; border-radius: 3px; cursor: pointer; font: 700 14px/1.2 var(--pb-sans); color: var(--pb-silk); background: linear-gradient(180deg, #2b2c31, #17181b); box-shadow: 0 0 0 1px #0a0907, 0 0 0 2px #6e5630, 0 2px 3px rgba(0, 0, 0, .3); }
.pb-go:hover { background: linear-gradient(180deg, #34353b, #1d1e22); }

/* 逐筆清單：一列兩行，第二行右邊是「看這一筆」。 */
.pb-trs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pb-tr { padding: 6px 4px 6px 8px; border-bottom: 1px dashed rgba(42, 30, 12, .25); box-shadow: inset 3px 0 0 var(--cc); }
.pb-tr.g-possible { box-shadow: inset 3px 0 0 #15120e; }
.pb-tr.pb-picked { background: rgba(42, 30, 12, .07); }
.pb-trtop { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 14.5px; }
.pb-trtop .ev { margin-left: auto; }
.pb-trdate { font-size: 13.5px; font-weight: 600; color: #2a1f0c; }
.pb-trbot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-top: 2px; }
.pb-trmeta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; font-size: 13px; color: var(--pb-ink-soft); }
.pb-trp { font-weight: 700; color: var(--pb-ink); }
.pb-view { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 30px; margin-left: auto; padding: 2px 7px; border-radius: 3px; cursor: pointer; font: 700 13px/1.2 var(--pb-sans); color: var(--pb-ink); box-shadow: inset 0 0 0 1px rgba(42, 30, 12, .5); background: rgba(255, 252, 244, .6); }
.pb-view:hover { background: #fffbf2; }
.pb-view[aria-pressed="true"] { color: var(--pb-silk); background: #2b2318; box-shadow: inset 0 0 0 1px #0a0907; }
.pb-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; font-size: 13.5px; color: var(--pb-ink-soft); }
.pb-mini { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 28px; padding: 1px 9px; border-radius: 3px; cursor: pointer; font: 700 13px/1.2 var(--pb-sans); color: var(--pb-ink); box-shadow: inset 0 0 0 1px rgba(42, 30, 12, .5); }
.pb-mini:hover { background: rgba(42, 30, 12, .1); }
.pb-retmark { padding: 0 5px; border: 1px dashed #2a1e0c; border-radius: 2px; font-size: 12.5px; font-weight: 700; color: var(--pb-ink); }
.pb-trwhy { font-size: 13.5px; line-height: 1.38; color: #2e230d; }
.pb-chip { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.pb-chip.g-linked { background: #efe9dc; color: #231c10; box-shadow: 0 0 0 1px #6a604c; }
.pb-chip.g-possible { padding-left: 13px; color: #15110a; box-shadow: 0 0 0 1px #15120e; background: repeating-linear-gradient(180deg, #15120e 0 3px, #a68c42 3px 6px) 0 0 / 7px 100% no-repeat, #e6d293; }
.pb-chip.g-unclassified { background: #8c3b2d; color: #fbeee6; }
.pb-chip.g-internal { background: #4c5f73; color: #f4f6f8; }

/* 次要數字：<details> 預設收起。 */
.pb-more { margin-top: 12px; border-top: 1.5px dashed rgba(42, 30, 12, .3); }
.pb-moresum { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 0 0; cursor: pointer; list-style: none; font: 700 14px/1.25 var(--pb-sans); color: var(--pb-ink-soft); }
.pb-moresum::-webkit-details-marker { display: none; }
.pb-moresum::before { content: "▸"; display: inline-block; width: 12px; font-size: 12px; }
.pb-more[open] > .pb-moresum::before { content: "▾"; }
.pb-moresum:hover { color: var(--pb-ink); }
.pb-more > .pb-tsec:first-of-type { margin-top: 2px; border-top: 0; padding-top: 2px; }
.pb-tactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pb-tactions .pb-link { background: linear-gradient(180deg, #2b2c31, #17181b); color: var(--pb-silk); border-color: #0a0907; box-shadow: 0 0 0 1px #6e5630, 0 2px 3px rgba(0, 0, 0, .3); }

/* ── 刊頭：胡桃木＋黃銅 ── */
body[data-view="patchbay"] .ld-mast {
  background-color: #2a1810;
  background-image: var(--pb-grain), linear-gradient(180deg, #3a2316, #2a1810 55%, #1f110a);
  background-size: 900px 480px, 100% 100%;
  border-bottom: 2px solid #b89758; box-shadow: 0 3px 0 #140a05, 0 8px 18px rgba(0, 0, 0, .5);
}
body[data-view="patchbay"] .mast-title, body[data-view="patchbay"] .mast-sa { color: #f2e7cd; }
body[data-view="patchbay"] .mast-db { color: #d9bd80; }
body[data-view="patchbay"] .mast-sub { color: #dccdae; }
body[data-view="patchbay"] :is(.mast-btn, .mast-tables, .mast-modes) {
  color: #1f170c; border-color: #4b3818;
  background: linear-gradient(176deg, #dcc48e, #c3a466 35%, #a98a4a);
  box-shadow: inset 0 1px 0 rgba(255, 245, 210, .55), 0 2px 3px rgba(0, 0, 0, .45);
}
body[data-view="patchbay"] :is(.mast-btn, .mast-tables, .mast-modes):hover { filter: brightness(1.06); border-color: #2a1e0c; }
body[data-view="patchbay"] .mast-select {
  color: #f2e7cd; border-color: #b89758;
  background-image: linear-gradient(45deg, transparent 50%, #dcc48e 50%), linear-gradient(135deg, #dcc48e 50%, transparent 50%), linear-gradient(180deg, #3a2316, #24140c);
}
body[data-view="patchbay"] .ld-mast :focus-visible { outline-color: #f2dfa4; }

/* ── 桌機一屏放下：長語言的端子排與圖例比中文高。modes.mjs 的 fitDesk 量過才逐級加上 fit1…fit4，
   最後一級還放不下才把整片面板等比縮小（最小 0.9 倍）。fit1 間距、fit2 次要字級、fit3 收起重複的說明、fit4 圖例只留線色與名稱。 */
.mode-patchbay[data-layout="desk"] :is(.pb-pip, .pb-colhead) { grid-template-columns: 92px minmax(0, 1fr); }
.mode-patchbay[data-layout="desk"] .pb-pcnt { white-space: nowrap; }
.mode-patchbay.fit1[data-layout="desk"] .pb-frame { padding: 4px 12px 6px; gap: 6px; }
.mode-patchbay.fit1[data-layout="desk"] .pb-board { padding: 10px 12px; gap: 8px 12px; }
.mode-patchbay.fit1[data-layout="desk"] .pb-strip { padding: 8px 8px 6px 6px; gap: 2px; }
.mode-patchbay.fit1[data-layout="desk"] .pb-pips { gap: 0; }
.mode-patchbay.fit1[data-layout="desk"] .pb-post { min-height: 28px; }
.mode-patchbay.fit1[data-layout="desk"] .pb-vaults { gap: 10px; }
.mode-patchbay.fit1[data-layout="desk"] .pb-vault { padding: 8px 8px 6px; }
.mode-patchbay.fit1[data-layout="desk"] :is(.pb-base, .pb-fieldhead) { gap: 6px; }
.mode-patchbay.fit1[data-layout="desk"] .pb-legend { gap: 1px; line-height: 1.25; }
.mode-patchbay.fit1[data-layout="desk"] .pb-legline { gap: 1px 14px; }
.mode-patchbay.fit2[data-layout="desk"] :is(.pb-caption, .pb-legend, .pb-swlabs, .pb-racksub, .pb-gatelab, .pb-capnote) { font-size: 12.5px; }
.mode-patchbay.fit2[data-layout="desk"] .pb-lede { font-size: 13.5px; }
.mode-patchbay.fit2[data-layout="desk"] :is(.pb-pcnt, .pb-plate) { font-size: 11.5px; }
.mode-patchbay.fit2[data-layout="desk"] :is(.pb-pipno, .pb-amt) { font-size: 14px; }
.mode-patchbay.fit2[data-layout="desk"] .pb-colhead { font-size: 12px; }
.mode-patchbay.fit2[data-layout="desk"] .pb-cal .pb-jval { font-size: 13.5px; }
.mode-patchbay.fit2[data-layout="desk"] .pb-cal .pb-none { font-size: 12.5px; }
.mode-patchbay.fit2[data-layout="desk"] .pb-gate { min-height: 30px; }
.mode-patchbay.fit2[data-layout="desk"] .pb-gname { font-size: 13.5px; }
/* fit3：月份插孔的說明與端子排的副標，吊牌都講過了。 */
.mode-patchbay.fit3[data-layout="desk"] :is(.pb-fieldhead .pb-caption, .pb-striphead .pb-caption) { display: none; }
/* fit4：圖例只留線色與名稱；說明移到滑過時的提示，報讀軟體照樣念得到。 */
.mode-patchbay.fit4[data-layout="desk"] .pb-legdesc { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── 桌機：金庫｜月份插孔｜PIP 端子排＋右側吊牌 ── */
.mode-patchbay[data-layout="desk"] .pb-body { display: grid; grid-template-columns: minmax(0, 1fr) 284px; gap: 12px; align-items: stretch; flex: 1; }
/* 吊牌欄不撐高版面：高度跟著面板，內容在牌子裡捲。 */
.mode-patchbay[data-layout="desk"] .pb-tagcol { contain: size; }
.mode-patchbay[data-layout="desk"] .pb-tagwrap { height: 100%; max-height: calc(100vh - var(--mast, 52px) - 18px); }
.mode-patchbay[data-layout="desk"] .pb-board {
  grid-template-columns: 160px minmax(0, 1fr) 252px; grid-template-rows: auto 1fr auto; padding: 14px 14px 14px; gap: 10px 14px;
  grid-template-areas: "vaults head strip" "vaults jacks strip" "rating base strip";
  min-height: calc(100vh - var(--mast, 52px) - 70px);
}

/* ── 平板：金庫表頭移到上方，月份陣列＋PIP 端子兩欄，吊牌是底部抽屜 ── */
.mode-patchbay[data-layout="tab"] .pb-board {
  grid-template-columns: minmax(0, 1fr) 262px;
  grid-template-areas: "vaults rating" "head head" "jacks strip" "base strip";
  align-items: start;
}
.mode-patchbay[data-layout="tab"] .pb-vaults { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-patchbay[data-layout="tab"] .pb-jacks { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 6px; align-self: stretch; align-content: start; }
.mode-patchbay[data-layout="tab"] .pb-strip { align-self: stretch; }
.mode-patchbay[data-layout="tab"] .pb-rating { align-self: stretch; }
.mode-patchbay[data-layout="tab"] .pb-capnote::after { content: none; }
.mode-patchbay[data-layout="tab"] .pb-capnote-t { text-align: left; order: -1; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-vsock { top: 6px; bottom: auto; width: 46px; height: 46px; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-vault[data-v="treasury"] .pb-vsock { right: 6px; left: auto; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-vault[data-v="fund"] .pb-vsock { left: 6px; right: auto; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-vault[data-v="treasury"] .pb-vhead { padding-right: 48px; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-vault[data-v="fund"] .pb-vhead { padding: 0 2px 0 50px; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-vault[data-v="treasury"] .pb-vrow:last-child { padding-right: 0; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-vhead { min-height: 44px; }
.mode-patchbay:is([data-layout="tab"], [data-layout="phone"]) .pb-bigsock { width: 38px; height: 38px; }
.mode-patchbay:not([data-layout="desk"]) .pb-body { display: block; }
.mode-patchbay:not([data-layout="desk"]) .pb-frame { padding-bottom: 0; }
.mode-patchbay:not([data-layout="desk"]) .pb-tagcol {
  position: sticky; bottom: 0; z-index: 6; margin: 12px -14px 0; padding: 6px 12px calc(8px + env(safe-area-inset-bottom));
  background-color: #2a1810; background-image: var(--pb-grain), linear-gradient(180deg, #33201a, #22130b);
  border-top: 2px solid #b89758; box-shadow: 0 -8px 18px rgba(0, 0, 0, .55);
}
.mode-patchbay:not([data-layout="desk"]) .pb-handle {
  all: unset; box-sizing: border-box; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; width: 100%; min-height: 44px; padding: 4px 8px; cursor: pointer; border-radius: 4px;
  color: var(--pb-silk);
}
.mode-patchbay:not([data-layout="desk"]) .pb-handle:hover { background: rgba(255, 248, 230, .05); }
.pb-hglyph { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--pb-ink); background: var(--pb-brass-face); box-shadow: 0 0 0 1px #2a1e0c; font-size: 15px; }
.pb-htxt { display: flex; flex-direction: column; min-width: 0; }
.pb-hkick { font-size: 12.5px; color: var(--pb-silk-dim); }
.pb-htitle { font: 700 16px/1.2 var(--pb-sans); }
.pb-hpick { margin-left: auto; font: 700 15px/1.2 var(--pb-sans); color: #fff3d6; }
.pb-handle .pb-gsum { margin: 0; color: var(--pb-silk); }
.mode-patchbay:not([data-layout="desk"]) .pb-tagwrap { position: static; max-height: min(62vh, 580px); padding-top: 4px; }
.mode-patchbay:not([data-layout="desk"]) .pb-taghook { display: none; }
.mode-patchbay:not([data-layout="desk"]) .pb-tagcard { clip-path: none; border-radius: 4px; padding-top: 16px; background: linear-gradient(178deg, var(--pb-paper), var(--pb-paper-lo)); }

/* ── 手機：上方兩座金庫，中間左邊月份插孔、右邊 PIP 端子，跳線跨在中間 ── */
.mode-patchbay[data-layout="phone"] .pb-frame { padding: 8px 8px 0; gap: 8px; }
.mode-patchbay[data-layout="phone"] .pb-rail { gap: 6px 10px; }
.mode-patchbay[data-layout="phone"] .pb-lede { flex-basis: 100%; font-size: 14px; }
.mode-patchbay[data-layout="phone"] .pb-railbtn { min-height: 44px; }
.mode-patchbay[data-layout="phone"] .pb-board {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 14px 42px; padding: 14px 10px 14px;
  grid-template-areas: "vaults vaults" "head head" "jacks strip" "rating rating" "base base";
  align-items: start;
}
.mode-patchbay[data-layout="phone"] .pb-vaults { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-patchbay[data-layout="phone"] .pb-vault { padding: 10px 8px 8px; }
.mode-patchbay[data-layout="phone"] .pb-vhead { padding-top: 2px; }
.mode-patchbay[data-layout="phone"] .pb-vname { font-size: 15px; }
.mode-patchbay[data-layout="phone"] .pb-vrow .pb-big { font-size: 15px; }
.mode-patchbay[data-layout="phone"] .pb-jacks { display: flex; flex-direction: column; gap: 0; padding: 0; }
.mode-patchbay[data-layout="phone"] .pb-jack { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; text-align: left; padding: 3px 0 5px; border-bottom: 1px solid rgba(228, 218, 198, .07); }
.mode-patchbay[data-layout="phone"] .pb-jbtn { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lab sock" "stub sock"; align-items: center; justify-items: start; gap: 2px 6px; width: 100%; min-height: 44px; padding: 0; }
.mode-patchbay[data-layout="phone"] .pb-mlab { grid-area: lab; font-size: 15px; }
.mode-patchbay[data-layout="phone"] .pb-stubs { grid-area: stub; }
.mode-patchbay[data-layout="phone"] .pb-socket { grid-area: sock; width: 32px; height: 32px; }
.mode-patchbay[data-layout="phone"] .pb-jval { align-items: flex-start; padding-right: 38px; }
/* 手機沒有滑過：沒選中的月份連位置都不留，清單短一半。 */
.mode-patchbay[data-layout="phone"] .pb-jack:not(.pb-on) :is(.pb-jval, .pb-stubs) { display: none; }
.mode-patchbay[data-layout="phone"] .pb-jack:not(.pb-on) .pb-jbtn { grid-template-areas: "lab sock"; }
.mode-patchbay[data-layout="phone"] .pb-capnote { padding: 8px 0 6px; }
.mode-patchbay[data-layout="phone"] .pb-capnote::after { content: "↓"; }
.mode-patchbay[data-layout="phone"] .pb-capnote::before { display: none; }
.mode-patchbay[data-layout="phone"] .pb-capnote-t { text-align: left; }
.mode-patchbay[data-layout="phone"] .pb-strip { align-self: stretch; padding: 10px 8px 10px 0; background: none; box-shadow: none; }
.mode-patchbay[data-layout="phone"] .pb-striphead { padding-left: 4px; }
.mode-patchbay[data-layout="phone"] .pb-pips { justify-content: flex-start; gap: 16px; }
.mode-patchbay[data-layout="phone"] .pb-pip { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
.mode-patchbay[data-layout="phone"] .pb-post { min-height: 44px; margin-left: -4px; }
.mode-patchbay[data-layout="phone"] .pb-pinfo { padding-left: 2px; }
.mode-patchbay[data-layout="phone"] .pb-base { gap: 0; }
.mode-patchbay[data-layout="phone"] .pb-rack { grid-template-columns: minmax(0, 1fr); }
.mode-patchbay[data-layout="phone"] .pb-hooks { display: none; }
.mode-patchbay[data-layout="phone"] .pb-bank { display: none; }
.mode-patchbay[data-layout="phone"] .pb-legend { padding: 10px 4px 2px; }
.mode-patchbay[data-layout="phone"] .pb-docksw { display: flex; gap: 4px; align-items: stretch; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-basis { flex: 1 1 auto; gap: 2px; flex-wrap: nowrap; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-sw { flex: 1 1 0; padding: 2px 2px 2px 0; gap: 3px; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-lever { transform: scale(.85); transform-origin: 50% 50%; width: 20px; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-swdesc { display: none; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-swname { font-size: 13.5px; gap: 1px 4px; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-swatch { width: 18px; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-reset { min-width: 48px; padding: 0 2px; }
.mode-patchbay[data-layout="phone"] .pb-tagcol { margin: 10px -8px 0; padding: 4px 8px calc(6px + env(safe-area-inset-bottom)); }
.mode-patchbay[data-layout="phone"] .pb-tagcard { padding: 14px 12px 14px; }
.mode-patchbay[data-layout="phone"] :is(.pb-gate, .pb-post, .pb-jbtn, .pb-sw, .pb-reset, .pb-handle, .pb-link, .pb-vsock, .pb-view, .pb-step, .pb-go, .pb-back, .pb-mini, .pb-moresum) { min-height: 44px; }
/* 手機第一屏要看得到月份與 PIP 之間的跳線：頂部收緊。 */
.mode-patchbay[data-layout="phone"] .pb-maker { display: none; }
.mode-patchbay[data-layout="phone"] .pb-lede { font-size: 13.5px; line-height: 1.35; }
.mode-patchbay[data-layout="phone"] .pb-capture { flex: 1 1 0; min-width: 0; font-size: 13px; padding: 3px 8px; }
.mode-patchbay[data-layout="phone"] .pb-railbtn { font-size: 14px; padding: 4px 10px; }
.mode-patchbay[data-layout="phone"] .pb-vault { gap: 4px; }
.mode-patchbay[data-layout="phone"] .pb-vhead { min-height: 40px; align-content: center; }
.mode-patchbay[data-layout="phone"] .pb-vault[data-v="fund"] .pb-vhead { padding-left: 46px; }
.mode-patchbay[data-layout="phone"] .pb-vault[data-v="treasury"] .pb-vhead { padding-right: 44px; }
.mode-patchbay[data-layout="phone"] .pb-vsock { top: 2px; width: 44px; height: 44px; }
.mode-patchbay[data-layout="phone"] .pb-bigsock { width: 34px; height: 34px; }
.mode-patchbay[data-layout="phone"] .pb-meter { max-width: 118px; }
.mode-patchbay[data-layout="phone"] .pb-vrow { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.mode-patchbay[data-layout="phone"] .pb-vrow dt { font-size: 12.5px; }
.mode-patchbay[data-layout="phone"] .pb-caption { font-size: 13px; }
.mode-patchbay[data-layout="phone"] .pb-gates { gap: 6px; }
.mode-patchbay[data-layout="phone"] .pb-gate { flex: 1 1 auto; padding: 3px 6px 3px 20px; }
.mode-patchbay[data-layout="phone"] .pb-gflag { left: 6px; }
.mode-patchbay[data-layout="phone"] .pb-gname { font-size: 13.5px; line-height: 1.15; }
.mode-patchbay[data-layout="phone"] .pb-hkick { display: none; }
.mode-patchbay[data-layout="phone"] .pb-handle { gap: 2px 10px; }

.mode-patchbay[data-layout="phone"] .pb-fieldtitle .pb-h3 { display: none; }
.mode-patchbay[data-layout="phone"] .pb-striphead .pb-caption { display: none; }
.mode-patchbay[data-layout="phone"] .pb-colhead { display: block; margin-left: -4px; padding-left: 4px; }
.mode-patchbay[data-layout="phone"] .pb-colhead span:first-child { display: none; }
.mode-patchbay[data-layout="phone"] .pb-railbtn { display: none; }
.mode-patchbay[data-layout="phone"] .pb-vsig { display: none; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-swname { font-size: 12px; line-height: 1.15; letter-spacing: -.005em; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-swmeta { font-size: 12.5px; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-sw { min-height: 44px; align-items: center; }
.mode-patchbay[data-layout="phone"] .pb-handle .pb-gsum { flex-basis: 100%; gap: 2px 10px; font-size: 12.5px; padding-left: 40px; }
.mode-patchbay[data-layout="phone"] .pb-handle .pb-gsum .pb-swatch { width: 18px; height: 7px; }
.mode-patchbay[data-layout="phone"] .pb-hglyph { width: 28px; height: 28px; }
.mode-patchbay[data-layout="phone"] .pb-legline { gap: 2px 12px; }
.pb-pcnt, .pb-resetlab { hyphens: auto; overflow-wrap: anywhere; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-reset { flex: 0 1 64px; min-width: 0; }
.mode-patchbay[data-layout="phone"] .pb-docksw .pb-resetlab { font-size: 12.5px; text-align: center; line-height: 1.1; }
