/* prstats 主题皮肤 — 把内置 tracker 的界面统一到本站风格（暗橄榄绿 / 亮色），
   支持 [data-theme=light|dark] 与中英文。只重组 chrome，不碰画布渲染。
   顶栏三段：左☰菜单 / 中比分 / 右⚙设置，图标点开竖向下拉。 */

@import url("../shared/theme.css");   /* prstats: /static/tracker/ → /static/shared/;prism: /tracker/ → /shared/ */
:root {
  --ps-bg: var(--bg); --ps-panel: var(--panel); --ps-panel2: var(--panel2); --ps-line: var(--line);
  --ps-ink: var(--ink); --ps-dim: var(--dim); --ps-accent: var(--accent); --ps-acc-ink: var(--acc-ink);
  --ps-bar: var(--bar); --ps-red: var(--red); --ps-blu: var(--blu);
}

body {
  background-color: var(--ps-bg) !important;
  color: var(--ps-ink) !important;
  font-family: 'IBM Plex Mono', 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', Consolas, monospace !important;
  touch-action: manipulation;   /* 禁掉浏览器双击缩放整页（点两下设置就放大的毛病）*/
}
#renderers { touch-action: none; }   /* 地图区缩放/平移全由 tracker 自己的触摸逻辑接管 */
a { color: var(--ps-accent); }
.ps-hidden { display: none !important; }

#DemoSelectionInterfaceInner { background-color: var(--ps-panel) !important; color: var(--ps-ink) !important; }
#loadingStatusOverlay {
  background: var(--ps-panel2) !important; color: var(--ps-ink) !important;
  border: 1px solid var(--ps-line) !important; border-radius: 12px; padding: 18px 26px !important;
  font-size: 13px !important; letter-spacing: .02em;
}
#loadingStatusOverlay::before {          /* 加载页品牌化 */
  content: "ALLIANCE EU · BATTLE REPLAY";
  display: block; color: var(--ps-accent); font-weight: 700; font-size: 15px;
  letter-spacing: .12em; margin-bottom: 8px;
}

/* 统一 SVG 图标 */
.mi { width: 16px; height: 16px; fill: currentColor; display: block; }
.ps-ico .mi { width: 15px; height: 15px; margin: 0 auto; }
.ps-ddbtn .mi { width: 19px; height: 19px; }

/* ────────── 顶栏：无横幅，三个半透明浮动件（菜单/比分/设置）────────── */
#psTopBar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 55;
  display: flex; align-items: flex-start; padding: 8px 10px; gap: 8px;
  background: transparent; border: 0; pointer-events: none;   /* 条本身不挡地图 */
}
#psTopBar > * { pointer-events: auto; }
.ps-tb-left, .ps-tb-right { flex: 0 0 auto; display: flex; }
.ps-tb-right { justify-content: flex-end; }
.ps-tb-center { flex: 1 1 auto; text-align: center; min-width: 0; pointer-events: none !important; }
.ps-tb-center > * { pointer-events: auto; }

/* 中间比分：玻璃浮动药丸 */
#psScore { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05;
  background: var(--ps-bar);  border: 1px solid var(--ps-line);
  border-radius: 13px; padding: 4px 16px 6px; }
.ps-tickets { font-size: 20px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 8px; }
.ps-tickets .t2 { color: var(--ps-blu); }
.ps-tickets .t1 { color: var(--ps-red); }
.ps-tickets .ps-dash { color: var(--ps-dim); font-weight: 400; }
.ps-intel { font-size: 12px; opacity: .8; }
.ps-subtime { font-size: 11px; color: var(--ps-dim); margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }

/* 图标按钮 + 竖向下拉 */
.ps-dd { position: relative; }
.ps-ddbtn {
  background: var(--ps-bar);  color: var(--ps-ink);
  border: 1px solid var(--ps-line);
  border-radius: 11px; width: 40px; height: 40px; font-size: 19px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.ps-ddbtn:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.ps-pop {
  display: none; position: absolute; top: 46px; z-index: 60; min-width: 190px;
  background: var(--ps-panel); border: 1px solid var(--ps-line); border-radius: 12px;
  padding: 6px; box-shadow: 0 14px 34px rgba(0,0,0,.45); flex-direction: column; gap: 2px;
}
.ps-dd-left .ps-pop { left: 0; }
.ps-dd-right .ps-pop { right: 0; }
.ps-pop.show { display: flex; }
.ps-item {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; text-align: left;
  background: transparent; border: 0; color: var(--ps-ink); font: inherit; font-size: 14px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.ps-item:hover { background: var(--ps-panel2); }
.ps-item.on { color: var(--ps-accent); }
.ps-item.on .ps-ico { filter: drop-shadow(0 0 4px var(--ps-accent)); }
.ps-ico { width: 20px; text-align: center; flex: 0 0 auto; font-size: 15px; }
.ps-lbl { flex: 1 1 auto; }
.ps-div { height: 1px; background: var(--ps-line); margin: 5px 4px; }
.ps-check { width: 15px; height: 15px; flex: 0 0 auto; border: 1.5px solid var(--ps-dim);
  border-radius: 4px; position: relative; }
.ps-check.on { background: var(--ps-accent); border-color: var(--ps-accent); }
.ps-check.on::after { content: "✓"; position: absolute; inset: 0; color: var(--ps-acc-ink);
  font-size: 11px; line-height: 12px; text-align: center; font-weight: 700; }

/* ────────── 底部播放条：无横幅，播放键+进度药丸浮动 ────────── */
#controlBarContainer {
  background: transparent !important; border-top: 0 !important; padding: 6px 10px 10px !important;
}
/* 播放键：自绘圆角图标 + 玻璃底，30px 收敛不抢注意力 */
#startPauseButton {
  background: var(--ps-bar) !important; 
  border: 1px solid var(--ps-line) !important; border-radius: 11px !important;
  width: 32px !important; padding: 0 !important; box-sizing: border-box !important;
  align-items: center; justify-content: center !important;
}
#startPauseButton:hover { border-color: var(--ps-accent) !important; }
#startPauseButton svg { fill: var(--ps-accent) !important; width: 15px !important; height: 15px !important; }
/* 原版 .state-* 规则是 display:block，图标顶在角上不居中——强制 flex 居中 */
#startPauseButton.state-paused .play-icon, #startPauseButton.state-playing .pause-icon {
  display: flex !important; align-items: center; justify-content: center; width: 100%; height: 100%; }
#controlBar { background: var(--ps-bar); 
  border: 1px solid var(--ps-line); border-radius: 12px; padding: 0 10px; }
#playBar { accent-color: var(--ps-accent); }
#playSpeedLabel, #controlBarOptions { color: var(--ps-ink) !important; }
#addBookmarkButton { color: var(--ps-accent) !important; }

/* ────────── jQuery UI 面板 ────────── */
.ui-dialog, .ui-widget-content {
  background: var(--ps-panel) !important; color: var(--ps-ink) !important;
  border: 1px solid var(--ps-line) !important; border-radius: 12px !important;
  box-shadow: 0 14px 36px rgba(0,0,0,.5); font-family: inherit !important;
}
.ui-dialog-titlebar, .ui-widget-header {
  background: var(--ps-panel2) !important; color: var(--ps-accent) !important;
  border: 0 !important; border-bottom: 1px solid var(--ps-line) !important;
  border-radius: 12px 12px 0 0 !important; font-family: inherit !important; letter-spacing: .04em;
}
/* 弹窗关闭钮：jQuery UI 的雪碧图标经常显示不出（手机上"没有关闭按钮"）——改成明确的 ✕ */
/* 0902:这个 ✕ 一直是【看不见】的——jQuery UI 的 .ui-button-icon-only 给按钮加了
   text-indent:-9999px(用来藏掉里面那个字面量 "Close"),把我们的 ::after 一起推到屏幕外了。
   改法:按钮自身 font-size:0 藏掉 "Close" 文字 + text-indent 归零,✕ 在 ::after 里自己定字号。
   顺带描个边——用户反馈"根本看不出来有个关闭按钮"。 */
.ui-dialog .ui-dialog-titlebar-close {
  background: var(--ps-panel) !important; border: 1px solid var(--ps-line) !important;
  color: var(--ps-ink) !important; font-size: 0 !important; text-indent: 0 !important;
  width: 26px !important; height: 26px !important; right: 6px !important; top: 50% !important;
  transform: translateY(-50%); margin: 0 !important; cursor: pointer; border-radius: 7px;
  padding: 0 !important; display: flex !important; align-items: center; justify-content: center;
}
.ui-dialog .ui-dialog-titlebar-close:hover { color: var(--ps-acc-ink) !important;
  background: var(--ps-accent) !important; border-color: var(--ps-accent) !important; }
.ui-dialog .ui-dialog-titlebar-close .ui-icon,
.ui-dialog .ui-dialog-titlebar-close .ui-button-icon-space { display: none !important; }
.ui-dialog .ui-dialog-titlebar-close::after { content: "✕"; font-size: 13px; line-height: 1;
  display: block; text-align: center; text-indent: 0; }
.ui-dialog .ui-dialog-titlebar { padding-right: 40px !important; }   /* 标题/勾选框别压到 ✕ 底下 */
.ui-slider { background: var(--ps-panel2) !important; border-color: var(--ps-line) !important; }
.ui-slider .ui-slider-handle { background: var(--ps-accent) !important; border-color: var(--ps-accent) !important; }
table { font-family: inherit !important; }
th { color: var(--ps-dim); }
tr:hover > td { background: rgba(182, 194, 46, .07); }

/* ────────── 选中卡:一张卡多层页面(玩家/车/乘员/管理/受罚历史)────────── */
/* 类名由 JS 打（.ps-seldlg），不用 :has()——个别浏览器不支持时框会回到 310px 大框 */
/* 宽度【随内容】,只封个上限:一辆车两个乘员的卡本来只要一半宽,钉死 280px 就是中间一大片空白
   (站主 0904)。jQuery UI 会写内联 width,所以这里要 !important 压回 auto。 */
.ps-seldlg { width: auto !important; max-width: min(300px, 88vw) !important;
  background: var(--ps-bar) !important; }
.ps-seldlg .ui-dialog-titlebar { display: none !important; }   /* 去掉整行"选中"标题：✕挪进头部,头部行可拖动 */
.ps-seldlg .ui-dialog-content { padding: 8px 10px 9px !important; border-radius: 12px !important;
  min-height: 0 !important; height: auto !important; }   /* jQuery UI 默认 minHeight 会撑出大片留白 */
#selection.t1 { box-shadow: inset 3px 0 0 var(--ps-red); }
#selection.t2 { box-shadow: inset 3px 0 0 var(--ps-blu); }
.eicon { width: 12px; height: 12px; fill: currentColor; vertical-align: -1.5px; }
/* ★永远关得掉:卡的高度封顶、头部行常驻、只有内容区滚动。
   0904 之前内容一多就顶出屏幕,PRISM 上连 ✕ 都够不着(站主:"我甚至没法操作和关闭这个面板")。 */
.ps-sel { display: flex; flex-direction: column; max-height: min(62vh, 520px); padding-left: 6px;
  min-width: 148px; }   /* 内容再少也还是一张卡,不缩成一条 */
.ps-sel-top { flex: 0 0 auto; cursor: grab; }
.ps-sel-body { overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: thin; }
/* 第一行:兵种图标 + ID(长名字省略号收掉) + ◎跟随 + ✕ */
.ps-r1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ps-vicon, .ps-kit { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 3px; }
.ps-fic { display: inline-flex; width: 18px; height: 18px; flex: 0 0 auto; }
.ps-fic .eicon { width: 18px; height: 18px; }
.ps-fic.t1 { color: var(--ps-red); } .ps-fic.t2 { color: var(--ps-blu); }
.ps-sn { font-weight: 700; font-size: 14px; flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ps-ink); }
.ps-sn.t1 { color: var(--ps-red); } .ps-sn.t2 { color: var(--ps-blu); }
.ps-sn.act { cursor: pointer; }
.ps-sn.act:hover { text-decoration: underline; text-decoration-color: var(--ps-accent); }
.ps-mtitle { font-size: 12.5px; font-weight: 700; flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ps-ink); }
.ps-ib { flex: 0 0 auto; background: transparent; border: 0; color: var(--ps-dim); cursor: pointer;
  font: inherit; font-size: 13px; line-height: 1; padding: 3px 4px; border-radius: 4px; }
.ps-ib:hover { color: var(--ps-accent); background: var(--ps-panel2); }
.ps-ib.on { color: var(--ps-accent); }
/* 第二行:SQ/SL/推测 胶囊 · 分 · K · D */
.ps-r2 { display: flex; align-items: center; gap: 5px; margin-top: 3px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ps-dim); font-variant-numeric: tabular-nums; }
.ps-r2 b { color: var(--ps-ink); font-weight: 700; }
.ps-r2 i { font-style: normal; color: var(--ps-dim); font-size: 9.5px; margin-left: 1px; }
.ps-sep { color: var(--ps-line); }
.ps-chip { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 4px;
  border-radius: 3px; background: var(--ps-panel2); color: var(--ps-dim); }
.ps-chip.sl { background: rgba(182,194,46,.16); color: var(--ps-accent); }
.ps-chip.gs { background: transparent; border: 1px dashed var(--ps-line); }   /* 虚线 = 推出来的,不是服务器给的 */
/* 血量(只有回放有):数字亮 + 迷你血条 */
.ps-sel-hp { font-size: 11px; color: var(--ps-dim); margin: 4px 0 0; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 7px; }
.ps-sel-hp b { color: var(--ps-ink); font-size: 12px; }
.ps-sel-hp .s { opacity: .6; }
.ps-hpbar { flex: 1 1 auto; max-width: 90px; height: 4px; background: var(--ps-line); border-radius: 3px; overflow: hidden; }
.ps-hpbar i { display: block; height: 100%; background: linear-gradient(90deg, #e0655a, var(--ps-accent)); }
/* 乘员表:座位(暗) 名字(队伍色,可点进他的卡) K-D */
.ps-crew { margin-top: 5px; border-top: 1px solid var(--ps-line); padding-top: 4px;
  display: grid; grid-template-columns: auto minmax(0, auto) auto; gap: 0 10px; align-items: center; }
.ps-crew .ps-kd { margin-left: auto; }   /* K-D 靠右,但不靠"把中间撑开"来靠右 */
.ps-crow { display: contents; }
.ps-seat { color: var(--ps-dim); font-size: 10.5px; white-space: nowrap; padding: 2px 0; }
.ps-cn { padding: 2px 0; cursor: pointer; font-size: 12.5px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-cn.t1 { color: var(--ps-red); } .ps-cn.t2 { color: var(--ps-blu); }
.ps-crow:hover .ps-cn { text-decoration: underline; text-decoration-color: var(--ps-accent); }
.ps-kd { color: var(--ps-dim); font-size: 10.5px; font-variant-numeric: tabular-nums; }
/* 管理页:国旗/时长/评级一行小字 + 一排【只有图标】的操作键(站主 0904:"不需要文字,快捷操作") */
.ps-mmeta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 11px; color: var(--ps-dim); margin: 4px 0 6px; }
.ps-mflag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }
.ps-warnt { color: var(--ps-accent); }
.ps-ops { display: flex; gap: 3px; border-top: 1px solid var(--ps-line); padding-top: 6px; }
.ps-op { flex: 1 1 0; height: 30px; display: grid; place-items: center; border-radius: 4px; cursor: pointer;
  background: var(--ps-panel2); border: 1px solid var(--ps-line); color: var(--ps-ink); font: inherit; font-size: 14px; }
.ps-op:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.ps-op.danger:hover { border-color: #d4593f; color: #d4593f; background: rgba(212,89,63,.12); }
.ps-op.login { font-size: 12px; }
/* 管理键那一排画不出来时的一句话(没连上服务器/没有可用动作):占位要和按钮一样高,
   不然卡的高度会在"有键"和"没键"之间跳 */
.ps-opnote { flex: 1 1 auto; min-height: 30px; display: flex; align-items: center;
  font-size: 11.5px; color: var(--ps-dim); }
.ps-op:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 1px; }
.ps-histline { margin-top: 6px; border-top: 1px solid var(--ps-line); padding-top: 5px;
  display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--ps-dim); }
.ps-histline:hover { color: var(--ps-accent); }
.ps-histline .arrow { margin-left: auto; }
.ps-bad { color: #d4593f; }
/* 受罚历史:一行一段 —— 时间在上、处置在下(窄卡里分两列会把理由挤成竖排,站主 0904 指出) */
.ps-hsum { font-size: 11px; color: var(--ps-dim); margin: 4px 0 6px; }
.ps-hrow { padding: 5px 0; border-bottom: 1px solid var(--ps-line); font-size: 12px; }
.ps-hrow:last-child { border-bottom: 0; }
.ps-hrow .when { display: block; font-size: 10.5px; color: var(--ps-dim); font-variant-numeric: tabular-nums; }
.ps-hrow .what { font-weight: 700; font-size: 12.5px; }
.ps-hrow .what.warn { color: #d7a52b; }
.ps-hrow .what.kick, .ps-hrow .what.ban { color: #d4593f; }
.ps-hrow .why { color: var(--ps-dim); }
.ps-hmore { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--ps-line);
  font-size: 11.5px; color: var(--ps-dim); }

/* ── 执行窗口:居中弹一次,一个面板里填完就发(不长在卡里——卡跟着玩家跑)── */
#psExec { position: fixed; inset: 0; z-index: 900; background: rgba(8,10,4,.55);
  display: grid; place-items: center; }
.ps-exec { width: min(320px, 92vw); background: var(--ps-panel); border: 1px solid var(--ps-line);
  border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.6); padding: 11px 12px 12px;
  max-height: 92vh; overflow-y: auto; font-size: 13px; }
.ps-exec h4 { margin: 0 0 9px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.ps-exec h4.danger { color: #d4593f; }
.ps-exec h4 .ico { font-size: 15px; }
.ps-exec .x { margin-left: auto; background: transparent; border: 0; color: var(--ps-dim);
  cursor: pointer; font: inherit; font-size: 13px; padding: 2px 4px; border-radius: 3px; }
.ps-exec .x:hover { color: var(--ps-ink); background: var(--ps-panel2); }
/* 两件事都是"框比该占的宽":
   ① `1fr` 的自动最小值 = 内容的最小宽,而 <input> 自带 size=20 的最小内容宽(这里约 289px),
      于是它撑破 320px 的窗口、右边比下面那块"将要发送"多出去一截,窗口底下还多一条横滚动条
      (站主 0905:"输入框太宽了…看起来很不协调")。写成 minmax(0, 1fr) 才允许它缩到轨道宽。
   ② 标签那一列 40px 装不下英文 REASON(要 45px),字顶到输入框上。给 50px,中文标签更短不受影响。
   这样 TARGET 值 / 输入框 / 将要发送 / 两个按钮的左右边就都在同一条线上。 */
.ps-exec .fld { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 7px;
  align-items: center; margin-bottom: 7px; }
.ps-exec .lab { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ps-dim); }
.ps-exec .val { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-exec input { width: 100%; box-sizing: border-box; background: var(--ps-bg); border: 1px solid var(--ps-line);
  border-radius: 4px; color: var(--ps-ink); font: inherit; font-size: 13px; padding: 5px 7px; }
.ps-exec input:focus { outline: none; border-color: var(--ps-accent); }
.ps-exec input.bad { border-color: #d4593f; }     /* 理由空着点执行:框标红,不发 */
.ps-exec .durs { display: flex; gap: 4px; flex-wrap: wrap; }
.ps-exec .durs button { padding: 3px 8px; border-radius: 4px; background: var(--ps-bg);
  border: 1px solid var(--ps-line); color: var(--ps-dim); font: inherit; font-size: 11px; cursor: pointer; }
.ps-exec .durs button:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.ps-exec .durs button.on { border-color: var(--ps-accent); color: var(--ps-acc-ink);
  background: var(--ps-accent); font-weight: 700; }
.ps-exec .dcustom { width: 108px; font-size: 11px; padding: 3px 6px; }
/* 将要发送的原文命令:管理员看的是"服务器会收到什么",时长/时机一改这里就跟着变 */
.ps-exec .prev { margin: 3px 0 10px; padding: 6px 8px; background: var(--ps-bg);
  border: 1px solid var(--ps-line); border-radius: 4px; font-size: 11.5px;
  color: var(--ps-accent); word-break: break-all; }
.ps-exec .prev .pl { color: var(--ps-dim); display: block; font-size: 9.5px;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.ps-exec .mbtns { display: flex; gap: 6px; }
.ps-exec .mbtns button { flex: 1 1 0; padding: 7px; border-radius: 4px; cursor: pointer;
  font: inherit; font-size: 13px; background: var(--ps-panel2); border: 1px solid var(--ps-line); color: var(--ps-ink); }
.ps-exec .mbtns button:hover { background: var(--ps-bg); }
.ps-exec .mbtns .go { border-color: var(--ps-accent); color: var(--ps-accent); font-weight: 700; }
.ps-exec .mbtns .go.danger { border-color: rgba(212,89,63,.65); color: #d4593f; background: rgba(212,89,63,.12); }
.ps-exec .waiting { font-size: 12.5px; color: var(--ps-dim); display: flex; align-items: center; gap: 7px; }
.ps-exec .waiting::before { content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--ps-line); border-top-color: var(--ps-accent); animation: psspin .8s linear infinite; }
@keyframes psspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ps-exec .waiting::before { animation: none; } }
.ps-exec .reply { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.ps-exec .reply.ok { color: #8fbf4a; } .ps-exec .reply.bad { color: #d4593f; }
.ps-exec .reply .raw { font-size: 11.5px; font-weight: 400; color: var(--ps-ink);
  background: var(--ps-bg); border: 1px solid var(--ps-line); border-radius: 4px;
  padding: 5px 7px; word-break: break-all; white-space: pre-wrap; }
.ps-exec .autoclose { margin-top: 8px; font-size: 10.5px; color: var(--ps-dim); }

/* ────────── 面板（记分板/击杀/聊天/载具，panels.js 重绘）────────── */
.ps-panel { position: fixed; top: 64px; right: 12px; z-index: 70; width: min(410px, calc(100vw - 24px));
  max-height: calc(100vh - 160px); display: flex; flex-direction: column;
  background: var(--ps-panel); border: 1px solid var(--ps-line); border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0,0,0,.5); overflow: hidden; }
.pp-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 10px 14px;
  border-bottom: 1px solid var(--ps-line); background: var(--ps-panel2); flex: 0 0 auto; }
.pp-title { font-size: 13px; font-weight: 700; color: var(--ps-accent); letter-spacing: .05em; text-transform: uppercase; }
.pp-x { background: transparent; border: 0; color: var(--ps-dim); font-size: 14px; cursor: pointer; padding: 4px 9px; border-radius: 6px; }
.pp-x:hover { color: var(--ps-ink); background: var(--ps-panel); }
.pp-body { overflow-y: auto; padding: 6px 8px 10px; font-size: 12.5px; }
.pp-empty { color: var(--ps-dim); padding: 14px 6px; }
/* 行高:站主 0904 要回 0903 之前那块板的密度(padding 2px/gap 5px)——4px 一行看着松,
   一屏能看的人就少了一半,而记分板要的正是"一眼扫完 50 个人" */
.pp-row { display: flex; align-items: center; gap: 5px; padding: 2px 6px; line-height: 1.35;
  border-radius: 6px; cursor: pointer; min-width: 0; }
.pp-row:hover { background: var(--ps-panel2); }
.pp-nm { font-weight: 700; cursor: pointer; }
.pp-nm.t1 { color: var(--ps-red); } .pp-nm.t2 { color: var(--ps-blu); }
.pp-nm:hover { text-decoration: underline; }
.pp-clan { color: var(--ps-dim); font-size: 10px; }
/* 记分板 */
.pp-cols { display: flex; gap: 7px; padding: 2px 6px; font-size: 9px; color: var(--ps-dim);
  text-transform: uppercase; letter-spacing: .05em; }
.pp-cols span:first-child { flex: 1 1 auto; }
.pp-cols .num, .pp-prow .num { width: 30px; flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; }
/* 得分:排序按它排,所以它得看得见(站主 0904 要回来);比 K/D 宽一格放三位数 */
.pp-cols .num.sc, .pp-prow .num.sc { width: 38px; color: var(--ps-ink); }
.pp-cols .num.sc { color: var(--ps-dim); }
/* 记分板 0902:一个阵营一列。电脑上并排看得清谁对谁,手机上仍然叠着 */
.ps-panel[data-panel="scores"], .ps-panel[data-panel="vehicles"],
.ps-panel[data-panel="joins"] { width: min(760px, calc(100vw - 24px)); }
/* min-width:0 不是可有可无:记分板的 .pp-two 自己也是个 flex 项(.pls-body/.pp-body 都是 flex),
   不写的话它的最小宽 = 两列的【最小内容宽】——名字/车名都是 nowrap,加起来经常比板子宽,
   于是整个 .pp-two 撑出去、右边那一列(蓝队)的 D 和 ⇄ 被容器的 overflow:hidden 切掉
   (站主 0905:"蓝色阵营看不到切换的按钮")。收成 0,两列才各占一半、名字回到省略号。 */
.pp-two { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.pp-tcol { flex: 1 1 0; min-width: 0; }
.pp-tcol .pp-cols { padding-left: 30px; }
.pp-pn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 击杀距离 + TK 过滤钮 */
.pp-dist { color: var(--ps-dim); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.pp-filter { background: transparent; border: 1px solid var(--ps-line); color: var(--ps-dim);
  font-size: 10px; font-weight: 700; letter-spacing: .06em; cursor: pointer; padding: 3px 8px;
  border-radius: 6px; margin-left: auto; }
.pp-filter:hover { color: var(--ps-ink); border-color: var(--ps-accent); }
.pp-filter.on { background: rgba(224,69,58,.2); border-color: #e0655a; color: #e0655a; }
.pp-team { display: flex; align-items: baseline; gap: 10px; margin: 5px 2px 2px; padding: 4px 8px;
  border-radius: 8px; font-weight: 700; }
.pp-team.t1 { background: rgba(224,101,90,.12); color: var(--ps-red); }
.pp-team.t2 { background: rgba(90,162,224,.12); color: var(--ps-blu); }
.pp-team .fac { flex: 1 1 auto; font-size: 14px; }
.pp-team .tk { font-size: 15px; font-variant-numeric: tabular-nums; }
.pp-team .cnt { font-size: 10px; color: var(--ps-dim); font-weight: 400; }
/* 小队头:实心胶囊 SQ1 + 队名(和管理员名字旁边的 OP 一个样式);指挥官的 CMD 胶囊是黄的,一眼找得到 */
.pp-sq { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--ps-dim);
  text-transform: uppercase; letter-spacing: .05em; margin: 5px 6px 1px;
  padding: 1px 4px; border-radius: 6px; }
.pp-sq[data-sq] { cursor: pointer; }                       /* 点小队头 = 地图上标出整队(同原版) */
.pp-sq[data-sq]:hover { background: var(--ps-panel2); }
.pp-sq.on { background: rgba(68,255,0,.14); }              /* 选中态和地图上的 Style_SquadSelection 同一个绿 */
.pp-sq.on .pp-sqb { background: #44ff00; color: #0b1a00; }
/* 选中整队:框住的是【整组】(队头+队员),只把胶囊点绿看不出这一队被选了 */
.pp-sqg { border: 1px solid transparent; border-radius: 9px; }
.pp-sqg.on { border-color: rgba(68,255,0,.5); background: rgba(68,255,0,.07);
  box-shadow: 0 0 10px rgba(68,255,0,.16); padding-bottom: 3px; }
.pp-sqg.on .pp-sq { margin-top: 4px; }
.pp-sqb { background: var(--ps-dim); color: var(--ps-bg); font-size: 9px; font-weight: 700;
  letter-spacing: .06em; border-radius: 4px; padding: 1px 5px; flex: 0 0 auto; }
.pp-sqb.none { background: transparent; color: var(--ps-dim); padding-left: 0; }
.pp-sqb.cmd { background: #e0b23a; color: #1a1508; }
.pp-sqb.sl { background: var(--ps-accent); color: var(--ps-acc-ink); }   /* 队长:原来是颗 ★,胶囊和 CMD 一个语汇 */
.pp-sqn { color: var(--ps-ink); text-transform: none; letter-spacing: 0; font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-prow .pp-sqb { margin-right: 1px; }
.pp-prow .pp-nm { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-kit { width: 15px; height: 15px; flex: 0 0 auto; }
.pp-prow .dim2 { color: var(--ps-dim); }
/* 窄屏:一次只看一个阵营 + 这排切换钮(站主 0904:"空间够就显示两个,空间不够的话就变成按钮切换")。
   两列并排在手机上一列只剩 ~160px,名字全被截断,而且想看下面就得把两边一起拉。 */
.pp-sides { display: flex; gap: 6px; margin: 4px 2px 2px; }
.pp-sides .pp-side { flex: 1 1 0; background: var(--ps-panel2); border: 1px solid var(--ps-line);
  color: var(--ps-dim); border-radius: 7px; padding: 5px 4px; font: inherit; font-size: 12px;
  font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-sides .pp-side:first-child.on { background: rgba(224,101,90,.18); border-color: var(--ps-red); color: var(--ps-red); }
.pp-sides .pp-side:last-child.on { background: rgba(90,162,224,.18); border-color: var(--ps-blu); color: var(--ps-blu); }
.pp-two.one { display: block; }          /* 只有一列时不用并排布局 */
/* 名字后面的两个身份标:中国玩家国旗 + OP 胶囊。和网站上是同一套写法(app.css 的
   .cnflag/.opbadge),站主 0904:"像网站里其它地方显示的那种一样" */
.pp-cn { flex: 0 0 auto; border: 1px solid rgba(0,0,0,.25); vertical-align: -1px; margin-left: 4px; }
.opbadge { display: inline-block; font-size: 8.5px; font-weight: 700; letter-spacing: .05em;
  padding: 0 3px; border-radius: 3px; margin-left: 4px; vertical-align: 1px;
  background: var(--ps-accent); color: var(--ps-acc-ink); }
/* 记分板:红蓝两列【各自滚动】(站主 0904)。一起滚的话,想往下看红队就把蓝队也拉走了 ——
   人多的一局两边名单长度差很多,同一条滚动条服务不了两边。手机上两列是叠着的,回到整块滚。 */
.ps-panel[data-panel="scores"] .pp-body { overflow: hidden; display: flex; }
.ps-panel[data-panel="scores"] .pp-two { flex: 1 1 auto; min-height: 0; align-items: stretch; }
.ps-panel[data-panel="scores"] .pp-tcol { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
@media (max-width: 820px) {
  /* 手机:板子是"一次一个阵营 + 切换钮",整块滚 —— 不把 overflow 改回来的话拉不动 */
  .ps-panel[data-panel="scores"] .pp-body { display: block; overflow-y: auto; }
  .ps-panel[data-panel="scores"] .pp-tcol { overflow: visible; }
}
/* 击杀流 / 聊天 */
.pp-t { color: var(--ps-dim); font-size: 10.5px; font-variant-numeric: tabular-nums; flex: 0 0 34px; }
.pp-ktxt { flex: 1 1 auto; min-width: 0; line-height: 1.45; }
.pp-krow.future, .pp-crow.future { opacity: .45; }   /* 未播放到的击杀/聊天淡化，一眼看出当前进度 */
.pp-arrow { color: var(--ps-dim); font-size: 10px; }
.pp-tk { background: rgba(224,69,58,.18); color: #e0655a; font-size: 9px; font-weight: 700;
  border-radius: 4px; padding: 0 4px; }
.pp-w { color: var(--ps-dim); font-size: 10.5px; }
.pp-crow.server .pp-ktxt { color: var(--ps-dim); font-style: italic; }
.pp-ch { color: var(--ps-dim); font-size: 9px; text-transform: uppercase; border: 1px solid var(--ps-line);
  border-radius: 4px; padding: 0 3px; }
/* 载具面板 */
.pp-vic { width: 17px; height: 17px; flex: 0 0 auto; }
.pp-vnm { font-weight: 700; flex: 0 0 auto; }
.pp-vnm.t1 { color: var(--ps-red); } .pp-vnm.t2 { color: var(--ps-blu); }
.pp-vcrew { color: var(--ps-dim); font-size: 11px; flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 载具面板 0902:一辆车 = 一块(车名行 + 血条 + 按座位排的乘员行) */
.pp-vbox { border: 1px solid var(--ps-line); border-radius: 9px; margin: 6px 2px; padding: 2px 2px 4px;
  background: var(--ps-panel2); cursor: pointer; }
.pp-vbox:hover { border-color: var(--ps-accent); }
.pp-hp { flex: 1 1 auto; height: 5px; min-width: 40px; border-radius: 3px;
  background: rgba(255,255,255,.10); overflow: hidden; }
.pp-hpb { display: block; height: 100%; border-radius: 3px; }
.pp-hpb.hi { background: #6fbf5f; } .pp-hpb.mid { background: #d8b13a; } .pp-hpb.lo { background: var(--ps-red); }
.pp-hpn { flex: 0 0 auto; color: var(--ps-dim); font-size: 10px; font-variant-numeric: tabular-nums; }
.pp-vseat { display: flex; align-items: center; gap: 6px; padding: 2px 8px 2px 24px; min-width: 0; }
.pp-seat { color: var(--ps-dim); font-size: 10px; flex: 0 0 62px; }
/* 进出记录 0902:名字 · 整局时间线 · 接入 · 断开 · 在场 */
.pp-jrow .pp-jn, .pp-jcols span:first-child { flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-jrow.future { opacity: .45; }
.pp-jrow .num, .pp-jcols .num { width: 46px; flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums;
  color: var(--ps-dim); font-size: 11px; }
.pp-jrow .num.acc { color: var(--ps-accent); }   /* 还没断开:用主色和具体时刻区分开 */
/* 表头钉住:这个面板默认跟随播放滚到底,不钉住的话列名一开就滚没了 */
.pp-jcols { position: sticky; top: -6px; z-index: 1; background: var(--ps-panel);
  padding-top: 6px; padding-bottom: 4px; }
.pp-jbar, .pp-jcols .bar { position: relative; flex: 0 0 34%; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.07); overflow: hidden; }
.pp-jcols .bar { background: transparent; height: auto; text-align: center; }
.pp-jbar .seg { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--ps-dim); }
.pp-jbar .seg.t1 { background: var(--ps-red); } .pp-jbar .seg.t2 { background: var(--ps-blu); }
.pp-jbar .seg.open { border-radius: 4px 0 0 4px; }   /* 打到最后:右端不封口 */
.pp-jbar .nowl { position: absolute; top: -1px; bottom: -1px; width: 1px; background: var(--ps-ink); opacity: .5; }
/* 书签 */
.pp-mtxt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-mdel { background: transparent; border: 0; color: var(--ps-dim); font-size: 11px; cursor: pointer;
  padding: 2px 6px; border-radius: 5px; flex: 0 0 auto; }
.pp-mdel:hover { color: var(--ps-red); background: var(--ps-panel); }
.pp-add { background: transparent; border: 0; color: var(--ps-accent); font-size: 17px; cursor: pointer;
  padding: 0 8px; border-radius: 6px; margin-left: auto; }
.pp-add:hover { background: var(--ps-panel); }

/* 名字+前缀包装：单个网格元素，K/D 不再被挤到下一行 */
.ps-nmwrap { display: flex; align-items: baseline; gap: 5px; min-width: 0;
  overflow: hidden; white-space: nowrap; }
.ps-nmwrap .ps-sel-name { overflow: hidden; text-overflow: ellipsis; }

/* 跟随 HUD：屏幕上中，跟随以来的击杀/得分，击杀弹跳+连杀标语（录屏分享用） */
#psFolHud { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 48;
  text-align: center; pointer-events: none; }
.psfh-nm { font-size: 11px; color: var(--ps-ink); background: var(--ps-bar); 
  border: 1px solid var(--ps-line); border-radius: 7px; padding: 1px 9px; display: inline-block; }
/* 跟随载具时：车组乘员一行在车名下面——加底板+亮色粗体，录出来的视频里也要一眼可读 */
.psfh-crew { font-size: 12px; font-weight: 700; color: #f2f6e4; text-shadow: 0 1px 3px rgba(0,0,0,.9);
  background: rgba(10,12,6,.72); border-radius: 6px; padding: 1px 9px; display: inline-block;
  margin-top: 2px; max-width: 74vw; margin-left: auto; margin-right: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psfh-crew:empty { display: none; }
.psfh-big { font-size: 30px; font-weight: 700; color: var(--ps-accent); line-height: 1.1;
  text-shadow: 0 0 12px rgba(182,194,46,.45), 0 1px 3px rgba(0,0,0,.8); margin-top: 2px; }
/* 战场行为统计行：救人/载具/地雷/FOB/FOB复活——只显示非零项，谁变化谁弹跳 */
.psfh-stats { display: flex; gap: 8px; justify-content: center; margin-top: 3px; }
.psfh-stats:empty { display: none; }
.psfh-st { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700;
  color: var(--ps-ink); background: rgba(10,12,6,.66); border-radius: 6px; padding: 1px 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.psfh-st .eicon { width: 13px; height: 13px; fill: var(--ps-accent); }
.psfh-st.pop { animation: fhpop .5s cubic-bezier(.2,1.6,.4,1); color: #ffe98a; }
.psfh-flash .ri, .psfh-crow .ri { color: #7ed67e; font-weight: 700; }
.psfh-u { font-style: normal; font-size: 13px; font-weight: 400; color: var(--ps-ink); }
.psfh-n { display: inline-block; font-variant-numeric: tabular-nums; }
.psfh-n.pop { animation: fhpop .55s cubic-bezier(.2,1.6,.4,1); }
@keyframes fhpop { 0% { transform: scale(2.1); filter: brightness(1.9); } 100% { transform: scale(1); filter: none; } }
.psfh-pts { font-size: 12px; color: var(--ps-ink); text-shadow: 0 1px 3px rgba(0,0,0,.8); font-variant-numeric: tabular-nums; }
.psfh-flash { font-size: 13px; font-weight: 700; color: #ffd35e; min-height: 18px;
  text-shadow: 0 0 10px rgba(255,180,60,.6), 0 1px 3px rgba(0,0,0,.9); opacity: 0; }
.psfh-flash.show { animation: fhflash 2.2s ease-out forwards; }
@keyframes fhflash { 0% { opacity: 0; transform: translateY(6px) scale(1.25); } 12% { opacity: 1; transform: none; }
  75% { opacity: 1; } 100% { opacity: 0; } }
/* HUD 顶行：玩家ID + 集锦/详情小chip 就在名字旁边 */
.psfh-top { display: flex; gap: 5px; justify-content: center; align-items: center; pointer-events: auto; }
.psfh-chip { background: var(--ps-bar);  border: 1px solid var(--ps-line);
  border-radius: 7px; padding: 1px 9px; font: inherit; font-size: 10.5px; color: var(--ps-dim); cursor: pointer; }
.psfh-chip:hover { color: var(--ps-ink); border-color: var(--ps-accent); }
.psfh-chip.pop { animation: fhpop .5s cubic-bezier(.2,1.6,.4,1); color: var(--ps-accent); border-color: var(--ps-accent); }
/* 跟随时隐藏两侧播报——别挡 HUD（用户实测重叠） */
body.ps-following #psFeed, body.ps-following #psChatFeed { display: none !important; }
/* 集锦（并入详情框底部）：可点书签跳时刻 + ⬇导出 */
.ps-cut-h { margin: 9px 0 3px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ps-dim); }
.ps-selcut { display: flex; flex-direction: column; gap: 3px; max-height: 150px; overflow-y: auto; }
.ps-selcut .psfh-crow { border-radius: 6px; padding: 2px 7px; }
.psfh-rec.on { background: rgba(224,69,58,.2); color: #e0655a; border-color: #e0453a; font-weight: 700; }
.psfh-crow { background: var(--ps-bar);  border: 1px solid var(--ps-line);
  border-radius: 7px; padding: 2px 10px; font-size: 11px; color: var(--ps-ink); cursor: pointer;
  white-space: nowrap; }
.psfh-crow:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.psfh-crow .t { color: var(--ps-dim); font-variant-numeric: tabular-nums; }
.psfh-crow .vi .eicon, .psfh-vd .eicon { width: 12px; height: 12px; vertical-align: -2px; }
.psfh-flash .vi .eicon { width: 15px; height: 15px; vertical-align: -3px; }
.psfh-dl { background: transparent; border: 0; color: var(--ps-dim); font: inherit; font-size: 11px;
  cursor: pointer; padding: 0 2px; margin-left: 3px; border-radius: 4px; }
.psfh-dl:hover { color: var(--ps-accent); }
/* 录制指示器：底栏上方居中 */
#psRec { position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); z-index: 95;
  display: flex; align-items: center; gap: 7px; background: var(--ps-bar); 
  border: 1px solid #e0453a; border-radius: 10px; padding: 5px 12px; font-size: 12px; color: var(--ps-ink); }
#psRec .dot { width: 9px; height: 9px; border-radius: 50%; background: #e0453a; animation: recblink 1s infinite; }
#psRec .lbl { color: #e0655a; font-weight: 700; letter-spacing: .08em; }
#psRec .tm { font-variant-numeric: tabular-nums; color: var(--ps-dim); }
@keyframes recblink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.psfh-vd { color: var(--ps-accent); margin-left: 4px; }
/* 新条目弹入高亮：名字逐条留存，连杀再快也每个都看得清 */
.psfh-crow.fresh { animation: fhrow .9s cubic-bezier(.2,1.4,.4,1); }
@keyframes fhrow { 0% { transform: translateY(-8px) scale(1.35); background: rgba(182,194,46,.35);
    border-color: var(--ps-accent); box-shadow: 0 0 14px rgba(182,194,46,.5); }
  55% { transform: none; } 100% { background: var(--ps-bar); } }

/* 跟随镜头按钮（选中框头部） */
.ps-fol { margin-left: auto; flex: 0 0 auto; width: 26px; height: 26px; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1;
  background: var(--ps-panel2); color: var(--ps-ink);
  border: 1px solid var(--ps-line); border-radius: 7px; padding: 3px 8px; font: inherit;
  font-size: 11px; cursor: pointer; }
.ps-fol:hover { color: var(--ps-ink); border-color: var(--ps-accent); }
.ps-fol.on { background: var(--ps-accent); color: var(--ps-acc-ink); border-color: var(--ps-accent); font-weight: 700; }

/* killfeed：右上角当前时刻击杀播报 */
#psFeed { position: fixed; top: 64px; right: 12px; z-index: 50; display: flex; flex-direction: column;
  gap: 4px; align-items: flex-end; pointer-events: none; max-width: min(48vw, 440px); }
.pf-row { background: var(--ps-bar);  border: 1px solid var(--ps-line);
  border-radius: 8px; padding: 3px 9px; font-size: 12px; pointer-events: auto;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  animation: pf-in .18s ease-out; }
.pf-row .pp-nm { font-weight: 700; cursor: pointer; }
.pf-row .pp-nm.t1 { color: var(--ps-red); } .pf-row .pp-nm.t2 { color: var(--ps-blu); }
.pf-w { color: var(--ps-dim); font-size: 10.5px; margin: 0 3px; }
@keyframes pf-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

/* 聊天播报：左侧，和右侧击杀播报对称（两侧各限宽，中间必留缝不重叠）*/
#psChatFeed { position: fixed; top: 64px; left: 12px; z-index: 50; display: flex; flex-direction: column;
  gap: 4px; align-items: flex-start; pointer-events: none; max-width: min(46vw, 420px); }
#psChatFeed .pf-row { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#psChatFeed .cf-txt { color: var(--ps-ink); }
#psChatFeed .server .cf-txt { color: var(--ps-dim); font-style: italic; }

/* 快捷键提示 */
.ps-kbd { flex: 0 0 auto; color: var(--ps-dim); font-size: 10px; border: 1px solid var(--ps-line);
  border-radius: 4px; padding: 0 5px; line-height: 15px; }

/* 底栏倍速：单按钮显示当前倍速，点开向上弹框选择 */
#playBarLabel { flex: 1 1 auto; min-width: 0; width: auto !important; }   /* 原版 width:100% 不肯给按钮让位，滑条会伸到按钮底下 */
#psSpeed { position: relative; flex: 0 0 auto; display: flex; align-items: center; margin: 0 6px 0 10px; }
.ps-spbtn { background: var(--ps-panel2); color: var(--ps-ink); border: 1px solid var(--ps-line);
  border-radius: 8px; padding: 5px 11px; font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-spbtn:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.ps-speed-pop { display: none; position: absolute; right: 0; bottom: 42px; z-index: 60;
  flex-direction: column; gap: 3px; background: var(--ps-panel); border: 1px solid var(--ps-line);
  border-radius: 10px; padding: 5px; box-shadow: 0 -8px 26px rgba(0,0,0,.4); }
.ps-speed-pop.show { display: flex; }
.ps-pill { background: transparent; color: var(--ps-dim); border: 0;
  border-radius: 7px; padding: 6px 16px; font: inherit; font-size: 12px; cursor: pointer;
  font-variant-numeric: tabular-nums; text-align: center; }
.ps-pill:hover { color: var(--ps-ink); background: var(--ps-panel2); }
.ps-pill.on { background: var(--ps-accent); color: var(--ps-acc-ink); font-weight: 700; }

/* ────────── 信息卡（玩家迷你档案 / 地图信息 / 设置弹窗 / 片段结果）────────── */
#psCardOv, #psSetOv, #psClipOv, #psMarkOv { position: fixed; inset: 0; z-index: 96; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; }
#psClipOv .ps-card-btn { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
/* 保存/分享分步指引：醒目块,别让人错过 */
.ps-cliphint { margin: 2px 0 4px; padding: 8px 10px; font-size: 12px; line-height: 1.55;
  color: var(--ps-ink); background: rgba(182,194,46,.08);
  border-left: 3px solid var(--ps-accent); border-radius: 6px; }
.ps-input { width: 100%; box-sizing: border-box; background: var(--ps-panel2); color: var(--ps-ink);
  border: 1px solid var(--ps-line); border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 14px; }
.ps-input:focus { outline: none; border-color: var(--ps-accent); }
.ps-set .ps-card-b .ps-item { padding: 7px 8px; font-size: 13px; }
.ps-set .ps-card-sec:first-child { margin-top: 2px; }
.ps-card { position: relative; background: var(--ps-panel); border: 1px solid var(--ps-line);
  border-radius: 14px; padding: 14px 16px; width: min(360px, calc(100vw - 32px));
  max-height: 76vh; overflow-y: auto; box-shadow: 0 18px 48px rgba(0,0,0,.5);
  white-space: normal; }   /* 原版 body 全局 nowrap,卡片里的长文(保存指引等)得能换行 */
.ps-card-x { position: absolute; top: 8px; right: 8px; background: transparent; border: 0;
  color: var(--ps-dim); font-size: 15px; cursor: pointer; padding: 4px 7px; border-radius: 6px; }
.ps-card-x:hover { color: var(--ps-ink); background: var(--ps-panel2); }
.ps-card-t { font-size: 16px; font-weight: 700; color: var(--ps-ink); margin: 0 24px 10px 0; line-height: 1.25; }
/* 设置卡的标题栏:标题 + 右侧几个"一下就完事"的动作(亮暗/语言/复制/关闭)。
   卡本身会滚,标题栏 sticky 住,滚到中间也够得着这几个键 */
.ps-card-hd { position: sticky; top: -14px; z-index: 2; display: flex; align-items: flex-start; gap: 8px;
  margin: -14px -16px 0; padding: 14px 16px 0; background: var(--ps-panel); }
.ps-card-hd .ps-card-t { flex: 1 1 auto; margin-right: 0; }
.ps-hd-acts { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; margin-top: -2px; }
.ps-card-hd .ps-card-x { position: static; }
.ps-hdb { background: transparent; border: 0; color: var(--ps-dim); cursor: pointer;
  padding: 4px 6px; border-radius: 6px; line-height: 0; }
.ps-hdb .mi { width: 17px; height: 17px; fill: currentColor; }
.ps-hdb:hover { color: var(--ps-ink); background: var(--ps-panel2); }
.ps-hdb.ok { color: #6fdc4a; }
.ps-hdb.bad { color: var(--ps-red); }
.ps-clan { color: var(--ps-dim); font-size: 11px; font-weight: 400; }
.ps-card-b { font-size: 13px; }
.ps-card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0;
  border-bottom: 1px solid var(--ps-line); }
.ps-card-row:last-child { border-bottom: 0; }
.ps-card-row .k { color: var(--ps-dim); font-size: 11px; flex: 0 0 auto; }
.ps-card-row .v { text-align: right; min-width: 0; }
.ps-card-row .v b { font-size: 14px; }
.ps-card-row .s, .ps-card .s { color: var(--ps-dim); font-size: 11px; }
.ps-card-sec { margin: 12px 0 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ps-dim); }
.ps-card-f { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
.ps-card-btn { background: var(--ps-panel2); color: var(--ps-ink); border: 1px solid var(--ps-line);
  border-radius: 8px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.ps-card-btn.acc { background: var(--ps-accent); color: var(--ps-acc-ink); border-color: var(--ps-accent); font-weight: 700; }
.ps-card-btn:hover { filter: brightness(1.08); }
.ps-winrow { display: grid; grid-template-columns: minmax(0,1fr) 90px auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 12px; }
.ps-winrow .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-winrow .bar { height: 6px; background: var(--ps-line); border-radius: 4px; overflow: hidden; }
.ps-winrow .bar i { display: block; height: 100%; background: var(--ps-accent); }
.ps-winrow .p { font-variant-numeric: tabular-nums; font-weight: 700; }
.ps-jump { color: var(--ps-accent); text-decoration: none; margin-left: 4px; }
@media (max-width: 820px) {
  #psCardOv, #psSetOv, #psClipOv, #psMarkOv { align-items: flex-end; }
  .ps-card { width: 100vw; max-height: 72vh; border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: 22px; }
  /* 面板 → 底部抽屉 */
  .ps-panel[data-panel="scores"], .ps-panel[data-panel="vehicles"],
  .ps-panel[data-panel="joins"] { width: 100vw; }
  .pp-jbar, .pp-jcols .bar { display: none; }     /* 手机:一行放不下时间线,留文字列 */
  .pp-two { display: block; }                     /* 手机:两个阵营叠着,一屏放不下并排 */
  .pp-tcol + .pp-tcol { margin-top: 10px; }
  .ps-panel { top: auto; right: 0; left: 0; bottom: 0; width: 100vw; max-height: 62vh;
    border-radius: 16px 16px 0 0; border-bottom: 0; }
  .pp-body { padding-bottom: 24px; }
  .ps-pill { padding: 5px 9px; font-size: 12px; }
  /* 播报手机上更紧凑：两侧各限 48/44vw + 单行省略，中间必留缝不再重叠 */
  #psFeed { top: 66px; right: 8px; max-width: 48vw; }
  #psChatFeed { top: 66px; left: 8px; max-width: 44vw; }
  .pf-row { font-size: 11px; padding: 2px 7px; }
  .ps-kbd { display: none; }             /* 手机没键盘，不显示快捷键提示 */
  .ps-spbtn { padding: 6px 12px; font-size: 13px; }
  #startPauseButton { width: 34px !important; padding: 10px 0 !important; transform: none; }
  #controlBarContainer { min-height: 0 !important; }
}

/* 时间轴图例/筛选（设置下拉里）*/
.ps-pop-head { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ps-dim); padding: 4px 10px 2px; }
.ps-swatch { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
/* 设置里的滑条行（UI 缩放）：标签 + 滑条 + 读数，一行不换行 */
.ps-item-range { cursor: default; }
.ps-item-range:hover { background: transparent; }
.ps-item-range .ps-lbl { flex: 0 0 auto; }
.ps-item-range input[type="range"] { flex: 1 1 auto; min-width: 80px; margin: 0 2px; accent-color: var(--ps-accent); }
.ps-rval { flex: 0 0 auto; width: 42px; text-align: right; font-size: 12px; color: var(--ps-dim);
  font-variant-numeric: tabular-nums; }
/* 勾掉某类 → 时间轴隐藏对应标记 */
#psEventLane.tl-h-fob .g-fobb, #psEventLane.tl-h-fob .g-fobd,
#psEventLane.tl-h-veh .g-veh, #psEventLane.tl-h-flag .g-flag,
#psEventLane.tl-h-cache .g-cache, #psEventLane.tl-h-bleed .g-bleed,
#psEventLane.tl-h-viol .viol, #psEventLane.tl-h-feat .feat { display: none; }

/* ────────── 在线人数：跟票数/时间同住比分栏（用户 0819：像 PRISM Web 那样；0902 从左上角挪进来） ──────────
   原来在进度条上方画折线图，占地方又跟进度条抢注意力，已去掉。 */
#psPopChip { font-variant-numeric: tabular-nums; }
#psPopChip::before { content: "·"; color: var(--ps-line); margin: 0 5px; }
#psPopChip.low { color: #e0955a; }       /* 低于 seeding 阈值：这一刻属于"人少" */

/* ────────── 事件时间轴：违规/高光=点，票数曲线事件=与曲线图一致的图标 ────────── */
#psEventLane { position: absolute; left: 0; right: 0; top: -15px; height: 15px; pointer-events: none; }
.ps-ev-dot { position: absolute; top: 2px; width: 11px; height: 11px; margin-left: -5px;
  border-radius: 50%; border: 1.5px solid var(--ps-bg); cursor: pointer; pointer-events: auto; transition: transform .1s; }
.ps-ev-dot:hover { transform: scale(1.5); }
.ps-ev-dot.viol { background: #e0453a; box-shadow: 0 0 5px #e0453a; }
.ps-ev-dot.feat { background: var(--ps-accent); box-shadow: 0 0 5px var(--ps-accent); }
.ps-ev-mk { position: absolute; top: 1px; width: 13px; height: 13px; margin-left: -6.5px; cursor: pointer;
  pointer-events: auto; transition: transform .1s; display: flex; align-items: center; justify-content: center; }
.ps-ev-mk .eicon { width: 100%; height: 100%; filter: drop-shadow(0 0 1px var(--ps-bg)); }
.ps-ev-mk:hover { transform: scale(1.5); }
.ps-ev-mk.g-flag { color: var(--ps-accent); }
.ps-ev-mk.g-fobb { color: #4caf50; }
.ps-ev-mk.g-fobd { color: #e0655a; }
.ps-ev-mk.g-cache { color: #e0955a; }
.ps-ev-mk.g-veh { color: var(--ps-blu); }
.ps-ev-mk.g-bleed { color: var(--ps-dim); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ps-line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--ps-dim); }
::-webkit-scrollbar-track { background: var(--ps-bg); }

/* ────────── 移动端：单排更简洁（图标 + 居中比分 + 图标）────────── */
@media (max-width: 820px) {
  #psTopBar { padding: 8px 10px; }
  .ps-ddbtn { width: 44px; height: 44px; font-size: 21px; }
  .ps-tickets { font-size: 22px; }
  .ps-subtime { font-size: 12px; }
  .ps-pop { min-width: 210px; top: 52px; }
  .ps-item { font-size: 15px; padding: 11px 12px; }
  #controlBarContainer { min-height: 50px !important; }
  #playBar { height: 26px !important; }
  #playBar::-webkit-slider-thumb {
    -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--ps-accent); border: 2px solid #fff; cursor: pointer;
  }
  #playBar::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--ps-accent); border: 2px solid #fff; }
  /* 播放键别太大：去掉放大、收窄、内缩图标 */
  #playSpeedLabel { font-size: 16px !important; }
  .ps-ev-dot { width: 15px; height: 15px; margin-left: -7px; }
  .ui-dialog { max-width: 94vw !important; }
}

/* ── 滚动不要冒泡给页面（用户 0817 反馈）───────────────────────────────
   症状：记分板/载具表这类列表滚到头之后再继续滚，浏览器会把滚动交给最近的
   可滚动祖先（也就是整个页面），页面一动，你瞄准的位置就跟着移走，点下去就偏了。
   这和之前地图那次是同一个根因的两种表现——那次是滚轮缺 preventDefault，
   这次是滚动链式传播（scroll chaining）。

   用 :where() 的零特异性通配，而不是去一个个列出 #scoreBoard/#vehicles/…：
   overscroll-behavior 只对【真正会滚】的元素有意义，加在别的元素上是空操作，
   而列出选择器的做法以后每新增一个可滚动面板就会漏一个。 */
:where(*) { overscroll-behavior: contain; }
/* 页面本身也别橡皮筋回弹——这个应用是整屏的，根本不该有页面级滚动 */
html, body { overscroll-behavior: none; }

/* ────────── 回放库(tools/library):直接进 /tracker、手上还没有任何一局时的那一页 ──────────
   原版此时只给一个裸的 "Select file from local or URL" 输入框,普通玩家在这儿是死路;
   现在摆的是首页那份"这一天打了哪些局"。整屏盖住原版的选文件界面和加载条。 */
body.ps-lib-on #DemoSelectionInterface, body.ps-lib-on #loadingStatusOverlay { display: none !important; }
#psLib { position: fixed; inset: 0; z-index: 94; overflow-y: auto; background: var(--ps-bg);
  white-space: normal; -webkit-overflow-scrolling: touch; }
.ps-lib-in { max-width: 760px; margin: 0 auto; padding: 22px 16px 40px; }
.ps-lib-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ps-lib-t { font-size: 21px; font-weight: 800; color: var(--ps-ink); letter-spacing: .02em; }
.ps-lib-s { font-size: 12px; color: var(--ps-dim); margin-top: 3px; }
.ps-lib-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--ps-panel2);
  color: var(--ps-ink); border: 1px solid var(--ps-line); border-radius: 9px; padding: 8px 12px;
  font: inherit; font-size: 13px; cursor: pointer; }
.ps-lib-btn:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.ps-lib-btn .mi { width: 15px; height: 15px; fill: currentColor; }
.ps-lib-btn.wide { width: 100%; box-sizing: border-box; justify-content: center; margin-top: 2px; }
/* 日期条:‹ 日期 › —— 和看板首页同一种翻法(一整个 PR 日为一段) */
.ps-lib-day { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 10px; }
.ps-lib-day .lab { min-width: 150px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ps-ink); }
.ps-lib-nav { background: var(--ps-panel); color: var(--ps-ink); border: 1px solid var(--ps-line);
  border-radius: 9px; width: 34px; height: 32px; font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.ps-lib-nav:hover:not(:disabled) { border-color: var(--ps-accent); color: var(--ps-accent); }
.ps-lib-nav:disabled { opacity: .35; cursor: default; }
.ps-lib-list { display: flex; flex-direction: column; gap: 6px; }
.ps-lib-msg { text-align: center; color: var(--ps-dim); font-size: 13px; padding: 34px 0; }
/* 一行 = 一局:时刻 / 底图 / 地图名+模式+人数时长 / 票数 / ▶ */
.ps-lib-r { display: flex; align-items: center; gap: 11px; width: 100%; box-sizing: border-box; text-align: left;
  background: var(--ps-panel); border: 1px solid var(--ps-line); border-radius: 11px;
  padding: 8px 12px 8px 8px; font: inherit; color: var(--ps-ink); cursor: pointer; }
.ps-lib-r:hover:not(:disabled) { border-color: var(--ps-accent); }
.ps-lib-r:disabled { opacity: .5; cursor: default; }
.ps-lib-r .tm { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--ps-dim);
  font-variant-numeric: tabular-nums; width: 42px; text-align: center; }
.ps-lib-r .th { flex: 0 0 auto; width: 74px; height: 42px; object-fit: cover; border-radius: 7px;
  background: var(--ps-panel2); display: block; }
.ps-lib-r .mid { flex: 1 1 auto; min-width: 0; display: block; }
.ps-lib-r .mn { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.ps-lib-r .chip { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--ps-dim);
  border: 1px solid var(--ps-line); border-radius: 5px; padding: 1px 5px; }
.ps-lib-r .sub { display: block; font-size: 11px; color: var(--ps-dim); margin-top: 2px; }
.ps-lib-r .sc { flex: 0 0 auto; font-size: 14px; font-variant-numeric: tabular-nums; }
.ps-lib-r .sc i { color: var(--ps-dim); font-style: normal; margin: 0 3px; }
.ps-lib-r .sc .t1 { color: var(--ps-red); }
.ps-lib-r .sc .t2 { color: var(--ps-blu); }
.ps-lib-r .go { flex: 0 0 auto; color: var(--ps-dim); line-height: 0; }
.ps-lib-r .go .mi { width: 16px; height: 16px; fill: currentColor; }
.ps-lib-r:hover:not(:disabled) .go { color: var(--ps-accent); }
.ps-lib-imp { display: flex; gap: 6px; align-items: center; }
.ps-lib-hint { font-size: 11px; color: var(--ps-dim); margin-top: 10px; line-height: 1.5; }
@media (max-width: 560px) {
  .ps-lib-r .th { width: 54px; height: 34px; }
  .ps-lib-r .sc { font-size: 12px; }
  .ps-lib-in { padding: 16px 10px 30px; }
}

/* ── 记分板(tools/board)里【只有实时源才有】的那几件:载具、小队战力、⇄ 换边 ──
   0903 起两块板是同一份 HTML,差异按数据源能力开关,不再各写一块板子。
   一行里放什么也是这次定的:名字 + 小队/兵种 + K-D。得分/评分/ping/国别都从行里撤了 ——
   评分和国别搬进"管理员操作"那张玩家卡,ping 看了也做不了什么。 */
.pp-prow .pp-veh { color: #c9a86a; font-size: 10px; margin-left: 6px; white-space: nowrap; }
.pp-prow .pp-veh.dim { color: var(--ps-dim); }
.pp-sqpw { color: var(--ps-dim); font-size: 9px; font-weight: 400; text-transform: none;
  letter-spacing: 0; margin-left: auto; flex: 0 0 auto; }
/* ⇄:整队的在小队头上,单人的在这一行右端 —— 站主要的"有时候换整队,有时候只换一两个人"。
   两种都只是【进换边清单】(tools/switchcart),攒够了一次发,不是点一下就发命令。 */
.pp-sw { background: rgba(90,162,224,.14); border: 1px solid var(--ps-line); color: var(--ps-blu);
  border-radius: 5px; font: inherit; font-size: 11px; line-height: 1; padding: 2px 6px;
  cursor: pointer; flex: 0 0 auto; }
.pp-sw:hover { background: rgba(90,162,224,.3); border-color: var(--ps-blu); }
.pp-sw.queued { background: var(--ps-accent); border-color: var(--ps-accent); color: var(--ps-acc-ink); }
.pp-sq .pp-sw { margin-left: 6px; }
/* 实时窗口(#psLiveScores)里这块板子的容器是窄的:两列并排就够,手机上收成单列 */
#psLiveScores .pp-two { gap: 8px; }
#psLiveScores .pp-team { margin-top: 4px; }
@media (max-width: 820px) {
  #psLiveScores .pp-two { flex-direction: column; }
  #psLiveScores .pp-tcol { width: 100%; }
}

/* 这两个类名 0904 之前住在选中框那一段里,别的工具(mapcard/playercard/record)也在用 ——
   选中卡改版时把那一段整段换掉了,补回来一份公用的,不然那几张卡的暗色小字全变默认色 */
.ps-clan { color: var(--ps-dim); font-size: 11px; font-weight: 400; }
.ps-dim { color: var(--ps-dim); font-size: 12px; }
