/* 「赛道」页签（赛道遥测 · 测试）。沿用后台卡片、读数带与回放「保持时间轴」的色板和几何，不引入新主题或外部资源 */
.track-bar { flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
#trackStatus { margin: 0 0 12px; }
#trackStatus:empty { display: none; }
.track-strip { margin: 0; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; }
.track-strip .ro .v { font-size: 17px; }
.track-summary h4 { margin: 0 0 8px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.track-summary .tbl + h4 { margin-top: 16px; }
.track-skill-note { margin: -4px 0 8px; font-size: 11.5px; }
.track-summary .tbl { border: 1px solid var(--hair); border-radius: var(--r-sm); }
.track-lanes { padding: 10px 14px; overflow-x: auto; }
.track-lanes svg { display: block; width: 100%; min-width: 560px; background: var(--surface-2); border-radius: var(--r-sm); cursor: crosshair; }
.track-span { fill: var(--hover); }
.track-speed { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linejoin: round; }
.track-seg.track-drift { fill: var(--accent); opacity: .85; }
.track-seg.track-boost { fill: var(--warn); opacity: .85; }
.track-seg.track-overload { fill: var(--danger); opacity: .8; }
.track-seg.track-action { fill: var(--purple); opacity: .85; }
.track-seg.track-unknown { fill: none; stroke: var(--warn); stroke-dasharray: 3 4; opacity: 1; }
.track-seg-text { fill: var(--accent-ink); font-size: 10px; font-family: var(--mono); pointer-events: none; }
.track-go { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 3; }
.track-go-text { fill: var(--text-2); font-weight: 600; }
.track-skill { fill: var(--purple); }
.track-skill-text { fill: var(--text-2); font-size: 10.5px; pointer-events: none; }
.track-lane-label { fill: var(--text-2); }
.track-lane-sub { font-size: 9.5px; }
.track-cursor { pointer-events: none; }
#trackFollow .card-head { flex-wrap: wrap; }
@media (max-width: 900px) { .track-summary.grid.two { grid-template-columns: 1fr; } }
/* 0.13.2「本场比赛」：右栏（本机计数、技巧分类计数）任何宽度下都完整可见——成绩那一栏 minmax(0, 1fr)（太宽就在自己框里横向滚），右栏固定 240～320；
   卡片本身不够宽（左边有轨道和塔、或者窄屏）就把右栏挪到成绩表下面。原来 1fr 1fr + 不换行的长文字把左栏撑破、右栏被卡片裁掉一半 */
#trackSummary { container-type: inline-size; }
.track-summary.grid.two { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); }
.track-summary.grid.two > * { min-width: 0; }
.track-summary .tbl { overflow-x: auto; }
@container (max-width: 860px) { .track-summary.grid.two { grid-template-columns: minmax(0, 1fr); } }
.track-summary td.track-roster-cell { white-space: normal; min-width: 200px; max-width: 460px; line-height: 1.45; }
.track-summary td.track-note-cell { white-space: normal; }
.track-selected summary { cursor: pointer; font-size: 11.5px; list-style: revert; }
.track-selected[open] summary { margin-bottom: 2px; }
/* 实时轨迹（1.73.0）：俯视画布 + 侧栏。两层画布叠在一起：底层底图与历史线，上层当前点 */
.track-live .card-head { flex-wrap: wrap; gap: 8px; }
.track-live-namebox { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.track-live-namebox[hidden] { display: none; }
.track-live-name { width: 180px; }
.track-live-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 12px; padding: 12px 14px; align-items: start; }
.track-live-wrap { position: relative; background: var(--surface-2); border-radius: var(--r-sm); overflow: hidden; min-height: 260px; }
.track-live-wrap canvas { position: absolute; left: 0; top: 0; }
.track-live-note { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: var(--text-2); background: var(--surface); padding: 3px 8px; border: 1px solid var(--hair); border-radius: var(--r-sm); pointer-events: none; }
.track-live-note[hidden] { display: none; }
/* 0.22.0：悬停道具箱的提示 */
.track-live-tip { position: absolute; z-index: 3; max-width: 230px; font-size: 12px; line-height: 1.45; white-space: pre-line; color: var(--text); background: var(--surface); padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: none; }
.track-live-tip[hidden] { display: none; }
.track-live-side table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.track-live-side th, .track-live-side td { padding: 4px 6px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.track-live-side td:nth-child(2) { white-space: normal; }
.track-live-side tr.sel td { font-weight: 600; }
.track-live-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.track-live-sidenote { font-size: 11px; margin: 6px 0 0; }
.track-live-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 14px 12px; }
.track-live-controls input[type=range] { flex: 1 1 320px; }
.track-live-controls input[hidden], .track-live-controls button[hidden] { display: none; }
/* 1.74.0：回放的播放 / 暂停与倍速 */
.track-live-speed { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.track-live-speed[hidden] { display: none; }
#trackLivePlay { min-width: 56px; }
/* 1.75.0：回放时本机道具栏 */
.track-live-items { margin: 8px 0 0; font-size: 13px; }
.track-live-items[hidden] { display: none; }
.track-live-items-value { font-weight: 600; }
.track-live-time { min-width: 120px; color: var(--text-2); font-size: 12px; }
.track-live-controls .btn[aria-pressed="true"] { background: var(--hover); border-color: var(--line-2); }
@media (max-width: 900px) { .track-live-body { grid-template-columns: 1fr; } }
/* 1.73.2：赛道名优先显示；没有名字时的起名提示；没成场的比赛；游戏内昵称 */
.track-live-key.named { font-family: inherit; color: var(--text); font-weight: 600; }
.track-name-hint { font-size: 11.5px; color: var(--blue); }
.track-name-hint[hidden] { display: none; }
.ro .track-name-hint { display: block; margin-top: 4px; padding: 2px 6px; }
.track-live-unformed { margin: 0 14px; padding: 6px 10px; border-radius: var(--r-sm); font-size: 12.5px; }
.track-live-unformed.held { background: var(--warn-bg); color: var(--text); }
.track-live-unformed.rejected { background: var(--danger-bg); color: var(--text); }
.track-live-unformed[hidden] { display: none; }
#trackUnformed .card-head { flex-wrap: wrap; gap: 8px; }
#trackUnformed .card-head #trackRefinalize { margin-left: auto; }
#trackUnformed .card-head #trackRefinalize[hidden] { display: none; }
.track-unformed { display: grid; gap: 10px; padding: 12px 14px; }
.track-unformed > p { margin: 0; }
.track-unformed-row { border: 1px solid var(--hair); border-left: 3px solid var(--danger); border-radius: var(--r-sm); padding: 8px 12px; display: grid; gap: 4px; }
.track-unformed-row.held { border-left-color: var(--warn); background: var(--warn-bg); }
.track-unformed-row.transient { border-left-color: var(--line-2, var(--hair)); opacity: .8; }
.track-unformed-text { font-weight: 600; font-size: 13px; }
.track-unformed-meta { font-size: 11.5px; }
.track-unformed-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.game-names .card-body { display: grid; gap: 8px; }
.game-names-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.game-names-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.game-names-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--hair); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12.5px; }
.game-names-cands { display: grid; gap: 6px; }
.game-names-cand { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.game-names-add { gap: 8px; align-items: center; }
.game-names-add .input { width: 240px; }
.game-names-msg { margin: 0; }
.game-names-msg:empty { display: none; }
/* 1.76.0：每人的车辆 · 角色、喷漆小色点、显示与自选不同的提示 */
.paint-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; box-shadow: 0 0 0 1px var(--line-2); }
.paint-dot[hidden] { display: none; }
.track-live-roster { font-size: 11.5px; color: var(--text-2); margin: 1px 0 0 14px; }
.track-live-roster[hidden] { display: none; }
.track-roster-note { color: var(--amber, #c98a0b); font-size: 11.5px; }
/* 1.78.0：加速与道具（回放）——轨迹上的记号、本队集气条、事件列表；同队车的道具栏 */
.track-live-mates[hidden] { display: none; }
.track-live-mate { margin: 4px 0 0; font-size: 12px; }
.track-live-boosts { padding: 0 14px 12px; display: grid; gap: 8px; }
.track-live-boosts[hidden] { display: none; }
.track-live-boosts-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.track-live-legend { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; font-size: 12px; color: var(--text-2); }
.track-live-legend span { margin-right: 6px; }
.track-mark { display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; background: #9aa3b2; border-radius: 50%; }
.track-mark-booster { background: #f5a623; border-radius: 0; transform: rotate(45deg) scale(.8); }
.track-mark-team { background: #8b5cf6; border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.track-mark-item { background: #e5484d; }   /* 0.7.3 道具赛：用其它道具 */
/* 1.80.0 仿游戏 HUD（track-hud.mjs）：深色面板、横条分段；游戏自带的界面图片（数据目录 hud/）有就用 */
.hud { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 12px; align-items: start; }
.hud[hidden] { display: none; }
.hud-panel { background: linear-gradient(180deg, #1c2533, #121821); color: #e8edf5; border-radius: 12px; padding: 10px 12px 12px; display: grid; gap: 7px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); font-size: 12.5px; }
.hud-who { display: flex; align-items: center; gap: 6px; }
.hud-who strong { font-size: 13.5px; }
.hud-dim { color: #93a0b4; font-size: 11.5px; }
.hud-who .hud-dim { margin-left: auto; }
.hud-row { display: flex; align-items: center; gap: 8px; }
.hud-row[hidden] { display: none; }
.hud-label { width: 64px; flex: none; color: #b8c4d6; font-size: 11.5px; }
.hud-slots { gap: 8px; margin-bottom: 14px; }   /* 下面留出格子名字（绝对定位在格子下面）的地方；0.17.7 原来的「.hud-slots + .hud-bar-row」被中间藏着的道具统计隔开、没生效 */
.hud-slot { position: relative; width: 58px; height: 58px; border-radius: 10px; background: radial-gradient(circle at 50% 35%, #33415a, #1a2230 70%);
  box-shadow: inset 0 0 0 2px #52627c, 0 1px 0 rgba(255,255,255,0.08); display: grid; place-items: center; }
.hud-slot canvas { width: 52px; height: 52px; }
.hud-slot-cap { position: absolute; bottom: -15px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: #b8c4d6; white-space: nowrap; }
.hud-slot.empty { box-shadow: inset 0 0 0 2px #3a475c; }
.hud-slot.unknown { background: repeating-linear-gradient(45deg, #1d2532, #1d2532 6px, #232d3c 6px, #232d3c 12px); box-shadow: inset 0 0 0 2px #3a475c; }
.hud-slots-note { align-self: flex-end; margin-left: 4px; }
.hud-bar { position: relative; flex: 1; height: 22px; border-radius: 6px; background: #0c1017; box-shadow: inset 0 0 0 1px #3f4c61; overflow: hidden; }
.hud-bar.img { background-size: 100% 100%; background-repeat: no-repeat; box-shadow: none; border-radius: 0; }
.hud-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; overflow: hidden; }
.hud-bar-img { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; display: block; }
.hud-nitro .hud-bar-img { background: linear-gradient(90deg, #ffd000, #ff9500 55%, #ff2a00); }
.hud-team .hud-bar-img { background: linear-gradient(90deg, #7dd3fc, #22c3e6); }
.hud-team[data-team="1"] .hud-bar-img:not(.img) { background: linear-gradient(90deg, #fca5a5, #e0453a); }
.hud-team[data-team="2"] .hud-bar-img:not(.img) { background: linear-gradient(90deg, #93c5fd, #2f6fdf); }
.hud-bar-img.img { background-size: 100% 100%; background-repeat: no-repeat; }
.hud-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,0.35) calc(10% - 1px) 10%); pointer-events: none; }
.hud-bar.img::after { display: none; }
.hud-bar.flash { box-shadow: 0 0 0 2px #fff6c2, 0 0 14px 4px rgba(255, 214, 0, 0.75); }
.hud-team.flash { box-shadow: 0 0 0 2px #e9d5ff, 0 0 14px 4px rgba(139, 92, 246, 0.8); }
.hud-pct { width: 38px; text-align: right; color: #e8edf5; }
.hud-bar-row.na .hud-bar { opacity: 0.35; }
/* 0.17.7 三段条：粉色满格，白竖线是可以开三段的量；够开了亮一点 */
.hud-triple .hud-bar-img { background: linear-gradient(90deg, #ffb3d6, #ff5fa8 60%, #e0247a); opacity: 0.7; }
.hud-triple.usable .hud-bar-img { opacity: 1; }
.hud-thresh { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.55); z-index: 1; }
.hud-thresh[hidden] { display: none; }
.hud-triple-text { width: auto; min-width: 38px; white-space: nowrap; }
.hud-charger-na { font-size: 12px; color: #93a0b4; line-height: 14px; }
.hud-charger.na .hud-label { opacity: 0.6; }
.hud-note { font-size: 11.5px; color: #93a0b4; margin: -3px 0 0 72px; min-height: 14px; }
.hud-note[hidden] { display: none; }
.hud-note.hot { color: #ffe066; font-weight: 700; }
.hud-segs { display: flex; gap: 3px; flex: 1; }
.hud-seg { flex: 1; height: 14px; border-radius: 3px; background: #0c1017; box-shadow: inset 0 0 0 1px #3f4c61; }
.hud-seg.wide { flex: 1; }
.hud-seg.lit { background: linear-gradient(180deg, #ffe38a, #e8b400); box-shadow: inset 0 0 0 1px #fff2b8; }
.hud-seg.charging { background: linear-gradient(180deg, #fff6c2, #ffb700); box-shadow: 0 0 8px 1px rgba(255, 190, 0, 0.8); }
.hud-seg.unknown { background: repeating-linear-gradient(45deg, #1d2532, #1d2532 4px, #283243 4px, #283243 8px); }
.hud-charger-text { width: 52px; text-align: right; font-weight: 700; color: #ffe066; }
.hud-charger:not(.charging) .hud-charger-text { color: #e8edf5; font-weight: 500; }
.hud-lamps { flex-wrap: wrap; gap: 6px; }
.hud-lamp { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: #0c1017; color: #7d8aa0;
  box-shadow: inset 0 0 0 1px #3a475c; font-size: 11.5px; }
.hud-lamp i:not(.hud-lamp-img) { width: 8px; height: 8px; border-radius: 50%; background: #3a475c; }
.hud-lamp.on { color: #fff; }
.hud-lamp-boost.on { background: #7a3d00; box-shadow: inset 0 0 0 1px #f5a623; } .hud-lamp-boost.on i { background: #f5a623; box-shadow: 0 0 6px #f5a623; }
.hud-lamp-draft.on { background: #064152; box-shadow: inset 0 0 0 1px #22c3d6; } .hud-lamp-draft.on i { background: #22c3d6; box-shadow: 0 0 6px #22c3d6; }
.hud-lamp-drift.on { background: #213a6b; box-shadow: inset 0 0 0 1px #7aa2ff; } .hud-lamp-drift.on i { background: #7aa2ff; box-shadow: 0 0 6px #7aa2ff; }
.hud-lamp-charger.on { background: #5c4300; box-shadow: inset 0 0 0 1px #e8b400; } .hud-lamp-charger.on i { background: #ffd000; box-shadow: 0 0 6px #ffd000; }
.hud-lamp-exceed.on { background: #5c1a3d; box-shadow: inset 0 0 0 1px #ff5fa8; } .hud-lamp-exceed.on i { background: #ff5fa8; box-shadow: 0 0 6px #ff5fa8; }
.hud-lamp.na { opacity: 0.45; }   /* 0.17.7：这辆车没有这一样（不是读不到） */
.hud-lamp[hidden] { display: none; }
.hud-lamp.unknown { opacity: 0.55; font-style: italic; }
.hud-lamp-img { width: 22px; height: 15px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.hud-lamp-img[hidden] { display: none; }
.hud-lanes canvas { display: block; width: 100%; background: var(--surface-2); border-radius: var(--r-sm); cursor: pointer; }
.hud-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11px; color: var(--text-2, #5b6678); margin-top: 6px; }
.hud-sw { display: inline-block; width: 14px; height: 8px; margin-right: -6px; border-radius: 2px; }
.hud-sw-booster { background: #f5a623; } .hud-sw-team { background: #8b5cf6; } .hud-sw-other { background: #7aa2d6; }
.hud-sw-draft { background: #22c3d6; height: 4px; } .hud-sw-charger { background: #e8b400; height: 4px; } .hud-sw-drift { background: #7aa2ff; height: 3px; }
.hud-sw-other { height: 3px; opacity: .55; }
.hud-sw-m-booster { width: 9px; height: 9px; background: #f5a623; transform: rotate(45deg) scale(.8); border-radius: 0; }
.hud-sw-m-team { width: 11px; height: 11px; background: #8b5cf6; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.hud-sw-m-item { width: 8px; height: 8px; background: #e5484d; border: 1px solid #1f2a3a; border-radius: 50%; }   /* 0.7.3 道具赛：用其它道具 */
.hud-items-note { margin: 16px 0 0 0; }   /* 槽下面的名字是绝对定位挂在槽外的，统计这一行要让出来 */
.hud-legend-items { display: contents; }   /* 0.7.3：图例按赛制换，外面包一层但仍按原来的 flex 排 */
.hud-sw-m-triple { width: 2px; height: 12px; background: #ff5fa8; border-radius: 1px; }
.hud-sw-exceed { background: rgba(255, 95, 168, 0.3); height: 10px; box-shadow: inset 0 1px 0 #ff5fa8, inset 0 -1px 0 #ff5fa8; }
.hud-sw-m-nitro { width: 0; height: 0; background: none; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid #16a34a; border-radius: 0; }
/* 0.22.2 吃到什么道具：拿到（绿色小三角，泳道下沿）、换位 / 变更 / 被替换（空心圈） */
.hud-sw-m-gain { width: 0; height: 0; background: none; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid #16a34a; border-radius: 0; }
.hud-sw-m-change { width: 8px; height: 8px; background: none; border: 1.5px solid #e5484d; border-radius: 50%; }
.hud-sw-m-lost { width: 8px; height: 8px; background: none; border: 1.5px solid #9aa3b2; border-radius: 0; }
.hud-item-event { margin: 14px 0 0 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.hud-item-event[hidden] { display: none; }
.hud-item-event .hud-dim { font-size: 11.5px; }
.hud-sw-m-fill { width: 9px; height: 9px; background: #8b5cf6; transform: rotate(45deg) scale(.8); border-radius: 0; }
.hud-foot { grid-column: 1 / -1; margin: 0; font-size: 11.5px; }
@media (max-width: 900px) { .hud { grid-template-columns: 1fr; } }
#trackLiveSide tr { cursor: pointer; }
#trackLiveSide tr.hud-target td:first-child { box-shadow: inset 3px 0 0 #2f6fdf; }
.track-live-boost-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--hair); border-radius: var(--r-sm); }
.track-live-boost-list table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.track-live-boost-list th { position: sticky; top: 0; background: var(--surface); text-align: left; }
.track-live-boost-list th, .track-live-boost-list td { padding: 4px 8px; border-bottom: 1px solid var(--hair); }
.track-live-boost-list th.r, .track-live-boost-list td.r { text-align: right; }
.track-live-boost-list tr { cursor: pointer; }
.track-live-boost-list tr:hover td { background: var(--hover); }
.track-live-boost-list tr:not(.past) td { color: var(--text-2); }
.track-live-boost-list tr.track-boost-fill td { font-weight: 600; }
.track-live-boost-note { margin: 0; font-size: 11.5px; }

/* 0.8.0 回放「比赛事件」 */
.track-live-race { padding: 0 14px 12px; }
.track-race { display: grid; gap: 10px; }
.track-race[hidden] { display: none; }
.track-race-body { display: grid; gap: 12px; }
.track-race-sec h4 { margin: 0 0 4px; font-size: 13px; }
.track-race-note { margin: 0 0 6px; font-size: 11.5px; }
.track-race-facts { margin: 0; padding-left: 18px; font-size: 12.5px; display: grid; gap: 2px; }
.track-race-filter { margin: 6px 0; gap: 6px; align-items: center; }
.track-race-list { max-height: 320px; }
.track-race-list tr.track-race-static { cursor: default; }
.track-race-list td { color: var(--text) !important; }
.track-race-list td.dim { color: var(--text-2) !important; }
.track-race-list td.track-race-hit { color: #c0392b !important; font-weight: 600; }
.track-race-list td.track-race-blocked, .track-race-list td.track-race-dodged { color: #2471a3 !important; }
.track-race-list td.track-race-miss, .track-race-list td.track-race-unknown { color: var(--text-2) !important; }

/* ── 0.13.0 操作面板（replay-panel.mjs）：键盘 + 道具栏 + 氮气条，叠在轨迹画面角上 / 独立窗口 ── */
.op { font-size: 12px; color: var(--text); }
.op-overlay { position: absolute; right: 10px; bottom: 10px; z-index: 4; width: min(440px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 6px 22px rgba(0,0,0,.28); }
.op-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--hair); cursor: grab; user-select: none; touch-action: none; }
.op-head:active { cursor: grabbing; }
.op-title { font-weight: 700; }
.op-who { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.op-clock { color: var(--text-3); font-variant-numeric: tabular-nums; }
.op-btn { font: inherit; font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.op-btn:hover { border-color: var(--line-2); color: var(--text); }
.op-body { display: flex; flex-direction: column; gap: 7px; padding: 8px; }
.op-kb { display: grid; grid-template-columns: repeat(var(--kb-cols, 5), minmax(0, 1fr)); grid-auto-rows: auto; gap: clamp(2px, 1.2cqw, 5px); container-type: inline-size; }
.op-key { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: clamp(30px, 10cqw, 46px); padding: 2px clamp(2px, .8cqw, 4px); overflow: hidden;
  font-size: clamp(8px, 2.6cqw, 12px); border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); transition: background .06s, border-color .06s; }
.op-key-name { display: flex; align-items: baseline; gap: 3px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-key-glyph { font-size: 1.3em; line-height: 1; }
.op-key-phys { font-size: .82em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-key[data-state="held"] { border-color: var(--accent); background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--accent); }
.op-key[data-state="held"] .op-key-name { color: var(--accent); }
.op-key[data-state="unknown"] { border-style: dashed; border-color: var(--warn); background: var(--warn-bg); }
.op-key[data-state="none"] { opacity: .45; }
/* 复位只有两种外观：按下 = 琥珀亮起（选手端同色 #FFC43D → #E89A10，不用红色——红色只表示「现在处理」）、松开余辉约 1 秒（--glow 1 → 0）；
   其余一切（抬起、未知、记录范围之外）= 暗格：不画键帽底色，只留很淡的轮廓（约 10%）和更淡的小字（约 22%），比没按的普通键明显暗。
   未知时只在暗格里用同样淡的字写「未知」，不套普通键的虚线 / 琥珀底（选择器带 [data-state]，压过上面按状态的样式）。
   默认「按下才出现」（data-reset-style="pressed"，2026-10-21 产品负责人定）：不亮时整格不画，余辉一路淡到没有；切成暗格时照上面。格子位置两种一样 */
.op-key[data-role="RESET"][data-state] { --reset-dim: color-mix(in srgb, var(--text) 22%, transparent); --reset-line: color-mix(in srgb, var(--text) 10%, transparent);
  border-style: solid; border-color: var(--reset-line); background: transparent; box-shadow: none; color: var(--reset-dim); opacity: 1; }
.op-kb[data-reset-style="pressed"] .op-key[data-role="RESET"][data-state] { --reset-dim: transparent; --reset-line: transparent; }
.op-kb[data-reset-style="pressed"] .op-key[data-role="RESET"][data-state]:not(.lit) { visibility: hidden; }
.op-key[data-role="RESET"][data-state] .op-key-name, .op-key[data-role="RESET"][data-state] .op-key-phys { font-weight: 500; color: var(--reset-dim); }
.op-key[data-role="RESET"][data-state].lit { --g: calc(var(--glow, 0) * 100%); border-color: color-mix(in srgb, #FFC43D var(--g), var(--reset-line));
  background: linear-gradient(180deg, color-mix(in srgb, #FFC43D var(--g), transparent), color-mix(in srgb, #E89A10 var(--g), transparent));
  box-shadow: 0 0 calc(var(--glow, 0) * 12px) color-mix(in srgb, #FFC43D var(--g), transparent); }
.op-key[data-role="RESET"][data-state].lit .op-key-name, .op-key[data-role="RESET"][data-state].lit .op-key-phys { color: color-mix(in srgb, #2b1b00 var(--g), var(--reset-dim)); }
.op-reset-style { justify-self: end; align-self: flex-end; margin-top: -2px; padding: 1px 6px; font-size: 10.5px; color: var(--text-3); background: transparent;
  border: 1px solid var(--hair, var(--line)); border-radius: 6px; cursor: pointer; }
.op-reset-style:hover { color: var(--text-2); border-color: var(--line-2, var(--line)); }
.op-note { margin: 0; color: var(--text-3); font-size: 11px; }
.op-items, .op-nitro { display: flex; align-items: center; gap: 6px; min-width: 0; }
.op-label { color: var(--text-3); font-size: 11px; flex: none; width: 3.5em; }
.op-slots { display: flex; gap: 4px; }
.op-slot { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.op-slot img { width: 30px; height: 30px; object-fit: contain; }
.op-slot.op-slot-empty { opacity: .5; border-style: dashed; }
.op-slot-name { font-size: 9.5px; line-height: 1.1; text-align: center; padding: 1px; color: var(--text-2); }
.op-bar { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.op-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #16a34a; border-radius: 4px; }
.op-pct { font-size: 11px; color: var(--text-2); }
/* 三段条（超越系统的俗称，不是分三段）：一根条 + 可用阈值刻度；到阈值亮起写「可用」，激活那一下闪（帧给的 flash） */
.op-triple-bar { overflow: visible; }
.op-triple-fill { background: color-mix(in srgb, #7aa2ff 55%, var(--surface-3)); }
.op-triple-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text-2); border-radius: 1px; }
.op-triple.usable .op-triple-fill { background: #7aa2ff; box-shadow: 0 0 6px color-mix(in srgb, #7aa2ff 60%, transparent); }
.op-triple-state { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.op-triple.usable .op-triple-state { color: #7aa2ff; font-weight: 600; }
.op-triple.flash .op-triple-bar { box-shadow: 0 0 0 2px #c7d7ff, 0 0 12px #7aa2ff; }
.op-triple.flash .op-triple-fill { background: #c7d7ff; }
.op-triple.flash .op-triple-state { color: #c7d7ff; font-weight: 700; }
.op-pending { white-space: nowrap; }
/* 三段条下面一行小字：车辆默认的超越类型（名称表的资源参数，不是这一把读到的）；对齐到条的起点 */
.op-triple-default { margin: -4px 0 0 calc(3.5em + 6px); font-size: 10.5px; line-height: 1.35; }
.op-dim { color: var(--text-3); font-size: 11px; }
.op-chip { position: absolute; right: 10px; bottom: 10px; z-index: 4; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text); cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.op-away { position: absolute; right: 10px; bottom: 10px; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 12px; color: var(--text-2);
  border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); }
.op-away .op-btn { border-radius: 999px; }
/* 独立窗口 */
body.op-window { margin: 0; background: var(--bg); min-height: 100vh; }
.op-standalone { display: flex; flex-direction: column; min-height: 100vh; }
.op-standalone .op-head { cursor: default; }
.op-standalone .op-body { flex: 1; }
.op-transport { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--hair); }
.op-transport input[type=range] { flex: 1; accent-color: var(--accent); }
.op-transport select { font: inherit; font-size: 12px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
.op-closed { margin: 0; padding: 8px; color: var(--warn); }
.op-foot { margin: 0; padding: 0 8px 8px; }
body.op-is-closed .op-body, body.op-is-closed .op-transport { opacity: .45; pointer-events: none; }

/* 0.13.2：回放的主播放条固定在页面底部（滚动区 .content 的最后一个孩子，sticky 贴底：看得见、点得到，又在文档流里占着自己的高度，不挡最底下的内容） */
.replay-dock { position: sticky; bottom: 0; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 14px -22px -48px; padding: 10px 22px 12px; background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 16px rgba(0, 0, 0, .22); }
.replay-dock[hidden] { display: none; }
.replay-dock .replay-dock-slider { flex: 1 1 320px; min-width: 200px; accent-color: var(--accent); }
.replay-dock .track-live-time { min-width: 116px; font-size: 13px; color: var(--text); }
.replay-dock .btn[aria-pressed="true"] { background: var(--hover); border-color: var(--line-2); }
.replay-dock input[hidden], .replay-dock button[hidden] { display: none; }
@media (max-width: 960px) {
  /* 窄屏：整页滚动，底下还有 60 像素高的导航条：贴在它上面；按钮放大；进度条单独一行 */
  .replay-dock { bottom: 60px; margin: 12px -14px -30px; padding: 8px 12px 10px; gap: 6px; }
  .replay-dock .btn { min-height: 40px; min-width: 56px; font-size: 14px; }
  .replay-dock .replay-dock-slider { order: 10; flex-basis: 100%; height: 28px; }
  .replay-dock .track-live-time { min-width: 0; flex: 1 1 auto; }
}
/* 内嵌在分牌后台（iframe）里：iframe 是整页高度，贴的是 iframe 的底；照样在文档流里不挡内容 */
body.embed .replay-dock { margin-left: 0; margin-right: 0; }
