/* photo-browser — 深色 Google Photos 风格 */
:root {
  --bg: #101214; --panel: #17191c; --card: #1e2226;
  --text: #e8eaed; --muted: #9aa0a6; --accent: #4da3ff;
  --hover: rgba(255,255,255,.08); --border: #2b2f34;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; overflow: hidden; }
.hidden { display: none !important; }

#app { display: flex; height: calc(100vh - 22px); }   /* 底部 22px 让给备案号页脚（#beian） */

/* ─── 侧栏目录树 ─── */
#sidebar { width: 280px; min-width: 280px; background: var(--panel);
  border-right: 1px solid var(--border); overflow-y: auto; transition: margin .2s; }
#sidebar.collapsed { margin-left: -280px; }
#brand { font-size: 16px; font-weight: 600; padding: 14px 12px 10px 20px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel);
  display: flex; align-items: center; justify-content: space-between; }
#btn-collapse, #btn-reveal { background: none; border: none; color: var(--muted); font-size: 15px;
  cursor: pointer; padding: 2px 6px; border-radius: 6px; }
#brand-btns { display: flex; align-items: center; gap: 2px; }
/* 5E：管理入口（仅 admin 显示）；人物入口所有登录用户可见 */
#btn-admin, #btn-people { color: var(--muted); text-decoration: none; font-size: 12px;
  padding: 3px 7px; border: 1px solid var(--border); border-radius: 6px; white-space: nowrap; }
#btn-admin:hover, #btn-people:hover { color: var(--text); background: var(--hover); }
/* 登出（2026-09-16）：所有登录用户可见 */
#btn-logout { color: var(--muted); font-size: 12px; padding: 3px 7px;
  border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; white-space: nowrap; }
#btn-logout:hover { color: var(--text); background: var(--hover); }
#btn-collapse:hover, #btn-reveal:hover { background: var(--hover); color: var(--text); }
#btn-reveal { display: inline-flex; align-items: center; margin-left: 2px; }
#btn-reveal svg { display: block; }
#btn-reveal.on { color: var(--accent); }
.tnode { user-select: none; }
.tnode-row { display: flex; align-items: center; gap: 4px; padding: 5px 10px;
  cursor: pointer; border-radius: 6px; margin: 1px 8px; font-size: 13px; white-space: nowrap; }
.tnode-row:hover { background: var(--hover); }
.tnode-row.active { background: rgba(77,163,255,.18); color: var(--accent); }
.tnode-caret { width: 16px; text-align: center; color: var(--muted); flex: none;
  transition: transform .15s; }
.tnode-caret.open { transform: rotate(90deg); color: var(--accent); }
.tnode-name { overflow: hidden; text-overflow: ellipsis; }
.tnode-cnt { margin-left: auto; color: var(--muted); font-size: 11px; flex: none; }
/* 5E：不可浏览的导航节点（只授权深子目录时的祖先）—— 可展开导航，置灰不可打开 */
.tnode-row.nav-only { color: var(--muted); }
.tnode-row.nav-only .tnode-name { cursor: default; }
.tnode-children { margin-left: 14px; }

/* ─── 主区 ─── */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: var(--panel); flex: none; }
#btn-sidebar { background: none; border: none; color: var(--text); font-size: 18px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px; }
#btn-sidebar:hover { background: var(--hover); }
#crumb { font-size: 14px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* AI 搜索框（C1，docs/18 §4.5）：简洁灰边样式，与顶栏齐平 */
#searchbox { flex: none; width: 220px; padding: 5px 10px; font-size: 13px; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px; outline: none; }
#searchbox:focus { border-color: var(--accent); }
#searchbox::placeholder { color: color-mix(in srgb, var(--text) 40%, transparent); }
#searchbox::-webkit-search-cancel-button { cursor: pointer; }
/* 搜索范围切换（docs/35）：目录内搜索时出现，一点即切全库/本目录 */
#btn-search-scope { flex: none; padding: 5px 10px; font-size: 12px; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
#btn-search-scope:hover { background: var(--hover); }
.linkbtn { margin-top: 8px; padding: 4px 10px; font-size: 13px; color: var(--accent);
  background: none; border: 1px solid currentColor; border-radius: 6px; cursor: pointer; }
.linkbtn:hover { opacity: .8; }
.crumb-link { cursor: pointer; }
.crumb-link:hover { color: var(--accent); }
.crumb-sep { margin: 0 8px; color: color-mix(in srgb, var(--text) 50%, transparent); }
.crumb-cur { color: var(--text); }
/* 5E：不可浏览的祖先（层级仍展示，置灰不可点） */
.crumb-link.dim, .crumb-link.dim:hover, .crumb-cur.dim { color: var(--muted); cursor: default; }
#viewctl { margin-left: auto; display: flex; gap: 4px; flex: none; align-items: center; }
#count { margin-left: 0; font-size: 12px; color: var(--muted); flex: none; }
#countwrap { display: flex; flex-direction: column; align-items: flex-end; flex: none; }

/* 视图浮框：hover "视图" 按钮出现 */
#viewmenu, #sortmenu { position: relative; }
/* 排序浮框（与视图浮框同款交互） */
#btn-view, #btn-sort { background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  font-size: 12px; padding: 3px 10px; border-radius: 6px; cursor: pointer; }
#btn-view:hover, #btn-sort:hover { color: var(--text); border-color: var(--accent); }
#viewpanel, #sortpanel { display: none; position: absolute; top: 100%; right: 0; z-index: 60;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; width: 210px; box-shadow: 0 4px 16px rgba(0,0,0,.45); }
#viewmenu:hover #viewpanel, #sortmenu:hover #sortpanel { display: block; }
.vrow { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; font-size: 12px; color: var(--muted); }
.srow { cursor: pointer; border-radius: 4px; padding-left: 6px; padding-right: 6px;
  justify-content: flex-start; gap: 8px; }
.srow:hover { background: var(--hover); color: var(--text); }
.srow .radio { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--muted);
  position: relative; flex: none; }
.srow.on .radio { border-color: var(--accent); }
.srow.on .radio::after { content: ""; position: absolute; inset: 2px;
  background: var(--accent); border-radius: 50%; }
/* 三段滑动选择（小/中/大） */
.seg { position: relative; display: flex; background: var(--card); border-radius: 8px; padding: 2px; }
.seg span { position: relative; z-index: 1; padding: 2px 9px; font-size: 12px;
  color: var(--muted); cursor: pointer; transition: color .15s; }
.seg span.on { color: #fff; }
#szind { position: absolute; top: 2px; bottom: 2px; left: 2px;
  width: calc((100% - 4px) / 3); background: var(--accent); border-radius: 6px;
  transition: left .15s; }

#gridwrap { flex: 1; min-height: 0; position: relative; display: flex; }
#grid { flex: 1; min-width: 0; overflow-y: auto; padding: 0 3px 3px; display: flex; flex-wrap: wrap;
  gap: 3px; align-content: flex-start; scrollbar-width: none; }
#grid::-webkit-scrollbar { display: none; }   /* 原生滚动条由右侧独立滚动栏替代 */
/* 独立滚动栏（不覆盖图片，自带宽度空间）：拖拽快速定位，气泡显示日期/首字母 */
#scrollbar { width: 16px; flex: none; position: relative; background: var(--panel);
  border-left: 1px solid var(--border); cursor: pointer; }
#sb-thumb { position: absolute; left: 3px; right: 3px; height: 30px; border-radius: 3px;
  background: var(--muted); opacity: .55; transition: opacity .15s, background .15s; }
#scrollbar:hover #sb-thumb, #sb-thumb.drag { background: var(--accent); opacity: 1; }
#sb-bubble { position: absolute; right: 20px; transform: translateY(-50%);
  background: rgba(0,0,0,.78); color: #fff; font-size: 12px; padding: 3px 9px;
  border-radius: 4px; pointer-events: none; white-space: nowrap; }
/* 日期分组表头（非虚拟路径 sticky 吸顶；虚拟路径由 VirtGrid 内联 absolute + 布局定位，不吸顶） */
.datehead { width: 100%; position: sticky; top: 0; z-index: 3; background: var(--bg);
  font-size: 13px; color: var(--text); padding: 10px 6px 6px; }
/* 树节点加载失败占位（M3：可点重试） */
.tnode-err { padding: 6px 10px; color: var(--accent); cursor: pointer; font-size: 12px; }
.tnode-err:hover { color: var(--text); }
/* 5E：权限态提示（404 = 无可见目录，非故障）—— 不给重试入口 */
.tnode-err.muted, .tnode-err.muted:hover { color: var(--muted); cursor: default; }
.cell.ph { opacity: .35; }   /* 虚拟滚动未加载尾部占位 */
/* 瀑布流：JS 最短列打包（纵向追加），列数随预览大小档位 */
#grid.masonry { display: block; }
.msec { margin-bottom: 10px; }
.mcols { display: flex; gap: 3px; align-items: flex-start; }
.mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#grid.masonry .cell { width: 100%; }
#grid.masonry .sq::before { display: none; }
#grid.masonry .cell.folder { height: 150px; }
/* 列数由 JS 写入的 --cols 变量统一驱动（E3② 2026-09-14：与虚拟路径同口径，默认 8 列兜底） */
.cell { position: relative; width: calc(100% / var(--cols, 8) - 3px); overflow: hidden; border-radius: 4px;
  background: var(--card); cursor: pointer; }
/* 方形图区：padding-top 技巧，不依赖 aspect-ratio（旧内核兼容） */
.sq { position: relative; }
.sq::before { content: ""; display: block; padding-top: 100%; }
.sq > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; }
/* 文件名行（视图开关开启时显示） */
.fname { font-size: 11px; color: var(--muted); padding: 3px 5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-align: center; }
.cell.v { display: flex; flex-direction: column; position: absolute; }
.cell.v .sq { flex: 1 1 auto; min-height: 0; }
.cell.v .sq::before { display: none; }   /* 虚拟 masonry：高度由布局预计算显式控制 */
.cell.v .fname { flex: none; }
.cell img.rot90 { transform: rotate(90deg); }
.cell img.rot270 { transform: rotate(-90deg); }
.cell img.rot180 { transform: rotate(180deg); }
.cell .badge { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.55);
  color: #fff; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
  letter-spacing: .5px; }
.cell .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.55);
  color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.cell .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.6); }
#grid .empty { width: 100%; color: var(--muted); text-align: center; padding: 60px 0; font-size: 14px; }
.cell.folder { height: 160px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; padding: 12px 8px; text-align: center; }
.cell.folder::before { display: none; }
.cell.folder:hover { background: var(--hover); }
/* 5E：不可浏览的导航目录卡片（置灰不可点） */
.cell.folder.nav-only, .cell.folder.nav-only:hover { opacity: .5; cursor: default; background: var(--card); }
.cell .folder-icon { font-size: 36px; line-height: 1; }
.cell .folder-name { font-size: 12px; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-all; }
.cell .folder-cnt { font-size: 11px; color: var(--muted); }

/* ─── 查看器：左主区 + 右详情侧栏（推挤布局） ─── */
#viewer { position: fixed; inset: 0; background: rgba(8,9,10,.97); z-index: 100;
  display: flex; }
#v-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#v-top { display: flex; align-items: center; padding: 10px 16px; gap: 10px; flex: none; }
#v-title { font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#v-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
#v-actions button, #v-actions a { background: none; border: none; color: var(--text);
  font-size: 19px; cursor: pointer; padding: 4px 10px; border-radius: 6px; text-decoration: none; }
#v-actions button:hover, #v-actions a:hover { background: var(--hover); }
/* 滑动开关（通用）：轨道+滑块，.on 点亮 */
.sw { width: 30px; height: 16px; border-radius: 8px; background: var(--border);
  position: relative; border: none; cursor: pointer; transition: background .15s; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px;
  height: 12px; border-radius: 50%; background: #fff; transition: left .15s; }
.on .sw, .sw.on { background: var(--accent); }
.on .sw::after, .sw.on::after { left: 16px; }
#v-actions button.switch { display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--muted); font-size: 12px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px; }
#v-actions button.switch:hover { background: var(--hover); }
#v-stage { flex: 1; display: flex; align-items: center; min-height: 0; position: relative; }
#v-body { flex: 1; height: 100%; display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative; touch-action: none; }   /* 自管捏合/拖拽，禁浏览器手势 */
#v-body img.full, #v-body video { max-width: 92%; max-height: 92%; object-fit: contain; user-select: none; }
/* 大图 raster 层：Chromium 缩放接缝规避（实现见 app.js rasterPlan / docs/08）——
   外层 wrap（.zoomwrap / .motion-wrap）承载缩放平移、尺寸由 JS 按视口算出；
   内层 .raster 固定栅格化：按接近原图的分辨率布版 + 反向缩放回适配尺寸，
   will-change 让 Chrome 只栅格化一次（不再随缩放重新分瓦片 → 无接缝）。 */
#v-body .zoomwrap, #v-body .motion-wrap { flex: none; }
#v-body .zoomwrap .raster, #v-body .motion-wrap .raster {
  position: relative; transform-origin: 0 0; will-change: transform; }
/* 选择器要压过 #v-body .motion-wrap img（同为 id+class+type，靠 .raster 多一层取胜）：
   raster 内的封面图必须铺满布版尺寸，不能被 92vw/88vh 之类的适配约束再缩一次 */
#v-body .zoomwrap .raster img, #v-body .motion-wrap .raster img {
  display: block; width: 100%; height: 100%;
  max-width: none; max-height: none; object-fit: fill; }
#v-body .motion-wrap { position: relative; }
#v-body .motion-wrap img, #v-body .motion-wrap video { max-width: 92vw; max-height: 88vh;
  object-fit: contain; }
/* live 视频浮层恒覆盖在封面 img 之上：不接鼠标事件（无 controls，播放由 wrap 的监听驱动），
   否则静止时右键命中的是 <video> → 原生菜单变成视频菜单，存不了图片 */
#v-body .motion-wrap video { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000; pointer-events: none; }
#v-body .rotwrap-90, #v-body .rotwrap-270 { width: 82vh; height: 82vw; max-width: 92vw; max-height: 88vh;
  display: flex; align-items: center; justify-content: center; }
/* 旋转类名由 app.js applyRot() 加在 video 元素自身（不是外层容器）→ 须用自身选择器；
   原后代写法（.rotwrap-N video）永不匹配，90/180/270 的 transform 从未生效 */
#v-body video.rotwrap-90 { transform: rotate(90deg); max-height: none; max-width: none;
  height: 82vw; }
#v-body video.rotwrap-270 { transform: rotate(-90deg); max-height: none; max-width: none;
  height: 82vw; }
#v-body video.rotwrap-180 { transform: rotate(180deg); }
/* 照片域手动旋转（Phase 7.2）：img.full 与 video 同款 rotwrap 类；外层 .rotfallback
   是缩放载体（zoom 的 inline transform 会覆盖类 transform，旋转必须放在内层元素） */
#v-body .rotfallback { display: flex; align-items: center; justify-content: center; }
#v-body img.full.rotwrap-90 { transform: rotate(90deg); max-height: none; max-width: none; }
#v-body img.full.rotwrap-270 { transform: rotate(-90deg); max-height: none; max-width: none; }
#v-body img.full.rotwrap-180 { transform: rotate(180deg); }
#v-body .hevc-err { color: var(--muted); text-align: center; font-size: 14px; line-height: 2; }
/* 原片坏 → 代理播放的提示条（app.js showProxyNotice） */
#v-body .proxy-notice { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  max-width: 92%; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; line-height: 1.6;
  padding: 6px 12px; border-radius: 8px; z-index: 6; pointer-events: none; }
#v-body .hevc-err .path { font-family: monospace; font-size: 12px; color: var(--accent);
  word-break: break-all; }
#pano-cv { width: 100%; height: 100%; cursor: grab; touch-action: none; }
#pano-cv:active { cursor: grabbing; }
.nav { background: none; border: none; color: #fff; font-size: 44px; cursor: pointer;
  padding: 0 18px; height: 100%; flex: none; opacity: .5; }
.nav:hover { opacity: 1; }
#v-hint { text-align: center; color: var(--muted); font-size: 12px; padding: 8px; flex: none; }
#v-bottom { position: relative; flex: none; }
#v-liveplay { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(0,0,0,.6);
  color: #fff; font-size: 17px; cursor: pointer; z-index: 5; }
#v-liveplay:hover { background: rgba(0,0,0,.85); }

/* ─── 详情面板（查看器内推挤布局，小屏回退浮层） ─── */
#info-panel { width: 340px; flex: none;
  background: var(--panel); border-left: 1px solid var(--border); overflow-y: auto; }
#info-head { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; font-weight: 600; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--panel); }
#info-close { background: none; border: none; color: var(--text); font-size: 16px; cursor: pointer; }
#info-body { padding: 14px 18px; font-size: 13px; }
#info-body table { width: 100%; border-collapse: collapse; }
#info-body td { padding: 4px 0; vertical-align: top; word-break: break-all; }
#info-body td.k { color: var(--muted); width: 40%; }
#info-body h4 { margin: 14px 0 6px; font-size: 13px; color: var(--accent); }
#info-body a { color: var(--accent); text-decoration: none; }
#info-body .tag { display: inline-block; background: var(--card); border-radius: 4px;
  padding: 2px 8px; margin: 2px 4px 2px 0; font-size: 12px; }
#info-body details.dupbox { margin-top: 4px; }
#info-body summary { cursor: pointer; color: var(--accent); font-size: 12px; }
#info-body .dupitem { font-size: 12px; color: var(--accent); cursor: pointer;
  word-break: break-all; padding: 3px 0; border-bottom: 1px solid var(--border); }
#info-body .dupitem:hover { color: var(--text); }

/* ─── 虚拟相册（Phase 8）：侧栏区块 / 相册操作行 / 弹层 ─── */
#albums-box { border-top: 1px solid var(--border); padding: 10px 0 16px; }
.album-sec-h { display: flex; align-items: center; justify-content: space-between;
  padding: 4px 14px; font-size: 11px; color: var(--muted); letter-spacing: .05em; }
#btn-album-new { background: none; border: none; color: var(--muted); font-size: 15px;
  cursor: pointer; padding: 0 4px; }
#btn-album-new:hover { color: var(--accent); }
.album-list { padding: 0 8px; }
.album-item { display: flex; align-items: center; gap: 6px; padding: 5px 6px;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text); }
.album-item:hover { background: var(--hover); }
.album-item.active { background: rgba(77,163,255,.18); color: var(--accent); }
.album-item .an { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.album-item .ac { margin-left: auto; color: var(--muted); font-size: 11px; flex: none; }
.album-item .alb-cover { width: 34px; height: 34px; border-radius: 6px; object-fit: cover;
  flex: none; background: var(--card); }
.album-item .alb-cover.nocov { display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 15px; font-weight: 600; }
.album-empty { padding: 4px 14px; font-size: 12px; color: var(--muted); }
#albumbar { display: flex; gap: 6px; flex: none; }
#albumbar button { background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 12px; padding: 3px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
#albumbar button:hover { color: var(--accent); border-color: var(--accent); }
/* 编辑者（Phase 8.5）：只保留"排序"（内容性），身份性操作隐藏 */
#albumbar.editor-mode #ab-rename,
#albumbar.editor-mode #ab-share,
#albumbar.editor-mode #ab-delete { display: none; }
#btn-dir-album { background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 12px; padding: 3px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
#btn-dir-album:hover { color: var(--accent); border-color: var(--accent); }
#btn-select { background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 12px; padding: 3px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
#btn-select:hover { color: var(--accent); border-color: var(--accent); }
#btn-select.on { color: var(--accent); border-color: var(--accent); }
#v-album, #v-rmalbum, #v-cover { background: none; border: none; color: var(--muted);
  font-size: 13px; cursor: pointer; padding: 0 6px; white-space: nowrap; }
#v-album:hover, #v-rmalbum:hover, #v-cover:hover { color: var(--accent); }
/* 弹层（相册选择 / 收录 / 分享管理）：遮罩 + 面板卡片 */
#modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; }
#modal-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  width: min(420px, 92vw); max-height: 80vh; overflow-y: auto; padding: 18px 20px; }
#modal-card h3 { margin: 0 0 12px; font-size: 15px; color: var(--text); }
#modal-card .mrow { display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text); }
#modal-card .mrow:hover { background: var(--hover); }
#modal-card .mrow.sel { background: rgba(77,163,255,.15); color: var(--accent); }
#modal-card .mrow .sub { margin-left: auto; color: var(--muted); font-size: 11px; }
#modal-card input[type=text] { width: 100%; box-sizing: border-box; background: var(--card);
  border: 1px solid var(--border); border-radius: 6px; color: var(--text);
  padding: 7px 10px; font-size: 13px; margin-top: 6px; }
#modal-card .mfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#modal-card .mbtn { background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 13px; padding: 5px 14px; border-radius: 6px; cursor: pointer; }
#modal-card .mbtn.primary { color: var(--accent); border-color: var(--accent); }
#modal-card .mbtn:hover { background: var(--hover); }
#modal-card .mnote { font-size: 12px; color: var(--muted); margin: 8px 0; line-height: 1.6; }
#modal-card .mtoggle { display: flex; align-items: center; gap: 8px; font-size: 13px;
  color: var(--text); padding: 6px 0; cursor: pointer; }
/* ─── 多选模式（Phase 8.5）：格子勾选框 + 底部操作条 ─── */
.sq .selmark { display: none; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); color: #fff;
  font-size: 13px; line-height: 19px; text-align: center; z-index: 3; }
#grid.selmode .cell { cursor: pointer; }
#grid.selmode .sq .selmark { display: block; }
#grid.selmode .cell.sel .selmark { background: var(--accent); border-color: var(--accent); }
#grid.selmode .cell.sel .sq { outline: 2px solid var(--accent); outline-offset: -2px; }
#selbar { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 150;
  display: flex; align-items: center; gap: 14px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 18px;
  box-shadow: 0 6px 28px rgba(0,0,0,.45); }
#selbar #sel-count { font-size: 13px; color: var(--text); white-space: nowrap; }
#selbar button { background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 13px; padding: 5px 13px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
#selbar button:hover { color: var(--accent); border-color: var(--accent); }
#selbar button.primary { color: var(--accent); border-color: var(--accent); }
#selbar #sel-actions { display: flex; gap: 8px; }

/* ─── 页脚：备案号（广东管局要求：网站底部悬挂主体备案号 + 链接工信部官网） ─── */
#beian { position: fixed; left: 0; right: 0; bottom: 0; height: 22px; line-height: 22px;
  text-align: center; font-size: 12px; background: var(--panel); border-top: 1px solid var(--border);
  z-index: 60; }
#beian a { color: var(--muted); text-decoration: none; }
#beian a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 700px) {
  #sidebar { position: fixed; z-index: 50; height: calc(100% - 22px); box-shadow: 4px 0 20px rgba(0,0,0,.5); }
  .nav { padding: 0 8px; font-size: 34px; }
  /* 小屏：详情面板回退为浮层，不挤压主区 */
  #info-panel { position: fixed; right: 0; top: 0; bottom: 0; width: 100%; z-index: 120; }
}

/* AI 摘要 / 字幕（2026-10-21，详情面板） */
#info-body .ai-summary { margin: 6px 0 10px; padding: 10px 12px; border-radius: 8px;
  background: rgba(64,158,255,.10); border-left: 3px solid var(--blue, #409eff);
  font-size: 13.5px; line-height: 1.75; color: var(--text, #e8ebef); white-space: pre-wrap; }
#info-body .ai-sub { margin: 4px 0 10px; max-height: 220px; overflow-y: auto;
  padding: 8px 10px; border-radius: 8px; background: var(--card, #1b2028);
  border: 1px dashed var(--border-weak, #3a4552); }
#info-body .ai-sub .cue { display: flex; gap: 8px; padding: 1px 0; font-size: 12.5px; line-height: 1.55; }
#info-body .ai-sub .ct { flex: none; min-width: 70px; color: var(--muted, #8a929e);
  font-variant-numeric: tabular-nums; font-size: 11.5px; }
#info-body .ai-sub .cx { color: var(--text, #e8ebef); }
#info-body .ai-sub.plain { white-space: pre-wrap; font-size: 12.5px; color: #b7c0cc; }
#info-body .ai-desc { margin: 6px 0 8px; }
#info-body .ai-desc > summary { cursor: pointer; font-size: 12.5px; color: var(--muted, #9aa3af); }
#info-body .ai-caption { margin-top: 6px; max-height: 260px; overflow-y: auto;
  font-size: 12.5px; line-height: 1.7; color: #b7c0cc; white-space: pre-wrap; }
