/* 光棱 —— 唯一界面模式：固定浅色 + 克制 3D 层次；全部颜色走变量，无深色/主题切换 */
/* 精简模式：hidden 必须压过组件的 display 规则 */
[hidden] { display: none !important; }
:root {
  --bg: #FCFDFE;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --fill: #F1F5F9;
  --fill-hover: #E9EFF5;
  --line: #E8EDF2;
  --line-strong: #DBE2EA;
  --text: #0F172A;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --accent: #E33786;
  --accent-hover: #CE256F;
  --accent-soft: #FDF0F7;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --success: #16A34A;
  --success-soft: #F0FDF4;
  --radius: 7px;
  --shadow: 0 8px 28px rgba(15, 23, 42, .09);
/* 主色上的文字：固定浅色模式下恒为白色，避免浅色主色配白字看不清 */
  --on-accent: #FFFFFF;
  --accent-soft-bd: #F7CDE2;
  --accent-soft-hover: #FBDCEC;
  /* 3D 层次色：极淡网格线 + 中性投影，不用渐变拟物 */
  --glow: rgba(227, 55, 134, .06);
  --grid-line: rgba(15, 23, 42, .035);
  --card-lift: 0 12px 30px rgba(15, 23, 42, .14);
}
/* 访问级别徽标：纯色描边，不使用渐变，浅深主题均走变量 */
.access-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: 11.5px; white-space: nowrap; cursor: default;
}
.access-badge[hidden] { display: none; }
.access-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.access-badge.admin { border-color: var(--accent); color: var(--accent); }
.access-badge.admin::before { background: var(--accent); }
/* 只读访客：隐藏上传等写入口；v2.9.16 起复选框与批量条对访客开放（仅打包下载），故不再隐藏 */
body.readonly #btnUpload,
body.readonly #btnEmptyUpload,
body.readonly #btnNewCollection,
body.readonly #btnSaveSettings,
body.readonly #btnSweep,
body.readonly #btnEmptyTrash,
body.readonly #btnNewToken,
body.readonly .quick-del,
body.readonly .grid-del { display: none !important; }
/* 个人精简模式：隐藏批量选择相关列与操作条（重绘后依然生效） */
body.no-bulk .bulkbar,
body.no-bulk .checkbox,
body.no-bulk table.files th:first-child,
body.no-bulk table.files td:first-child { display: none !important; }
body.readonly #btnNewCollection,
body.readonly #btnSaveSettings,
body.readonly #btnSweep,
body.readonly #btnEmptyTrash,
body.readonly #btnNewToken,
body.readonly .quick-del,
body.readonly .grid-del { display: none !important; }
/* 只读访客：连文件夹卡片上的「重命名 / 删除」也一并隐藏（服务端本身已 403 拦截，这里只是不暴露入口） */
body.readonly [data-folder-rename],
body.readonly [data-folder-del] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
.ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: none; }
.ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#app { height: 100%; display: flex; flex-direction: column; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 52px; flex: none; display: flex; align-items: center; gap: 24px;
  padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.brand { font-size: 17px; font-weight: 700; letter-spacing: -.4px; color: var(--text); white-space: nowrap; display: flex; align-items: center; gap: 9px; }
.brand em { font-style: normal; color: var(--accent); }
.brand-ico { width: 22px; height: 22px; color: var(--accent); display: inline-flex; }
.brand-ico svg { width: 22px; height: 22px; }
.top-actions { margin-left: auto; display: flex; gap: 2px; }
.icon-btn {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--muted); border-radius: 6px;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn.small { width: 24px; height: 24px; }

/* ---------- 布局 ---------- */
.shell { flex: 1; min-height: 0; display: flex; }
.sidebar {
  width: 232px; flex: none; display: flex; flex-direction: column;
  padding: 16px 12px 12px; border-right: 1px solid var(--line); background: var(--surface-alt);
  overflow-y: auto; overflow-x: hidden;
}
.btn-primary {
  border: 0; background: var(--accent); color: var(--on-accent); border-radius: var(--radius);
  height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 600; font-size: 13.5px; padding: 0 16px;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
/* 危险操作的确认键用红色：和普通「保存」区分开，避免手快点到同一个颜色 */
.btn-danger { border: 0; background: var(--danger); color: var(--on-accent); border-radius: var(--radius); }
.btn-danger:hover { background: #B91C1C; }
.btn-danger:disabled, .btn-danger.busy { opacity: .6; cursor: not-allowed; }
.upload-main { width: 100%; margin-bottom: 26px; }
.small-btn { height: 30px; font-size: 12.5px; padding: 0 14px; }
.btn-outline {
  width: 100%; height: 30px; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; border-radius: 6px; font-size: 12px;
}
.btn-outline:hover { background: var(--accent-soft); }
.nav-group { margin-bottom: 18px; }
.nav-label { font-size: 11px; color: var(--muted-2); padding: 0 10px 6px; }
.nav-item {
  width: 100%; height: 34px; display: flex; align-items: center; gap: 10px;
  padding: 0 10px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 13px; text-align: left; min-width: 0;
}
.nav-item span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item b { flex: none; font-weight: 400; font-size: 12px; color: var(--muted-2); }
.nav-item:hover { background: var(--fill); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active b { color: var(--accent); }
.sidebar-bottom { margin-top: auto; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface); }
.plan-head { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.plan-head .ico { width: 14px; height: 14px; color: var(--muted); }
.plan-card p { font-size: 11px; line-height: 1.55; color: var(--muted-2); margin: 7px 0 10px; }

.main { flex: 1; min-width: 0; overflow: auto; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.page-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page-title h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.3px; }
.page-title span { font-size: 12px; color: var(--muted-2); }
/* 页头分项统计：像「文件夹 2 个」一样说清楚是什么、有几个；
   取代右下角笼统的「共 N 个项目」。用主题变量，深浅色都跟随，不写死背景 */
.title-stats { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.title-stats .stat-chip {
  font-size: 13.5px; line-height: 1.65; color: var(--muted-2);
  background: var(--surface-alt); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 12px; white-space: nowrap;
}
.title-stats .stat-chip b { color: var(--text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* 进入文件夹 / 合集后的返回入口：面包屑「返回所有文件 / 当前名称」 */
.crumb-back {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
  color: var(--text); font-size: 12.5px; white-space: nowrap;
}
.crumb-back .ico { width: 14px; height: 14px; color: var(--muted); }
.crumb-back:hover { border-color: var(--accent); color: var(--accent); }
.crumb-back:hover .ico { color: var(--accent); }
.crumb-back[hidden], .crumb-sep[hidden] { display: none !important; }
.crumb-sep { color: var(--muted-2); font-size: 13px; }
.head-right { display: flex; align-items: center; gap: 12px; }
.sort-field {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px;
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius);
  white-space: nowrap;
}
.sort-field > span { font-size: 14px; color: var(--muted); line-height: 1; }
.sort-field select {
  border: 0; outline: 0; background: transparent; color: var(--text);
  font-size: 14px; font-weight: 500; cursor: pointer; min-width: 96px; height: 100%; padding-right: 2px;
}
.view-switch { display: flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--surface); }
.view-switch button { width: 32px; height: 30px; border: 0; background: transparent; color: var(--muted-2); display: grid; place-items: center; }
.view-switch button + button { border-left: 1px solid var(--line); }
.view-switch button.active { color: var(--text); background: var(--fill); }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; align-items: stretch; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-search {
  flex: 1 1 260px; max-width: 470px; height: 40px; display: flex; align-items: center; gap: 8px;
  padding: 0 11px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted-2);
}
.toolbar-search:focus-within { border-color: var(--accent); }
.toolbar-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--text); }
.toolbar-search input::placeholder { color: var(--muted-2); }
.toolbar-right { margin-left: auto; display: flex; align-items: stretch; gap: 8px; flex-wrap: nowrap; }
/* 服务断线横幅：固定底部居中，跟随主题变量，不遮挡操作 */
.net-banner {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 900;
  display: flex; align-items: center; gap: 9px; max-width: min(92vw, 720px);
  padding: 9px 12px; border: 1px solid var(--danger); border-radius: 9px;
  background: var(--surface); color: var(--text); font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.net-banner[hidden] { display: none; }
.net-banner .net-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.net-banner button {
  flex: none; border: 1px solid var(--line-strong); background: var(--surface-alt);
  color: var(--text); border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.net-banner button:hover { border-color: var(--accent); color: var(--accent); }
/* 「上传」与「新建文件夹」是并列的同级动作：共用同一条规则，
   边框 / 底色 / 文字色 / 高度 / 字号 / hover 完全一样，避免以后再各改各的导致不一致。 */
.new-folder-btn, .upload-trigger {
  width: auto; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 400; white-space: nowrap; box-shadow: none;
}
.new-folder-btn .ico, .upload-trigger .ico { width: 15px; height: 15px; color: var(--accent); }
.new-folder-btn:hover, .upload-trigger:hover {
  border-color: var(--accent); color: var(--accent); background: var(--surface);
}
body.readonly .new-folder-btn { display: none; }
/* 回收站里「上传」「新建文件夹」没有意义（上传的文件只会落到根目录），一律不显示 */
body.trash-view #toolbar .upload-menu,
body.trash-view #btnNewFolder,
body.trash-view #emptyUploadMenu { display: none !important; }
/* 「上传」悬停菜单：默认只显示「上传」，鼠标移入展开 上传文件 / 上传文件夹 */
.upload-menu { position: relative; display: inline-flex; }
.upload-menu[hidden] { display: none !important; }
/* 上传按钮与「新建文件夹」共用上面的规则，此处不再单独覆盖 */
.upload-menu-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
  min-width: 172px; padding: 6px; display: none; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  box-shadow: 0 12px 34px rgba(0,0,0,.16);
}
.upload-menu-list::before { content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.upload-menu:hover .upload-menu-list,
.upload-menu:focus-within .upload-menu-list { display: flex; }
.upload-menu.center { display: inline-flex; }
.upload-menu.center .upload-menu-list {
  left: 50%; right: auto; transform: translateX(-50%);
  animation: uploadMenuIn .12s ease-out both;
}
/* 下拉上方的小箭头，指向「上传」按钮，强化「从这儿展开」的视觉关联 */
.upload-menu.center .upload-menu-list::after {
  content: ''; position: absolute; top: -5px; left: 50%;
  width: 9px; height: 9px; background: var(--surface);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
@keyframes uploadMenuIn { from { opacity: 0; } to { opacity: 1; } }
/* 触发按钮右侧的向下小箭头，提示「这是一个菜单」 */
.upload-trigger .ico-caret { width: 12px; height: 12px; color: var(--muted); margin-left: 1px; transform: rotate(90deg); transition: transform .15s ease, color .15s ease; }
.upload-menu:hover .upload-trigger .ico-caret,
.upload-menu:focus-within .upload-trigger .ico-caret { color: var(--accent); transform: rotate(90deg) translateX(1px); }
.upload-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 11px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text);
  font-size: 13px; text-align: left;
}
.upload-opt .ico { width: 15px; height: 15px; color: var(--muted); }
.upload-opt:hover { background: var(--fill); }
.upload-opt:hover .ico { color: var(--accent); }
/* 「上传文件」「上传文件夹」两项完全一致：都不加底色，只在悬停时给淡色反馈 */
.upload-opt.folder { background: transparent; color: var(--text); font-weight: 400; }
.upload-opt.folder .ico { color: var(--muted); }
.upload-opt.folder:hover { background: var(--fill); }
body.readonly .upload-menu { display: none !important; }
/* 键盘焦点环：主题感知，只作用于可交互控件，输入控件已有边框聚焦反馈故不重复 */
button:focus-visible, a:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}
.field {
  height: 40px; min-width: 108px; padding: 3px 9px; display: flex; flex-direction: column; justify-content: center;
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius);
}
.field > span { font-size: 10px; color: var(--muted-2); line-height: 1.2; }
.field select { border: 0; outline: 0; background: transparent; font-size: 12.5px; color: var(--text); padding: 0; cursor: pointer; }
.field select option { background: var(--surface); color: var(--text); }
/* 框外独立的「清除筛选 ×」已取消（v2.9.10）：搜索框 input[type=search] 自带框内 × 即可复位全部筛选 */

/* ---------- 批量操作 ---------- */
.bulkbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt);
}
.bulk-count { font-size: 12.5px; color: var(--muted); }
.bulk-actions { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.link-btn { border: 0; background: transparent; color: var(--accent); font-size: 12.5px; padding: 4px 6px; }
.link-btn:hover { text-decoration: underline; }
.chip-btn {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  border-radius: 6px; font-size: 12px; padding: 5px 10px;
}
.chip-btn:hover { background: var(--fill); }
.chip-btn.danger { color: var(--danger); border-color: var(--danger); }
.chip-btn.danger:hover { background: var(--danger-soft); }

/* ---------- 内容卡片 ---------- */
.content-card {
  position: relative; min-height: 230px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
/* 空状态的「上传」悬停菜单是绝对定位，会被卡片的 overflow:hidden 裁掉一半；
   空状态出现时放开裁切，让「上传文件 / 上传文件夹」两项都能完整显示。 */
.content-card:has(.empty-state:not([hidden])),
.content-card.allow-overflow { overflow: visible; }
.info-dot {
  position: absolute; top: 8px; right: 10px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; font-style: italic;
  display: grid; place-items: center; cursor: help; z-index: 2;
}
.empty-state { padding: 62px 20px 66px; text-align: center; color: var(--muted); }
.empty-icon { color: var(--muted-2); margin-bottom: 10px; opacity: .55; }
.empty-icon .ico { width: 30px; height: 30px; }
.empty-state strong { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.empty-state p { margin: 5px 0 16px; font-size: 11.5px; color: var(--muted-2); }

/* 表格：全部颜色变量化，深色模式下不会残留浅色底 */
table.files { width: 100%; border-collapse: collapse; }
table.files th {
  text-align: left; font-size: 11px; font-weight: 500; color: var(--muted-2);
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-alt); white-space: nowrap;
}
table.files td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; vertical-align: middle; }
table.files tr:last-child td { border-bottom: 0; }
table.files tbody tr:hover { background: var(--surface-alt); }
table.files .c-check { width: 36px; }
table.files .c-name { min-width: 200px; }
table.files .c-num { width: 100px; color: var(--muted); font-variant-numeric: tabular-nums; }
table.files .c-date { width: 150px; color: var(--muted); }
table.files .c-act { width: 84px; text-align: right; white-space: nowrap; }
.quick-del { color: var(--muted-2); }
.quick-del:hover { color: var(--danger); background: var(--fill); }
.file-name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-badge {
  width: 30px; height: 30px; flex: none; border-radius: 6px; display: grid; place-items: center;
  background: var(--fill); color: var(--muted);
}
.file-badge .ico { width: 15px; height: 15px; }
.file-name-cell .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-name-cell .nm:hover { color: var(--accent); cursor: pointer; }
.file-sub { font-size: 10.5px; color: var(--muted-2); }
.tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); margin-left: 6px; }
.tag.folder[data-folder-tag] { cursor: pointer; }
.tag.folder[data-folder-tag]:hover { border-color: var(--accent); color: var(--accent); }
.tag.expired { color: var(--danger); border-color: var(--danger); }
.tag.star { color: var(--accent); border-color: var(--accent); }
.checkbox { display: inline-flex; align-items: center; cursor: pointer; }
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox span { width: 15px; height: 15px; border: 1.5px solid var(--line-strong); border-radius: 4px; display: inline-block; position: relative; }
.checkbox input:checked + span { background: var(--accent); border-color: var(--accent); }
.checkbox input:checked + span::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 1.6px 1.6px 0; transform: rotate(42deg); }

/* 网格视图 */
.grid-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 12px; padding: 14px; }
.grid-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface); position: relative; }
.grid-card:hover { border-color: var(--line-strong); }
.grid-thumb { height: 92px; border-radius: 6px; background: var(--fill); display: grid; place-items: center; color: var(--muted-2); margin-bottom: 10px; overflow: hidden; }
.grid-thumb .ico { width: 30px; height: 30px; }
.grid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.grid-card .nm { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-card .meta { font-size: 11px; color: var(--muted-2); margin-top: 4px; display: flex; gap: 10px; }
.grid-card .grid-check { position: absolute; left: 20px; top: 20px; }
.grid-card .grid-more { position: absolute; right: 8px; bottom: 8px; }
.grid-card .grid-del { position: absolute; right: 40px; bottom: 8px; }

.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.page-btn { min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 5px; font-size: 12px; }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 菜单 / 弹窗 ---------- */
.menu {
  position: fixed; z-index: 60; min-width: 178px; padding: 5px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow);
}
.menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 0; background: transparent; border-radius: 5px; font-size: 12.5px; text-align: left; color: var(--text); }
.menu button:hover { background: var(--fill); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
/* 通用弹窗层级必须高于预览层(90)：否则「预览里弹确认框」会被预览盖住，看起来像点了没反应 */
.modal-mask { position: fixed; inset: 0; z-index: 95; background: rgba(15, 23, 42, .38); display: grid; place-items: center; padding: 20px; }
/* 短屏 / 小窗也能完整操作：头和脚固定，正文自己滚 */
.modal { width: min(460px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  animation: modalIn .16s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal, .modal.nudge, .preview-box.nudge { animation: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; flex: none; }
.modal-body { padding: 16px; font-size: 13px; color: var(--muted); overflow: auto; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex: none; }
/* 点击不可关闭的遮罩时轻推一下，明确告诉用户「必须做选择」 */
.modal.nudge { animation: modalNudge .26s ease; }
.preview-box.nudge { animation: modalNudge .26s ease; }
@keyframes modalNudge { 0%, 100% { transform: none; } 30% { transform: translateX(-5px); } 65% { transform: translateX(4px); } }
.modal-ok.busy { opacity: .6; cursor: progress; }
/* 弹窗 / 预览打开时锁住背景滚动 */
body.modal-open { overflow: hidden; }
.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-row label { display: block; font-size: 12px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--surface-alt); color: var(--text); outline: 0; font-size: 13px;
}
.form-row textarea { height: auto; padding: 8px 10px; resize: vertical; }
.form-row input:focus, .form-row select:focus { border-color: var(--accent); }
.form-hint { font-size: 11px; color: var(--muted-2); margin-top: 5px; line-height: 1.5; }
.share-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.share-row { display: flex; align-items: center; gap: 8px; }
.share-row .sr-name { flex: 0 0 132px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--text); }
.share-row .sr-link { flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--fill); color: var(--muted); font: 11.5px/1.4 Consolas, Monaco, monospace; }
.share-row .chip-btn { flex: none; }
.btn-ghost { height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 6px; font-size: 12.5px; }
.btn-ghost:hover { background: var(--fill); }
.code-box { padding: 10px 12px; background: var(--fill); border: 1px solid var(--line); border-radius: 6px; font: 12px/1.6 Consolas, Monaco, monospace; color: var(--text); word-break: break-all; user-select: all; }
.preview-mask { z-index: 90; }
.preview-box { width: min(1000px, 96vw); height: min(760px, 92vh); background: var(--surface); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.preview-head { height: 46px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.preview-head > div { display: flex; align-items: center; gap: 8px; }
.preview-body { flex: 1; min-height: 0; display: grid; place-items: center; background: var(--surface-alt); overflow: auto; }
.preview-body img, .preview-body video { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-body iframe { width: 100%; height: 100%; border: 0; }
.preview-body pre { white-space: pre-wrap; word-break: break-all; padding: 20px; font-size: 12.5px; color: var(--text); }
/* 全类型预览：文本 / Office / 压缩包清单 / 二进制信息卡 */
.preview-body.pv-text { display: block; padding: 0; }
.pv-panel { width: 100%; min-height: 100%; box-sizing: border-box; padding: 18px 20px 26px; }
.pv-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1.7; }
.pv-panel pre { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  white-space: pre-wrap; word-break: break-word; font: 12.5px/1.75 Consolas, Monaco, monospace; color: var(--text); }
.pv-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.pv-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--text); }
.pv-list li:last-child { border-bottom: 0; }
.pv-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-list li small { color: var(--muted-2); flex: none; }
.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pv-actions .btn-ghost { text-decoration: none; display: inline-flex; align-items: center; }
/* 无法在线渲染时的说明卡：明确告诉用户「为什么」和「怎么办」，不再甩一串十六进制 */
.pv-warn { padding: 14px 16px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  border-radius: 6px; background: var(--surface); font-size: 13px; line-height: 1.7; color: var(--text); }
.pv-warn strong { display: block; margin-bottom: 4px; font-size: 13.5px; }
.pv-warn .pv-sub { color: var(--muted); }
.pv-tips { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.pv-tips li { margin: 3px 0; }
.pv-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt); }
.pv-details > summary { padding: 9px 12px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; list-style: none; }
.pv-details > summary::-webkit-details-marker { display: none; }
.pv-details > summary::before { content: '▸ '; color: var(--muted-2); }
.pv-details[open] > summary::before { content: '▾ '; }
.pv-details > summary:hover { color: var(--text); }
.pv-details > pre { margin: 0 !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 0 6px 6px !important; background: var(--surface) !important; }
.pv-details > video { display: block; width: 100%; max-height: 62vh; background: #000; border-radius: 0 0 6px 6px; }
.pv-details > .pv-hint { padding: 10px 12px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.pv-badge { display: inline-block; padding: 1px 7px; margin-left: 6px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 11px; color: var(--muted); vertical-align: middle; }
/* 文件夹批量选择 */
.folder-strip .fs-head .checkbox { flex: none; cursor: pointer; }
.fs-check { flex: none; display: inline-flex; align-items: center; cursor: pointer; }
.fs-card.selected { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 通用页面（设置 / 令牌 / 合集） ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.panel .desc { margin: 0 0 18px; font-size: 12px; color: var(--muted-2); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.setting-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; word-break: break-all; text-align: right; }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; cursor: pointer; }
.switch input { accent-color: var(--accent); width: 15px; height: 15px; }
.path-box { display: flex; gap: 8px; align-items: center; }
.path-box input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-alt); color: var(--text); font-size: 12.5px; outline: 0; }
.path-box input:focus { border-color: var(--accent); }
.table-plain { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table-plain th { text-align: left; font-size: 11px; font-weight: 500; color: var(--muted-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table-plain td { padding: 10px; border-bottom: 1px solid var(--line); color: var(--text); }
.table-plain tr:last-child td { border-bottom: 0; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.collection-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface); }
.collection-card h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; }
.collection-card p { margin: 0 0 12px; font-size: 11.5px; color: var(--muted-2); }
.collection-card .row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 上传 / 提示 ---------- */
.drop-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(227, 55, 134, .10); display: grid; place-items: center; pointer-events: none; }
.drop-inner { width: min(460px, 80vw); padding: 40px; border: 2px dashed var(--accent); border-radius: 14px; background: var(--surface); text-align: center; box-shadow: var(--shadow); }
.drop-inner .ico { width: 36px; height: 36px; color: var(--accent); }
.drop-inner strong { display: block; margin-top: 12px; font-size: 15px; }
.drop-inner p { margin: 6px 0 0; font-size: 12px; color: var(--muted-2); }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 110; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  min-width: 230px; max-width: 380px; padding: 10px 13px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 12.5px;
}
.toast .t-title { display: flex; justify-content: space-between; gap: 10px; }
.toast .t-bar { height: 3px; background: var(--fill); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.toast .t-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.toast.err { border-color: var(--danger); color: var(--danger); }
.toast.ok { border-color: var(--success); }

/* ---------- 上传文件夹 / 分类导航 ---------- */
.upload-folder {
  width: 100%; height: 38px; margin: 8px 0 14px; display: flex; align-items: center;
  justify-content: center; gap: 8px; border: 1px solid var(--accent-soft-bd, var(--line-strong));
  border-radius: 8px; background: var(--accent-soft, #fdeef5); color: var(--accent, #E33786);
  font-size: 13px; font-weight: 600;
}
.upload-folder:hover { background: var(--accent-soft-hover, #fbdcec); border-color: var(--accent); color: var(--accent); }
.upload-folder .ico { width: 16px; height: 16px; }
body.readonly #btnUploadFolder { display: none !important; }
.nav-category .nav-item b { font-variant-numeric: tabular-nums; }

/* ---------- 文件夹页（整体分享） ---------- */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.folder-card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--surface); }
.folder-card .fc-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.folder-card .fc-icon { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--fill); color: var(--accent); }
.folder-card .fc-icon .ico { width: 18px; height: 18px; }
.folder-card h3 { margin: 0; font-size: 13.5px; font-weight: 600; word-break: break-all; }
.folder-card .fc-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 12px; line-height: 1.8; }
.folder-card .fc-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.folder-tree { font-size: 12.5px; }
/* ---------- 「全部」顶部的文件夹条 ---------- */
.folder-strip { margin-bottom: 14px; }
.folder-strip .fs-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.folder-strip .fs-head .ico { width: 15px; height: 15px; color: var(--accent); }
.folder-strip .fs-head strong { font-weight: 600; color: var(--text); }
.folder-strip .fs-count { font-size: 12px; color: var(--muted-2); }
.folder-strip .fs-hint { font-size: 11.5px; color: var(--muted-2); margin-left: auto; }
.folder-strip .fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.fs-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.fs-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.fs-card .fs-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--fill); color: var(--accent); }
.fs-card .fs-ico .ico { width: 16px; height: 16px; }
.fs-card .fs-body { min-width: 0; flex: 1; }
.fs-card .fs-name { font-size: 13px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-card .fs-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.fs-card .fs-actions { display: flex; gap: 2px; flex: none; }
.fs-card .fs-actions .icon-btn { width: 26px; height: 26px; color: var(--muted-2); }
.fs-card .fs-actions .icon-btn:hover { color: var(--text); background: var(--fill); }
.fs-card .fs-actions .icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.fs-card .fs-actions .ico { width: 14px; height: 14px; }
.folder-tree .tree-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.folder-tree .tree-row:last-child { border-bottom: 0; }
.folder-tree .tree-path { flex: 1; min-width: 0; word-break: break-all; color: var(--muted); }
.tree-row .ico { width: 15px; height: 15px; }

/* ---------- 设置页：完整路径 ---------- */
.path-full {
  display: block; width: 100%; margin: 4px 0 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt);
  font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
  word-break: break-all; color: var(--text);
}
.path-full-label { font-size: 11px; color: var(--muted-2); margin: 14px 0 4px; }

/* ---------- 上传目标 / 速度显示 / 存储位置设置 ---------- */
.upload-target { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 11px; color: var(--muted-2); }
.upload-target span { flex: none; }
.upload-target select {
  flex: 1; min-width: 0; height: 28px; padding: 0 6px; border: 1px solid var(--line-strong);
  border-radius: 5px; background: var(--surface-alt); color: var(--text); font-size: 11.5px; outline: 0;
}
.upload-target select:focus { border-color: var(--accent); }
body.readonly .upload-target { display: none !important; }
.toast .t-speed { font-size: 10.5px; color: var(--muted-2); margin-top: 5px; font-variant-numeric: tabular-nums; }
.storage-editor { margin-top: 12px; }
.storage-editor .path-box { margin-top: 6px; }
.storage-editor select {
  height: 36px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--surface-alt); color: var(--text); font-size: 12px; outline: 0;
}
/* 覆盖 .form-row input/select 的 width:100%：路径输入框要撑满、模式下拉按内容宽度 */
.storage-editor .path-box input { width: auto; flex: 1 1 240px; min-width: 0; }
.storage-editor .path-box select { width: auto; flex: 0 0 auto; }
.storage-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 11.5px; color: var(--muted-2); }
.storage-meta b { color: var(--text); font-weight: 500; }
/* v2.9.21：存储位置一句话说清「文件到底在哪」，避免用户以为按钮坏了 */
.storage-where {
  display: flex; flex-direction: column; gap: 4px; margin: 10px 0 2px;
  padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.65;
  border: 1px solid rgba(11,111,242,.18); background: rgba(11,111,242,.045); color: var(--muted-2);
}
.storage-where b { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.storage-where.local { border-color: rgba(22,163,74,.22); background: rgba(22,163,74,.05); }
.storage-where.local b { color: var(--success); }
.storage-result {
  margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface-alt); font-size: 11.5px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-all;
}
.storage-result.bad { border-color: var(--danger); color: var(--danger); }
.path-full.editable { background: var(--surface); }

@media (max-width: 900px) {
  .sidebar { width: 190px; }
  .main { padding: 20px 16px 50px; }
  table.files .c-date, table.files .c-num.optional { display: none; }
}

/* ---------- 固定域名（自有域名 + 固定隧道）：全部走主题变量，深浅色一致 ---------- */
.fixed-dom {
  margin-top: 14px; padding: 14px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-alt);
}
.fixed-dom.on { border-color: var(--accent); }
.fd-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 4px; }
.fd-head b { font-weight: 600; color: var(--text); }
.fd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.fd-dot.on { background: var(--success); }
.fd-tag {
  margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap;
}
.fixed-dom.on .fd-tag { color: var(--accent); border-color: var(--accent); }
.fixed-dom .kv { padding: 7px 0; font-size: 12px; }
.fd-warn { color: var(--danger); }
.fixed-dom .path-box input { width: auto; flex: 1 1 240px; min-width: 0; }
.fixed-dom .path-box { margin-top: 6px; }
.fd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fd-result {
  margin-top: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); font-size: 11.5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-all;
}
.fd-result.bad { border-color: var(--danger); color: var(--danger); }
.fd-steps { margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.fd-steps summary { cursor: pointer; color: var(--accent); }
.fd-steps ol { margin: 8px 0 0 18px; padding: 0; line-height: 1.85; }
.fd-steps code { background: var(--fill); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* ---------- 云端备份（对象存储副本） ---------- */
.tag.cloud { color: var(--accent); border-color: var(--accent); }
.tag.cloud-err { color: var(--danger); border-color: var(--danger); }
.cloud-form { display: grid; gap: 10px; margin-top: 14px; }
.cloud-form .form-row { margin: 0; }
.cloud-form input, .cloud-form select { width: 100%; box-sizing: border-box; }
.cloud-form label { font-size: 12px; color: var(--muted); }
#cloudPanel .fd-actions { margin-top: 12px; }
#cloudPanel .fd-steps { margin-top: 12px; }

/* 首次播放的自动转码提示条（视频 H.265 / AC-3 / mkv → H.264 + AAC） */
.pv-tc {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  padding: 7px 12px; border-radius: 6px; font-size: 12.5px;
  background: var(--surface-alt); border: 1px solid var(--line); color: var(--muted);
}
.pv-tc-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent); animation: pvPulse 1.2s ease-in-out infinite;
}
@keyframes pvPulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* 表格类文本（.xls / .et 等）：保留制表符原样、横向滚动，折行会把列全部打乱 */
.pv-panel pre.pv-pre-table,
.preview-body pre.pv-pre-table {
  white-space: pre; word-break: normal; overflow-x: auto; tab-size: 4;
}

/* ---- 云服务：预览里的「AI 速读」 ---- */
.pv-ai { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pv-ai-btn { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; }
.pv-ai-btn[disabled] { opacity: .5; cursor: not-allowed; }
.pv-ai-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.pv-ai-btn.busy .pv-ai-dot { animation: pvPulse 1s infinite; }
.pv-ai-out { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 6px; background: var(--surface); font-size: 13px; line-height: 1.85; color: var(--text);
  white-space: pre-wrap; word-break: break-word; }
/* 分享页的「已被查看」徽标 */
.share-views { margin-top: 10px; font-size: 11.5px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; }
.share-views .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .8; }

/* ---- 分享二维码（管理页弹窗 + 访客分享页共用） ---- */
.qr-panel { text-align: center; }
/* 二维码必须白底：扫码器靠明暗对比定位，深色背景会直接扫不出来（功能性白底，非表格配色写死） */
.qr-frame { width: 224px; height: 224px; margin: 6px auto 12px; padding: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; }
.qr-frame svg { display: block; width: 100%; height: 100%; }
.qr-name { font-size: 13px; font-weight: 600; color: var(--text); word-break: break-all; margin-bottom: 6px; }
.qr-url { font-size: 11px; color: var(--muted-2); word-break: break-all; line-height: 1.7;
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; user-select: all; }
.qr-tip { font-size: 11.5px; color: var(--muted-2); line-height: 1.8; margin-top: 10px; text-align: left; }
.qr-entry { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.qr-entry .qr-box { margin-top: 12px; }
.qr-entry-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.qr-inline { padding: 8px 0 2px; }
.qr-inline-inner { display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: 7px; padding: 10px; }
.qr-frame.qr-frame-sm { width: 168px; height: 168px; margin: 0 0 6px; padding: 8px; }
.qr-inline-inner .qr-url { width: 100%; max-width: 440px; }
.wx-tip { margin-bottom: 12px; padding: 9px 12px; font-size: 12px; color: var(--text);
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: 7px; line-height: 1.6; }

/* ============================================================
   v2.9.11 · 外观主题 / 三档视图 / 文件夹就地展开
   所有颜色走变量：深色与 3D 主题下表格、卡片、输入、弹窗都不硬编码浅色
   ============================================================ */

/* ---------- ① 文件夹清单：点「查看文件」就地展开，零跳转 ---------- */
.fc-files { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.fc-loading { font-size: 12px; color: var(--muted-2); padding: 10px 2px; }
.fc-loading.err { color: var(--danger); }
.fc-file-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.fc-file-head strong { color: var(--text); font-size: 12.5px; }
.fc-file-table { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface-alt); }
.fc-file { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto auto; gap: 10px;
  align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.fc-file:last-child { border-bottom: 0; }
.fc-file:hover { background: var(--fill); }
.fc-file .ico { width: 15px; height: 15px; color: var(--accent); }
.fc-fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.fc-fsize, .fc-fdate { color: var(--muted-2); font-size: 11px; white-space: nowrap; }
.fc-file .chip-btn { padding: 2px 9px; font-size: 11px; }
.fc-files-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--muted-2); }

/* ---------- ② 视图切换：列表 / 平铺 / 大图 ---------- */
.view-switch button { width: auto; min-width: 62px; height: 30px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11.5px; white-space: nowrap; }
.view-switch button .ico { width: 14px; height: 14px; }
#fileList[data-view="tile"] .grid-wrap { grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)); gap: 9px; padding: 10px; }
#fileList[data-view="tile"] .grid-card { padding: 9px; }
#fileList[data-view="tile"] .grid-thumb { height: 56px; margin-bottom: 7px; }
#fileList[data-view="tile"] .grid-thumb .ico { width: 22px; height: 22px; }
#fileList[data-view="tile"] .grid-card .meta { font-size: 10.5px; gap: 6px; }
#fileList[data-view="grid"] .grid-wrap { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 18px; }
#fileList[data-view="grid"] .grid-card { padding: 16px; }
#fileList[data-view="grid"] .grid-thumb { height: 150px; }
#fileList[data-view="grid"] .grid-thumb .ico { width: 44px; height: 44px; }
#fileList[data-view="grid"] .grid-card .nm { font-size: 13.5px; }

/* ---------- ③ v2.9.13：唯一浅色模式（无主题切换、无深色） ---------- */
/* 6 套主题与深色变量已整体移除，:root 即最终配色。不再存在任何
   html[data-theme="..."] 覆盖块，旧浏览器里残留的主题偏好也不会把页面染成深色。 */

/* 3D 层（唯一固定风格）：细网格底纹 + 顶部高光线 + 卡片跟随鼠标的轻微透视 */
html.theme-3d body {
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 38px 38px;
}
html.theme-3d .topbar, html.theme-3d .sidebar { box-shadow: inset 0 -1px 0 var(--line); }
html.theme-3d .panel, html.theme-3d .folder-card, html.theme-3d .grid-card,
html.theme-3d .fs-card, html.theme-3d .collection-card { position: relative; }
html.theme-3d .tilt-card {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transform-style: preserve-3d;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
html.theme-3d .folder-card::after, html.theme-3d .grid-card::after,
html.theme-3d .fs-card::after, html.theme-3d .collection-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
html.theme-3d .folder-card:hover, html.theme-3d .grid-card:hover,
html.theme-3d .fs-card:hover, html.theme-3d .collection-card:hover {
  border-color: var(--accent); box-shadow: var(--card-lift);
}
@media (prefers-reduced-motion: reduce) {
  html.theme-3d .tilt-card { transform: none !important; transition: none !important; }
}

/* ---------- ④ v2.9.13：外观选择器与传输设置弹窗样式已删除（只有一种界面模式） ---------- */

/* ---------- ⑥ v2.9.12：无读权限访客引导（不弹错误、不留满屏 0） ---------- */
body.visitor-gate-mode .sidebar,
body.visitor-gate-mode .page-head,
body.visitor-gate-mode .toolbar,
body.visitor-gate-mode .bulk-bar,
body.visitor-gate-mode .pagination,
body.visitor-gate-mode #emptyState { display: none !important; }
body.visitor-gate-mode .content-card { min-height: 430px; display: grid; place-items: center; }
.visitor-gate { width: min(560px, 100%); margin: 0 auto; padding: 30px 26px; }
.visitor-gate .vg-icon { width: 46px; height: 46px; margin: 0 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; display: grid; place-items: center; color: var(--accent); }
.visitor-gate .vg-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.visitor-gate h2 { margin: 0 0 10px; font-size: 19px; font-weight: 600; color: var(--text); }
.visitor-gate .vg-lead { margin: 0 0 18px; font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.visitor-gate .vg-lead b { color: var(--text); font-weight: 600; }
.visitor-gate .vg-rows { display: grid; gap: 10px; margin-bottom: 20px; }
.visitor-gate .vg-row { border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; background: var(--surface); display: grid; gap: 3px; }
.visitor-gate .vg-row b { font-size: 12.5px; color: var(--text); }
.visitor-gate .vg-row span { font-size: 12px; line-height: 1.75; color: var(--muted); }
.visitor-gate code { font: 12px/1.4 Consolas, Monaco, monospace; background: var(--fill); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.visitor-gate .vg-actions { margin-bottom: 14px; }
.visitor-gate .vg-share { display: flex; gap: 8px; flex-wrap: wrap; }
.visitor-gate .vg-share input { flex: 1 1 220px; min-width: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--text); padding: 8px 10px; font-size: 12.5px; }
.visitor-gate .vg-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.8; color: var(--muted-2); }

/* ==========================================================================
   v2.9.14 · 光棱 · 全息文件中枢 —— 唯一固定「浅色科技 HUD」皮肤
   保持上一轮的三条硬约束：只有一种浅色 / 没有深色模式 / 没有主题切换器。
   做法：整份配色走 :root 变量覆盖；网格底纹 + 全息光束 + 角标 + 扫描线做「炫酷」，
   但不使用拟物渐变按钮、不写死深色底、不引入任何 html[data-theme] 覆盖块。
   ========================================================================== */
:root {
  --bg: #F4F8FF;
  --surface: #FFFFFF;
  --surface-alt: #F7FAFF;
  --fill: #EDF3FC;
  --fill-hover: #E2ECFA;
  --line: #DFE9F8;
  --line-strong: #C6D8F2;
  --text: #0C1B33;
  --muted: #5C6F8C;
  --muted-2: #8A9BB5;
  --accent: #0B6FF2;
  --accent-hover: #0759C6;
  --accent-soft: #E9F3FF;
  --accent-soft-bd: #BAD8FF;
  --accent-soft-hover: #DCEBFF;
  --accent-2: #7A3CF0;
  --cyan: #06B6D4;
  --danger: #DF2850;
  --danger-soft: #FFF1F4;
  --success: #0E9F6E;
  --success-soft: #EAFBF4;
  --on-accent: #FFFFFF;
  --radius: 10px;
  --shadow: 0 12px 34px rgba(12, 40, 90, .12);
  --glow: rgba(11, 111, 242, .12);
  --grid-line: rgba(11, 111, 242, .055);
  --card-lift: 0 18px 42px rgba(11, 111, 242, .18);
  --hud: linear-gradient(90deg, #06B6D4, #0B6FF2 48%, #7A3CF0);
}
/* 背景：两束极淡的全息光 + 精细网格，仍是浅色（RGB 三通道均 > 200） */
body, html.theme-3d body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 460px at 6% -12%, rgba(6, 182, 212, .13), transparent 68%),
    radial-gradient(920px 420px at 98% 0%, rgba(122, 60, 240, .11), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
  background-attachment: fixed, fixed, fixed, fixed;
}
html body .gate-page, html body .login-bg, html body.share-page {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 12% -10%, rgba(6, 182, 212, .14), transparent 68%),
    radial-gradient(760px 380px at 92% 6%, rgba(122, 60, 240, .12), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
}

/* ---------- 顶栏：玻璃 + 流动光束 + HUD 状态灯 ---------- */
.topbar {
  height: 58px; padding: 0 22px; gap: 18px; position: relative; z-index: 6;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.35); backdrop-filter: blur(14px) saturate(1.35);
  border-bottom: 1px solid var(--line);
}
html.theme-3d .topbar { box-shadow: 0 8px 26px rgba(12, 40, 90, .07); }
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--hud); background-size: 200% 100%; opacity: .92;
  animation: prismSweep 9s linear infinite;
}
@keyframes prismSweep { from { background-position: 0% 0; } to { background-position: 200% 0; } }
.brand { font-size: 18px; font-weight: 750; letter-spacing: .3px; }
.brand em {
  font: 600 9.5px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.8px;
  color: var(--accent-2); padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line-strong);
}
.brand-ico { position: relative; width: 26px; height: 26px; color: var(--accent); }
.brand-ico svg { width: 22px; height: 22px; }
.brand-ico::after {
  content: ''; position: absolute; left: -3px; top: -3px; width: 32px; height: 32px;
  border: 1px solid rgba(11, 111, 242, .28); border-top-color: var(--cyan);
  border-right-color: var(--accent-2); border-radius: 50%;
  animation: orbitSpin 7s linear infinite;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.hud-status {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px;
  font: 600 9.5px/1 Consolas, monospace; letter-spacing: 1.4px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .74);
}
.hud-status i {
  width: 6px; height: 6px; border-radius: 50%; background: #10B981; flex: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .16), 0 0 10px #10B981;
}
.top-actions .icon-btn { border-radius: 8px; }

/* ---------- 侧栏：扫描线标签 + 发光选中态 ---------- */
html.theme-3d .sidebar { box-shadow: inset -1px 0 0 var(--line); }
.sidebar { background: rgba(247, 250, 255, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 18px 12px 12px; }
/* v2.9.30：删除标签前那个 5px 青色小方块。
   它和选中行左侧的标记同色同区，两者叠在一起就成了「多出来一个绿点」；
   全站标记语言统一为「一条 3px 竖条」，标签只用字重/字距/颜色区分层级。 */
.nav-label {
  display: flex; align-items: center; gap: 7px; text-transform: uppercase;
  letter-spacing: 1.5px; font-size: 10px; font-weight: 600;
}
.nav-item { height: 36px; border-radius: 8px; position: relative; }
.nav-item.active { box-shadow: inset 0 0 0 1px rgba(11, 111, 242, .2); }
/* v2.9.30：侧栏选中态唯一规则——左缘 3px 竖条（与页标题 h1::before 同款）
   left 用 1px 是为了避开 8px 圆角的切边；height 用 top/bottom 约束，居中由布局保证，
   不再使用 top:50% + translateY，避免与圆点版本混写产生半像素错位。 */
.nav-item.active::before {
  content: ''; position: absolute; left: 1px; top: 50%; bottom: auto; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 2px;
  background: var(--hud); box-shadow: 0 0 10px rgba(11, 111, 242, .7);
}
.nav-item b { font: 600 11px Consolas, Monaco, monospace; }

/* ---------- 页头 / 工具区 ---------- */
.main { padding: 28px 34px 64px; }
.page-title h1 { font-size: 20px; font-weight: 750; letter-spacing: .2px; }
.title-stats .stat-chip {
  font-size: 13.5px; background: rgba(255, 255, 255, .9); border-color: var(--line-strong);
  box-shadow: 0 2px 10px rgba(12, 40, 90, .05); font-family: Consolas, "Microsoft YaHei", monospace;
}
.title-stats .stat-chip b { font-size: 15px; color: var(--accent); }
.view-switch {
  padding: 3px; gap: 2px; border-radius: 9px; background: rgba(255, 255, 255, .92);
  border-color: var(--line-strong); box-shadow: inset 0 1px 2px rgba(12, 40, 90, .04);
}
.view-switch button { height: 28px; border-radius: 6px; }
.view-switch button + button { border-left: 0; }
.view-switch button.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(11, 111, 242, .32); }
.toolbar-search, .sort-field { border-radius: 9px; }
.toolbar-search:focus-within { box-shadow: 0 0 0 3px rgba(11, 111, 242, .12); }
.btn-primary { border-radius: 8px; box-shadow: 0 6px 18px rgba(11, 111, 242, .26); }
.btn-outline { border-radius: 8px; }

/* ---------- 内容卡：HUD 四角定位框 ---------- */
.content-card {
  border-radius: 12px; border-color: var(--line); background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 34px rgba(12, 40, 90, .055);
}
.content-card::before, .content-card::after { content: ''; position: absolute; width: 20px; height: 20px; z-index: 1; pointer-events: none; }
.content-card::before { top: 0; left: 0; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: 12px; }
.content-card::after { bottom: 0; right: 0; border-bottom: 2px solid var(--accent-2); border-right: 2px solid var(--accent-2); border-bottom-right-radius: 12px; }
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 16px; color: var(--accent);
  background: var(--surface); box-shadow: 0 8px 26px rgba(11, 111, 242, .1); opacity: 1;
}
.empty-icon .ico { width: 30px; height: 30px; }

/* ---------- 文件卡片：顶光束 + 悬浮 ---------- */
.grid-wrap { gap: 14px; padding: 16px; }
.grid-card {
  border-radius: 10px; border-color: var(--line);
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFDFF 100%);
  box-shadow: 0 3px 12px rgba(12, 40, 90, .045);
}
.grid-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
/* 卡片底部信息行要给右下角「删除 / 更多」按钮留位，否则平铺视图里日期会被按钮压住 */
.grid-card .meta { padding-right: 56px; overflow: hidden; white-space: nowrap; }
#fileList[data-view="tile"] .grid-card .meta { padding-right: 48px; }
#fileList[data-view="tile"] .grid-card .meta span:nth-child(3) { display: none; }
.grid-card .grid-more, .grid-card .grid-del { border-radius: 6px; }
.grid-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--hud); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.grid-card:hover::before { opacity: 1; }
table.files th { letter-spacing: .6px; text-transform: uppercase; font-size: 10px; }
table.files td { padding: 10px 12px; }
.file-name-cell { gap: 12px; }

/* ==========================================================================
   v2.9.14 · 三档视图内联真实预览
   ========================================================================== */
.grid-thumb {
  position: relative; cursor: pointer; border: 1px solid rgba(11, 111, 242, .1);
  background: linear-gradient(135deg, #EFF6FF 0%, #F6F2FF 100%);
}
.grid-thumb > .ico { width: 30px; height: 30px; color: var(--accent); opacity: .55; }
.file-badge.thumb-badge {
  position: relative; width: 38px; height: 38px; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, #EFF6FF, #F6F2FF); border: 1px solid rgba(11, 111, 242, .14);
}
.file-badge.thumb-badge > .ico { width: 16px; height: 16px; color: var(--accent); opacity: .6; }
.th-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.th-img.th-failed { display: none; }
.th-fallback { display: none; position: absolute; inset: 0; place-items: center; color: var(--accent); opacity: .6; }
.th-fallback.show { display: grid; }
.th-ext {
  position: absolute; right: 7px; bottom: 7px; z-index: 2;
  font: 700 9.5px/1 Consolas, Monaco, monospace; letter-spacing: .6px; color: #fff;
  background: var(--accent); border: 1px solid rgba(255, 255, 255, .38); padding: 3px 6px;
  border-radius: 4px; box-shadow: 0 3px 10px rgba(11, 111, 242, .35);
}
.file-badge .th-ext { display: none; }
.th-scan {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(94, 231, 255, .3) 50%, transparent 58%);
  transform: translateX(-100%);
}
.grid-thumb:hover .th-scan, .file-badge:hover .th-scan { opacity: 1; animation: scanSweep 1.25s ease-in-out infinite; }
@keyframes scanSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
/* 迷你纸张：里面是服务端真正抽出来的正文 / 表格 / 压缩包清单 */
.th-doc {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-1.6deg);
  width: 74%; height: 80%; padding: 8% 7%; display: flex; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 3px;
  box-shadow: 0 6px 18px rgba(12, 40, 90, .14); overflow: hidden;
}
.th-doc-head { display: flex; align-items: center; gap: 3px; margin-bottom: 5px; flex: none; }
.th-doc-head b { font: 700 8px/1 Consolas, monospace; color: var(--accent); letter-spacing: .5px; }
.th-doc-head i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.th-doc-lines { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; }
.th-txt {
  display: block; max-width: 100%; font: 500 7.5px/1.5 Consolas, "Microsoft YaHei", monospace;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.th-txt::before { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 1px; background: var(--cyan); margin-right: 5px; vertical-align: middle; }
.file-badge .th-doc { width: 76%; height: 78%; padding: 8% 6%; border-radius: 2px; gap: 3px; }
.file-badge .th-doc-head { display: none; }
.file-badge .th-txt { font-size: 0; height: 3px; background: var(--line-strong); border-radius: 2px; }
.file-badge .th-txt::before { display: none; }
/* 音频：波形 + 试听键 */
.th-wave { position: absolute; inset: 14% 12%; display: flex; align-items: center; justify-content: center; gap: 3px; }
.th-wave i { flex: 1; max-width: 5px; min-width: 2px; border-radius: 2px; background: var(--hud); opacity: .85; box-shadow: 0 0 8px rgba(11, 111, 242, .25); }
.th-play-btn {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .62);
  background: rgba(11, 111, 242, .93); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(11, 111, 242, .42);
}
.th-play-btn .ico { width: 16px; height: 16px; }
.th-play-btn.playing { background: var(--accent-2); }
.file-badge .th-play-btn { width: 22px; height: 22px; }
.file-badge .th-play-btn .ico { width: 11px; height: 11px; }
.file-badge .th-wave { inset: 18% 10%; gap: 1px; }
/* 视频首帧 / 加密 / 其它 */
.th-play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.th-play .ico { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgba(11, 111, 242, .72); border: 1px solid rgba(255, 255, 255, .6); color: #fff; }
.th-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--accent); }
.th-lock .ico { width: 26px; height: 26px; }
.th-lock b { font-size: 11px; }
.file-badge .th-lock .ico { width: 17px; height: 17px; }

/* ---------- 网关 / 登录 / 分享页：同一套科技皮肤 ---------- */
html body .gate-brand, html body .login-brand { letter-spacing: .5px; font-weight: 700; }
html body .gate-card, html body .login-card, html body .share-card {
  position: relative; border-color: var(--line-strong); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(12, 40, 90, .1); background: rgba(255, 255, 255, .95);
}
html body .gate-card::before, html body .login-card::before, html body .share-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--hud); border-radius: 14px 14px 0 0; pointer-events: none;
}
html body .gate-icon, html body .empty-icon { border-color: var(--accent-soft-bd); color: var(--accent); }
html body .share-file .file-badge { border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
html body .login-btn, html body .gate-share button { border-radius: 8px; box-shadow: 0 6px 18px rgba(11, 111, 242, .24); }

@media (max-width: 860px) {
  /* v2.9.15：中文副标在手机上仍然可见；状态灯与遥测条交由后面的移动端布局统一处理 */
  .main { padding: 20px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar::after, .brand-ico::after, .th-scan { animation: none !important; }
  .grid-card, .th-scan { transition: none !important; }
}

/* ==========================================================================
   v2.9.15 · 光棱 · 全息文件中枢
   ① 列表 / 平铺 / 大图 / 分类页：批量选择与卡片完整操作补齐
   ② 移动端：Android 微信 X5、iOS 微信 WKWebView、Safari、Chrome 全适配
   ③ 浅色科技 HUD 增强（硬约束不变：唯一浅色 / 无深色 / 无主题切换器）
   ========================================================================== */

/* ---------- ① 三档视图的复选框：旧版被缩略图层盖住，视觉上等于不存在 ---------- */
.grid-card .grid-check {
  z-index: 6; left: 12px; top: 12px;
  width: 24px; height: 24px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--line-strong);
  border-radius: 7px; box-shadow: 0 3px 10px rgba(12, 40, 90, .18);
}
.grid-card .grid-check span { width: 15px; height: 15px; }
.grid-card .grid-check:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 111, 242, .14); }
.grid-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(11, 111, 242, .18), 0 12px 30px rgba(11, 111, 242, .16);
}
.grid-card.selected::before { opacity: 1; }
/* 卡片底部独立操作行：下载 / 分享链接 / 二维码 / 删除 / 更多，不再挤在日期上 */
.grid-card .grid-ops {
  display: flex; align-items: center; justify-content: flex-end; gap: 2px;
  margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line);
}
.grid-card .grid-ops .icon-btn {
  width: 26px; height: 26px; border-radius: 6px; color: var(--muted);
}
.grid-card .grid-ops .icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.grid-card .grid-ops .grid-del, .grid-card .grid-ops .grid-more { position: static; }
.grid-card .grid-ops .quick-del:hover { background: var(--danger-soft); color: var(--danger); }
.grid-card .meta { padding-right: 0; }
.folder-card { position: relative; }
.folder-card .fc-check {
  position: absolute; right: 12px; top: 12px; z-index: 4;
  width: 24px; height: 24px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 7px;
  box-shadow: 0 2px 8px rgba(12, 40, 90, .12);
}
.folder-card .fc-check:hover { border-color: var(--accent); }
.folder-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(11, 111, 242, .16); }
.fc-all {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 30px; padding: 0 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--surface); font-size: 12px; color: var(--muted);
}
.fc-all:hover { border-color: var(--accent); color: var(--accent); }
.folder-select-hint {
  font-size: 11.5px; color: var(--muted); margin: -6px 0 14px; padding-left: 10px;
  border-left: 2px solid var(--cyan);
}
.bulkbar .chip-btn:disabled { opacity: .45; cursor: not-allowed; }
.bulkbar .chip-btn:disabled:hover { background: var(--surface); }

/* ---------- ② 浅色科技 HUD 增强：更亮的光束 / 更清晰的层次 / 更明显的动效 ---------- */
/* 动态极光层：只叠在浅色底之上，不产生任何深色区域 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(780px 400px at 14% 6%, rgba(6, 182, 212, .17), transparent 70%),
    radial-gradient(720px 380px at 90% 18%, rgba(122, 60, 240, .15), transparent 72%),
    radial-gradient(640px 340px at 52% 102%, rgba(11, 111, 242, .12), transparent 72%);
  animation: auroraDrift 22s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: .72; }
  to   { transform: translate3d(2%, 1%, 0) scale(1.07); opacity: 1; }
}
#app { position: relative; z-index: 1; }
.topbar {
  background-color: rgba(255, 255, 255, .89);
  background-image: linear-gradient(100deg, rgba(6, 182, 212, .12), transparent 26%, rgba(11, 111, 242, .09) 58%, transparent 76%, rgba(122, 60, 240, .13));
  background-size: 220% 100%;
  animation: prismSweep 14s linear infinite;
  box-shadow: 0 10px 30px rgba(12, 40, 90, .09);
}
.topbar::after { height: 3px; opacity: 1; box-shadow: 0 0 14px rgba(6, 182, 212, .5); }
.brand { text-shadow: 0 0 20px rgba(11, 111, 242, .22); }
.brand em { font: 600 11px/1 "Microsoft YaHei", "PingFang SC", sans-serif; letter-spacing: 1.2px; }
/* 中文状态灯与遥测条 */
.hud-status {
  font: 600 11px/1 "Microsoft YaHei", "PingFang SC", sans-serif; letter-spacing: .6px;
  color: var(--accent); border-color: var(--accent-soft-bd); background: var(--accent-soft);
}
.hud-status i { animation: hudPulse 2.4s ease-in-out infinite; }
.hud-telemetry {
  display: inline-flex; align-items: center; height: 26px; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72), 0 3px 12px rgba(12, 40, 90, .06);
}
.hud-telemetry .ht-item {
  display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; height: 100%;
  font: 600 10.5px/1 Consolas, "Microsoft YaHei", monospace; letter-spacing: .3px;
  color: var(--muted); white-space: nowrap; border-right: 1px solid var(--line);
}
.hud-telemetry .ht-item:last-child { border-right: 0; }
.hud-telemetry b { font-size: 12.5px; color: var(--accent); font-variant-numeric: tabular-nums; }
.hud-telemetry .ht-enc { color: var(--accent-2); }
.hud-telemetry .ht-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 3px rgba(14, 159, 110, .16); animation: hudPulse 2.4s ease-in-out infinite;
}
@keyframes hudPulse { 50% { box-shadow: 0 0 0 6px rgba(14, 159, 110, .05), 0 0 12px rgba(14, 159, 110, .5); } }
/* 页头：棱镜光条 + 淡辉光 */
.page-title h1 { position: relative; padding-left: 12px; text-shadow: 0 0 20px rgba(11, 111, 242, .2); }
.page-title h1::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
  border-radius: 2px; background: var(--hud); box-shadow: 0 0 10px rgba(11, 111, 242, .65);
}
.title-stats .stat-chip { box-shadow: 0 3px 14px rgba(11, 111, 242, .1); }
/* 侧栏激活态：渐变扫光 + 发光边框 */
.nav-item.active {
  background: linear-gradient(90deg, var(--accent-soft), rgba(246, 242, 255, .7));
  box-shadow: inset 0 0 0 1px rgba(11, 111, 242, .26), 0 4px 14px rgba(11, 111, 242, .1);
}
.nav-item.active::before { box-shadow: 0 0 14px rgba(11, 111, 242, .85); }
/* 视图切换：激活态改为双色棱镜 + 霓虹投影 */
.view-switch { box-shadow: 0 6px 20px rgba(11, 111, 242, .14), inset 0 0 0 1px rgba(11, 111, 242, .08); }
.view-switch button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 5px 18px rgba(11, 111, 242, .42);
}
/* 批量条：左侧棱镜光带 + 顶部流动扫描线
   v2.9.24：去掉顶部 2px 棱镜线（::after）与 overflow:hidden——它会在高分屏/DPI缩放下
   渲染成一条粗横线（用户截图「粗线」根因），且裁掉溢出的按钮。
   同时把底部 box-shadow 减淡（原 0 7px 24px 在截图里像一条粗阴影线），改用极浅的 1px 底边，
   保证任何缩放比下都干净。 */
.bulkbar {
  position: relative; overflow: visible; border-color: var(--accent-soft-bd);
  background: linear-gradient(100deg, rgba(233, 243, 255, .97), rgba(246, 242, 255, .97));
  box-shadow: 0 2px 6px rgba(11, 111, 242, .06);
}
.bulkbar::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hud); }
.bulk-count { font: 600 12.5px/1 Consolas, "Microsoft YaHei", monospace; color: var(--accent); }
/* 内容卡：细数据网格 + 更大更亮的四角定位框 */
.content-card {
  background-image:
    linear-gradient(rgba(11, 111, 242, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 111, 242, .035) 1px, transparent 1px);
  background-size: 26px 26px;
  box-shadow: 0 14px 40px rgba(12, 40, 90, .08), inset 0 0 0 1px rgba(255, 255, 255, .8);
}
.content-card::before, .content-card::after { width: 26px; height: 26px; border-width: 2px; }
/* 卡片：更明显的边框流光、选中光环、缩略图内发光 */
.grid-card { border-color: rgba(11, 111, 242, .16); }
.grid-card:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(11, 111, 242, .17), 0 0 0 1px rgba(11, 111, 242, .1);
}
.grid-card:hover::before { height: 3px; box-shadow: 0 0 14px rgba(6, 182, 212, .6); }
.grid-thumb { border-color: rgba(11, 111, 242, .2); box-shadow: inset 0 0 26px rgba(11, 111, 242, .055); }
.th-ext { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.th-scan { background: linear-gradient(105deg, transparent 38%, rgba(94, 231, 255, .42) 50%, transparent 62%); }
.grid-thumb:hover .th-scan, .file-badge:hover .th-scan { animation-duration: .9s; }
/* 主按钮流光（浅底上只用白色高光，不做深色渐变） */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); animation: btnSheen 4.5s ease-in-out infinite; pointer-events: none;
}
@keyframes btnSheen { 0%, 58% { left: -60%; } 100% { left: 130%; } }
/* 微信内下载引导条 */
.wx-tip {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 10px 12px;
  border: 1px solid var(--accent-soft-bd); border-radius: 10px;
  background: var(--accent-soft); font-size: 12px; color: var(--muted);
}
.wx-tip .ico { color: var(--accent); flex: none; }
.wx-tip button {
  margin-left: auto; flex: none; width: 24px; height: 24px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 17px; line-height: 1;
}
.wx-tip button:hover { background: #fff; color: var(--accent); }

/* ---------- ③ 移动端 / 微信浏览器适配 ---------- */
button, a, input, select, label.checkbox { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (max-width: 1100px) {
  .hud-telemetry .ht-item:nth-child(1) { display: none; }   /* 中等宽度先收掉「节点在线」 */
}
@media (max-width: 768px) {
  .topbar { height: 54px; padding: 0 12px; gap: 10px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand em { font-size: 10px; padding-left: 7px; letter-spacing: .6px; }
  .hud-status { display: none; }                    /* 窄屏用中文遥测条代替，不重复占行 */
  .hud-telemetry { margin-left: auto; }
  .hud-telemetry .ht-item:nth-child(1) { display: none; }
  .hud-telemetry .ht-item { padding: 0 8px; font-size: 10px; }
  .top-actions { margin-left: 0; }
  .top-actions .icon-btn { width: 34px; height: 34px; }
  .shell { flex-direction: column; }
  /* 侧栏变成一条可横向滑动的中文分类胶囊带，无需额外按钮 / JS */
  .sidebar {
    width: 100%; flex: none; flex-direction: row; align-items: center; gap: 8px;
    padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; background: rgba(247, 250, 255, .9);
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .nav-group { margin: 0; display: flex; gap: 6px; flex: none; }
  .nav-label { display: none; }
  .nav-item {
    width: auto; height: 34px; padding: 0 12px; gap: 6px; border-radius: 999px;
    border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .8); white-space: nowrap;
  }
  .nav-item.active::before { display: none; }
  .nav-item b { font-size: 11px; }
  .main { padding: 16px 12px calc(40px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 12px; gap: 10px; }
  .page-title h1 { font-size: 18px; }
  .view-switch button { min-width: 52px; height: 32px; padding: 0 8px; }
  .toolbar { gap: 8px; }
  .toolbar-search { flex: 1 1 100%; max-width: none; }
  .toolbar-right { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 8px; }
  .toolbar-right > * { flex: 1 1 auto; }
  .bulkbar { gap: 8px; padding: 9px 10px 9px 14px; flex-wrap: wrap; }
  .bulkbar .bulk-count { white-space: nowrap; }
  .bulkbar .bulk-actions { flex: 1 1 100%; order: 3; }
  .bulkbar #btnClearSelection { order: 2; margin-left: auto; }
  .bulkbar .chip-btn { padding: 6px 10px; }
  .grid-wrap { gap: 10px; padding: 10px; }
  #fileList[data-view="tile"] .grid-wrap { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 8px; }
  #fileList[data-view="grid"] .grid-wrap { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 10px; }
  #fileList[data-view="grid"] .grid-thumb { height: 130px; }
  .grid-card .grid-check { width: 28px; height: 28px; }
  .grid-card .grid-check span { width: 17px; height: 17px; }
  .grid-card .grid-ops .icon-btn { width: 30px; height: 30px; }
  .folder-grid { grid-template-columns: 1fr; }
  .wx-tip { font-size: 11.5px; }
}
@media (max-width: 640px) {
  .hud-telemetry { display: none; }                /* 极窄屏收掉遥测条，中文副标仍保留 */
  .brand em { font-size: 9px; padding-left: 6px; letter-spacing: .2px; }
  .hud-status { display: none; }
  table.files .c-date, table.files .c-num.optional,
  table.files .c-num:not(.optional) { display: none; }
  table.files th, table.files td { padding: 9px 8px; }
  .file-name-cell { gap: 8px; }
  .file-sub { display: none; }
  .table th { letter-spacing: 0; }
  .view-switch button { min-width: 46px; font-size: 11px; }
  .view-switch button .ico { width: 12px; height: 12px; }
  .title-stats .stat-chip { font-size: 12px; padding: 2px 9px; }
}
/* 短屏 / 弹窗 / 预览：用 dvh 规避 iOS 微信地址栏与键盘造成的裁切 */
.modal-mask { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.modal { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.preview-box { max-width: 100vw; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
@media (max-width: 768px) {
  .modal-mask { padding: 8px; }
  .modal { width: 100%; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .modal-body { padding: 12px; }
  .modal-foot { flex-wrap: wrap; }
  .preview-box { width: 100vw; height: calc(100vh - 16px); height: calc(100dvh - 16px); border-radius: 10px; }
  .preview-head { height: 48px; padding: 0 8px 0 12px; }
  .share-row { flex-wrap: wrap; }
  .share-row .sr-name { flex: 1 1 100%; }
  .share-row .sr-link { flex: 1 1 160px; }
}
/* 触屏没有 hover：上传下拉改点击展开（JS 会切 .open），并放大所有可点目标 */
@media (hover: none) {
  .upload-menu:hover .upload-menu-list { display: none; }
  .upload-menu.open .upload-menu-list, .upload-menu:focus-within .upload-menu-list { display: flex; }
  .icon-btn, .chip-btn, .page-btn { min-width: 36px; min-height: 36px; }
  .upload-opt { min-height: 40px; }
  .grid-thumb:hover .th-scan { animation: none; opacity: .35; }
}
/* iOS 微信 / Safari 键盘弹起时不要锁死滚动 */
body.modal-open { overflow: hidden; }
/* 微信内置浏览器不强依赖 <a download>：链接仍可点，提示条负责引导 */
.wechat-webview .preview-head #previewDownload { font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  body::before, .topbar, .btn-primary::after,
  .hud-status i, .hud-telemetry .ht-dot { animation: none !important; }
}

/* ---------- v2.9.15 视觉增强 · 第二层：静态也能看出的科技层次 ---------- */
/* 内容卡：顶部青紫光幕 + 更清晰的数据网格 + 顶部往返扫描线 */
.content-card {
  background-image:
    linear-gradient(180deg, rgba(6, 182, 212, .10), rgba(122, 60, 240, .04) 120px, transparent 210px),
    linear-gradient(rgba(11, 111, 242, .042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 111, 242, .042) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px, 26px 26px;
}
#fileList { position: relative; }
#fileList::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3;
  pointer-events: none; opacity: .7;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--accent), var(--accent-2), transparent);
  background-size: 55% 100%; background-repeat: no-repeat;
  animation: dataScan 7s ease-in-out infinite;
}
@keyframes dataScan { 0% { background-position: -55% 0; } 100% { background-position: 155% 0; } }
/* 卡片右上角全息光晕 + 选中态更亮的光环 */
.grid-card, .fs-card, .folder-card {
  background-image: radial-gradient(150px 80px at 100% 0, rgba(122, 60, 240, .075), transparent 72%);
}
.grid-card.selected {
  background-image: radial-gradient(150px 80px at 100% 0, rgba(11, 111, 242, .12), transparent 72%);
}
/* 侧栏计数做成 HUD 读数胶囊 */
.nav-item b {
  background: var(--accent-soft); color: var(--accent);
  padding: 1px 7px; border-radius: 999px; min-width: 22px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.nav-item.active b { background: rgba(11, 111, 242, .16); }
/* 页头统计芯片加发光数据点 */
.title-stats .stat-chip { position: relative; padding-left: 21px; }
.title-stats .stat-chip::before {
  content: ''; position: absolute; left: 9px; top: 50%; width: 5px; height: 5px;
  margin-top: -2.5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
/* 顶栏棱镜折射：品牌图标外的旋转轨道更亮，光带更饱和 */
.brand-ico::after { border-top-color: var(--cyan); border-right-color: var(--accent-2); box-shadow: 0 0 12px rgba(6, 182, 212, .35); }
.topbar::after { box-shadow: 0 0 18px rgba(6, 182, 212, .7), 0 0 30px rgba(122, 60, 240, .28); }
/* 按钮与胶囊的霓虹描边（浅底上只用描边与淡辉光，不做深色块） */
.view-switch button.active, .btn-primary { box-shadow: 0 5px 18px rgba(11, 111, 242, .42), 0 0 0 1px rgba(255, 255, 255, .35) inset; }
.chip-btn:not(:disabled):hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 111, 242, .1); }
@media (prefers-reduced-motion: reduce) {
  #fileList::before { animation: none !important; opacity: .45; }
}




/* ==================== v2.9.16：可读性 + 排版对齐 + 访客能力 ==================== */
/* 需求2：截图框选的侧栏计数与列表表头字体偏小 —— 放大到清晰可读 */
.nav-item b {
  font: 700 13px/1.3 "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  min-width: 26px; padding: 2px 8px;
}
table.files th {
  font-size: 12.5px; font-weight: 650; letter-spacing: .3px;
  color: var(--muted); text-transform: none;
}
table.files td { font-size: 13px; }
@media (max-width: 768px) {
  .nav-item b { font-size: 12px; min-width: 23px; }
  table.files th { font-size: 12px; padding: 10px 8px; }
}
/* 需求1：管理组仅管理模式可见 */
.nav-manage[hidden] { display: none !important; }
/* 需求3：品牌改为非链接标识，去掉可点击手型 */
.brand { cursor: default; }
.brand:hover { color: var(--text); }
/* 需求4：顶栏右侧「管理模式 + 退出」与内容区右边界对齐、垂直居中 */
.topbar { padding-right: 34px; }
.top-actions { align-items: center; gap: 8px; }
.access-badge { height: 30px; font-size: 12.5px; }
.top-actions .icon-btn { width: 34px; height: 34px; }
/* 需求4：文件夹页标题行 / 全选 / 批量条 / 工具栏左边界统一，消除红框内的错位 */
.panel-head { align-items: center; }
.panel-head .fc-all { flex: none; }
#bulkbar { margin: 0 0 12px; }
.page-head { align-items: center; }
.page-title { align-items: center; }
/* 访客批量条：只一个打包按钮，别让空动作区撑开布局 */
body.readonly .bulk-actions { flex: none; }
@media (max-width: 768px) {
  .topbar { padding-right: 16px; }
}


/* ==================== v2.9.18：批量上传中心 + 卡片科技交互 ==================== */
.upload-opt.center-opt {
  color: var(--accent); font-weight: 650;
  background: linear-gradient(90deg, var(--accent-soft), transparent);
}
.upload-opt.center-opt .ico { color: var(--accent); }
.uc-wrap { display: flex; flex-direction: column; gap: 12px; }
.uc-drop {
  border: 1.5px dashed var(--line-strong); border-radius: 12px;
  background:
    linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(6,182,212,.14) 22px 23px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(6,182,212,.14) 22px 23px);
  padding: 22px 14px; text-align: center; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.uc-drop .ico { width: 27px; height: 27px; color: var(--accent); margin-bottom: 7px; }
.uc-drop strong { display: block; font-size: 14px; color: var(--text); }
.uc-drop p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.uc-drop.over { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(227,55,134,.12); transform: scale(1.01); }
.uc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.uc-add { height: 32px; padding: 0 12px; font-size: 12.5px; }
.uc-add .ico { width: 14px; height: 14px; color: var(--accent); }
.uc-all { height: 32px; margin-left: auto; font-size: 12.5px; }
.uc-summary {
  font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums;
  padding: 7px 10px; border-radius: 7px; background: var(--accent-soft); border: 1px solid var(--accent-soft-bd);
}
.uc-list { max-height: 290px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.uc-empty { padding: 22px 10px; text-align: center; color: var(--muted-2); font-size: 12.5px; }
.uc-row {
  display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 7px 10px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .16s;
}
.uc-row:last-child { border-bottom: 0; }
.uc-row:hover { background: var(--fill); }
.uc-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; cursor: pointer; }
.uc-ico { width: 16px; height: 16px; color: var(--accent-2); flex: none; }
.uc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uc-name b { font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-name small { font-size: 11px; color: var(--muted-2); }
.uc-size { font: 600 11.5px/1 Consolas, monospace; color: var(--muted); white-space: nowrap; }
.uc-remove { width: 26px; height: 26px; flex: none; }
@media (max-width: 640px) {
  .uc-all { margin-left: 0; }
  .uc-list { max-height: 230px; }
  .uc-size { display: none; }
}

/* 卡片：悬浮微抬升 + 对角线流光 + 选中呼吸光环（浅色，不用深色底） */
.file-list-card, .grid-card, .fs-card, .folder-card {
  position: relative;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s, border-color .22s;
}
@media (hover: hover) {
  .grid-card:hover, .fs-card:hover, .folder-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(15,23,42,.13), 0 0 0 1px rgba(227,55,134,.14);
  }
  .grid-card::after, .fs-card::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.72) 48%, rgba(6,182,212,.12) 53%, transparent 62%);
    background-size: 240% 100%; background-position: 140% 0; opacity: 0; transition: opacity .2s, background-position .55s;
  }
  .grid-card:hover::after, .fs-card:hover::after { opacity: 1; background-position: -40% 0; }
}
@keyframes cardHalo {
  0%, 100% { box-shadow: 0 0 0 2px rgba(227,55,134,.20), 0 10px 26px rgba(227,55,134,.10); }
  50% { box-shadow: 0 0 0 4px rgba(227,55,134,.12), 0 14px 32px rgba(227,55,134,.18); }
}
.grid-card.selected, .fs-card.selected { animation: cardHalo 2.6s ease-in-out infinite; }
.grid-card .grid-ops .icon-btn, .card-ops .icon-btn { transition: transform .18s, background .18s, box-shadow .18s; }
@media (hover: hover) {
  .grid-card .grid-ops .icon-btn:hover, .card-ops .icon-btn:hover {
    transform: translateY(-2px); background: var(--accent-soft); box-shadow: 0 4px 12px rgba(227,55,134,.18);
  }
}
/* v2.9.30：删除这里的「左侧数据点」覆盖规则。
   它把 .nav-item.active::before 从 3px 左缘竖条改成了 left:8px 的 5px 青色圆点，
   与 10px 处的图标挤在一起、还和上方「分类」小方块视觉重复，像多出来的一个点。
   选中态统一为一条 3px 竖条（与页标题 h1::before 同款），规则只在文件中定义一次。 */
@keyframes titleShimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.page-title h1 {
  background: linear-gradient(90deg, var(--text) 30%, var(--accent) 50%, var(--accent-2) 70%, var(--text) 90%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: titleShimmer 9s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .grid-card.selected, .fs-card.selected, .page-title h1 { animation: none; }
  .grid-card:hover, .fs-card:hover, .folder-card:hover { transform: none; }
}

/* ================= v2.9.20：增强 3D 科技卡片（浅色 / 零依赖 / 移动端降级） ================= */
/* 基于已有的 theme-3d + .tilt-card + --rx/--ry；这里放大景深、加光泽与入场动画 */
html.theme-3d .grid-wrap, html.theme-3d .folder-grid, html.theme-3d .fs-grid,
html.theme-3d .collection-grid { perspective: 1200px; }

html.theme-3d .tilt-card {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease, border-color .18s ease;
  box-shadow: 0 4px 14px rgba(15,23,42,.06);
}
html.theme-3d .tilt-card:hover {
  box-shadow: -10px 16px 34px rgba(15,23,42,.16), 0 0 0 1px rgba(227,55,134,.10);
  border-color: rgba(227,55,134,.45);
  z-index: 2;
}

/* 缩略图 / 图标向观察者凸起，形成真实景深 */
html.theme-3d .tilt-card .grid-thumb,
html.theme-3d .tilt-card .fs-ico,
html.theme-3d .tilt-card .folder-ico {
  transform: translateZ(28px);
  transition: transform .18s ease;
}
html.theme-3d .tilt-card .nm,
html.theme-3d .tilt-card h3,
html.theme-3d .tilt-card .meta { transform: translateZ(14px); }

/* 鼠标跟随的径向光泽（位置由 --gx/--gy 注入） */
html.theme-3d .tilt-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, -50%) var(--gy, -50%),
    rgba(255,255,255,.85) 0%, rgba(227,55,134,.10) 22%, transparent 55%);
  opacity: 0; transition: opacity .18s ease; z-index: 3;
}
html.theme-3d .tilt-card:hover::before { opacity: 1; }

/* 卡片入场：逐个轻微 3D 抬起淡入（不阻塞交互） */
@keyframes cardEnter3d {
  from { opacity: 0; transform: perspective(1000px) rotateX(10deg) translateY(14px) scale(.97); }
  to   { opacity: 1; transform: perspective(1000px) rotateX(0) translateY(0) scale(1); }
}
html.theme-3d .grid-wrap > .grid-card,
html.theme-3d .folder-grid > .folder-card,
html.theme-3d .fs-grid > .fs-card { animation: cardEnter3d .42s cubic-bezier(.2,.7,.3,1) both; }
html.theme-3d .grid-wrap > .grid-card:nth-child(2n),
html.theme-3d .fs-grid > .fs-card:nth-child(2n) { animation-delay: .04s; }
html.theme-3d .grid-wrap > .grid-card:nth-child(3n),
html.theme-3d .fs-grid > .fs-card:nth-child(3n) { animation-delay: .08s; }

/* 移动端 / 触屏：无 hover 视差，保留轻量入场，避免卡顿 */
@media (hover: none), (pointer: coarse) {
  html.theme-3d .tilt-card { transform: none !important; will-change: auto; }
  html.theme-3d .tilt-card .grid-thumb,
  html.theme-3d .tilt-card .fs-ico,
  html.theme-3d .tilt-card .folder-ico { transform: none !important; }
}
/* ================= v2.9.21：列表视图也能看见 3D（默认视图不再「像没发布」） ================= */
/* 原来 tilt 只绑定文件夹/网格卡片，用户默认停在「列表」视图时看不到任何立体感。
   这里给列表行加：常驻透视底座 + 逐行入场 + 鼠标跟随的横向光泽，浅色下克制可见。 */
html.theme-3d #fileList[data-view="list"] { perspective: 1400px; }
html.theme-3d table.files tbody tr {
  position: relative;
  transform: perspective(1200px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateY(var(--ty, 0px));
  transform-style: preserve-3d;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, background .2s ease;
  will-change: transform;
}
html.theme-3d table.files tbody tr:hover {
  box-shadow: -6px 10px 24px rgba(15, 23, 42, .10), inset 3px 0 0 var(--accent);
  background: linear-gradient(90deg, rgba(227,55,134,.05), rgba(255,255,255,0) 62%);
}
html.theme-3d table.files tbody tr:hover td:first-child { transform: translateZ(12px); }
html.theme-3d table.files tbody tr .nm { transform: translateZ(8px); }
@keyframes rowEnter3d {
  from { opacity: 0; transform: perspective(1000px) rotateX(8deg) translateY(8px); }
  to   { opacity: 1; transform: perspective(1000px) rotateX(0) translateY(0); }
}
html.theme-3d #fileList[data-view="list"] tbody tr { animation: rowEnter3d .34s cubic-bezier(.2,.7,.3,1) both; }
html.theme-3d #fileList[data-view="list"] tbody tr:nth-child(2n) { animation-delay: .025s; }
html.theme-3d #fileList[data-view="list"] tbody tr:nth-child(3n) { animation-delay: .05s; }

/* 顶部栏 3D 辉光条：无需悬停也能一眼看出是立体科技风 */
html.theme-3d .topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent) 18%, var(--accent-2) 50%, var(--accent) 82%, transparent);
  opacity: .55; transform: translateZ(0);
}

@media (hover: none), (pointer: coarse) {
  html.theme-3d table.files tbody tr { transform: none !important; will-change: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html.theme-3d .tilt-card { transform: none !important; transition: none !important; }
  html.theme-3d .grid-wrap > .grid-card,
  html.theme-3d .folder-grid > .folder-card,
  html.theme-3d .fs-grid > .fs-card { animation: none !important; }
  html.theme-3d .tilt-card::before { display: none; }
  html.theme-3d table.files tbody tr { transform: none !important; animation: none !important; transition: none !important; }
}

/* ========================================================================
   v2.9.29：进入页面动效（去掉 v2.9.28 的球形装饰，回归克制线性风格）
   触发：app.js revealApp() 给 body 加 .app-ready，约 1.8s 后自动移除。
   时序：顶栏光束(0) → 侧栏(150) → 主区(280) → 标题(340) → 工具栏(380) → 内容卡(460)。
   说明：v2.9.28 的发光球体装饰已在 v2.9.29 全部删除（顶栏 16px 图标旁放
        26px 彩色球体破坏视觉重心，与极简线性品牌冲突）。
   ======================================================================== */

/* ---- 顶栏光束扫过：一道高光沿横轴掠过，示意「服务就绪」 ---- */
@keyframes entryBeam {
  0%   { transform: translateX(-100%); opacity: 0; }
  20%  { opacity: .8; }
  80%  { opacity: .8; }
  100% { transform: translateX(100%); opacity: 0; }
}
body.app-ready .topbar { position: relative; overflow: hidden; }
body.app-ready .topbar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 100%;
  pointer-events: none; z-index: 2;
  background: linear-gradient(105deg,
    transparent 0%,
    transparent 30%,
    rgba(227, 55, 134, .20) 42%,
    rgba(122, 60, 240, .28) 50%,
    rgba(6, 182, 212, .18) 58%,
    transparent 70%,
    transparent 100%);
  animation: entryBeam 1.5s cubic-bezier(.45, 0, .25, 1) both;
}

/* ---- 副标题：字距展开 ---- */
@keyframes entryTagline {
  0%   { opacity: 0; transform: translateX(-14px); letter-spacing: 4px; }
  100% { opacity: 1; transform: none; letter-spacing: 1.8px; }
}
body.app-ready .brand em { animation: entryTagline .75s .25s cubic-bezier(.2, .7, .3, 1) both; }

/* ---- 侧栏 + 主区错落浮入 ---- */
@keyframes entrySlideLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: none; }
}
body.app-ready .sidebar { animation: entrySlideLeft .7s .15s cubic-bezier(.22, .8, .3, 1) both; }

@keyframes entryRise {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
body.app-ready .main { animation: entryRise .8s .28s cubic-bezier(.22, .8, .3, 1) both; }
body.app-ready .toolbar    { animation: entryRise .6s .38s cubic-bezier(.22, .8, .3, 1) both; }
body.app-ready #contentCard { animation: entryRise .7s .46s cubic-bezier(.22, .8, .3, 1) both; }

/* ---- 页面标题弹入 ---- */
@keyframes entryTitle {
  0%   { opacity: 0; transform: translateY(18px) scale(.94); }
  55%  { opacity: 1; transform: translateY(-5px) scale(1.02); }
  100% { opacity: 1; transform: none; }
}
body.app-ready .page-title h1 { animation: entryTitle .7s .34s cubic-bezier(.34, 1.56, .64, 1) both; }

/* ---- HUD 状态点脉冲 ---- */
@keyframes entryHud {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 106, .6); }
  50%  { transform: scale(1.5); box-shadow: 0 0 0 10px rgba(22, 163, 106, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 106, 0); }
}
body.app-ready .hud-status i { animation: entryHud .8s .4s cubic-bezier(.34, 1.56, .64, 1) both; display: inline-block; }

/* ---- reduced-motion：全部取消 ---- */
@media (prefers-reduced-motion: reduce) {
  body.app-ready .topbar::before,
  body.app-ready .brand em,
  body.app-ready .sidebar,
  body.app-ready .main,
  body.app-ready .page-title h1,
  body.app-ready .toolbar,
  body.app-ready #contentCard,
  body.app-ready .hud-status i { animation: none !important; }
}

/* ========================================================================
   v2.9.30 一、动态背景层（#bg-fx）
   做法：固定定位的三团超低透明度径向渐变，各自用 transform 缓慢漂移 +
   极轻微缩放，周期 46~62 秒、互素错开，因此肉眼看不到循环点。
   • 不透明度只有 .10~.18 且 62% 处已透明，文字对比度不受影响（浅色底恒 >220）。
   • 只用 transform，不触发重排；不加 filter: blur()，移动端几乎零成本。
   • z-index 0 + #app 提升到 1，保证光斑在内容之下、在 body 网格之上。
   ======================================================================== */
.bg-fx {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden; contain: strict;
}
.bg-fx i {
  position: absolute; display: block; border-radius: 50%;
  will-change: transform; transform: translate3d(0, 0, 0);
  animation-timing-function: ease-in-out; animation-iteration-count: infinite;
  animation-direction: alternate;
}
.bg-fx .b1 {
  width: 54vmax; height: 54vmax; left: -14vmax; top: -20vmax;
  background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, .13), rgba(6, 182, 212, 0) 66%);
  animation-name: bgDriftA; animation-duration: 46s;
}
.bg-fx .b2 {
  width: 48vmax; height: 48vmax; right: -16vmax; top: -12vmax;
  background: radial-gradient(circle at 50% 50%, rgba(122, 60, 240, .12), rgba(122, 60, 240, 0) 66%);
  animation-name: bgDriftB; animation-duration: 59s;
}
.bg-fx .b3 {
  width: 42vmax; height: 42vmax; left: 34%; bottom: -20vmax;
  background: radial-gradient(circle at 50% 50%, rgba(227, 55, 134, .10), rgba(227, 55, 134, 0) 66%);
  animation-name: bgDriftC; animation-duration: 53s;
}
@keyframes bgDriftA {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(7vmax, 5vmax, 0) scale(1.14); }
  100% { transform: translate3d(2vmax, 11vmax, 0) scale(1.04); }
}
@keyframes bgDriftB {
  0%   { transform: translate3d(0, 0, 0) scale(1.06); }
  50%  { transform: translate3d(-9vmax, 7vmax, 0) scale(1); }
  100% { transform: translate3d(-3vmax, 13vmax, 0) scale(1.12); }
}
@keyframes bgDriftC {
  0%   { transform: translate3d(-4vmax, 0, 0) scale(1); }
  50%  { transform: translate3d(6vmax, -8vmax, 0) scale(1.16); }
  100% { transform: translate3d(-2vmax, -3vmax, 0) scale(1.02); }
}
/* 内容层抬到光斑之上（#app 原来是静态定位，天然被 fixed 层盖住） */
#app { position: relative; z-index: 1; }
/* 顶栏 / 侧栏本身是半透明玻璃，光斑会透过它们形成缓慢流动的色温变化——这正是想要的效果 */

/* ========================================================================
   v2.9.32 二、开场动画（#splash）：一路放大 → 逐渐弱化消失，全程 3 秒
   时序：0ms        图标 0.70 倍、全透明起步
        0 → 0.70s  放大到 1.00 倍并完全显现（"出现"）
        0.70 → 2.40s 继续缓慢放大到 1.26 倍（"放大 + 停留"，数据在此时段内就绪）
        2.40 → 3.02s 再冲到 1.66 倍，同时透明度归零，整层底色同步化开（"逐渐弱化消失"）
        240ms 名字收字距淡入 / 420ms 副标淡入 / 120ms→2.27s 进度条 0→100%
   为什么这样改：v2.9.31 只有 +11% 的微放大，用户直接指出「放大啊，逐渐弱化啊，时间 3 秒」——
   幅度看不见、时长不够、结尾是硬切。现在把放大做成一条贯穿全程的连续曲线，
   收尾靠"继续放大 + 变透明"做出向前冲出后消散的观感，而不是原地淡掉。
   退出仍由 app.js revealApp() 触发，带 2.4s 最小停留，数据再快也不会闪一下就没。
   ======================================================================== */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  /* 与本体内页同一套底：细网格 + 极淡径向光，开场到进站不出现「白屏闪一下」的割裂感 */
  background-color: #FBFDFF;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(900px 640px at 50% 38%, #FFFFFF 0%, #F6FAFF 56%, #EDF3FE 100%);
  background-size: 34px 34px, 34px 34px, auto;
  transition: opacity .62s ease, visibility .62s ease;
}
.splash.is-out { opacity: 0; visibility: hidden; }
.splash-inner { display: flex; flex-direction: column; align-items: center; }
.splash-mark {
  position: relative; width: 152px; height: 152px; color: var(--accent);
  display: block; transform-origin: 50% 50%;
  /* 2.4s 与 app.js 的 SPLASH_MIN 严格对齐：放大跑完就交棒给收尾动画，中间不空档 */
  animation: splashMark 2.4s cubic-bezier(.18, .72, .22, 1) both;
  will-change: transform, opacity;
}
.splash-mark svg {
  position: relative; z-index: 1;
  width: 100%; height: 100%; display: block;
  stroke: currentColor; fill: none; stroke-width: 1.05;
  stroke-linecap: round; stroke-linejoin: round;
  /* 柔光只做「跟随三角形状」的投影，绝不加任何圆形底衬——
     v2.9.28 的球体和圆形光晕都被证明像「贴上去的圆片」，用户明确反感。 */
  filter: drop-shadow(0 16px 34px rgba(227, 55, 134, .30)) drop-shadow(0 0 18px rgba(122, 60, 240, .18));
}
@keyframes splashMark {
  0%   { opacity: 0; transform: scale(.70); }
  29%  { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.26); }
}
.splash-name {
  margin-top: 22px; font-size: 30px; font-weight: 750; letter-spacing: .14em;
  color: var(--text); text-indent: .14em;
  animation: splashName .9s .24s cubic-bezier(.22, .8, .28, 1) both;
}
@keyframes splashName {
  0%   { opacity: 0; transform: translateY(12px); letter-spacing: .5em; }
  100% { opacity: 1; transform: none; letter-spacing: .14em; }
}
.splash-tag {
  margin-top: 12px; font: 600 12px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .22em; text-indent: .22em;
  color: var(--muted);
  animation: splashTag .8s .42s ease both;
}
@keyframes splashTag { from { opacity: 0; } to { opacity: 1; } }
.splash-bar {
  margin-top: 28px; width: 148px; height: 3px; border-radius: 3px;
  background: rgba(15, 23, 42, .08); overflow: hidden;
  animation: splashTag .5s .3s ease both;
}
.splash-bar i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #06B6D4, #E33786 52%, #7A3CF0);
  transform-origin: 0 50%;
  /* 2.15s：0.12s 起走到 2.27s，正好在 2.4s 收尾前走满，不会「条走完还干等」 */
  animation: splashBar 2.15s .12s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes splashBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* v2.9.32 收尾（is-out，2400ms 起 0.62s）：图标从 1.26 倍继续冲到 1.66 倍并淡出，
   整层底色同时化开 —— 观感是「画面一边放大一边消散」，而不是原地暗掉。
   这里用新的 animation 覆盖 splashMark（而不是 transition），是为了让它接着 1.26 倍往下跑，
   不会因为动画被撤掉而先跳回 1 倍。 */
.splash.is-out .splash-mark { animation: splashMarkOut .62s cubic-bezier(.32, 0, .68, 1) forwards; }
@keyframes splashMarkOut {
  from { opacity: 1;    transform: scale(1.26); }
  to   { opacity: 0;    transform: scale(1.66); }
}

/* 小屏：开场图标按屏宽等比收一档，避免在 375px 宽的手机上占满半屏 */
@media (max-width: 520px) {
  .splash-mark { width: 108px; height: 108px; }
  .splash-name { font-size: 25px; }
  .splash-tag { font-size: 11px; }
  .splash-bar { margin-top: 22px; width: 120px; }
}

/* 降低动效偏好：开场直接呈现静止画面，背景光斑停止漂移 */
@media (prefers-reduced-motion: reduce) {
  .splash-mark, .splash-name, .splash-tag, .splash-bar, .splash-bar i { animation: none !important; }
  .splash { transition: none !important; }
  .bg-fx i { animation: none !important; }
}
