/* ui-v3 · 02 出招 */
.rot { height: 100%; display: grid; grid-template-columns: 288px minmax(0, 1fr) 372px; grid-template-rows: auto minmax(0, 1fr); }

/* ── 走帶列 ─────────────────────────── */
.tp { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 12, 16, .7), rgba(6, 7, 10, .3)); }
.tp > * { padding: 10px 20px 10px; border-right: 1px solid var(--line); min-width: 0; }
.tp-main { display: flex; flex-direction: column; gap: 3px; min-width: 300px; }
.tp-big { font-size: 54px; font-weight: 900; line-height: .9; letter-spacing: -.005em; margin-top: 3px; }
.tp-sub { font-size: 10.5px; color: var(--dim); }
.tp-kv { display: flex; align-items: stretch; padding-left: 0; padding-right: 0; }
.tp-kv > div { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 22px; }
.tp-kv > div + div { border-left: 1px solid var(--line); }
.tp-kv b.num { font-size: 28px; font-weight: 700; line-height: 1; }
.tp-kv b.num small { font-size: 15px; color: var(--dim); font-weight: 600; }
.tp-kv .mono { font-size: 10.5px; }
.tp-mix { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.mixbar { display: flex; gap: 2px; height: 10px; }
.mixbar i { flex-basis: 0; background: var(--c); border-radius: 1px; box-shadow: 0 0 14px -2px var(--c); transition: flex-grow var(--t4) var(--ease); }
.mixlg { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--fg2); }
.mixlg span { display: inline-flex; align-items: center; }
.mixlg i { width: 7px; height: 7px; background: var(--c); transform: rotate(45deg); margin-right: 7px; box-shadow: 0 0 8px var(--c); }
.mixlg b { margin-left: 7px; font-size: 11.5px; color: var(--fg); font-weight: 600; }
.typebar { display: flex; gap: 2px; height: 4px; }
.typebar i { flex-basis: 0; min-width: 2px; background: var(--t); border-radius: 1px; transition: flex-grow var(--t4) var(--ease); }
.typebar i.other { background: repeating-linear-gradient(90deg, var(--t) 0 2px, transparent 2px 4px); }
.typelg { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: -2px; font-size: 11px; color: var(--fg2); }
.typelg span { display: inline-flex; align-items: center; white-space: nowrap; }
.typelg i { width: 7px; height: 7px; margin-right: 6px; border-radius: 1px; background: var(--t); }
.typelg .other i { background: transparent; border: 1px dashed var(--t); }
.typelg b { margin-left: 6px; font-size: 10.5px; color: var(--fg); font-weight: 500; }
.tp-ctl { display: flex; flex-direction: column; justify-content: center; gap: 8px; border-right: 0 !important; width: 280px; }
.tp-enemy { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--s2); text-align: left; min-width: 0; transition: border-color var(--t1), background var(--t1); }
.tp-enemy:hover { border-color: var(--line3); background: var(--s3); }
.tp-enemy > svg { width: 18px; height: 18px; color: var(--dim); margin: 0 4px; }
.tp-enemy b { display: block; font-size: 13px; }
.tp-enemy small { display: block; font-size: 11px; color: var(--dim); }
.tp-enemy.none { border-style: dashed; }
.opts-pop { width: 420px; padding: 8px; }
.opts-g { padding: 4px 0; }
.opts-g + .opts-g { border-top: 1px solid var(--line); }
.opts-g > .lbl { display: block; padding: 6px 10px 2px; }

/* ── 招式庫 ─────────────────────────── */
.lib { --c: var(--sig); grid-row: 2; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.lib-tabs { display: flex; gap: 4px; padding: 12px 12px 8px; flex-shrink: 0; }
.lib-tab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 8px 4px 7px; border: 1px solid transparent; border-radius: var(--r2); font-size: 11.5px; color: var(--dim); transition: background var(--t2), border-color var(--t2), color var(--t1); }
.lib-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-tab .av { transition: transform var(--t3) var(--spring), box-shadow var(--t2); filter: grayscale(.6); }
.lib-tab:hover { background: var(--s2); color: var(--fg2); }
.lib-tab.on { border-color: color-mix(in oklab, var(--c) 45%, transparent); background: color-mix(in oklab, var(--c) 9%, transparent); color: var(--fg); }
.lib-tab.on .av { transform: scale(1.12); filter: none; box-shadow: 0 0 0 1.5px var(--c), 0 0 16px -2px var(--c); }
.lib-state { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 4px 14px 10px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.lib-st { font-size: 11.5px; color: var(--c); text-align: right; }
.lib-q { margin: 10px 12px 2px; height: 30px; flex-shrink: 0; }
.lib-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 8px 28px 10px; }
.lib-g { display: flex; flex-direction: column; gap: 1px; padding-top: 10px; }
.lib-gh { display: flex; justify-content: space-between; padding: 4px 6px 6px; }
.lib-gh span { color: var(--faint); }
.mv { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 14px; align-items: center; gap: 9px; padding: 5px 8px 5px 5px; border: 1px solid transparent; border-radius: var(--r2); text-align: left; transition: background var(--t1), border-color var(--t1), transform var(--t1) var(--ease); }
.mv:hover { background: var(--s3); border-color: var(--line); }
.mv:active { transform: scale(.98); }
.mv-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r2); overflow: hidden; background: radial-gradient(circle at 50% 70%, color-mix(in oklab, var(--c) 18%, transparent), transparent 70%), var(--s3); box-shadow: inset 0 0 0 1px var(--line2); color: var(--dim); font-size: 11px; }
.mv-ico img { width: 22px; height: 22px; }
.mv-tx { min-width: 0; }
.mv-tx b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.mv-tx small { font-size: 10.5px; color: var(--dim); }
.mv-m { font-size: 17px; font-weight: 600; color: var(--fg2); line-height: 1; }
.mv-m small { font-size: 10px; color: var(--dim); }
.mv.top .mv-m { color: var(--c); font-weight: 800; }
.mv.top .mv-tx b { font-weight: 700; }
.mv-add, .mv-lock { width: 14px; height: 14px; }
.mv-add { color: transparent; transition: color var(--t2); }
.mv:hover .mv-add, .mv:focus-visible .mv-add { color: var(--sig); }
.mv.blocked { opacity: .42; }
.mv-lock { color: var(--warn); }
.lib-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 4px; }

/* ── 舞台:時間軸 + 序列 ─────────────── */
.stage { grid-row: 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.stage > * { flex-shrink: 0; }
.tl { padding: 10px 18px 4px; }
.tl-hint { font-size: 11px; margin-right: 8px; }
.tl-z { font-size: 10.5px; color: var(--dim); min-width: 38px; text-align: center; }
.tl-empty .empty { min-height: 200px; }
.tl-body { margin-top: 8px; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--r2); background: rgba(4, 5, 7, .6); }
.tl-inner { position: relative; min-width: 100%; }
.tl-ruler { display: flex; height: 22px; border-bottom: 1px solid var(--line); cursor: ew-resize; user-select: none; touch-action: none; }
.tl-rh { position: sticky; left: 0; z-index: 4; display: flex; align-items: center; width: 96px; flex-shrink: 0; padding-left: 12px; background: var(--bg); border-right: 1px solid var(--line); font-size: 9px; }
.tl-rt { position: relative; flex: 1 1 auto; }
.tl-rt span { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-end; padding: 0 0 4px 4px; font: 400 9.5px var(--f-mono); color: var(--dim); pointer-events: none; }
.tl-rt span i { position: absolute; left: 0; bottom: 0; width: 1px; height: 7px; background: var(--line3); }
.lane { display: flex; height: var(--lane-h, 44px); border-bottom: 1px solid var(--line); }
.lane:last-of-type { border-bottom: 0; }
.lane-hd { position: sticky; left: 0; z-index: 4; display: flex; align-items: center; gap: 8px; width: 96px; flex-shrink: 0; padding: 0 10px; background: var(--bg); border-right: 1px solid var(--line); font-size: 12px; box-shadow: inset 2px 0 0 var(--c); }
.lane-tr { position: relative; flex: 1 1 auto; background: linear-gradient(transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)); }
.clip {
  position: absolute; top: 5px; bottom: 5px; min-width: 0; overflow: hidden; text-align: left; cursor: grab; touch-action: none;
  border-radius: 3px; border: 1px solid color-mix(in oklab, var(--c) 42%, transparent); background: color-mix(in oklab, var(--c) 13%, var(--s1));
  transition: background var(--t1), border-color var(--t1), box-shadow var(--t2), top var(--t2) var(--ease), bottom var(--t2) var(--ease), left var(--t3) var(--ease), width var(--t3) var(--ease);
}
.clip-lv { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--h) * 100%); background: linear-gradient(to top, color-mix(in oklab, var(--c) 62%, transparent), color-mix(in oklab, var(--c) 16%, transparent)); transform-origin: bottom; animation: barUp 700ms var(--ease) backwards; transition: height var(--t4) var(--ease); }
.clip-tx { position: relative; display: flex; align-items: center; gap: 5px; min-width: 0; padding: 4px 6px; font-size: 11px; color: var(--fg); white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); pointer-events: none; }
.clip-ico { width: 14px; height: 14px; flex-shrink: 0; }
.clip:hover { z-index: 2; background: color-mix(in oklab, var(--c) 24%, var(--s1)); border-color: var(--c); }
.clip.util { background: transparent; border-style: dashed; }
.clip.auto { border-style: dashed; }
.clip.zero { top: 30%; bottom: 30%; border: 0; background: var(--c); opacity: .85; }
.clip.zero .clip-lv { display: none; }
.clip.evt { width: 0; border: 0; background: none; overflow: visible; }
.clip.evt::before { content: ''; position: absolute; left: -6px; top: 50%; width: 11px; height: 11px; margin-top: -6px; transform: rotate(45deg); background: var(--bg); border: 1.5px solid var(--c); transition: transform var(--t2) var(--spring); }
.clip.evt:hover::before { transform: rotate(45deg) scale(1.3); }
.clip.warn { box-shadow: inset 0 -2px 0 var(--warn); }
.clip.bad { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.clip.sel { z-index: 3; top: 2px; bottom: 2px; border-color: var(--sig); box-shadow: 0 0 0 1px var(--sig), 0 0 20px -2px var(--sig); }
.clip.evt.sel::before { border-color: var(--sig); background: var(--sig); box-shadow: 0 0 12px var(--sig); }
.clip.zero.sel { top: 22%; bottom: 22%; background: var(--sig); }
.clip.drag { z-index: 6; cursor: grabbing; transition: none; box-shadow: 0 0 0 1px var(--warn), 0 14px 30px -8px #000; }
.tl-ph { position: absolute; top: 0; bottom: 0; z-index: 5; width: 1px; background: var(--sig); box-shadow: 0 0 10px var(--sig); pointer-events: none; transition: left 140ms var(--ease); }
.tl-ph::before { content: ''; position: absolute; top: 0; left: -5px; border: 5px solid transparent; border-top-color: var(--sig); }
.tl-ph span { position: absolute; top: 5px; left: 6px; padding: 1px 4px; border-radius: 2px; background: var(--sig); color: var(--sig-ink); font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.tl-drop { position: absolute; top: 22px; bottom: 0; z-index: 7; width: 2px; margin-left: -1px; background: var(--warn); box-shadow: 0 0 10px var(--warn); pointer-events: none; }

.seq { flex: 1 1 auto !important; min-height: 0; display: flex; flex-direction: column; padding: 2px 18px 0; }
.sq-head, .sq-row { display: grid; grid-template-columns: 14px 22px 34px 24px minmax(120px, 1fr) 26px 30px minmax(104px, 150px) minmax(56px, 110px) 36px 44px; gap: 8px; align-items: center; }
.sq-head { padding: 10px 8px 6px; border-bottom: 1px solid var(--line2); font-size: 9.5px; }
.sq-list { position: relative; height: 100%; overflow-y: auto; padding-bottom: 56px; overscroll-behavior: contain; scroll-padding: 44px 0 64px; }
.sq-row { position: relative; height: 36px; padding: 0 8px; border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: default; transition: background var(--t1); }
.sq-row:hover { background: var(--s2); }
.sq-row.swap { border-top: 1px solid var(--line3); }
.sq-row.sel { background: color-mix(in oklab, var(--sig) 7%, var(--s2)); box-shadow: inset 2px 0 0 var(--sig); }
.sq-row.bad { background: var(--danger-a); box-shadow: inset 2px 0 0 var(--danger); }
.sq-row.auto .sq-name { color: var(--fg2); }
.sq-row.evt .sq-name { color: var(--fg2); }
.sq-row .mono { font-size: 11.5px; }
.sq-grip { display: grid; place-items: center; color: transparent; cursor: grab; transition: color var(--t1); }
.sq-grip svg { width: 14px; height: 14px; }
.sq-row:hover .sq-grip { color: var(--faint); }
.sq-who { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.sq-cont { width: 2px; height: 18px; margin-left: 10px; background: var(--c); opacity: .45; }
.sq-row:focus-visible { outline-offset: -2px; }
.sq-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sq-auto { height: 16px; padding: 0 5px; font-size: 10px; flex-shrink: 0; }
.sq-type { flex-shrink: 0; padding: 0 4px; border: 1px solid var(--line2); border-radius: 2px; font-size: 10px; color: var(--dim); }
.sq-buff { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--s4); font-size: 10.5px; color: var(--fg2); }
.sq-dmg { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.sq-dmg i { position: absolute; left: 0; bottom: 7px; height: 2px; width: calc(var(--v) * 100%); background: color-mix(in oklab, var(--c) 60%, transparent); }
.sq-dmg b { position: relative; font-size: 12px; font-weight: 500; }
.sq-dmg small { position: relative; font-size: 10px; color: var(--fusion); }
.sq-st { font-size: 10.5px !important; }
.sq-pct { text-align: right; color: var(--fg2); }
.sq-x { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.sq-warn { display: grid; place-items: center; color: var(--warn); }
.sq-warn svg { width: 14px; height: 14px; }
.sq-warn.bad { color: var(--danger); }
.sq-exp svg { transition: transform var(--t2) var(--ease); }
.sq-exp.on svg { transform: rotate(180deg); }
.sq-diff { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 8px 132px; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.sq-diff .plus { color: var(--up); }
.sq-diff .enemy { color: var(--danger); }
.sq-diff .minus { color: var(--dim); }
.sq-ins { position: relative; height: 0; z-index: 2; }
.sq-ins::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--sig); box-shadow: 0 0 10px var(--sig); }
.sq-ins .lbl { position: absolute; right: 8px; top: -9px; padding: 2px 7px; border-radius: 2px; background: var(--sig); color: var(--sig-ink); font-size: 9px; }
.sq-ins .lbl b { color: var(--sig-ink); font-weight: 700; }
.drop-before > .sq-row { box-shadow: inset 0 2px 0 var(--warn); }
.drop-after > .sq-row { box-shadow: inset 0 -2px 0 var(--warn); }
.hits { padding: 8px 8px 12px 42px; background: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; animation: fadeIn 240ms var(--ease) backwards; }
.hits-h, .hits-r { display: grid; grid-template-columns: 24px 88px 64px 64px 56px 56px 52px 52px 104px 104px 130px 76px 84px; gap: 6px; min-width: 1010px; font-size: 11px; }
.hits-h { padding-bottom: 4px; border-bottom: 1px solid var(--line2); font-size: 9.5px; }
.hits-r { padding: 4px 0; border-bottom: 1px solid var(--line); color: var(--fg2); }
.hits-r .zh { font-family: var(--f-ui); }
.hits-x { padding-top: 6px; font-size: 11.5px; color: var(--fg2); }

/* ── 檢視器 ─────────────────────────── */
.insp { grid-row: 2; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.insp-tabs { padding: 12px 14px 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.insp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 36px; animation: fadeIn 220ms var(--ease) backwards; }
.ins-step, .ins-live, .ins-diff { display: flex; flex-direction: column; gap: 14px; }
.ins-step > *, .ins-live > *, .ins-diff > * { flex-shrink: 0; }
.ins-step { --c: var(--sig); }
.ins-hd { display: flex; align-items: flex-start; gap: 10px; }
.ins-name { display: block; margin-top: 3px; font-size: 16px; font-weight: 700; line-height: 1.35; }
.ins-meta { font-size: 12px; }
.ins-edit { display: flex; align-items: center; gap: 6px; }
.ins-dmg { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ins-dmg > div { display: flex; flex-direction: column; gap: 4px; }
.ins-avg .num { font-size: 42px; font-weight: 800; line-height: .95; color: var(--c); }
.ins-dmg b.mono { font-size: 12.5px; text-align: right; }
.chainz { display: flex; flex-direction: column; gap: 7px; }
.cz-base, .cz-sum { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.cz-base .mono.dim { margin-left: auto; font-size: 11px; }
.cz-base b { font-size: 12.5px; }
.cz { display: grid; grid-template-columns: 62px minmax(0, 1fr) 60px; column-gap: 10px; align-items: center; font-size: 12.5px; }
.cz-k { color: var(--fg2); }
.cz-bar { position: relative; height: 8px; overflow: hidden; border-radius: 1px; background: var(--s3); }
.cz-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: left; transform: scaleX(var(--w)); background: linear-gradient(90deg, color-mix(in oklab, var(--sig) 40%, transparent), var(--sig)); transition: transform 200ms var(--ease); }
.cz.loss .cz-bar i { background: linear-gradient(90deg, color-mix(in oklab, var(--down) 40%, transparent), var(--down)); }
.cz.flat .cz-bar i { width: 2px; transform: none; background: var(--line3); }
.cz b { text-align: right; font-size: 12px; }
.cz.loss b { color: var(--down); }
.cz.flat b { color: var(--dim); }
.cz-f { grid-column: 2 / -1; margin-top: 1px; font-size: 10.5px; }
.cz-sum { justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line2); color: var(--fg2); }
.cz-sum b { color: var(--fg); font-size: 13px; }
.ins-hits > div { display: grid; grid-template-columns: 22px 1fr 70px 80px; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.ins-hits .mono:nth-child(n+3) { text-align: right; }
.ins-ev > div, .ins-ctr > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.ins-ctr > div > span { flex: 1 1 auto; }
.ins-at { display: flex; align-items: baseline; justify-content: space-between; }
.ins-at .mono { font-size: 12px; color: var(--sig); }
.mem { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--s1); }
.mem.self { border-color: color-mix(in oklab, var(--c) 45%, transparent); box-shadow: inset 2px 0 0 var(--c); }
.mem-hd { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mem-st { font-size: 11.5px; }
.mem-res { display: flex; flex-direction: column; gap: 5px; }
.mem-res > div { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--fg2); }
.mem-res .meter i { background: var(--c); box-shadow: 0 0 6px var(--c); }
.mem-res b { text-align: right; font-size: 11px; }
.mem-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r1); background: var(--line); }
.mem-panel > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 7px; background: var(--s2); }
.mem-panel span { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-panel b { font-size: 12px; }
.mem-panel small { font-size: 9.5px; }
.tune { display: grid; grid-template-columns: 34px 1fr 56px; align-items: center; gap: 8px; font-size: 12px; }
.tune .meter { height: 6px; }
.tune b { text-align: right; font-size: 11.5px; }

/* ── 自訂 BUFF ─────────────────────── */
.cbfs { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 28px; }
.cbfs > * { flex-shrink: 0; }
.cbf { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.cbf-hd { display: flex; gap: 8px; }
.cbf-name { height: 34px; font-size: 15px; font-weight: 700; }
.cbf-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cbf-flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px; margin: 0 -6px; }
.cbf-mods { display: flex; flex-direction: column; gap: 6px; }
.cbf-mh, .cbf-m { display: grid; grid-template-columns: minmax(150px, 1.4fr) 100px minmax(110px, 1fr) minmax(96px, 1fr) minmax(110px, 1fr) 24px; gap: 6px; align-items: center; }
.cbf-mv { grid-column: 1 / -1; }
.cbf-mvs { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 0; }

/* ── 斷點 ─────────────────────────── */
@media (max-width: 1440px) { .tp-kv > div:nth-child(3) { display: none; } }
@media (max-width: 1360px) {
  .rot { grid-template-columns: 252px minmax(0, 1fr) 330px; }
  .tp-big { font-size: 52px; }
  .tp-kv b.num { font-size: 26px; }
  .tp-main { min-width: 250px; }
  .tl-hint { display: none; }
}
@media (max-width: 1180px) {
  body:has(.rot) { overflow: auto; }
  .app:has(.rot) { height: auto; min-height: 100dvh; }
  .rot { display: flex; flex-direction: column; height: auto; }
  .tp { grid-template-columns: 1fr 1fr; }
  .tp-mix { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .tp-ctl { width: auto; }
  .lib { max-height: 60vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .stage { overflow: visible; }
  .sq-list { max-height: 70vh; }
  .insp { border-left: 0; border-top: 1px solid var(--line); }
  .insp-body { overflow: visible; }
}

/* MIX 主軌:整套出招的聲波 */
.lane.master { height: 40px; background: linear-gradient(180deg, rgba(124, 243, 228, .03), transparent); }
.lane.master .lane-hd { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; box-shadow: inset 2px 0 0 var(--sig); }
.lane.master .lane-hd .mono { font-size: 10.5px; }
.wave { cursor: ew-resize; background: linear-gradient(transparent calc(50% - .5px), var(--line2) calc(50% - .5px), var(--line2) calc(50% + .5px), transparent calc(50% + .5px)); }
.wave i { position: absolute; top: calc(4px + (100% - 8px) * (1 - var(--h)) / 2); height: calc((100% - 8px) * var(--h)); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--c); box-shadow: 0 0 6px color-mix(in oklab, var(--c) 60%, transparent); animation: waveIn 600ms var(--ease) backwards; animation-delay: var(--d); pointer-events: none; }
@keyframes waveIn { from { opacity: 0; } }
@media (max-width: 760px) {
  .tp { grid-template-columns: minmax(0, 1fr); }
  .tp > * { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .tp-main { min-width: 0; }
  .tp-big { font-size: 48px; }
  .tp-kv { flex-wrap: wrap; padding: 10px 16px; }
  .tp-kv > div { padding: 4px 18px 4px 0; }
  .tp-kv > div + div { border-left: 0; }
  .tl, .seq { padding-left: 12px; padding-right: 12px; }
  .sq-head, .sq-row { grid-template-columns: 22px 24px minmax(0, 1fr) 92px 30px; }
  .sq-head > :nth-child(1), .sq-head > :nth-child(3), .sq-head > :nth-child(6), .sq-head > :nth-child(7), .sq-head > :nth-child(9), .sq-head > :nth-child(10),
  .sq-row > :nth-child(1), .sq-row > :nth-child(3), .sq-row > :nth-child(6), .sq-row > :nth-child(7), .sq-row > :nth-child(9), .sq-row > :nth-child(10) { display: none; }
  .sq-type { display: none; }
  .sq-diff { padding-left: 54px; }
  .hits { padding-left: 8px; }
}
/* 游標時間線 */
.tl-hv { position: absolute; top: 0; bottom: 0; z-index: 4; width: 1px; background: rgba(255, 255, 255, .28); pointer-events: none; opacity: 0; transition: opacity var(--t2); }
.tl-hv span { position: absolute; top: 5px; left: 5px; padding: 1px 4px; border-radius: 2px; background: var(--s5); color: var(--fg); font-size: 9.5px; white-space: nowrap; }

/* ── 時間軸高度可調 / 收合 ─────────────── */
.tl.short .clip-tx { display: none; }
.tl.short .lane-hd { font-size: 11px; gap: 6px; }
.tl.collapsed .tl-body { border-bottom-left-radius: var(--r2); }
/* 序列清單目前看到的範圍 */
.tl-view { position: absolute; top: 22px; bottom: 0; z-index: 1; pointer-events: none; background: rgba(255, 255, 255, .035); box-shadow: inset 1px 0 0 rgba(124, 243, 228, .35), inset -1px 0 0 rgba(124, 243, 228, .35); transition: left var(--t3) var(--ease), width var(--t3) var(--ease); }
.tl-view span { position: absolute; bottom: 3px; left: 5px; font-size: 9px; color: var(--sig); opacity: .7; white-space: nowrap; }
.tl.collapsed .tl-view span { display: none; }

/* 分隔線:拖曳調整時間軸 / 序列的比例 */
.split { position: relative; flex-shrink: 0; height: 14px; margin: 0 18px; cursor: row-resize; touch-action: none; }
.split::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--line); transition: background var(--t1); }
.split i { position: absolute; left: 50%; top: 4px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--s5); transition: background var(--t1), width var(--t2) var(--ease), margin var(--t2) var(--ease); }
.split:hover::before, .split.drag::before, .split:focus-visible::before { background: color-mix(in oklab, var(--sig) 50%, transparent); }
.split:hover i, .split.drag i, .split:focus-visible i { background: var(--sig); width: 64px; margin-left: -32px; box-shadow: 0 0 10px var(--sig); }
.split:focus-visible { outline: none; }

/* 序列:上下還有多少招 */
.sq-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
.sq-wrap::before, .sq-wrap::after { content: ''; position: absolute; left: 0; right: 8px; height: 44px; z-index: 3; pointer-events: none; opacity: 0; transition: opacity var(--t2); }
.sq-wrap::before { top: 0; background: linear-gradient(var(--bg), transparent); }
.sq-wrap::after { bottom: 0; background: linear-gradient(transparent, var(--bg) 85%); }
.sq-wrap.more-up::before, .sq-wrap.more-down::after { opacity: 1; }
.sq-more { position: absolute; left: 50%; z-index: 4; display: flex; gap: 6px; transform: translateX(-50%); animation: chipIn 260ms var(--ease) backwards; }
.sq-more.up { top: 6px; }
.sq-more.down { bottom: 8px; }
@keyframes chipIn { from { opacity: 0; transform: translate(-50%, 6px); } }
.sq-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 8px; border-radius: 12px; border: 1px solid var(--line3); background: var(--s3); color: var(--fg); font-size: 11.5px; white-space: nowrap; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .8); transition: background var(--t1), border-color var(--t1), transform var(--t1) var(--ease); }
.sq-chip svg { width: 13px; height: 13px; }
.sq-chip:hover { background: var(--s5); border-color: var(--sig); }
.sq-chip:active { transform: scale(.96); }
.sq-chip.sig { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); font-weight: 700; padding: 0 10px; }
.sq-chip.sig:hover { background: var(--sig-2); }

/* 排版隔離 */
@media (min-width: 1181px) { .lib, .stage, .insp { contain: strict; } }
.tp, .tl, .sq-row, .mv, .mem { contain: layout style; }

/* ── BUFF 不到期(忽略秒數):主數字是上限;琥珀色 = 到期才少掉的傷害 ── */
.ceil-l { font-style: normal; color: var(--warn); }
.ceil-t { color: var(--warn); }
.tp-sub.ceil-sub { color: color-mix(in oklab, var(--warn) 70%, var(--fg2)); }
.tp-sub.ceil-sub b { color: var(--warn); font-weight: 600; }
.tp.ceil .tp-big { text-shadow: 0 0 24px color-mix(in oklab, var(--warn) 22%, transparent); }
.ceil-tag { cursor: pointer; gap: 6px; transition: background var(--t1), border-color var(--t1); }
.ceil-tag:hover { background: color-mix(in oklab, var(--warn) 20%, transparent); border-color: var(--warn); }
.ceil-tag b { font-weight: 600; font-size: 10.5px; }
.ceil-dot { width: 6px; height: 6px; background: var(--warn); transform: rotate(45deg); box-shadow: 0 0 8px var(--warn); }
.ceil-inf { font-style: normal; color: var(--warn); margin-left: 5px; font: 600 13px/1 var(--f-mono); }
.tl.ceil .tl-body { border-color: color-mix(in oklab, var(--warn) 22%, var(--line)); }
.tl.ceil .tl-rt { background: repeating-linear-gradient(-45deg, color-mix(in oklab, var(--warn) 9%, transparent) 0 3px, transparent 3px 9px); }
.wave i.gap { background: linear-gradient(var(--warn) 0 calc(var(--g) * 100%), var(--c) calc(var(--g) * 100%) calc(100% - var(--g) * 100%), var(--warn) calc(100% - var(--g) * 100%)); }
.clip.gap .clip-lv {
  background:
    linear-gradient(to top, color-mix(in oklab, var(--c) 62%, transparent), color-mix(in oklab, var(--c) 24%, transparent)) bottom / 100% calc(var(--n) * 100%) no-repeat,
    repeating-linear-gradient(-45deg, color-mix(in oklab, var(--warn) 60%, transparent) 0 2px, transparent 2px 5px) top / 100% calc((1 - var(--n)) * 100%) no-repeat;
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--warn) 70%, transparent);
}
.sq-gap { position: relative; font-style: normal; font-size: 10px; color: var(--warn); }
.tl .sh > .lbl, .tl .sh > .meta { white-space: nowrap; }
.tl.ceil .tl-hint { display: none; } /* 標頭讓給「BUFF 不到期」標籤;操作說明在各元素的提示裡都有 */
.clip.zero.gap { background: linear-gradient(to top, var(--c) calc(var(--n) * 100%), var(--warn) calc(var(--n) * 100%)); } /* 耗時 0 的細條(飞阙等):上段琥珀 = 到期損失 */
