* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #0d1117;
  color: #e6edf3;
  font: 13px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  display: flex;
  /* 窄窗口时横向滚动，否则侧栏标题会被压成竖排 */
  min-width: 1120px;
  overflow: hidden;
}
button { font: inherit; cursor: pointer; }

/* 滚动条：Windows 默认滚动条在深色页面上是一条亮灰宽带（左栏那条竖条最抢眼，
   还带上下箭头），统一改成 8px 的暗色圆角滑块，hover 才提亮；轨道透明不占视线 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a313b; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3d4753; }
::-webkit-scrollbar-corner { background: transparent; }
/* 通用隐藏：弹窗里的返回按钮/待显示元素都用它切换 */
.hide { display: none !important; }

/* ---------------- 左侧栏 ---------------- */
#side {
  width: 232px; flex: 0 0 232px;
  background: #10151c;
  display: flex; flex-direction: column;
  overflow-y: auto;
  /* 滑块只有 8px，不预留的话出现/消失时内容会左右抽一下 */
  scrollbar-gutter: stable;
}
.brand {
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  border-bottom: 1px solid #21262d;
}
.brand b { font-size: 15px; letter-spacing: .5px; }
/* 数字版本号徽标：贴在标题右侧，比标题小一号，不抢注意力但一眼能看到 */
.brand .ver {
  font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .3px;
  padding: 1px 5px; margin-left: 4px; vertical-align: 2px;
  color: #7d8590; background: #161b22; border: 1px solid #21262d; border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.brand .ver:empty { display: none; }
.brand span { font-size: 10.5px; line-height: 1.45; color: #7d8590; }

/* 标注人：多人共用一个链接，从名单里选（不选则标记记为集体标注） */
.whoBox {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-bottom: 1px solid #1b2027;
}
.whoBox label { flex: 0 0 auto; font-size: 11px; color: #7d8590; letter-spacing: 1px; }
.whoBox select {
  flex: 1; min-width: 0; padding: 5px 26px 5px 9px; border-radius: 6px;
  background: #0b0f14; border: 1px solid #30363d; color: #e6edf3; font-size: 12px;
  appearance: none;
  /* 自画下拉箭头：原生箭头在暗底上发白、与输入框边框不协调 */
  background-image: linear-gradient(45deg, transparent 50%, #7d8590 50%),
                    linear-gradient(135deg, #7d8590 50%, transparent 50%);
  background-position: calc(100% - 13px) calc(50% - 1px), calc(100% - 9px) calc(50% - 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.whoBox select:focus { outline: none; border-color: #1f6feb; }
.whoBox select option { background: #0b0f14; color: #e6edf3; }

#siteTabs { padding: 10px 10px 4px; display: flex; flex-direction: column; gap: 4px; }
.siteTab {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  color: #c9d1d9; text-align: left;
}
.siteTab:hover { background: #161b22; }
.siteTab.on { background: #1f6feb22; border-color: #1f6feb66; color: #fff; }
.siteTab .nm { font-size: 13.5px; font-weight: 600; }
.siteTab .ct { font-size: 11px; color: #7d8590; font-variant-numeric: tabular-nums; }
.siteTab.on .ct { color: #9fb3c8; }

/* 目标进度：贴在行底的细条，宽度即「有效/目标」。
   绝对定位不占行内布局，48 类的长列表也不会因此变高。
   未满金色、已满绿色，与 .ct.short/.full 的颜色语义一致。 */
.siteTab, .grp { position: relative; }
.goalbar {
  position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px;
  border-radius: 2px; background: #21262d; overflow: hidden; pointer-events: none;
}
.grp .goalbar { left: 10px; right: 10px; bottom: 2px; height: 2.5px; }
.goalbar i {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #9e6a03, #d29922);
  transition: width .3s ease;
}
.goalbar.full i { background: linear-gradient(90deg, #1a7f37, #3fb950); }
.grp.on .goalbar { background: #1f6feb33; }

/* 左栏拖拽把手：常态只是一条与背景同调的细线，上下渐隐，不再是
   一根顶到底的硬灰柱；hover 变蓝提示可拖，拖动时加深并带微光。 */
#resizer {
  position: relative; flex: 0 0 5px;
  cursor: col-resize; background: transparent;
}
#resizer::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 2px; width: 1px;
  background: linear-gradient(180deg, transparent, #232a33 12%, #232a33 88%, transparent);
  transition: left .12s ease, width .12s ease, background .12s ease, box-shadow .12s ease;
}
#resizer:hover::after {
  left: 1px; width: 3px; border-radius: 3px; background: #1f6feb88;
}
body.side-drag { cursor: col-resize; }
body.side-drag * { cursor: col-resize !important; user-select: none !important; }
body.side-drag #resizer::after {
  left: 1px; width: 3px; border-radius: 3px; background: #1f6feb;
  box-shadow: 0 0 10px rgba(31, 111, 235, .55);
}

.sideSec { padding: 10px 10px 4px; border-top: 1px solid #1b2027; margin-top: 6px; }
.sideTitle { font-size: 11px; color: #7d8590; letter-spacing: 1px; padding: 0 6px 6px; }
#groupList { display: flex; flex-direction: column; gap: 2px; }
.grp {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 10px; border-radius: 6px;
  background: transparent; border: 0; color: #adbac7; text-align: left;
}
.grp:hover { background: #161b22; }
.grp.on { background: #1f6feb22; color: #fff; }
.grp .ct { font-size: 11px; color: #6e7681; font-variant-numeric: tabular-nums; }
/* 目标口径：有效/目标。未满用黄色提醒「还要补」，满额给绿色。 */
.grp .ct.short { color: #d29922; }
.grp .ct.full { color: #3fb950; }
.grp.on .ct.short, .grp.on .ct.full { color: inherit; }
/* 存疑徽标：分组行和站点行共用 */
.badge {
  font-size: 10px; padding: 0 5px; border-radius: 8px;
  background: #bb800933; color: #d29922; border: 1px solid #bb800955;
}

.keys { padding: 0 6px 10px; font-size: 11.5px; color: #7d8590; line-height: 2; }
kbd {
  background: #21262d; border: 1px solid #30363d; border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; font-size: 11px; color: #c9d1d9;
}
.ghost {
  background: #21262d; border: 1px solid #30363d; color: #c9d1d9;
  border-radius: 6px; padding: 6px 10px; font-size: 12px;
}
.ghost:hover { background: #30363d; }
#qualBtn { width: calc(100% - 12px); margin: 0 6px 10px; }
/* 顶栏图标按钮（标注统计入口）：与「重扫」同高，图标居中 */
.iconBtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border-radius: 7px;
  background: #21262d; border: 1px solid #30363d; color: #adbac7;
}
.iconBtn:hover { background: #30363d; color: #fff; }

/* ---------------- 主区 ---------------- */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; transition: margin-right .22s ease; position: relative; }
/* 切站/切分组加载进度：不透明盖掉上一站残留，转圈 + 进展文案 */
.gridLoad {
  position: absolute; inset: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #0d1117;
}
.gridLoad.hide { display: none; }
.glSpin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #30363d; border-top-color: #1f6feb;
  animation: glSpinRot .9s linear infinite;
}
@keyframes glSpinRot { to { transform: rotate(360deg); } }
#gridLoadText { font-size: 13px; color: #8b949e; }

#bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid #21262d; background: #0d1117;
  position: sticky; top: 0; z-index: 20;
}
.titleWrap { display: flex; align-items: baseline; gap: 10px; min-width: 220px; }
#h1 { font-size: 16px; margin: 0; }
#h1sub { font-size: 11.5px; color: #7d8590; }
.tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
#q {
  width: 260px; padding: 7px 11px; border-radius: 7px;
  background: #0b0f14; border: 1px solid #30363d; color: #e6edf3; font-size: 12.5px;
}
#q:focus { outline: none; border-color: #1f6feb; }
.chk { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #adbac7; cursor: pointer; }
.seg { display: flex; border: 1px solid #30363d; border-radius: 7px; overflow: hidden; }
.seg button {
  background: transparent; border: 0; color: #8b949e; padding: 6px 11px; font-size: 12px;
  border-right: 1px solid #30363d;
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: #1f6feb; color: #fff; }
.seg button b {
  margin-left: 3px; font-weight: 600; opacity: .7;
  font-variant-numeric: tabular-nums;
}
.seg button.on b { opacity: .92; }

/* ---------------- 人工筛选覆盖率（当前类目一条，按标注人分段） ---------------- */
/* 用户要的就是一个数：这个类目被人工筛掉多少了。所以只有一条槽，
   谁标了多少就占多长；多人复核同一类时颜色能看出谁在干、各干了多少。 */
.covRow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 7px 18px 8px; border-bottom: 1px solid #1b2027;
  font-size: 11.5px; color: #8b949e;
}
.covRow.hide { display: none; }
.covLabel { color: #adbac7; white-space: nowrap; }
.covNum {
  color: #e6edf3; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.covNum em { color: #8b949e; font-weight: 400; font-style: normal; }
.covTrack {
  flex: 1; min-width: 160px; height: 9px; border-radius: 5px;
  background: #21262d; overflow: hidden; display: flex;
}
.covTrack i { display: block; height: 100%; transition: width .3s ease; }
/* 段与段之间留一道暗缝：两个人颜色接近时也能看出是两段 */
.covTrack i + i { box-shadow: -1px 0 0 #0d1117; }
.covWho { display: flex; gap: 10px; flex-wrap: wrap; }
.covChip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.covChip i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.covChip b { color: #c9d1d9; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 网格正上方那一条：页签靠左（一眼能看到），统计文字跟在右侧。
   页签必须跟缩略图同一块（内容区），不属于顶部标题栏、也不进左栏 */
.legendRow {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 18px;
  border-bottom: 1px solid #1b2027;
}
.legend {
  flex: 1; min-width: 0;
  padding: 2px 0; font-size: 11.5px; color: #7d8590;
  display: flex; gap: 16px; flex-wrap: wrap;
}
.legendRow .seg { flex: 0 0 auto; }
.legend b { color: #adbac7; font-weight: 600; }

/* 横竖屏子页签行：贴在页签行下面，比主行细一圈 */
.oriRow { padding-top: 0; gap: 10px; }
.oriRow .seg button { padding: 3px 10px; font-size: 11.5px; }
.oriHint { font-size: 11px; color: #566370; }
/* 缩略图大小滑杆：贴在页签行最右侧 */
.sizeCtl { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #8b949e; white-space: nowrap; }
.sizeCtl input[type=range] { width: 140px; accent-color: #1f6feb; cursor: pointer; }
.sizeCtl b { color: #c9d1d9; font-variant-numeric: tabular-nums; min-width: 30px; }

#grid {
  flex: 1; overflow-y: auto; padding: 14px 18px 60px;
  display: grid; gap: 12px;
  /* 卡片最小宽度走变量（默认 320，比旧 248 大一圈；页签行右侧滑杆可调 200~520） */
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 320px), 1fr));
  /* 行高必须由内容撑开。用默认的 auto 时，.card 的 overflow:hidden 会让它
     作为 grid item 的自动最小尺寸归零，行高直接压成 border 的 2px，
     缩略图全被裁掉（测得 card_clientHeight=0 而 scrollHeight=191）。 */
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
}
#more { padding: 0 18px 40px; text-align: center; }

/* ---------------- 卡片 ---------------- */
.card {
  position: relative; border-radius: 9px; overflow: hidden;
  background: #161b22; border: 1px solid #21262d;
  cursor: pointer; user-select: none;
  display: flex; flex-direction: column;
}
.card:hover { border-color: #3d444d; }
.thumb {
  position: relative; width: 100%;
  background: #0b0f14;
  display: block; overflow: hidden;
}
/* 高度跟图片自身比例走（三帧正方形是 3:1，旧的 2x2 是 16:9）：
   不再用 padding-top 固定容器高度——容器比图片高时就会在底部留一条黑边。 */
.thumb img {
  display: block; width: 100%; height: auto;
}
/* 未生成时用同比例占位撑住卡片高度，避免卡片先塌后跳 */
.thumb .ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 3 / 1;
  color: #4a5560; font-size: 11.5px;
  background: repeating-linear-gradient(45deg, #0d1117, #0d1117 8px, #11161d 8px, #11161d 16px);
}

/* 悬停提示：半区只铺一层淡色告诉人“这半边是哪边”，字做成实心胶囊，
   这样既明显又不把缩略图遮死（之前整片高不透明度色块把画面盖掉了） */
.halfHint {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .12s ease; pointer-events: none;
}
.halfHint.left {
  left: 0;
  background: linear-gradient(90deg, rgba(46,160,67,.30), rgba(46,160,67,.05));
  border-right: 2px dashed rgba(255,255,255,.30);
}
.halfHint.right {
  right: 0;
  background: linear-gradient(270deg, rgba(218,54,51,.30), rgba(218,54,51,.05));
}
.halfHint .pill {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .5px; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.26), 0 4px 14px rgba(0,0,0,.6);
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.halfHint.left .pill { background: #2ea043; }
.halfHint.right .pill { background: #da3633; }
/* 轻微压暗即可，不能再把画面盖没 */
.card:not(.is-keep):not(.is-rej):hover .thumb img { filter: brightness(.86); }
.card:hover .halfHint { opacity: 1; }
.card.is-keep .halfHint, .card.is-rej .halfHint { opacity: 0; }

/* 序号 */
.no {
  position: absolute; left: 5px; top: 5px; z-index: 4;
  background: rgba(0,0,0,.66); border-radius: 5px; padding: 1px 6px;
  font-size: 10.5px; color: #9fb3c8; font-variant-numeric: tabular-nums;
}
/* 判定人角标：已标记卡片左上角编号下方，紫色区分于时长/存疑 */
.who {
  position: absolute; left: 5px; top: 26px; z-index: 4;
  background: rgba(0,0,0,.72); border-radius: 4px; padding: 1px 6px;
  font-size: 10.5px; color: #d2a8ff;
}
.who:empty { display: none; }
/* 判定结果直接写进判定人角标：✓ 张三 / ✕ 李四，一个角标同时回答
   「判成了什么」和「谁判的」，不必再铺一层整幅色块。 */
.card.is-keep .who { background: rgba(46,160,67,.92); color: #fff; }
.card.is-rej .who { background: rgba(218,54,51,.92); color: #fff; }
/* 时长 */
.dur {
  position: absolute; right: 5px; bottom: 5px; z-index: 4;
  background: rgba(0,0,0,.72); border-radius: 4px; padding: 1px 5px;
  font-size: 10.5px; color: #d0d7de; font-variant-numeric: tabular-nums;
}
/* 别人正在标这条：挂在缩略图底部居中，避开左下的存疑/字幕和右下的时长 */
.lockTag {
  position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
  z-index: 4; padding: 1px 7px; border-radius: 4px; white-space: nowrap;
  background: rgba(187,128,9,.92); color: #1a1200;
  font-size: 10.5px; font-weight: 600; pointer-events: none;
}
.lockTag:empty { display: none; }
/* 存疑角标 */
.sus {
  position: absolute; left: 5px; bottom: 5px; z-index: 4;
  border-radius: 4px; padding: 1px 6px; font-size: 10.5px; font-weight: 600;
  background: #bb8009; color: #1a1200;
}
.sus.high { background: #da3633; color: #fff; }
/* 画面字幕/花字角标：紫色，和红黄系的「⚠ 存疑」分档颜色区分开 */
.sub {
  position: absolute; left: 5px; bottom: 26px; z-index: 4;
  border-radius: 4px; padding: 1px 6px; font-size: 10.5px; font-weight: 600;
  background: #7d4bc9; color: #fff;
}
.sus.mid { background: #d29922; color: #1a1200; }
.sus.low { background: #9e6a03; color: #ffe6b0; }

/* 标题行：点标题开播放器，复制按钮独立 */
.titleRow {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 8px 9px 9px;
}
.title {
  flex: 1; min-width: 0;
  font-size: 12.5px; line-height: 1.45; color: #c9d1d9;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.title:hover { color: #58a6ff; text-decoration: underline; }
.copy {
  flex: 0 0 auto; margin-top: 1px;
  background: #21262d; border: 1px solid #30363d; color: #8b949e;
  border-radius: 5px; width: 24px; height: 22px; padding: 0;
  font-size: 12px; line-height: 1;
}
.copy:hover { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.copy.ok { background: #238636; border-color: #2ea043; color: #fff; }

/* 标记遮罩：整张盖住，靠点同侧撤销不够直观，右上角另给 ↺ */
.mark { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
/* 判定结果只留一圈细描边。以前是整幅 26%/30% 的绿/红铺满，
   判完想回头核对画面时内容全被染色——而缩略图恰好是判完还要看的东西。
   具体判成什么由左上角 .who 角标（✓/✕ + 判定人）说明。 */
.card.is-rej .mark { border: 2px solid rgba(218,54,51,.85); }
.card.is-keep .mark { border: 2px solid rgba(46,160,67,.85); }
.card.is-rej .title { color: #f85149; text-decoration: line-through; }
.card.is-keep .title { color: #3fb950; }

.undo {
  position: absolute; right: 5px; top: 5px; z-index: 6;
  display: none; align-items: center;
  height: 22px; padding: 0 9px; border-radius: 11px;
  background: rgba(0,0,0,.78); border: 1px solid rgba(255,255,255,.34);
  color: #e6edf3; font-size: 11.5px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.card.is-rej .undo { display: flex; border-color: rgba(242,85,90,.65); }
.card.is-keep .undo { display: flex; border-color: rgba(63,185,80,.65); }
.undo:hover { background: #4c8dff; border-color: #4c8dff; color: #fff; }

/* ---------------- 右侧抽屉 ---------------- */
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  /* 用 min() 而不是 max-width:62vw：窄视口下 62vw 会把抽屉压到一百多像素，
     视频只有 107px 宽。 */
  width: min(560px, 92vw);
  background: #0f141a; border-left: 1px solid #30363d;
  display: flex; flex-direction: column; z-index: 60;
  transform: translateX(102%); transition: transform .22s ease;
  box-shadow: -12px 0 40px rgba(0,0,0,.5);
}
.drawer.on { transform: translateX(0); }
/* 抽屉中间区（标签 + 视频 + 12 帧缩略图）可能比窗口还高：这一段自己滚。
   不这样做 flex 会把它压扁，里面的东西溢出到下一块上——原来的键盘图
   就是这么压在判定按钮上的。顶栏 / 文件名 / 判定 / 上下条永远钉在可视区内。 */
.dwBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dwHead, .dwName, .dwActs, .dwNav { flex: 0 0 auto; }
.dwBody::-webkit-scrollbar { width: 8px; }
.dwBody::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
.dwBody::-webkit-scrollbar-track { background: transparent; }
/* 抽屉弹出时主区让位：缩略图网格收窄后 auto-fill 自动减列重排，不再被抽屉盖住。
   关闭抽屉时 margin 归零复原。 */
body.drawer-open #main { margin-right: min(560px, 92vw); }
.dwHead {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 14px 8px; border-bottom: 1px solid #1b2027;
}
.dwTitle { flex: 1; font-size: 13.5px; line-height: 1.5; color: #e6edf3; word-break: break-all; }
.dwClose {
  flex: 0 0 auto; background: #21262d; border: 1px solid #30363d; color: #c9d1d9;
  width: 26px; height: 26px; border-radius: 6px; padding: 0; line-height: 1;
}
.dwClose:hover { background: #da3633; border-color: #da3633; color: #fff; }
.dwMeta { padding: 6px 14px 0; font-size: 11.5px; color: #7d8590; }
/* 别人正在标这条：一条窄带，不抢画面。占锁期间判定按钮置灰。 */
.dwLock {
  display: flex; align-items: center; gap: 7px;
  margin: 7px 14px 0; padding: 5px 9px; border-radius: 7px;
  background: rgba(187,128,9,.16); border: 1px solid rgba(227,179,65,.42);
  font-size: 11.5px; color: #efd27a;
}
.dwLock.hide { display: none; }
.dwLock .lockDot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: #e3b341; animation: lockPulse 1.4s ease-in-out infinite;
}
@keyframes lockPulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
/* 被锁住时判定入口不可点，避免两个人同时改同一条 */
.dwActs button:disabled { opacity: .38; cursor: not-allowed; }
.dwTags { padding: 6px 14px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.dwTags .t {
  font-size: 11px; padding: 2px 7px; border-radius: 9px;
  background: #bb800922; color: #d29922; border: 1px solid #bb800955;
}
.dwTags .t i { font-style: normal; color: #8b949e; }
.dwVideo { padding: 10px 14px 0; position: relative; }
.dwVideo video { width: 100%; max-height: 42vh; background: #000; border-radius: 8px; display: block; }
/* 判定反馈：按下 A/D/S 后先在播放器上闪一下“做了什么”，再切下一条 */
.dwFlash {
  position: absolute; inset: 10px 14px auto; height: calc(100% - 10px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; opacity: 0; pointer-events: none; z-index: 5;
}
/* 判定反馈胶囊：瞬时闪一下就走。尺寸从 22px 收到 17px——
   它现在只负责「刚才按下的那一下生效了」，不需要占满画面正中被盯着看。 */
.flashPill {
  padding: 5px 15px; border-radius: 999px;
  font-size: 17px; font-weight: 800; letter-spacing: 1px; color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.26), 0 6px 22px rgba(0,0,0,.55);
}
.dwFlash.keep .flashPill { background: #2ea043; }
.dwFlash.rej .flashPill { background: #da3633; }
/* 跳过：不改标记，只是往后走，用中性蓝色区分于认可/筛除 */
.dwFlash.skip .flashPill { background: #1f6feb; }
/* 抽屉下方的常驻键盘引导：不按也能看到该怎么用，按了就亮对应键 */
/* 键位提示：只留 A/S/D 三个键（整张键盘图已删除，它和按钮叠在一起了） */
.keyTips { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: #8b949e; }
.keyTips span { display: flex; align-items: center; gap: 5px; }
.keyTips kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 6px; border-radius: 5px;
  font: 600 11px/1 ui-monospace, Consolas, monospace; color: #c9d1d9; background: #1b2129;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 2px 0 #0a0e13;
}
.keyTips kbd.a { color: #7ee787; box-shadow: inset 0 0 0 1px rgba(46,160,67,.55), 0 2px 0 #0a0e13; }
.keyTips kbd.d { color: #ff7b72; box-shadow: inset 0 0 0 1px rgba(218,54,51,.55), 0 2px 0 #0a0e13; }
.keyTips kbd.s { color: #79c0ff; box-shadow: inset 0 0 0 1px rgba(31,111,235,.55), 0 2px 0 #0a0e13; }
/* 按下时这三个键跟着跳一下（动画原来挂在键盘图上，图删了改挂这里） */
.keyTips kbd.down { color: #fff; transform: translateY(2px); animation: keyPress .42s ease-out; }
.keyTips kbd.a.down { background: #2ea043; }
.keyTips kbd.s.down { background: #1f6feb; }
.keyTips kbd.d.down { background: #da3633; }
@keyframes keyPress {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(3px) scale(1.22); }
  100% { transform: translateY(2px) scale(1); }
}
.dwFlash.on { animation: dwFlash .52s ease-out both; }
@keyframes dwFlash {
  0% { opacity: 0; transform: scale(.72); }
  22% { opacity: 1; transform: scale(1.08); }
  62% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
/* 切换条目时上一段的最后一帧还挂着，先压暗到接近全黑，等新帧到了再恢复 */
.dwVideo video.loading { opacity: .12; }
/* 加载进度：叠在画面顶部，不占布局；只在「还没得看」时出现，出画面/缓存完就淡出 */
.dwLoad {
  position: absolute; left: 14px; right: 14px; top: 10px; z-index: 4;
  padding: 7px 10px 8px; border-radius: 8px 8px 0 0;
  background: linear-gradient(rgba(6,9,13,.92), rgba(6,9,13,.05));
  pointer-events: none; transition: opacity .3s;
}
.dwLoad[hidden] { display: none; }
.dwLoad.done { opacity: 0; }
.dwLoadBar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.16); overflow: hidden; }
.dwLoadBar i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, #1f6feb, #58a6ff); transition: width .18s linear;
}
/* 转码阶段总量未知：用一段来回滑的色块表示「在动，只是没数」 */
.dwLoad.indet .dwLoadBar i { width: 34%; animation: dwIndet 1.15s ease-in-out infinite; }
@keyframes dwIndet {
  0% { margin-left: -34%; }
  100% { margin-left: 100%; }
}
.dwLoadText {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 5px; font-size: 11px; color: #c9d1d9;
  font-variant-numeric: tabular-nums;
}
.dwLoadText span:last-child { color: #8b949e; }
.dwName {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 14px 0; padding: 7px 9px;
  background: #0b0f14; border: 1px solid #21262d; border-radius: 7px;
}
#dwWho { font-size: 11px; color: #d2a8ff; white-space: nowrap; }
#dwWho:empty { display: none; }
.dwName code {
  flex: 1; min-width: 0; font-size: 11px; color: #8b949e;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dwName .copy { width: auto; padding: 0 9px; height: 24px; font-size: 11.5px; color: #c9d1d9; }

/* 抽屉缩略图网格：3×4 共 12 帧。用户希望大到大体上不必播视频就能判断，
   所以单帧从旧的横条 85px 宽提到 170px 左右，帧数也翻倍。
   一张 jpg 用 background-position 切成 12 格：隧道下 12 个小图要 12 次往返，
   拼一张只算 1 次。grid-template-columns 与 JS 的 STRIP_COLS/ROWS 必须同步。 */
.dwStrip { padding: 12px 14px 0; }
.dwStrip.hide { display: none; }
.dwStripHead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.dwStripHead b { font-size: 12px; color: #e6edf3; font-weight: 600; }
.dwStripHead span { font-size: 11px; color: #6e7681; }
.dwStripGrid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  border-radius: 6px; overflow: hidden; background: #0d1117;
}
.stripCell {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  aspect-ratio: 16 / 9; cursor: pointer; background-color: #161b22;
  background-repeat: no-repeat; filter: brightness(.94);
  transition: filter .12s;
}
.stripCell:hover { filter: brightness(1.2); }
.stripCell:active { filter: brightness(1.35); }
.stripT {
  position: absolute; left: 3px; bottom: 3px; padding: 1px 4px;
  border-radius: 3px; background: rgba(6,9,13,.74);
  color: #d7dee7; font-size: 10px; font-style: normal; line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
/* 这是等距抽样的 12 帧、不是连续画面，必须写清楚，否则会被当成“视频里真有这十二帧依次出现” */
.dwStripNote { margin-top: 6px; font-size: 11px; color: #6e7681; line-height: 1.45; }
.dwStripNote b { color: #8b949e; font-weight: 600; }

/* 首次进入强制选择标注人 */
#whoBox { width: min(420px, 100%); }
.whoBody { white-space: normal; font-family: inherit; display: flex; flex-direction: column; gap: 10px; }
.whoLead { font-size: 12.5px; color: #8b949e; }
.whoOpts { display: flex; flex-direction: column; gap: 8px; }
.whoOpt { padding: 11px 14px; border-radius: 8px; text-align: left; font-size: 14px;
  background: #161b22; border: 1px solid #30363d; color: #e6edf3; cursor: pointer; }
.whoOpt:hover { background: #1f6feb22; border-color: #1f6feb; }
.whoSkip { margin-top: 4px; align-self: center; background: none; border: 0; color: #6e7681;
  font-size: 12px; cursor: pointer; text-decoration: underline; }
.whoSkip:hover { color: #8b949e; }

.dwActs { display: flex; gap: 8px; padding: 12px 14px 12px; }
.dwActs button {
  flex: 1; padding: 9px 0; border-radius: 8px; font-size: 12.5px;
  border: 1px solid #30363d; background: #21262d; color: #c9d1d9;
}
.dwActs .keep { background: #238636; border-color: #2ea043; color: #fff; }
.dwActs .keep:hover { background: #2ea043; }
.dwActs .rej { background: #da3633; border-color: #f85149; color: #fff; }
.dwActs .rej:hover { background: #f85149; }
.dwActs .ghost { flex: 0 0 96px; }
.dwNav {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  /* 贴底靠 .dwBody 占满剩余高度，不再用 margin-top:auto */
  padding: 10px 14px 14px;
  border-top: 1px solid #1b2027;
}
.dwNav button {
  background: #21262d; border: 1px solid #30363d; color: #c9d1d9;
  border-radius: 7px; padding: 7px 12px; font-size: 12px;
}
.dwNav #dwPos { font-size: 11.5px; color: #7d8590; font-variant-numeric: tabular-nums; }
/* 键位提示吃下中间剩余宽度并居中，宽度不够时换行（手机上） */
.dwNav .keyTips { flex: 1; justify-content: center; }

/* ---------------- 顶部「有新视频」横幅 ---------------- */
.newbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 18px; font-size: 12.5px; color: #f0d9a0;
  background: linear-gradient(180deg, #3a2c07, #2b2106);
  border-bottom: 1px solid #7a5c07;
}
.newbar.hide { display: none; }
.newbar .dot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: #e3b341; box-shadow: 0 0 0 3px rgba(227,179,65,.22);
}
.newbar b { color: #fff; font-variant-numeric: tabular-nums; }
.newbar .grow { flex: 1; }
.newbar button {
  background: #d29922; border: 1px solid #e3b341; color: #1a1200;
  border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 600;
}
.newbar button:hover { background: #e3b341; }
.newbar button:disabled { opacity: .6; cursor: default; }
.newbar button.ghost {
  background: transparent; border-color: #7a5c07; color: #d8c390; font-weight: 400;
}
.newbar button.ghost:hover { background: #ffffff14; }
/* ---------------- 版本横幅（唯一的更新提示） ---------------- */
.verbar {
  color: #cfe3ff;
  background: linear-gradient(180deg, #10304f, #0c2338);
  border-bottom: 1px solid #1f6feb88;
}
.verbar .dot { background: #4c9eeb; box-shadow: 0 0 0 3px rgba(76,158,235,.22); }
.verbar button { background: #1f6feb; border-color: #4c9eeb; color: #fff; }
.verbar button:hover { background: #2b7ff5; }
.verbar button.ghost { background: transparent; border-color: #1f6feb66; color: #a9c7e8; }
.verbar button.ghost:hover { background: #1f6feb1f; }
/* ---------------- 素材盘离线横幅（长期状态：素材盘拔了/盘符没挂上） ---------------- */
.offbar {
  color: #ffd7d5;
  background: linear-gradient(180deg, #3d1210, #2a0d0b);
  border-bottom: 1px solid #8b1d1c;
}
.offbar .dot { background: #f85149; box-shadow: 0 0 0 3px rgba(248,81,73,.22); }

/* ---------------- toast / modal ---------------- */
#toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: #1f6feb; color: #fff; padding: 9px 18px; border-radius: 20px;
  font-size: 12.5px; opacity: 0; pointer-events: none; transition: .18s; z-index: 200;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 40px;
}
.modal.on { display: flex; }
.modalBox {
  width: min(980px, 100%); max-height: 100%;
  background: #0f141a; border: 1px solid #30363d; border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
}
.modalHead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #21262d !important; background: #0f141a;
}
.modalBody {
  padding: 14px 20px 30px; overflow-y: auto; font-size: 12.5px; line-height: 1.75;
  color: #c9d1d9; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* ---------------- 标注统计（按人 × 类别） ---------------- */
/* 这里不是预格式化文本，覆盖 modalBody 的 pre-wrap/等宽字体 */
.statBody { white-space: normal; font-family: inherit; }
#statBox2 { width: min(920px, 100%); }
.statSum {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 12px; border-radius: 8px;
  background: #161b22; border: 1px solid #21262d;
}
.statSum b { font-size: 14px; }
.statSum span { font-size: 12px; color: #8b949e; }
/* 第一层：排行榜行（名字 / 横条 / 条数 / 准确率），点开进他的类别明细 */
.rankCap { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 2px 2px 12px; }
.rankCap b { font-size: 14px; }
.rankCap span { font-size: 11.5px; color: #8b949e; }
.rankRow {
  display: grid; grid-template-columns: 92px 1fr 92px 62px;
  align-items: center; gap: 14px; width: 100%;
  padding: 13px 16px; margin-bottom: 6px; border-radius: 10px;
  background: #12161c; border: 1px solid #1d232b; color: #e6edf3; text-align: left;
}
.rankRow:hover { background: #1a2029; border-color: #30363d; }
.rankRow .nm { font-size: 13.5px; font-weight: 700; }
.rankRow .bar { position: relative; height: 10px; border-radius: 6px; background: #262c35; }
.rankRow .bar i {
  position: relative; display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #1f9d8a, #43c2a8);
  transition: width .25s ease;
}
/* 条头圆点：图尾落在哪，差距一眼可见 */
.rankRow .bar u {
  position: absolute; right: -1px; top: 50%; transform: translate(50%, -50%);
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .4);
}
/* 前三名配色：金 / 银 / 铜，其余保持青色（带 i 选择器压过基础规则） */
.rankRow .bar i.f1 { background: linear-gradient(90deg, #b8860b, #f2c14e); }
.rankRow .bar i.f2 { background: linear-gradient(90deg, #8d97a3, #e3e9f0); }
.rankRow .bar i.f3 { background: linear-gradient(90deg, #a4551f, #f0a35e); }
.rankRow .tot { font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.rankRow .pct { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.rankRow .pct.good { color: #3fb950; }
.rankRow .pct.bad { color: #f85149; }
/* 「集体标注」是历史聚合桶，不是人：灰色条、字也压淡 */
.rankRow.anon .nm { color: #8b949e; font-weight: 600; }
.rankRow.anon .bar i { background: linear-gradient(90deg, #4a5361, #6e7681); }
.statHint { padding: 2px 2px 0; font-size: 11.5px; color: #6e7681; }
.statTbl {
  display: flex; flex-direction: column;
  border: 1px solid #21262d; border-radius: 8px; overflow: hidden;
}
.statTr {
  display: grid; grid-template-columns: 92px 1fr 62px 62px 62px 66px;
  gap: 8px; align-items: center;
  padding: 5px 12px; font-size: 12px; border-bottom: 1px solid #161b22;
}
.statTr:last-child { border-bottom: 0; }
.statTr.hd { font-size: 11px; color: #6e7681; background: #0f141a; }
/* 行可点：直接跳回该站点/类别核对，不必手翻侧栏 */
.statTr:not(.hd) { cursor: pointer; }
.statTr:not(.hd):hover { background: #1f6feb1a; }
.statTr .c-site { color: #8b949e; }
.statTr .c-grp { color: #e6edf3; }
.statTr .c-k { color: #3fb950; font-variant-numeric: tabular-nums; }
.statTr .c-r { color: #f85149; font-variant-numeric: tabular-nums; }
.statTr .c-rat { color: #8b949e; font-variant-numeric: tabular-nums; }
.statEmpty { padding: 20px 0; color: #8b949e; }

/* ---------------- 拉框批量选择 ---------------- */
#marquee {
  position: fixed; z-index: 90; display: none; pointer-events: none;
  border: 1px solid #4aa3ff; background: rgba(74,163,255,.13); border-radius: 3px;
}
/* Shift 追加选区绿框，Alt 剔除选区红框，与默认蓝框区分 */
#marquee.add { border-color: #3fb950; background: rgba(63,185,80,.10); }
#marquee.sub { border-color: #f85149; background: rgba(248,81,73,.10); }
.card.picked { outline: 2px solid #4aa3ff; outline-offset: -2px; }
/* 拖动中给个十字光标，提示当前在拉框而不是在卡片上 */
body.marquee-on, body.marquee-on * { cursor: crosshair !important; }

#bulkBar {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 190; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px;
  background: rgba(22,27,34,.94); border: 1px solid #30363d;
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
}
#bulkBar.hide { display: none; }
#bulkBar b {
  font-size: 12.5px; color: #e6edf3; margin-right: 4px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
#bulkBar button {
  height: 30px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  font-size: 12.5px; border: 1px solid #30363d;
  background: #21262d; color: #e6edf3; white-space: nowrap;
}
#bulkBar button:hover { border-color: #4aa3ff; color: #fff; }
#bulkBar #bulkKeep { background: #238636; border-color: #2ea043; }
#bulkBar #bulkKeep:hover { background: #2ea043; }
#bulkBar #bulkRej { background: #8b1d1c; border-color: #da3633; }
#bulkBar #bulkRej:hover { background: #da3633; }
#bulkBar .ghost { background: transparent; }
#bulkBar .ghost:hover { border-color: #6e7681; }
