/* 宝匣 Web UI —— 视觉基线：CloudDrive2 桌面端（深色）
   设计取舍：无毛玻璃铺底、无渐变大圆角、无 emoji；图标全部走 icons.js 的线性 SVG。
   尺寸基准：顶栏 48 / 工具条 44 / 控件 28 / 表格行 34 / 状态栏 24 / 字号 12.5 */
:root {
  /* 原生控件（滚动条、input、select）跟随深色，避免亮色控件割裂界面 */
  color-scheme: dark;
  --bg: #0f0f12;
  --bg-1: #16161a;
  --bg-2: #1c1c21;
  --bg-3: #23232a;
  --bg-4: #2c2c35;
  --line: #232329;
  --line-2: #303038;
  --fg: #e7e7ec;
  --fg-2: #a3a3ae;
  /* 弱化文本 #70707c 在 --bg 上只有 3.9:1（不达 4.5:1），调亮到 #7a7a87 = 4.52:1 */
  --fg-3: #7a7a87;
  --accent: #2f8ff5;
  --accent-2: #6bb0ff;
  --accent-soft: rgba(47, 143, 245, .15);
  --ok: #3fb950;
  --warn: #d9a032;
  --err: #e5534b;
  --r: 6px;
  --r-sm: 5px;
  --h-top: 48px;
  --h-tools: 44px;
  --h-ctl: 28px;
  --h-row: 34px;
  --sd: 0 8px 24px rgba(0, 0, 0, .5);
  /* 语义别名（仍被页面引用） */
  --border-strong: #3d3d47;
  --success: var(--ok);
  --danger: var(--err);
  --muted: var(--fg-3);
  --faint: #5d5d68;
  --ring: 0 0 0 2px rgba(47, 143, 245, .35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 12.5px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #8ec4ff; }
::selection { background: rgba(47, 143, 245, .32); }

/* ---------- 图标 ---------- */
.ic {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ic-folder { stroke: #c99a3e; fill: rgba(201, 154, 62, .16); }
.name .ico { display: inline-flex; width: 18px; justify-content: center; flex: 0 0 18px; }
.name .ico .ic { width: 17px; height: 17px; }
.thumb-ico .ic { width: 34px; height: 34px; stroke-width: 1.3; }
.row-thumb .thumb-ico .ic { width: 14px; height: 14px; stroke-width: 1.8; }
.thumb-play .ic { width: 10px; height: 10px; fill: currentColor; stroke: none; }
.vault-badge .ic { width: 12px; height: 12px; }
.vb-ico .ic { width: 15px; height: 15px; }
.statusbar .ic { width: 12px; height: 12px; }

/* ---------- 控件 ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h-ctl); padding: 0 10px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--fg);
  font: inherit; font-size: 12.5px;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
button:hover:not(:disabled), .btn:hover { background: var(--bg-4); border-color: var(--border-strong); }
button:active:not(:disabled), .btn:active { background: #33333d; }
button:disabled { opacity: .42; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
button.primary:hover:not(:disabled), .btn.primary:hover { background: #3d9bff; border-color: #3d9bff; }
button.plain, .btn.plain, button.ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
button.plain:hover:not(:disabled), .btn.plain:hover, button.ghost:hover {
  background: rgba(255, 255, 255, .07); border-color: transparent; color: var(--fg);
}
button.regular, .btn.regular { background: var(--bg-2); }
button.danger, .btn.danger { background: transparent; border-color: rgba(229, 83, 75, .38); color: #ef8b84; }
button.danger:hover:not(:disabled), .btn.danger:hover { background: rgba(229, 83, 75, .14); border-color: rgba(229, 83, 75, .6); }
button.sm { height: 22px; padding: 0 8px; font-size: 11.5px; border-radius: 4px; }
button.icon-only, .btn.icon-only { width: var(--h-ctl); padding: 0; }
button.icon-btn, .btn.icon-btn { width: 28px; height: 28px; padding: 0; flex: 0 0 auto; }
button.icon-btn .ic { width: 15px; height: 15px; }

/* 懒加载缩略图统一裁切：cover 把画面尽可能放大填满方框，object-position 固定 center，
   以图片中心为定位点（不偏向任何一角）。 */
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }

/* ---------- 表单控件：全部自绘，禁用浏览器原生外观（含未写 type 的 input） ----------
   注意排除 checkbox / radio：它们有自己的 15px 尺寸，若被 width:100% 命中，
   在 flex 容器里会被压扁成一条细线（历史上的勾选框"极窄看不清"就是这个原因）。 */
input:not([type=checkbox]):not([type=radio]), select, textarea {
  appearance: none; -webkit-appearance: none;
  box-sizing: border-box;
  height: var(--h-ctl); width: 100%; padding: 0 9px;
  background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--fg); font-family: inherit; font-size: 12.5px; line-height: normal;
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { height: auto; min-height: 62px; padding: 8px 10px; resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #5d5d68; }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
/* 去掉数字输入的上下箭头（原生步进器不属于我们的外观） */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* 去掉 WebKit 给 search 加的原生圆角与清除按钮 */
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
/* 自绘复选框：勾由两条边旋转而成，不依赖平台控件。
   width/height 必须用 min-width/min-height 兜底：万一某处又写了 width:auto 的内联样式，
   也不会被压成 0 宽。 */
input[type=checkbox] {
  display: inline-block; vertical-align: middle; margin: 0;
  box-sizing: border-box;
  width: 15px; min-width: 15px; height: 15px; flex: none; padding: 0;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px;
  position: relative; cursor: pointer;
}
input[type=checkbox]:hover { border-color: var(--border-strong); }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 1.6px 1.6px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}
input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
/* 自绘滑块（播放器音量等） */
input[type=range] { height: 22px; padding: 0; background: transparent; border: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--line-2); border-radius: 999px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; margin-top: -4px;
  background: var(--accent); border: 0; border-radius: 50%;
}
input[type=range]::-moz-range-track { height: 4px; background: var(--line-2); border-radius: 999px; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; background: var(--accent); border: 0; border-radius: 50%; }
/* Chrome 自动填充会强行刷上它自己的底色，这里盖回去 */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg);
  box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--fg);
}
select {
  padding-right: 26px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%),
    linear-gradient(135deg, var(--fg-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 13px, calc(100% - 10px) 13px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.select-sm { height: 26px; width: auto; min-width: 96px; font-size: 12px; }

/* ---------- 存储接入方式卡片（四类入口分开） ---------- */
.kind-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--r);
}
.kind-card .hint { flex: 1; }
.kc-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.kc-ico { display: inline-flex; color: var(--accent); }
.kc-ico .ic { width: 16px; height: 16px; }
.kind-card > button { align-self: flex-start; }

/* ---------- 可折叠卡片（存储管理的高级设置默认收起） ---------- */
.card.collapsible { padding: 0; }
.card-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 12px 14px;
  background: transparent; border: 0; border-radius: var(--r);
  color: var(--fg); font-family: inherit; font-size: 13px; font-weight: 600;
  text-align: left; cursor: pointer;
}
.card-head:hover { background: var(--bg-2); }
.card-head .chev {
  flex: none; width: 0; height: 0;
  border-left: 5px solid var(--fg-3);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .15s ease;
}
.card-head.open .chev { transform: rotate(90deg); }
.card-body { padding: 0 14px 14px; }
.hint.warn { color: var(--warn); }
label { color: var(--fg-2); font-size: 12px; }
:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- 应用骨架 ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  flex: 0 0 218px; width: 218px;
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.sb-head {
  flex: 0 0 var(--h-top);
  display: flex; align-items: center; gap: 9px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
}
.logo {
  width: 24px; height: 24px; flex: 0 0 24px;
  display: grid; place-items: center;
  border-radius: 5px;
  background: var(--accent);
  color: #fff; font-size: 12.5px; font-weight: 600;
}
.sb-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sb-title b { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.sb-title small { font-size: 9px; letter-spacing: .18em; color: var(--fg-3); }

.sb-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 7px 7px 14px; }
.sb-foot { flex: 0 0 auto; padding: 7px; border-top: 1px solid var(--line); }

.nav-title {
  display: flex; align-items: center; gap: 6px;
  padding: 15px 8px 5px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-3);
}
.nav-title > span { flex: 1 1 auto; }
.nav-add {
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 4px;
  color: var(--fg-3); cursor: pointer;
}
.nav-add:hover { background: var(--bg-3); color: var(--fg); }
.nav-add .ic { width: 12px; height: 12px; stroke-width: 2; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  height: 30px; padding: 0 8px;
  border-radius: 5px;
  color: var(--fg-2);
  font-size: 12.5px;
  cursor: pointer; user-select: none;
  transition: background .1s ease, color .1s ease;
}
.nav-item:hover { background: var(--bg-2); color: var(--fg); }
.nav-item.active { background: var(--accent-soft); color: #cfe6ff; }
.nav-ico { display: grid; place-items: center; width: 16px; flex: 0 0 16px; color: var(--fg-3); }
.nav-item.active .nav-ico { color: var(--accent-2); }
.nav-item .txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-empty {
  padding: 6px 8px 4px;
  font-size: 11.5px; line-height: 1.7; color: var(--fg-3);
}
.nav-empty a { color: var(--accent-2); cursor: pointer; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 16px; padding: 0 5px;
  border-radius: 8px;
  background: var(--bg-4); color: var(--fg-2);
  font-size: 10.5px; font-variant-numeric: tabular-nums;
}
.badge.ok { background: rgba(63, 185, 80, .16); color: #7ee787; }
.dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--fg-3); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--err); }

.user-box {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px; border-radius: 5px;
  cursor: pointer;
}
.user-box:hover { background: var(--bg-2); }
.avatar {
  width: 25px; height: 25px; flex: 0 0 25px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--bg-4); color: var(--fg-2);
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
}
.u-meta { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.u-meta b { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-meta small { font-size: 10.5px; color: var(--fg-3); }
.u-out { color: var(--fg-3); display: grid; place-items: center; }
.u-out .ic { width: 14px; height: 14px; }

/* ---------- 主区 / 顶栏 ---------- */
.main { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }

.topbar {
  flex: 0 0 var(--h-top);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}
.topbar #menu { width: 28px; height: 28px; }
.spacer { flex: 1 1 auto; }

.crumbs { display: flex; align-items: center; gap: 1px; min-width: 0; overflow: hidden; }
.crumbs a {
  padding: 3px 6px; border-radius: 4px;
  color: var(--fg-2); font-size: 12.5px;
  white-space: nowrap; cursor: pointer;
}
.crumbs a:hover { background: var(--bg-3); color: var(--fg); }
.crumbs a:last-of-type { color: var(--fg); }
.crumbs .sep { color: #3a3a44; font-size: 11px; padding: 0 1px; }

.search-box {
  display: flex; align-items: center; gap: 5px;
  width: 236px; height: 28px; padding-left: 8px;
  background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 5px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.search-box .in { width: 13px; height: 13px; color: var(--fg-3); }
.search-box input {
  flex: 1 1 auto; width: 100%; height: 26px;
  padding: 0; background: transparent; border: 0; font-size: 12.5px;
}
.search-box input:focus, .search-box input:hover { border: 0; box-shadow: none; }
.search-box button {
  height: 24px; margin-right: 2px; padding: 0 8px;
  background: transparent; border: 0; border-radius: 4px;
  color: var(--fg-3); font-size: 11.5px;
}
.search-box button:hover { background: var(--bg-3); color: var(--fg); border: 0; }

.sse {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--bg-2);
  color: var(--fg-3); font-size: 11px; white-space: nowrap;
}
.sse i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); }
.sse.on i { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 185, 80, .14); }
.sse.off i { background: var(--err); }

.content { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* ---------- 状态栏 ---------- */
.statusbar {
  flex: 0 0 24px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  color: var(--fg-3); font-size: 11px;
}
.st-left, .st-sel, .st-right {
  display: inline-flex; align-items: center; gap: 5px;
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.st-left { flex: 0 1 auto; }
.st-sel { color: var(--accent-2); flex: 0 0 auto; }
.st-right { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.st-sep { color: #3a3a44; }
.st-path { color: var(--fg-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; }
.statusbar .ic { color: var(--fg-3); }

/* ---------- 工作区 / 工具条 ---------- */
.workspace { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.toolbar {
  flex: 0 0 var(--h-tools);
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}
.tb-group { display: flex; align-items: center; gap: 6px; }
.tb-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--line-2); }
.toolbar .btn .ic, .toolbar button .ic { width: 14px; height: 14px; }
.toolbar .btn.primary .ic { stroke-width: 1.9; }

.file-surface { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; }
.file-surface .empty { min-height: 60%; }
.workspace > .empty { flex: 1 1 auto; }

/* ---------- 卡片 / 空态 ---------- */
.card {
  margin: 12px;
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.card h3 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; }
.card + .card { margin-top: 0; }
.grid .card { margin: 0; }
.grid { display: grid; gap: 12px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 44px 20px;
  color: var(--fg-3); font-size: 12.5px; text-align: center;
}
.empty h3 { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--fg); }
.empty p { margin: 0; max-width: 460px; line-height: 1.8; }
.empty.big { padding: 84px 20px; }
.empty-ico {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--fg-3);
}
.empty-ico .ic { width: 26px; height: 26px; stroke-width: 1.4; }
.empty-ops { display: flex; gap: 8px; margin-top: 8px; }
.empty-ops .btn { height: 30px; padding: 0 14px; }

.hint { color: var(--fg-3); font-size: 11.5px; line-height: 1.7; }
.muted { color: var(--fg-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.bar {
  position: relative; height: 5px; border-radius: 3px;
  background: var(--bg-4); overflow: hidden;
}
.bar > i {
  display: block; height: 100%; width: 0;
  background: var(--accent); border-radius: 3px;
  transition: width .2s ease;
}
.ok { color: #7ee787; }
.warn { color: #e3b341; }
.err { color: #f08c85; }
.txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sep { color: var(--fg-3); }

/* ---------- 加密目录横幅 / 批量条 ---------- */
.vault-banner {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px;
  background: rgba(217, 160, 50, .08);
  border-bottom: 1px solid rgba(217, 160, 50, .22);
  color: #e3c07a; font-size: 12px;
}
.vb-ico { display: grid; place-items: center; color: var(--warn); }
.vb-title { font-weight: 600; color: #f0cf8a; }
.vb-sub { color: var(--fg-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-banner .btn, .vault-banner button { height: 24px; font-size: 11.5px; }

/* ---------- 加密目录视图切换（F-48） ---------- */
.seg {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px;
  background: var(--bg-3);
  border: 1px solid var(--line-2); border-radius: 7px;
}
.seg-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px;
  background: transparent; border: 0; border-radius: 5px;
  color: var(--fg-2); font-size: 11.5px; font-family: inherit; cursor: pointer;
}
.seg-btn .ic { width: 13px; height: 13px; }
.seg-btn:hover:not([disabled]) { color: var(--fg); background: var(--bg-4); }
.seg-btn.active {
  background: var(--accent-soft); color: #cfe6ff;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 245, .38);
}
.seg-btn[disabled] { opacity: .45; cursor: not-allowed; }
/* 上锁态的「明文」：可点（点击即弹口令框），用琥珀色区别于普通态 */
.seg-btn.locked:not(.active) { color: #e3c07a; }
.seg-btn.locked:not(.active):hover { background: rgba(217, 160, 50, .12); color: #e3c07a; }
.seg-btn .spinner {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .22); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 切换过程中列表整体弱化，工具条保持可用（UI.md §5 加载态） */
.workspace.switching .file-surface { opacity: .5; pointer-events: none; }
.st-badge {
  margin-left: 8px; padding: 0 6px;
  border: 1px solid rgba(217, 160, 50, .35); border-radius: 999px;
  background: rgba(217, 160, 50, .12);
  color: #e3c07a; font-size: 10.5px; line-height: 16px;
}
.skel-bar {
  height: 9px; border-radius: 4px;
  background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%);
  background-size: 220% 100%;
  animation: skel 1.2s linear infinite;
}
tr.skel-row td { height: var(--h-row); padding: 0 10px; }
.thumb-card.skel .thumb-box { background: var(--bg-3); }
.skel-line {
  height: 9px; margin: 8px 6px 0; border-radius: 4px;
  background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%);
  background-size: 220% 100%;
  animation: skel 1.2s linear infinite;
}
/* 上锁态：横幅用琥珀色，与「未解锁」的语义一致（F-49） */
.vault-banner.locked { background: rgba(217, 160, 50, .08); border-bottom-color: rgba(217, 160, 50, .22); color: #e3c07a; }
.vault-banner.locked .vb-ico, .vault-banner.locked .vb-title { color: #e3c07a; }
/* 明文视图：横幅换色，避免与「未解锁」的视觉混淆 */
.vault-banner.plain:not(.locked) { background: rgba(47, 143, 245, .08); border-bottom-color: rgba(47, 143, 245, .22); color: #cfe6ff; }
.vault-banner.plain .vb-ico { color: var(--accent); }
.vault-banner.plain .vb-title { color: #dfeeff; }

/* A+ 常驻条（F-60）：固定 36px 高度，未选中时显示操作提示，选中后原地换成按钮组。
   容器高度不变 → .file-surface 不伸缩、虚拟列表 clientHeight 稳定，文件不会跳位置。 */
.sel-bar {
  flex: 0 0 36px; height: 36px;
  display: flex; align-items: center; gap: 7px;
  padding: 0 12px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--fg-2);
}
.sel-bar.has-sel {
  background: var(--accent-soft);
  border-bottom-color: rgba(47, 143, 245, .28);
  color: #cfe6ff;
}
.sel-bar .sel-ops { display: none; align-items: center; gap: 7px; }
.sel-bar.has-sel .sel-ops { display: flex; }
.sel-bar .btn, .sel-bar button { height: 24px; font-size: 11.5px; }
.sel-bar .btn .ic { width: 13px; height: 13px; }

/* ---------- 列表（表格） ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.list thead th {
  position: sticky; top: 0; z-index: 3;
  height: 30px; padding: 0 10px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  text-align: left; font-size: 11.5px; font-weight: 500; color: var(--fg-3);
  white-space: nowrap; user-select: none;
}
table.list thead th[data-sort] { cursor: pointer; }
table.list thead th[data-sort]:hover { color: var(--fg); }
table.list tbody td {
  height: var(--h-row); padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2); vertical-align: middle;
}
table.list tbody tr:hover td { background: var(--bg-1); }
table.list tbody tr.sel td { background: var(--accent-soft); }
table.list tbody tr.sel td .name .txt { color: #dceeff; }
table.list tbody td:first-child { padding-left: 12px; }

.sel-cell { width: 34px; padding-left: 12px !important; padding-right: 0 !important; }
.sel-cell input { vertical-align: middle; }

.name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.name .txt {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--fg);
}
.name .ico { display: inline-flex; flex: 0 0 18px; width: 18px; justify-content: center; }

.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; opacity: 0; transition: opacity .1s ease; }
tr:hover .row-actions, .vrow:hover .row-actions { opacity: 1; }
.row-actions button {
  height: 22px; padding: 0 7px;
  background: var(--bg-3); border-color: var(--line-2);
  font-size: 11.5px; border-radius: 4px;
}
.row-actions button .ic { width: 13px; height: 13px; }
.row-actions button.danger { background: transparent; }

/* 行内小缩略图 */
.row-thumb {
  position: relative; flex: 0 0 20px; width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 3px; overflow: hidden;
  background: var(--bg-3);
}
.row-thumb .thumb-ico { display: grid; place-items: center; color: var(--fg-3); }
.row-thumb .thumb-skel { border-radius: 3px; }
.row-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.row-thumb.thumb-ready .thumb-ico { display: none; }

.vault-badge {
  display: inline-flex; align-items: center; gap: 2px;
  height: 15px; padding: 0 3px; flex: 0 0 auto;
  border-radius: 3px;
  background: rgba(217, 160, 50, .14);
  color: #e3c07a;
}

/* ---------- 虚拟滚动列表 ---------- */
.vhead {
  position: sticky; top: 0; z-index: 4;
  display: grid; align-items: center;
  height: 30px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--fg-3);
  user-select: none;
}
.vhead > * { padding: 0 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vhead [data-sort] { cursor: pointer; }
.vhead [data-sort]:hover { color: var(--fg); }
.vhead .sel-cell { padding: 0 0 0 12px !important; }

.vlist { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.vinner { position: relative; }
.vwindow { position: absolute; left: 0; right: 0; top: 0; }

.vrow {
  display: grid; align-items: center;
  height: var(--h-row);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--fg-2);
  cursor: default;
}
.vrow:hover { background: var(--bg-1); }
.vrow.sel { background: var(--accent-soft); }
.vrow.sel .name .txt { color: #dceeff; }
.vrow > * { padding: 0 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .sel-cell { padding: 0 0 0 12px !important; display: flex; align-items: center; }
.vrow .row-actions { justify-content: flex-end; }

/* 列宽拖拽热区 */
.col-grip {
  position: absolute; top: 0; right: -3px;
  width: 7px; height: 100%;
  cursor: col-resize; z-index: 5;
}
.col-grip::after {
  content: ''; position: absolute; top: 6px; bottom: 6px; left: 3px;
  width: 1px; background: transparent; transition: background .12s ease;
}
.col-grip:hover::after { background: var(--accent); }
table.list thead th[data-col], .vhead [data-col] { position: relative; }

/* ---------- 缩略图网格 ---------- */
.thumbs {
  display: grid; gap: 10px; padding: 12px;
  grid-template-columns: repeat(auto-fill, minmax(134px, 1fr));
  align-content: start;
}
.thumb-card {
  position: relative;
  display: flex; flex-direction: column; gap: 5px;
  padding: 6px; border-radius: var(--r);
  border: 1px solid transparent;
  cursor: default;
  transition: background .1s ease, border-color .1s ease;
}
.thumb-card:hover { background: var(--bg-1); border-color: var(--line); }
.thumb-card.sel { background: var(--accent-soft); border-color: rgba(47, 143, 245, .45); }

.thumb-box {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  border-radius: var(--r-sm); overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.thumb-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.thumb-ico { display: grid; place-items: center; color: var(--fg-3); }
.thumb-skel {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%);
  background-size: 220% 100%;
  animation: skel 1.2s linear infinite;
}
.thumb-ready .thumb-skel { display: none; }
.thumb-ready .thumb-ico { display: none; }
.thumb-failed .thumb-skel { display: none; }
.thumb-play {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  display: grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .62);
  color: #fff;
}
.thumb-name { font-size: 11.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 信息行：左侧大小/类型，右侧「打开」——两者同一基线，不再叠在封面上 */
.thumb-meta { display: flex; align-items: center; gap: 6px; min-height: 18px; font-size: 10.5px; }
.thumb-meta .muted { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-open {
  flex: 0 0 auto; height: 18px; padding: 0 5px;
  background: transparent; border: 0; border-radius: 4px;
  color: var(--fg-3); font-size: 10.5px; line-height: 1;
  cursor: pointer; transition: color .12s ease, background .12s ease;
}
.thumb-card:hover .thumb-open { color: var(--fg-2); }
.thumb-open:hover, .thumb-open:focus-visible { color: var(--accent); background: var(--accent-soft); outline: none; }

/* 封面上的两个控件：左上复选框 / 右上「更多」，同尺寸同内边距，8px 贴角对齐。
   注意选择器要压过全局 input[type=checkbox]（否则 position 被改成 relative，复选框会掉进流里错位）。 */
.thumb-card input.card-pick {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 18px; height: 18px; margin: 0;
  background: rgba(12, 12, 16, .55);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .12s ease, background .12s ease, border-color .12s ease;
}
.thumb-card input.card-pick:checked { background: var(--accent); border-color: var(--accent); }
.thumb-card:hover input.card-pick,
.thumb-card.sel input.card-pick,
.thumb-card input.card-pick:checked,
.thumb-card input.card-pick:focus-visible { opacity: 1; }
.thumb-more {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 18px; height: 18px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;            /* 圆形 = 更多；方形 = 复选框，两者一眼可分 */
  background: rgba(12, 12, 16, .55);
  border: 1px solid rgba(255, 255, 255, .6);
  color: #fff; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .12s ease, background .12s ease;
}
/* 三个点靠 stroke-linecap:round 画出来，尺寸缩小后线宽不放大就等于看不见 */
.thumb-more .ic { width: 16px; height: 16px; stroke-width: 3.4; }
.thumb-card:hover .thumb-more,
.thumb-card.sel .thumb-more,
.thumb-more:focus-visible { opacity: 1; }
.thumb-more:hover { background: rgba(12, 12, 16, .9); }

/* ---------- 详情侧栏 ---------- */
/* top 跳过工具条：侧栏打开时右端的视图切换/侧边栏按钮仍可点（F-59）。 */
.detail {
  position: absolute; top: calc(var(--h-top) + var(--h-tools)); right: 0; bottom: 24px;
  width: 304px; z-index: 18;
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border-left: 1px solid var(--line-2);
}
#detail-toggle.active { background: var(--accent-soft); border-color: var(--accent); color: var(--fg-1); }
.detail-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.detail-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-body { flex: 1 1 auto; overflow: auto; padding: 12px; }
.detail-body table.list { font-size: 12px; }
.detail-body table.list tbody td, .mbody table.list tbody td {
  height: auto; padding: 4px 0; border-bottom: 0;
}
.detail-body table.list tbody tr:hover td, .mbody table.list tbody tr:hover td { background: transparent; }
.detail-thumb {
  margin-bottom: 10px; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
}
.detail-thumb img { display: block; width: 100%; max-height: 190px; object-fit: contain; }
.detail-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.detail-ops button { height: 25px; font-size: 11.5px; }
.detail-body h4 { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--fg-2); }
.detail-versions { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 2px; }
.detail-versions h4 { margin-top: 10px; }
.dv-list { display: flex; flex-direction: column; gap: 6px; }
.dv-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--bg-2);
}
.dv-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.dv-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-row .row-actions { opacity: 1; }
.dv-row button { height: 22px; font-size: 11px; }

/* 拖拽框选矩形 + 外部文件拖入高亮 */
.marquee {
  position: fixed; border: 1px solid var(--accent);
  background: rgba(47, 143, 245, .16); pointer-events: none; z-index: 60;
}
.file-surface.drop-external {
  outline: 2px dashed var(--accent); outline-offset: -4px;
  background: rgba(47, 143, 245, .06);
}

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .58);
}
.modal {
  width: min(560px, 100%); max-height: 86vh;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: var(--sd);
}
.modal h2 {
  margin: 0; padding: 13px 16px;
  font-size: 13.5px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mbody { padding: 14px 16px; overflow: auto; color: var(--fg-2); line-height: 1.75; }
.mbody p { margin: 0 0 10px; }
.mbody p:last-child { margin-bottom: 0; }
.mbody input#share-url { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
.actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; margin-bottom: 5px; }
.field-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.field-row:last-child { border-bottom: 0; }
.field-row > div:first-child { flex: 1 1 auto; min-width: 0; }
.field-row .meta { color: var(--fg-3); font-size: 11px; line-height: 1.5; }
.field-row .ctl { flex: 0 0 210px; width: 210px; }
/* 分享权限单选（F-105）：radio 不参与全局 input 的 100% 宽度。 */
.perm-options { display: flex; flex-wrap: wrap; gap: 7px 18px; }
.perm-options label {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--fg-2); font-size: 12.5px; cursor: pointer;
}
.perm-options input[type=radio] {
  width: auto; min-width: 0; height: auto; margin: 0;
  accent-color: var(--accent); cursor: pointer;
}

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; right: 16px; bottom: 34px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  min-width: 210px; max-width: 360px;
  padding: 9px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--fg-3);
  border-radius: 6px;
  box-shadow: var(--sd);
  color: var(--fg); font-size: 12px; line-height: 1.6;
  pointer-events: auto;
  animation: toast-in .16s ease;
}
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast.info { border-left-color: var(--accent); }
.toast .rid {
  margin-top: 4px; font-size: 10.5px; color: var(--fg-3);
  font-family: ui-monospace, Menlo, monospace;
  cursor: pointer; word-break: break-all;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes skel { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* ---------- 预览 / 播放器 ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 34px;
  background: rgba(8, 8, 10, .95);
}
.viewer img { max-width: 92vw; max-height: 88vh; border-radius: 4px; }
.pv-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pv-hint {
  padding: 14px 18px; max-width: 84vw; text-align: center;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--fg-2); font-size: 12.5px; line-height: 1.7;
}
.pv-hint p { margin: 0 0 10px; }
.viewer pre {
  max-width: 92vw; max-height: 84vh; overflow: auto;
  margin: 0; padding: 16px;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg-2); font-size: 12px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}
.viewer .card { margin: 0; }
.viewer .close {
  position: fixed; top: 14px; right: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(28, 28, 33, .9);
  border: 1px solid var(--line-2);
}
.viewer .close .ic { width: 14px; height: 14px; }

.pl-viewer { flex-direction: column; gap: 0; padding: 0; background: #06060a; }
.pl-stage { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; width: 100%; }
.pl-stage video { max-width: 92vw; max-height: 82vh; background: #000; border-radius: 4px; outline: none; }
.pl-stage audio { width: min(620px, 86vw); }
.pl-panel {
  flex: 0 0 auto; width: min(1000px, 96vw);
  padding: 6px 4px 14px;
  transition: opacity .2s ease;
}
.pl-viewer.pl-idle .pl-panel { opacity: 0; pointer-events: none; }
.pl-progress { position: relative; padding: 9px 0; cursor: pointer; }
.pl-rail { position: relative; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
.pl-buffered { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, .26); border-radius: 2px; }
.pl-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 2px; }
.pl-dot {
  position: absolute; top: 50%; left: 0;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4);
  opacity: 0; transition: opacity .12s ease;
}
.pl-progress:hover .pl-dot { opacity: 1; }
.pl-tip {
  position: absolute; bottom: 20px; transform: translateX(-50%);
  padding: 2px 6px; border-radius: 4px;
  background: rgba(0, 0, 0, .82); color: #fff;
  font-size: 10.5px; font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.pl-row { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.pl-btn {
  height: 26px; padding: 0 8px;
  background: transparent; border: 0; border-radius: 4px;
  color: #d9d9de; font-size: 12px;
}
.pl-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; border: 0; }
.pl-btn.active { color: var(--accent-2); }
.pl-btn .ic { width: 15px; height: 15px; }
.pl-play .ic { width: 14px; height: 14px; }
.pl-time { color: #b9b9c2; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pl-row input[type=range] { width: 82px; height: 22px; }
.pl-close { top: 12px !important; right: 14px !important; }

/* ---------- 右键菜单 ---------- */
.ctx-menu {
  position: fixed; z-index: 400; min-width: 152px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  box-shadow: var(--sd);
}
.ctx-menu button {
  display: flex; align-items: center; gap: 7px; justify-content: flex-start;
  width: 100%; height: 26px; padding: 0 8px;
  background: transparent; border: 0; border-radius: 4px;
  color: var(--fg-2); font-size: 12px; text-align: left;
}
.ctx-menu button:hover { background: var(--bg-4); color: var(--fg); border: 0; }
.ctx-menu .ck { display: inline-flex; width: 12px; flex: 0 0 12px; color: var(--accent-2); }
.ctx-menu .ck.off { visibility: hidden; }
.ctx-menu .ck .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.ctx-menu .sep { height: 1px; margin: 4px 2px; background: var(--line); }

/* 缩略图下拉：每个选项带一行说明，避免三种模式混淆 */
.thumb-menu { min-width: 280px; max-width: 340px; }
.thumb-menu button {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 2px; height: auto; min-height: 42px; padding: 6px 9px; white-space: normal;
}
.thumb-menu button span { font-size: 12px; color: var(--fg-2); }
.thumb-menu button small { font-size: 11px; line-height: 1.3; color: var(--fg-3, var(--fg-2)); opacity: .72; }
.thumb-menu button:hover span { color: var(--fg); }
.btn .caret { margin-left: 2px; font-size: 10px; opacity: .7; }

/* ---------- 上传托盘 ---------- */
.uptray {
  position: fixed; right: 16px; bottom: 32px; z-index: 220;
  width: 326px; max-width: 92vw;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: var(--sd);
  overflow: hidden;
}
.uphead {
  display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 6px 0 12px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.up-count {
  display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 5px;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent-2);
  font-size: 10.5px; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums;
}
.up-count:empty { display: none; }
.upbody { max-height: 268px; overflow: auto; padding: 6px 12px; }
.uprow { padding: 7px 0; border-bottom: 1px solid var(--line); }
.uprow:last-child { border-bottom: 0; }
.upname { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uprow .bar { margin: 5px 0 4px; }
.upmsg { font-size: 10.5px; }
.uprow.ok .bar > i { background: var(--ok); }
.uprow.bad .bar > i { background: var(--err); }

/* ---------- 拖拽提示 ---------- */
.dragging { opacity: .45; }
.drop-hint {
  position: fixed; inset: 0; z-index: 190;
  display: grid; place-items: center;
  background: rgba(47, 143, 245, .1);
  border: 2px dashed var(--accent);
  color: #cfe6ff; font-size: 13px;
  pointer-events: none;
}

/* ---------- 登录 / 初始化 ---------- */
.auth {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background: var(--bg);
}
.auth-card { width: 344px; max-width: 100%; margin: 0; padding: 22px 22px 18px; }
.auth-card .brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.auth-card h1 { margin: 14px 0 4px; font-size: 15px; font-weight: 600; }
.auth-card .hint { margin: 0 0 14px; }
.auth-form { display: flex; flex-direction: column; gap: 2px; }
.auth-form .field { margin-bottom: 11px; }
.auth-submit { height: 32px; width: 100%; margin-top: 4px; }
.auth-foot { margin: 12px 0 0; font-size: 11px; }

/* ---------- 设置页 ---------- */
.settings-layout { display: flex; align-items: stretch; min-height: 100%; }
.settings-nav {
  flex: 0 0 164px;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  position: sticky; top: 0; align-self: flex-start;
}
.settings-nav button {
  display: flex; align-items: center; justify-content: flex-start;
  width: 100%; height: 28px; margin-bottom: 2px; padding: 0 9px;
  background: transparent; border: 0; border-radius: 5px;
  color: var(--fg-2); font-size: 12.5px;
}
.settings-nav button:hover { background: var(--bg-2); color: var(--fg); border: 0; }
.settings-nav button.active { background: var(--accent-soft); color: #cfe6ff; }
#settings-body { flex: 1 1 auto; min-width: 0; }

/* F-102 外观：三主题预览卡（预览色固定，不随当前主题变化） */
.theme-grid {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.theme-card {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  gap: 7px; height: auto; padding: 10px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  text-align: left; white-space: normal;
}
.theme-card:hover:not(:disabled) { background: var(--bg-2); border-color: var(--accent); }
.theme-card.on { border-color: var(--accent); box-shadow: var(--ring); }
.theme-preview {
  display: grid; grid-template-columns: 34% 1fr; gap: 0;
  height: 76px; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line-2);
}
.theme-preview .tp-side { display: block; border-right: 1px solid rgba(255, 255, 255, .08); }
.theme-preview .tp-main { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 12px; }
.theme-preview .tp-main b { display: block; height: 7px; border-radius: 3px; }
.theme-preview .tp-main b:nth-child(1) { width: 64%; }
.theme-preview .tp-main b:nth-child(2) { width: 88%; }
.theme-preview .tp-main b:nth-child(3) { width: 46%; }
.theme-preview-dark .tp-side { background: #16161a; }
.theme-preview-dark .tp-main { background: #0f0f12; }
.theme-preview-dark .tp-main b { background: #2c2c35; }
.theme-preview-dark .tp-main b:nth-child(1) { background: #2f8ff5; }
.theme-preview-endian .tp-side { background: #fafaf7; border-right-color: #e8e4d9; }
.theme-preview-endian .tp-main { background: #fdfcf8; }
.theme-preview-endian .tp-main b { background: #e8e4d9; }
.theme-preview-endian .tp-main b:nth-child(1) { background: #1554a8; }
.theme-preview-roco .tp-side { background: #f4faf7; border-right-color: #cfe4df; }
.theme-preview-roco .tp-main { background: #f8fcfa; }
.theme-preview-roco .tp-main b { background: #cfe4df; }
.theme-preview-roco .tp-main b:nth-child(1) { background: #237d85; }
.theme-name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.theme-name small { color: var(--fg-3); font-size: 10.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.theme-card .hint { font-size: 11.5px; line-height: 1.5; }
.theme-on { align-self: flex-start; }

/* ---------- 排版杂项 ---------- */
h1 { font-size: 15px; }
h2 { font-size: 13.5px; }
h3 { font-size: 13px; }
h4 { font-size: 12px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
b, strong { font-weight: 600; }
code, kbd {
  padding: 1px 4px; border-radius: 4px;
  background: var(--bg-3); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
}
hr { height: 1px; margin: 14px 0; border: 0; background: var(--line); }
img { max-width: 100%; }
button a, .btn a { color: inherit; }

/* ---------- 传输任务页（全局任务列表：上传/下载/播放/复制/移动） ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--fg-2); font-size: 11.5px; cursor: pointer;
  transition: background .1s ease, color .1s ease, border-color .1s ease;
}
.chip:hover { background: var(--bg-3); color: var(--fg); }
.chip.on { background: var(--accent-soft); border-color: rgba(47, 143, 245, .5); color: #cfe6ff; }
.chip b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--fg-3); }
.chip.on b { color: #cfe6ff; }

/* 传输卡片：左侧色条 + 图标表达类型，中间是类型专属信息，右侧是状态与操作 */
.trf-list { display: flex; flex-direction: column; }
.trf-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: start;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  background: var(--bg-1);
  transition: background .12s ease;
}
.trf-item:last-child { border-bottom: 0; }
.trf-item:hover { background: var(--bg-2); }
.trf-item.clickable { cursor: pointer; }
.trf-item.live { background: linear-gradient(90deg, rgba(47, 143, 245, .07), transparent 55%); }
.trf-item-ico {
  width: 30px; height: 30px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--bg-3); color: var(--fg-2);
}
.trf-item-ico svg { width: 16px; height: 16px; }
.trf-item-main { min-width: 0; }
.trf-item-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trf-item-name {
  font-size: 13px; font-weight: 500; max-width: 62%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trf-kind { background: var(--bg-3); }
.trf-item-sub {
  margin-top: 3px;
  font-size: 11.5px; line-height: 1.5; color: var(--fg-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trf-item-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.trf-item-bar .bar { flex: 0 1 260px; }
.trf-item-bar .muted { font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trf-item-err { margin-top: 4px; font-size: 11px; line-height: 1.45; color: #fca5a5; word-break: break-word; }
.trf-item-side { display: flex; align-items: center; gap: 10px; font-size: 11px; padding-top: 2px; }
.trf-item-side .row-actions { display: flex; gap: 4px; }
.trf-speed { min-width: 58px; text-align: right; font-variant-numeric: tabular-nums; }
.trf-detail {
  grid-column: 1 / -1;
  margin: 4px -14px -11px;
  padding: 8px 14px 10px;
  border-top: 1px dashed var(--line);
  background: var(--bg-1);
}
.trf-items { margin: 0; }
.trf-items thead th { padding-top: 4px; font-size: 11px; }
/* 类型色调 */
.tone-upload { border-left-color: var(--ok); }
.tone-upload .trf-item-ico { color: #7ee787; background: rgba(63, 185, 80, .13); }
.tone-download, .tone-folder { border-left-color: var(--accent); }
.tone-download .trf-item-ico, .tone-folder .trf-item-ico { color: var(--accent-2); background: var(--accent-soft); }
.tone-copy, .tone-move { border-left-color: #a371f7; }
.tone-copy .trf-item-ico, .tone-move .trf-item-ico { color: #c9a3ff; background: rgba(163, 113, 247, .14); }
.tone-play { border-left-color: #2bb3b3; }
.tone-play .trf-item-ico { color: #67dcdc; background: rgba(43, 179, 179, .14); }
.tone-sync { border-left-color: var(--warn); }
.tone-sync .trf-item-ico { color: #e3b341; background: rgba(217, 160, 50, .14); }
.tone-index { border-left-color: #7d8590; }
.tone-index .trf-item-ico { color: #a8b0ba; background: rgba(125, 133, 144, .16); }

/* ---------- 滚动条 ---------- */
* { scrollbar-width: thin; scrollbar-color: #3a3a44 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #34343d; border: 2px solid transparent; background-clip: padding-box; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #46464f; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  table.list .hide-sm { display: none; }
  .search-box { width: 168px; }
  .detail { width: 100%; border-left: 0; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: 232px; flex-basis: 232px;
    transform: translateX(-100%);
    transition: transform .18s ease;
  }
  .sidebar.open { transform: none; box-shadow: var(--sd); }
  .search-box { width: 132px; }
  .search-box button { display: none; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .settings-layout { flex-direction: column; }
  .settings-nav {
    flex: 0 0 auto; display: flex; gap: 4px;
    overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line);
    position: static;
  }
  .settings-nav button { width: auto; white-space: nowrap; }
  .uptray { right: 8px; left: 8px; width: auto; }
  .trf-item { grid-template-columns: 28px minmax(0, 1fr); }
  .trf-item-side { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .trf-item-name { max-width: 100%; }
  .toast-wrap { right: 8px; left: 8px; }
  .toast { max-width: none; }
  .statusbar .st-path { display: none; }
  .thumb-open { display: none; } /* 窄屏点封面即可打开，信息行只留大小 */
  .field-row { flex-wrap: wrap; }
  .field-row .ctl { flex: 1 0 100%; width: auto; }
}

/* ---------------- 本机挂载（F-53） ---------------- */
.mount-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.mf-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mf-row label { font-size: 12px; color: var(--muted); }
.mf-row input:not([type=checkbox]), .mf-row select { width: 100%; box-sizing: border-box; }
@media (max-width: 720px) { .mount-form { grid-template-columns: 1fr; } }

/* 目录选择器（复制/移动目标）：浏览卷目录树，避免手打路径 */
.pk-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.pk-path { font-size: 12px; color: var(--fg-2); word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pk-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.pk-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.pk-row:last-child { border-bottom: none; }
.pk-row:hover { background: var(--bg-3); }
.pk-row .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-arrow { width: 16px; text-align: center; color: var(--fg-3); }
.pk-up { color: var(--fg-2); }
.pk-empty { padding: 16px; text-align: center; color: var(--fg-3); font-size: 13px; }
@media (max-width: 720px) { .pk-list { max-height: 200px; } }

/* 传输页操作按钮必须常显：
   .row-actions 默认 opacity:0（只在 tr/vrow hover 时淡入），而传输卡片是 .trf-item 容器，
   没有匹配的 hover 规则 → 暂停/继续/取消按钮虽然渲染了但完全透明，看起来"没有按钮"。 */
.trf-item-side .row-actions,
.trf-items tr .row-actions,
.trf-detail .row-actions { opacity: 1; }

/* 传输明细顶部的汇总条：总进度 + 当前文件 */
.trf-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; font-size: 12px; border-bottom: 1px solid var(--line); }
.trf-sum .bar { flex: 1 1 160px; min-width: 120px; height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.trf-sum .bar i { display: block; height: 100%; background: var(--accent); }
.trf-sum-cur { color: var(--accent-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 加密目录卡片：多个目录并排时，标题/徽标/按钮组要能换行，不能挤成一坨 */
.vault-card { padding: 14px; min-width: 0; }
.vault-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 8px;
}
.vault-head .vault-name {
  min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vault-acts {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto;
}
@media (max-width: 980px) {
  .vault-acts { margin-left: 0; width: 100%; }
}

/* 图片查看器：缩放/平移/旋转 */
.pv-box { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 94vw; }
.pv-tools { display: flex; align-items: center; gap: 6px; }
.pv-stage {
  max-width: 92vw; max-height: 76vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: none;
}
.pv-stage.dragging { cursor: grabbing; }
.pv-stage img {
  max-width: 92vw; max-height: 76vh;
  transform-origin: center center;
  user-select: none; -webkit-user-drag: none;
  transition: transform .06s linear;
}
.pv-zoom { font-size: 12px; color: var(--fg-2); min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }

/* 顶栏/侧栏品牌 LOGO：SVG 跟随 currentColor，尺寸压在 24px 方块里 */
.logo svg { width: 18px; height: 18px; display: block; }

/* 工具栏默认隐藏（转码中不显示），图片 load 后才显示；
   注意 .pv-tools 有 display:flex，会盖掉 UA 的 [hidden]，必须显式写。 */
.pv-tools[hidden] { display: none; }
.pv-box .pv-hint { order: 2; }
.pv-box .pv-tools { order: 3; }

/* 传输明细：固定最大高度 + 分页条，条目多时不再把页面撑爆或反复抖动 */
.trf-detail { max-height: 460px; overflow: auto; }
.trf-pager {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12px;
  position: sticky; bottom: 0; background: var(--bg-2);
}

/* ==========================================================================
   统一组件层（1.0.0）：全站共用的设计令牌与语义类。
   目标是把散落在各页面模板里的内联 style 与页面专属 CSS 收敛到这一层，
   风格基准 = 专业简洁：既有令牌、无渐变、无毛玻璃、状态色语义不变。
   旧类名保持不变（渐进替换，避免一次性大改破坏既有页面）。
   ========================================================================== */
:root {
  --sp-2: 8px;
  --sp-3: 12px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-title: 16px;
}

/* 结构：板块 = 全站统一的卡片分区，传输页三板块与其它页面共用 */
.bx-section {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: var(--sp-3);
}
.bx-section:last-child { margin-bottom: 0; }
.bx-section-head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 10px var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.bx-section-body { padding: var(--sp-3); }
.bx-title { margin: 0; font-size: var(--fs-title); font-weight: 600; }
.bx-hint { color: var(--fg-3); font-size: var(--fs-sm); line-height: 1.5; }
.bx-empty { padding: 28px 16px; text-align: center; color: var(--fg-3); }

/* 布局工具：替代模板里成百上千处 display:flex / margin / font-size 内联样式 */
.bx-row { display: flex; align-items: center; gap: var(--sp-2); }
.bx-row-wrap { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.bx-grow { flex: 1 1 auto; min-width: 0; }
.bx-m0 { margin: 0; }
.bx-mt0 { margin-top: 0; }
.bx-mt8 { margin-top: var(--sp-2); }
.bx-mt10 { margin-top: 10px; }
.bx-mt14 { margin-top: 14px; }
.bx-mb10 { margin-bottom: 10px; }
.bx-ml12 { margin-left: var(--sp-3); }
.bx-p12 { padding: var(--sp-3); }
.bx-sm { font-size: var(--fs-sm); }
.bx-md { font-size: var(--fs-md); }
.bx-break { word-break: break-all; }

/* 控件与集合：统一 chip / badge / 表格 / 操作区 */
.bx-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  background: var(--bg-2); color: var(--fg-2);
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: var(--fs-sm); cursor: pointer;
}
.bx-chip:hover { color: var(--fg); border-color: var(--accent); }
.bx-chip.on { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent); }
.bx-chip b { font-weight: 600; }
.bx-badge {
  display: inline-block; min-width: 20px; padding: 0 6px;
  background: var(--bg-3); color: var(--fg-2);
  border-radius: 999px; font-size: 11px; line-height: 18px; text-align: center;
}
.bx-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bx-stat { color: var(--fg-2); font-size: var(--fs-sm); }

/* 传输页三板块（1.0.0）：板块头在窄屏自动换行，图标与标题统一尺寸 */
.bx-section-head { flex-wrap: wrap; row-gap: 6px; }
.bx-section-ico { display: inline-flex; align-items: center; color: var(--accent-2); }
.bx-section-ico .ic { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .bx-section-head .bx-hint { flex-basis: 100%; }
  .bx-section-head .bx-chips { flex-basis: 100%; }
}

/* F-86 缩略图任务：失败状态徽标（全站缺失）、展开明细行、表格内进度条 */
.badge.danger { background: rgba(229, 83, 75, .16); color: #ef8b84; }
table.list tr[data-sub] > td { background: var(--bg-2); }
table.list tr[data-sub] > td .bar { max-width: 220px; }
table.list .bar i { display: block; height: 100%; background: var(--accent); }

/* ---------- F-94 加载反馈：转动的圆环 ---------- */
.bx-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted, #9093a1); }
.bx-loading-ring {
  width: 20px; height: 20px; flex: 0 0 auto; box-sizing: border-box;
  border: 2px solid var(--line, #303038); border-top-color: var(--accent, #2f8ff5);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.bx-loading-label { font-size: 13px; }
/* 文件展示区块内：只出现在 .file-surface，工具条 / 选择栏是兄弟节点，不会被遮挡或隐藏 */
.bx-loading--surface {
  position: sticky; top: 0; z-index: 4;
  min-height: 64px; padding: 10px 12px;
  background: var(--card, #16161a); border-radius: 8px 8px 0 0;
}
.bx-loading--surface .bx-loading-label { font-weight: 600; color: var(--fg, #d8dae0); }
/* 独立功能页：右侧内容区居中卡片，不局限于文件展示区块 */
.bx-loading-card { min-height: 220px; display: flex; align-items: center; justify-content: center; }
.bx-loading--page { flex-direction: column; gap: 14px; padding: 36px 16px; }
.bx-loading--page .bx-loading-ring { width: 30px; height: 30px; border-width: 3px; }
.bx-loading--page .bx-loading-label { font-size: 14px; }

/* ---------- F-95 一刻相册看板 ----------
   组件层（.card/.btn/.badge/.empty/.toolbar/.sel-bar）全部复用全局样式，
   这里只补相册卡片与瀑布流布局；颜色只用 :root 变量。 */
.yike-album-grid {
  display: grid; gap: 12px; margin-top: 10px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  align-content: start;
}
.yike-album-card {
  padding: 6px; border: 1px solid transparent; border-radius: var(--r);
  background: var(--bg-2); cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.yike-album-card:hover { background: var(--bg-3); border-color: var(--accent); }
.yike-album-cover {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-sm);
  overflow: hidden; background: var(--bg-3);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.yike-album-cover img { width: 100%; height: 100%; object-fit: cover; }
.yike-cover-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--fg-3); }
.yike-cover-ph .ic { width: 34px; height: 34px; stroke-width: 1.4; }
.yike-count {
  position: absolute; right: 6px; bottom: 6px; padding: 1px 6px;
  border-radius: 10px; font-size: 10.5px; color: #fff;
  background: rgba(0, 0, 0, .62);
}
.yike-album-meta { display: flex; flex-direction: column; gap: 2px; padding: 7px 4px 3px; }
.yike-album-meta b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yike-album-meta small { color: var(--fg-3); font-size: 10.5px; }

.yike-card { margin: 12px; padding: 0; }
.yike-waterfall { display: flex; align-items: flex-start; gap: 10px; padding: 10px; }
.yike-waterfall > .empty { flex: 1 1 100%; min-height: 180px; }
.yike-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.yike-tile {
  position: relative; display: block; width: 100%; margin-bottom: 0;
  border: 1px solid transparent; border-radius: var(--r);
  background: var(--bg-2); cursor: pointer; overflow: hidden;
}
.yike-tile:hover { border-color: var(--accent); }
.yike-tile.sel { border-color: var(--accent); background: var(--accent-soft); }
.yike-tile-media { position: relative; display: grid; place-items: center; min-height: 72px; background: var(--bg-3); }
.yike-tile-media img { display: block; width: 100%; height: auto; }
.yike-tile-media .yike-cover-ph { height: 120px; }
.yike-play {
  position: absolute; right: 8px; bottom: 8px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .62); color: #fff;
}
.yike-play .ic { width: 14px; height: 14px; }
.yike-tile .yike-pick {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 18px; height: 18px; margin: 0; opacity: 0;
  background: rgba(12, 12, 16, .55); border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.yike-tile:hover .yike-pick, .yike-tile.sel .yike-pick, .yike-tile .yike-pick:checked,
.yike-tile .yike-pick:focus-visible { opacity: 1; }
.yike-tile .yike-pick:checked { background: var(--accent); border-color: var(--accent); }
.yike-tile-meta { display: flex; align-items: center; gap: 6px; padding: 5px 7px 6px; font-size: 10.5px; }
.yike-tile-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yike-card > .hint { padding: 0 12px 12px; }
/* F-95 顶栏：标题可截断、操作区固定右侧，长标题不再挤压按钮 */
.yike-toolbar { gap: 10px; }
.yike-tb-title { flex: 1 1 auto; min-width: 0; }
.yike-title {
  display: inline-block; max-width: min(46vw, 420px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle;
}
.yike-sub { flex: 0 0 auto; font-size: 11px; }
.yike-tb-ops { flex: 0 0 auto; margin-left: auto; gap: 8px; }
.yike-toolbar button { white-space: nowrap; }

/* F-103 相册时间线：按日分组 + 响应式网格 */
.album-card { margin: 12px; padding: 0; overflow: hidden; position: relative; }
.album-timeline { padding: 4px 12px 12px; }
/* F-104 月份滚轴：给右侧留出轨道宽度，卡片本身的圆角裁切由 overflow:hidden 负责。 */
.album-card > .album-timeline { padding-right: 60px; }

/* F-104 时间线快速跳转：半透明、等距月份、年份分隔 */
.album-rail {
  position: absolute; top: 10px; right: 6px; bottom: 10px; width: 46px;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 6px 4px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: .55; transition: opacity .16s ease; z-index: 3;
  touch-action: none; user-select: none;
}
.album-rail:hover, .album-rail:focus-within { opacity: 1; }
.album-rail-latest {
  height: 20px; border: 0; background: transparent; color: var(--fg-3); font-size: 12px;
  padding: 0; cursor: pointer; line-height: 1;
}
.album-rail-latest:hover { color: var(--accent); }
.album-rail-scroll {
  flex: 1 1 auto; overflow-y: auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 1px;
}
.album-rail-scroll::-webkit-scrollbar { display: none; }
.album-rail-year {
  font-size: 9px; color: var(--fg-3); text-align: center; padding: 4px 0 2px;
  letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.album-rail-tick {
  position: relative; border: 0; background: transparent; color: var(--fg-3);
  height: 18px; min-height: 18px; padding: 0; font-size: 9.5px; line-height: 1;
  cursor: pointer; border-radius: 5px; font-variant-numeric: tabular-nums;
}
.album-rail-tick em { display: none; }
.album-rail-tick:hover { color: var(--fg-1); background: var(--accent-soft); }
.album-rail-tick.active { color: #fff; background: var(--accent); }
.album-rail-more { text-align: center; color: var(--fg-3); font-size: 10px; padding-top: 2px; }
.album-rail-bubble {
  position: absolute; right: 58px; z-index: 4; pointer-events: none;
  padding: 5px 9px; border-radius: 8px; font-size: 11.5px; white-space: nowrap;
  background: color-mix(in srgb, var(--bg-3) 92%, transparent);
  border: 1px solid var(--line); color: var(--fg-1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
@media (max-width: 900px) {
  .album-rail { width: 34px; opacity: .4; }
  .album-rail-tick { font-size: 9px; }
  .album-card > .album-timeline { padding-right: 46px; }
  .album-rail-bubble { right: 46px; }
}
.album-day { margin-top: 14px; }
.album-day-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 6px 2px; font-weight: 600; font-size: 12.5px; color: var(--fg-2);
  background: var(--bg-1);
}
.album-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.album-cell {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--bg-2); cursor: pointer; min-width: 0;
}
.album-cell:hover { border-color: var(--accent); }
.album-cell-media { position: relative; background: var(--bg-3); }
.album-cell-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.album-cell-media .yike-cover-ph { position: absolute; inset: 0; }
.album-cell-time {
  position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; border-radius: 6px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px;
}
.album-cell-meta { display: flex; align-items: center; gap: 6px; padding: 5px 7px 6px; font-size: 10.5px; }
.album-cell-meta span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-cell-meta small { flex: 0 0 auto; color: var(--fg-3); }
.album-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.album-seg button { border: 0; border-radius: 0; background: transparent; }
.album-seg button.active { background: var(--accent-soft); color: var(--accent); }
.album-card > .hint { padding: 0 12px 12px; }
@media (max-width: 700px) {
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
.yike-toolbar .lbl { margin-left: 4px; }
.yike-status { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .yike-toolbar .lbl { display: none; }
  .yike-status { display: none; }
}
@media (max-width: 900px) {
  .yike-waterfall { gap: 8px; padding: 8px; }
  .yike-col { gap: 8px; }
  .yike-album-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

/* ---------- 可访问性：动效降级 ---------- */
/* 系统开启「减少动态效果」时关闭过渡与动画（含骨架屏/闪烁提示），
   保留最终状态，不改变任何布局。 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  /* 小型进度指示保留慢速旋转：完全静止会被误读成"卡住了"。
     它不属于大幅位移/闪烁动画，减速即可满足减少动态效果的要求。 */
  .spinner {
    animation-duration: 1.2s !important;
    animation-iteration-count: infinite !important;
  }
}

/* ---------- 可访问性：键盘焦点 ---------- */
/* 行/卡片可聚焦后必须看得见焦点（深色底上 2px 蓝色描边）。 */
.vrow:focus-visible,
.list tbody tr:focus-visible,
.thumb-card:focus-visible,
.yike-card:focus-visible,
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
/* 弹窗/菜单的初始焦点不要出现"默认蓝框闪一下"，交给 :focus-visible 决定。 */
.modal:focus, .ctx-menu:focus { outline: none; }

/* 缩略图 cached 档的提示条：一行文字 + 一个生成按钮，不抢视觉。 */
.thumb-hint {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-2); color: var(--fg-2); font-size: 12px;
}
