/* ============ 设计令牌（Windows 11 云母 / 亚克力风格）============ */
:root {
  --brand: #005fb8;
  --brand-hover: #0078d4;
  --brand-active: #0067c0;
  --bg-page: #f3f3f3;
  --text-primary: #1a1a1a;
  --text-secondary: #5f5f5f;
  --text-placeholder: #9a9a9a;
  --border: rgba(0,0,0,.08);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --mica: rgba(243,243,243,.72);
  --mica-border: rgba(255,255,255,.55);
  --shadow: 0 2px 8px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.12), 0 12px 32px rgba(0,0,0,.10);
  --font: "Segoe UI Variable", "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* ---- 动效令牌（借鉴 TDesign Motion 规范）----
     统一缓动与时长，让全站动画节奏一致、观感协调。
     TDesign 标准缓动：cubic-bezier(.38, 0, .24, 1)（快出慢入，符合 Material/TDesign 的「强调」曲线） */
  --ease-standard: cubic-bezier(.38, 0, .24, 1);   /* 标准：用于进出场、位移、缩放 */
  --ease-out: cubic-bezier(0, 0, .15, 1);          /* 减速：用于淡入、展开 */
  --ease-in: cubic-bezier(.38, 0, 1, 1);           /* 加速：用于退出 */
  --dur-fast: .12s;    /* 微交互：hover、按下 */
  --dur-base: .2s;     /* 常规：菜单、按钮、面板进出场 */
  --dur-slow: .28s;    /* 大型：模态框、页面级切换 */

  /* 面板底色（云母卡片统一背景，原散落在各处重复声明） */
  --panel: rgba(255, 255, 255, .86);
  --bg-card: rgba(255, 255, 255, .72);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

/* 独立子应用页（files.html / posts.html，作为 iframe 内容）：允许纵向滚动 */
body.sub-app { overflow-y: auto; }
/* 主框架 shell 页：固定视口，不滚动 */
body.shell-body { overflow: hidden; height: 100vh; }

/* ============ 桌面背景（Win11 风格柔和渐变）=========== */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, #cfe4ff 0%, #e8f1fb 40%, #f5f0fb 70%, #fdeef2 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  animation: drift 26s ease-in-out infinite;
}
.b1 { width: 520px; height: 520px; background: #9ec5ff; top: -160px; left: -100px; }
.b2 { width: 560px; height: 560px; background: #c9e4ff; bottom: -200px; right: -120px; animation-delay: -8s; }
.b3 { width: 420px; height: 420px; background: #e2d4ff; top: 38%; left: 58%; animation-delay: -16s; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(46px,-36px) scale(1.1); }
  66% { transform: translate(-34px,28px) scale(.94); }
}

/* ============ 云母玻璃容器 ============ */
.glass {
  background: var(--mica);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--mica-border);
  box-shadow: var(--shadow);
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 12px; z-index: 10;
  margin: 12px 16px 0; padding: 12px 18px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); background: linear-gradient(135deg, #0067c0, #4cc2ff); color: #fff; }
.logo .ic { width: 20px; height: 20px; }
.brand h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: .2px; }
.brand .sub { font-size: 12px; color: var(--text-secondary); }

/* ============ 按钮 ============ */
.btn {
  font-family: var(--font); font-size: 14px; font-weight: 400;
  border: none; border-radius: var(--radius-md); cursor: pointer;
  padding: 8px 16px; line-height: 1;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
/* 危险操作按钮（如退出登录）：红色醒目 */
.btn-danger { background: var(--danger, #e5484d); color: #fff; }
.btn-danger:hover { background: var(--danger-hover, #d13438); }
.btn-danger:active { background: var(--danger-active, #b52a2e); }

/* ============ 上传窗口（TDesign 设计语言 v2 — 精致版） ============ */
.dialog-wide { max-width: 520px; width: 100%; }

/* 对话框整体增强 */
.dialog-wide.dialog {
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  box-shadow:
    0 25px 60px -12px rgba(0,0,0,.18),
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 0 80px -20px rgba(99,102,241,.15);
}

/* 标题栏 */
.upload-dialog .up-head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.upload-dialog .up-head .ic { width: 23px; height: 23px; color: #6366f1; }
.upload-dialog .up-head-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: #111827; }
.upload-dialog .up-head-sub { margin-left: auto; font-size: 12px; color: #94a3b8; background: #f1f5f9; padding: 3px 10px; border-radius: 999px; }

/* ====== 拖放区 ====== */
.upload-dialog .dropzone {
  border: 2px dashed #cbd5e1; border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); cursor: pointer;
  transition: all .28s cubic-bezier(.4,0,.2,1);
  margin-bottom: 18px; position: relative; overflow: hidden;
}
.upload-dialog .dropzone::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(99,102,241,.06) 0%, transparent 70%);
  opacity: 0; transition: opacity .28s ease;
}
.upload-dialog .dropzone:hover { border-color: #6366f1; background: linear-gradient(135deg, #eef2ff 0%, #ede9fe 100%); }
.upload-dialog .dropzone:hover::before { opacity: 1; }
.upload-dialog .dropzone:focus-visible { outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.15); }
.upload-dialog .dropzone.drag {
  border-color: #6366f1; background: linear-gradient(135deg, #eef2ff 0%, #ddd6fe 100%);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2), inset 0 0 20px rgba(99,102,241,.08);
}
.upload-dialog .dropzone-inner { padding: 38px 20px; text-align: center; pointer-events: none; position: relative; z-index: 1; }
.upload-dialog .drop-ic-wrap {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #c7d2fe);
  box-shadow: 0 4px 14px -3px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease;
}
.upload-dialog .dropzone:hover .drop-ic-wrap { transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 22px -4px rgba(99,102,241,.45); }
.upload-dialog .drop-ic { width: 30px; height: 30px; color: #4f46e5; }
.upload-dialog .drop-title { font-size: 15px; color: #1e293b; font-weight: 600; letter-spacing: -.005em; }
.upload-dialog .drop-title .link { color: #4f46e5; font-weight: 700; text-decoration: none; position: relative; z-index: 1; }
.upload-dialog .drop-title .link::after {
  content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; border-radius: 1px;
  background: #4f46e5; transform: scaleX(0); transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.upload-dialog .dropzone:hover .drop-title .link::after { transform: scaleX(1); }
.upload-dialog .drop-sub { font-size: 12px; color: #94a3b8; margin-top: 7px; letter-spacing: .02em; }

/* ====== 文件列表 ====== */
.upload-dialog .up-list {
  max-height: 260px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px;
  /* 自定义滚动条 */
  scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.upload-dialog .up-list::-webkit-scrollbar { width: 5px; }
.upload-dialog .up-list::-webkit-scrollbar-track { background: transparent; }
.upload-dialog .up-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.upload-dialog .up-empty {
  color: #94a3b8; font-size: 13px; padding: 26px 16px; text-align: center;
  border: 1.5px dashed #e2e8f0; border-radius: 12px; background: #fafbfc;
}

/* 单个文件卡片 */
.upload-dialog .up-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.upload-dialog .up-item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: transparent; border-radius: 0 3px 3px 0; transition: background .22s ease;
}
.upload-dialog .up-item:hover { border-color: #c7d2fe; box-shadow: 0 4px 16px -4px rgba(99,102,241,.12); transform: translateX(2px); }
.upload-dialog .up-item:hover::before { background: #6366f1; }

/* 文件类型图标（彩色圆角方块） */
.upload-dialog .up-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; position: relative;
  background: linear-gradient(145deg, #eef2ff, #e0e7ff);
  box-shadow: 0 2px 8px -2px rgba(99,102,241,.25), inset 0 1px 0 rgba(255,255,255,.7);
}
.upload-dialog .up-icon .ic { width: 22px; height: 22px; color: #4338ca; }
/* 图片类型 → 蓝绿渐变 */
.upload-dialog .up-icon[data-type="image"] { background: linear-gradient(145deg, #ecfdf5, #d1fae5); box-shadow: 0 2px 8px -2px rgba(16,185,129,.25), inset 0 1px 0 rgba(255,255,255,.7); }
.upload-dialog .up-icon[data-type="image"] .ic { color: #059669; }
/* 视频类型 → 紫粉渐变 */
.upload-dialog .up-icon[data-type="video"] { background: linear-gradient(145deg, #fdf4ff, #fae8ff); box-shadow: 0 2px 8px -2px rgba(217,70,239,.25), inset 0 1px 0 rgba(255,255,255,.7); }
.upload-dialog .up-icon[data-type="video"] .ic { color: #a21caf; }
/* 音频类型 → 橙黄渐变 */
.upload-dialog .up-icon[data-type="audio"] { background: linear-gradient(145deg, #fffbeb, #fef3c7); box-shadow: 0 2px 8px -2px rgba(245,158,11,.25), inset 0 1px 0 rgba(255,255,255,.7); }
.upload-dialog .up-icon[data-type="audio"] .ic { color: #d97706; }

/* 文件信息区 */
.upload-dialog .up-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.upload-dialog .up-name { font-size: 14px; color: #1e293b; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.upload-dialog .up-sub { display: flex; align-items: center; gap: 8px; }
.upload-dialog .up-size { font-size: 12px; color: #64748b; font-variant-numeric: tabular-nums; font-weight: 500; }
.upload-dialog .up-status {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: #f1f5f9; color: #94a3b8; white-space: nowrap; letter-spacing: .01em;
}
.upload-dialog .up-status.enc { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #4338ca; }

/* 删除按钮 */
.upload-dialog .up-remove {
  background: transparent; border: none; color: #cbd5e1; cursor: pointer;
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  transition: all .2s ease;
}
.upload-dialog .up-remove:hover { background: #fef2f2; color: #dc2626; }
.upload-dialog .up-remove .ic { width: 16px; height: 16px; }

/* ====== 加密区 ====== */
.upload-dialog .up-enc {
  border: 1.5px solid #e2e8f0; border-radius: 14px;
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
  overflow: hidden; transition: all .28s ease;
}
.upload-dialog .up-enc.open { border-color: #c7d2fe; box-shadow: 0 0 0 3px rgba(99,102,241,.07); }
.upload-dialog .up-enc-bar {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px; cursor: pointer; user-select: none;
  transition: background .2s ease;
}
.upload-dialog .up-enc-bar:hover { background: rgba(99,102,241,.03); }
.upload-dialog .up-enc-bar .ic { width: 18px; height: 18px; color: #64748b; }
.upload-dialog .up-enc-bar .t { font-size: 14px; color: #334155; font-weight: 600; flex: 1; }

/* Toggle 开关 */
.upload-dialog .up-enc-switch {
  width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; position: relative; flex-shrink: 0;
  transition: background .3s cubic-bezier(.4,0,.2,1);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}
.upload-dialog .up-enc-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.upload-dialog .up-enc.open .up-enc-switch { background: linear-gradient(90deg, #6366f1, #818cf8); box-shadow: none; }
.upload-dialog .up-enc.open .up-enc-switch::after { transform: translateX(18px); }

/* 加密字段容器 */
.upload-dialog .up-enc-fields {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, padding .25s ease;
  padding: 0 15px; display: flex; flex-direction: column; gap: 10px;
}
.upload-dialog .up-enc.open .up-enc-fields { max-height: 300px; opacity: 1; padding: 0 15px 15px; }

/* 表单字段 */
.upload-dialog .up-field label { display: block; font-size: 12px; color: #64748b; font-weight: 600; margin-bottom: 5px; letter-spacing: .01em; }
.upload-dialog .up-input {
  width: 100%; box-sizing: border-box; padding: 10px 13px; font-size: 14px; color: #1e293b;
  border: 1.5px solid #e2e8f0; border-radius: 10px; background: #fff;
  transition: all .22s ease;
}
.upload-dialog .up-input::placeholder { color: #94a3b8; }
.upload-dialog .up-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); background: #fff; }
.upload-dialog .up-input.bad { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.upload-dialog .up-enc-hint { font-size: 12px; min-height: 18px; margin-top: 3px; font-weight: 500; transition: color .2s ease; }
.upload-dialog .up-enc-hint.ok { color: #059669; }
.upload-dialog .up-enc-hint.err { color: #dc2626; }
.upload-dialog .up-enc-note {
  font-size: 12px; color: #64748b; line-height: 1.55;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff); border-radius: 9px; padding: 10px 12px;
  border: 1px solid rgba(99,102,241,.08);
}

/* ====== 底部操作栏 ====== */
.upload-dialog .up-foot {
  display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.upload-dialog .up-foot-info { font-size: 12px; color: #94a3b8; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.upload-dialog .up-foot-info b { color: #475569; font-weight: 700; font-variant-numeric: tabular-nums; }
.upload-dialog .up-foot-actions { margin-left: auto; display: flex; gap: 9px; }
.upload-dialog .btn.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
/* 按下时轻微回弹，与 hover 形成层次（TDesign 的「按压反馈」） */
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:active { background: var(--brand-active); }
.btn-ghost { background: rgba(255,255,255,.55); color: var(--text-primary); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.85); }
.icon-btn { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; width: 32px; height: 32px; border-radius: var(--radius-md); display: grid; place-items: center; }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn:hover { background: rgba(0,0,0,.05); color: var(--text-primary); }
.icon-btn.spin .ic { animation: icon-spin .6s linear infinite; }
@keyframes icon-spin { to { transform: rotate(360deg); } }

/* ============ 工具栏 ============ */
.toolbar {
  position: sticky; top: 76px; z-index: 9;
  margin: 12px 16px 0; padding: 10px 14px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.usage { margin-left: auto; font-size: 12px; color: var(--text-secondary); display: flex; gap: 10px; align-items: center; }
.usage .pill { background: rgba(0,95,184,.1); color: var(--brand); padding: 4px 12px; border-radius: 999px; }

/* ============ 空状态 ============ */
.empty { text-align: center; color: var(--text-placeholder); padding: 60px 0; }
/* 博客列表加载态：spinner 与文字垂直居中 */
.posts-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px 0; color: var(--text-secondary); font-size: 14px; }

/* ============ 通用弹窗（博客详情 / 对话框） ============ */
/* 进出场统一使用标准缓动：遮罩淡入（--dur-base），面板「上浮 + 放大」（--dur-slow） */
.modal-mask, .dialog-mask { position: fixed; inset: 0; background: rgba(0,0,0,.32); backdrop-filter: blur(2px); z-index: 20; opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
.modal-mask.show, .dialog-mask.show { opacity: 1; pointer-events: auto; }
.modal { position: fixed; z-index: 22; top: 50%; left: 50%; transform: translate(-50%,-46%) scale(.96); opacity: 0; pointer-events: none; width: min(760px, 94vw); max-height: 88vh; overflow: hidden; border-radius: var(--radius-lg); transition: opacity var(--dur-slow) var(--ease-standard), transform var(--dur-slow) var(--ease-standard); display: flex; flex-direction: column; }
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.modal-head-actions { display: flex; gap: 4px; }
.modal-body { padding: 16px 18px; overflow-y: auto; min-height: 120px; }

/* 加载动画（弹窗与预览页共用） */
.modal-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 0; color: var(--text-secondary); font-size: 13px; }
.spinner {
  display: inline-block;
  width: 34px; height: 34px; border: 3px solid rgba(0,95,184,.18);
  border-top-color: var(--brand); border-radius: 50%;
  /* 旋转用线性（linear）最自然：匀速无停顿，避免缓动造成的「卡顿」错觉 */
  animation: spin .68s linear infinite;
  vertical-align: -0.5em; margin-right: 8px;
}
/* 模态加载卡片：预览页全屏遮罩中央的加载提示 */
.modal-loading-card {
  position: fixed; z-index: 24; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 28px 40px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  color: var(--text-secondary); font-size: 14px;
}
.modal-loading-card .spinner { margin-right: 0; width: 40px; height: 40px; }

/* ============ 自定义对话框 ============ */
.dialog {
  position: fixed; z-index: 22; top: 50%; left: 50%;
  transform: translate(-50%,-46%) scale(.96); opacity: 0; pointer-events: none;
  width: min(420px, 92vw); border-radius: var(--radius-lg);
  transition: opacity var(--dur-slow) var(--ease-standard), transform var(--dur-slow) var(--ease-standard);
  overflow: hidden;
}
.dialog.show { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.dialog-head { padding: 16px 20px 8px; }
.dialog-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.dialog-body { padding: 8px 20px 16px; }
.dialog-body .input { width: 100%; }
.dialog-body .dlg-text { margin: 0; font-size: 14px; color: var(--text-primary); line-height: 1.6; word-break: break-all; }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--border); background: rgba(0,0,0,.02); }

/* 输入框 */
.input {
  font-family: var(--font); font-size: 14px; color: var(--text-primary);
  background: rgba(255,255,255,.8); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 9px 12px; outline: none;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,95,184,.15); }

/* ============ 操作加载遮罩（重命名/删除，带后台加载按钮）============ */
.op-loading-mask {
  position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.28);
  backdrop-filter: blur(2px); display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out);
}
.op-loading-mask.show { opacity: 1; pointer-events: auto; }
.op-loading {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 28px 40px; border-radius: var(--radius-lg);
}
.op-loading-text { font-size: 14px; color: var(--text-primary); }
.op-bg-btn { font-size: 13px; padding: 6px 14px; }

/* ============ 传输列表（整页视图，TDesign + MUI + shadcn 风格）============ */
.transfer-page { position: relative; z-index: 1; max-width: 760px; margin: 18px auto 60px; padding: 0 16px; }
.transfer-page[hidden] { display: none; }
.transfer-page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.transfer-page-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.transfer-page-head .btn .ic { width: 15px; height: 15px; }
.transfer-list { display: grid; gap: 12px; }

/* 单行传输卡片 */
.transfer-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--mica); backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--mica-border, var(--border)); border-radius: var(--radius-lg); box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.06));
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.transfer-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-1px); }
.transfer-item.done { border-color: rgba(16,124,16,.25); }
.transfer-item.error { border-color: rgba(196,43,28,.28); }

/* 类型图标（圆形彩色底） */
.transfer-icon {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: rgba(99,102,241,.1); transition: background var(--dur-fast) var(--ease-out);
}
.transfer-icon .ic { width: 22px; height: 22px; color: var(--brand); }
.transfer-item.done .transfer-icon { background: rgba(16,124,16,.12); }
.transfer-item.done .transfer-icon .ic { color: #107c10; }
.transfer-item.error .transfer-icon { background: rgba(196,43,28,.12); }
.transfer-item.error .transfer-icon .ic { color: #c42b1c; }

/* 主体区 */
.transfer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.transfer-row { display: flex; align-items: center; gap: 10px; }
.transfer-name { flex: 1; min-width: 0; font-size: 14px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 方向徽标（上传/下载） */
.transfer-dir {
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  font-size: 11px; color: var(--text-secondary); background: rgba(0,0,0,.04);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.transfer-dir .ic { width: 13px; height: 13px; }
.transfer-item.done .transfer-dir { color: #107c10; background: rgba(16,124,16,.08); }
.transfer-item.error .transfer-dir { color: #c42b1c; background: rgba(196,43,28,.08); }

/* 状态标签 */
.transfer-status { font-size: 11px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; font-weight: 500; }
.transfer-status.up { background: rgba(99,102,241,.12); color: var(--brand); }
.transfer-status.done { background: rgba(16,124,16,.12); color: #107c10; }
.transfer-status.error { background: rgba(196,43,28,.12); color: #c42b1c; }

/* 进度条（MUI 风格：加高 + 光晕 + 平滑） */
.transfer-progress { display: flex; align-items: center; gap: 10px; }
.transfer-bar {
  flex: 1; height: 7px; background: rgba(0,0,0,.07); border-radius: 999px; overflow: hidden; position: relative;
}
.transfer-bar i {
  display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #6366f1);
  box-shadow: 0 0 6px rgba(99,102,241,.5);
  transition: width .25s cubic-bezier(.4,0,.2,1);
}
.transfer-bar.is-done i { background: linear-gradient(90deg, #16a34a, #22c55e); box-shadow: 0 0 6px rgba(34,197,94,.5); }
.transfer-bar.is-error i { background: linear-gradient(90deg, #dc2626, #ef4444); box-shadow: 0 0 6px rgba(239,68,68,.5); }
.transfer-pct { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }

/* 副信息行 */
.transfer-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-placeholder); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.transfer-meta-size { color: var(--text-secondary); }
.transfer-meta-speed { color: var(--brand); }
.transfer-meta-done { color: #107c10; }
.transfer-meta-err { color: #c42b1c; }

/* 加密任务图标：保持锁文件图标，使用警示色 */
.transfer-item.enc .transfer-icon { background: rgba(196,43,28,.12); }
.transfer-item.enc .transfer-icon .ic { color: #c42b1c; }

/* 标签栏（全部 / 上传 / 下载）+ 清空 */
.transfer-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.tt-tab {
  border: 1px solid var(--mica-border, var(--border)); background: var(--mica, rgba(255,255,255,.6));
  color: var(--text-secondary); font-size: 13px; font-weight: 500; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1); font-family: inherit;
}
.tt-tab:hover { border-color: rgba(99,102,241,.4); color: var(--brand); }
.tt-tab.active {
  background: linear-gradient(135deg, #6366f1, #818cf8); color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px -2px rgba(99,102,241,.4);
}
.transfer-clear {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  border: 1px solid var(--mica-border, var(--border)); background: var(--mica, rgba(255,255,255,.6));
  color: var(--text-secondary); font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 999px; font-family: inherit;
  transition: all .2s ease;
}
.transfer-clear:hover { border-color: rgba(196,43,28,.4); color: #c42b1c; background: rgba(196,43,28,.06); }
.transfer-clear .ic { width: 15px; height: 15px; }

/* 删除单条按钮 */
.transfer-del {
  background: transparent; border: none; cursor: pointer; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0; color: var(--text-placeholder);
  transition: all .2s ease; margin-left: 4px;
}
.transfer-del:hover { background: rgba(196,43,28,.1); color: #c42b1c; }
.transfer-del .ic { width: 15px; height: 15px; }

/* 空态 */
.transfer-empty { text-align: center; padding: 64px 20px; color: var(--text-placeholder); }
.transfer-empty-ic {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(99,102,241,.08);
}
.transfer-empty-ic .ic { width: 34px; height: 34px; color: var(--brand); opacity: .7; }
.transfer-empty-title { margin: 0 0 6px; font-size: 15px; color: var(--text-secondary); font-weight: 500; }
.transfer-empty-sub { margin: 0; font-size: 13px; }

/* ============ 顶栏分类切换 ============ */
.brand { flex-shrink: 0; }
.nav-tabs { display: flex; gap: 2px; background: rgba(0,0,0,.04); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; margin: 0 auto; }
.nav-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: transparent; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font); font-size: 14px; color: var(--text-secondary);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.nav-tab .ic { width: 16px; height: 16px; }
.nav-tab:hover { background: rgba(255,255,255,.7); color: var(--text-primary); }
.nav-tab.active { background: #fff; color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-weight: 500; }
.topbar-actions { flex-shrink: 0; }
.topbar-actions[hidden] { display: none; }

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .nav-tabs { order: 3; width: 100%; margin: 0; }
  .nav-tab { flex: 1; justify-content: center; }
}

/* ============ 博客列表页 ============ */
.posts-page { position: relative; z-index: 1; max-width: 1000px; margin: 18px auto 60px; padding: 0 16px; overflow-y: auto; max-height: calc(100vh - 120px); }
.posts-page[hidden] { display: none; }

/* 筛选区 */
.posts-filter { padding: 14px 16px; border-radius: var(--radius-lg); margin-bottom: 14px; display: grid; gap: 12px; }
.pf-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pf-search { position: relative; flex: 1; min-width: 240px; display: flex; align-items: center; }
.pf-search .ic { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--text-placeholder); pointer-events: none; }
.pf-search .input { width: 100%; padding-left: 36px; padding-right: 36px; }
.pf-clear { position: absolute; right: 8px; background: transparent; border: none; cursor: pointer; color: var(--text-placeholder); display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-sm); }
.pf-clear .ic { position: static; width: 14px; height: 14px; }
.pf-clear:hover { background: rgba(0,0,0,.06); color: var(--text-primary); }
.pf-select { flex-shrink: 0; width: auto; min-width: 150px; }
.pf-cats { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.pf-tags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.pf-no-tags { font-size: 12px; color: var(--text-placeholder); }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  background: rgba(255,255,255,.6); border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--font); font-size: 12px; color: var(--text-secondary); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.tag-chip:active { transform: scale(.96); }
.tag-chip:hover { background: rgba(255,255,255,.9); border-color: var(--brand); }
.tag-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tag-count { font-size: 10px; opacity: .75; font-variant-numeric: tabular-nums; }
.pf-time { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pf-time label { font-size: 12px; color: var(--text-secondary); }
.pf-date { width: auto; padding: 6px 10px; font-size: 13px; }
.pf-dash { color: var(--text-placeholder); }
.pf-reset { padding: 6px 12px; font-size: 13px; }

.posts-meta { font-size: 13px; color: var(--text-secondary); margin: 0 0 12px; padding: 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.posts-view-toggle { display: flex; gap: 2px; background: rgba(0,0,0,.04); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; }
.pvt-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; font-family: var(--font); font-size: 13px;
  background: transparent; border: none; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.pvt-btn .ic { width: 15px; height: 15px; }
.pvt-btn:hover { background: rgba(255,255,255,.7); color: var(--text-primary); }
.pvt-btn.active { background: #fff; color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* 两个独立页面容器 */
.app-page { position: relative; z-index: 1; }
.app-page[hidden] { display: none; }

/* 大图模式：卡片固定宽度档位，按屏幕自动调整列数（居中，避免大留白） */
.posts-grid.posts-list-mode {
  --post-col: 100%;
  display: grid; grid-template-columns: repeat(auto-fill, var(--post-col));
  gap: 18px; justify-content: center; align-items: start; max-width: 100%;
}

/* 大图（封面）模式：智能分列——卡片加宽（固定展示 3 张预览图），按视口自动计算列数 */
.posts-grid.view-cover {
  display: grid; gap: 20px; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
@media (max-width: 1200px) {
  .posts-grid.view-cover { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
@media (max-width: 820px) {
  .posts-grid.view-cover { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
}
@media (max-width: 560px) {
  .posts-grid.view-cover { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 380px) {
  .posts-grid.view-cover { grid-template-columns: 1fr; }
}

/* 卡片（大图） */
.cover-card {
  background: var(--mica); backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--mica-border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
  display: flex; flex-direction: column; height: auto;
}
.cover-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
/* 媒体区：固定比例（卡片尺寸固定），图片/视频缩放填满，完整展示 */
.pc-cover { position: relative; width: 100%; aspect-ratio: 16 / 9; background: rgba(0,0,0,.04); display: block; overflow: hidden; }
/* 封面固定展示 3 格（不足补灰），一行完整展示 */
.sm-grid { position: relative; display: grid; gap: 2px; grid-template-columns: repeat(3, 1fr); aspect-ratio: 16 / 9; }
.sm-cell { position: relative; overflow: hidden; background: rgba(0,0,0,.06); display: grid; place-items: center; }
/* 灰色占位格：无预览图时补足 3 格，保持封面宽度一致 */
.sm-cell-empty { background: rgba(0,0,0,.05); }
/* 预览图：自适应完整显示（不裁剪），水平+竖直居中 */
.sm-img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; transition: transform .3s ease; }
.sm-cell:hover .sm-img { transform: scale(1.04); }
.sm-video-cell { cursor: pointer; }
.sm-video-thumb { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.sm-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.sm-play .ic { width: 34px; height: 34px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); background: rgba(0,0,0,.35); border-radius: 50%; padding: 7px; box-sizing: content-box; transition: transform .15s, background .15s; }
.sm-video-cell:hover .sm-play .ic { transform: scale(1.12); background: var(--brand); }
.pc-cover-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pc-cover-empty { display: grid; place-items: center; color: var(--text-placeholder); min-height: 160px; }
.pc-cover-empty .ic { width: 40px; height: 40px; }
.pc-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.pc-row { display: flex; align-items: baseline; gap: 12px; }
.pc-title { font-size: clamp(15px, 2.2vw, 18px); font-weight: 600; line-height: 1.4; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-tag { font-size: 11px; background: rgba(0,95,184,.12); color: var(--brand); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pc-tag.muted { background: rgba(0,0,0,.06); color: var(--text-placeholder); }
.pc-time { font-size: 11px; color: var(--text-placeholder); font-variant-numeric: tabular-nums; flex-shrink: 0; }
/* 列表模式操作区与删除按钮 */
.pc-actions { display: flex; justify-content: flex-end; margin-top: 2px; }
.pc-del {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: rgba(255,255,255,.6); color: var(--text-secondary);
  cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); flex-shrink: 0;
}
.pc-del .ic { width: 16px; height: 16px; }
.pc-del:hover { color: #e5484d; border-color: rgba(229,72,77,.4); background: rgba(229,72,77,.08); }
.pc-del:disabled { opacity: .5; cursor: default; }
/* 大图模式卡片也提供删除按钮（右上角悬浮） */
.cover-card:not(.list-card) .pc-actions { position: absolute; top: 8px; right: 8px; z-index: 2; }
.cover-card:not(.list-card) .pc-del { background: rgba(0,0,0,.45); border-color: transparent; color: #fff; backdrop-filter: blur(4px); }
.cover-card:not(.list-card) .pc-del:hover { background: rgba(229,72,77,.9); color: #fff; }

/* 宽屏（桌面）：一行多帖，卡片固定宽度档位、按屏幕自动列数 */
@media (min-width: 900px) {
  .posts-grid.posts-list-mode { --post-col: 100%; gap: 20px; }
}
@media (min-width: 1280px) {
  .posts-grid.posts-list-mode { --post-col: 100%; gap: 22px; }
}
/* 竖屏 / 移动：单列更紧凑，标题两行 */
@media (max-width: 640px) {
  .posts-grid.posts-list-mode { gap: 12px; grid-template-columns: 1fr; }
  .pc-body { padding: 12px 14px 14px; gap: 7px; }
  .pc-title { font-size: 15px; white-space: normal; display: -webkit-box; display: box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  /* 列表模式卡片在移动端：缩略图 + 信息 + 删除，紧凑一行 */
  .list-card { gap: 10px; padding: 8px 10px; }
  .pc-thumb { width: 72px; height: 48px; }
  .pc-actions { margin-top: 0; }
  .pc-del { width: 28px; height: 28px; }
  /* 大图模式卡片：删除按钮内移到封面内 */
  .cover-card:not(.list-card) .pc-actions { top: 6px; right: 6px; }
}

/* 列表模式卡片：一行一个，只有标题（无预览图） */
.list-card {
  background: var(--mica); border: 1px solid var(--mica-border); border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-standard);
  display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 11px 14px;
  min-height: 100px;
}
.list-card:hover { background: rgba(0,0,0,.035); box-shadow: var(--shadow-hover); }
/* 列表模式：正文区横向排布，标题占满，删除按钮在右 */
.list-card .pc-body { padding: 0; gap: 10px; flex-direction: row; align-items: center; flex: 1; min-width: 0; }
.list-card .pc-row { flex: 1; min-width: 0; }
.list-card .pc-tags { display: none; } /* 列表模式只显示标题，不显示标签 */
.list-card .pc-actions { margin-top: 0; flex-shrink: 0; }
.list-card .pc-del { background: rgba(255,255,255,.6); }
.list-card .pc-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 在列表模式下隐藏封面预览图 */
.list-card .pc-cover { display: none; }

/* 封面/缩略播放标记 */
.sm-cover-play { position: absolute; inset: 0; display: grid; place-items: center; gap: 6px; color: #fff; background: rgba(0,0,0,.28); cursor: pointer; transition: background .15s; }
.sm-cover-play:hover { background: rgba(0,0,0,.42); }
.sm-cover-play .ic { width: 38px; height: 38px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.sm-cover-play.big .ic { width: 52px; height: 52px; }
.sm-cover-play span { font-size: 12px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pc-thumb .sm-cover-play .ic { width: 26px; height: 26px; }

/* ============ 博客编辑器 ============ */
.editor-page { position: relative; z-index: 1; max-width: 1400px; margin: 12px auto 40px; padding: 0 16px; }
.editor-page[hidden] { display: none; }
.editor-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-lg); margin-bottom: 14px; }
.editor-title { flex: 1; min-width: 0; font-family: var(--font); font-size: 17px; font-weight: 600; background: transparent; border: none; outline: none; color: var(--text-primary); padding: 6px 4px; }
.editor-title::placeholder { color: var(--text-placeholder); font-weight: 400; }
.editor-mode-label { flex-shrink: 0; font-size: 13px; color: var(--text-secondary); padding: 4px 10px; background: rgba(0,0,0,.04); border-radius: var(--radius-sm); }
/* 布局：左列=元数据（跨两行），右列=编辑区；预览图栏已上移到 editor-head 下方靠上区域 */
.editor-main {
  display: grid; grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px; align-items: start;
}
.editor-side { grid-column: 1; grid-row: 1; }
.editor-area-wrap { grid-column: 2; grid-row: 1; }
.editor-previewcfg { margin-top: 0; }

/* 侧边元数据 */
.editor-side { padding: 16px; border-radius: var(--radius-lg); display: grid; gap: 16px; align-content: start; position: sticky; top: 92px; }
.es-field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.es-field .input { width: 100%; resize: vertical; font-family: var(--font); }
.es-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text-primary); user-select: none; }
.es-check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.es-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.es-tag { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,95,184,.1); color: var(--brand); padding: 3px 6px 3px 10px; border-radius: 999px; font-size: 12px; }
.es-tag button { background: transparent; border: none; cursor: pointer; color: inherit; display: grid; place-items: center; padding: 0; width: 16px; height: 16px; border-radius: 50%; opacity: .7; }
.es-tag button .ic { width: 11px; height: 11px; }
.es-tag button:hover { background: rgba(0,0,0,.1); opacity: 1; }
.es-files { display: flex; gap: 5px; flex-wrap: wrap; }
.es-file { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-secondary); background: rgba(0,0,0,.04); padding: 3px 8px; border-radius: var(--radius-sm); max-width: 100%; }
.es-file .ic { width: 12px; height: 12px; flex-shrink: 0; }
.es-file .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-empty, .es-files:empty::after { content: "无引用文件"; font-size: 12px; color: var(--text-placeholder); }

/* 编辑区（Vditor） */
.editor-area-wrap {
  padding: 0; border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; height: calc(100vh - 260px); min-height: 460px;
}
.editor-vditor-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#vditor { flex: 1; min-height: 0; border: none !important; display: flex; flex-direction: column; }
.vditor {
  border: none !important; border-radius: 0 !important;
  flex: 1; min-height: 0; display: flex; flex-direction: column; background: transparent;
}
/* 工具栏常驻：随编辑区滚动始终吸顶 */
.vditor-toolbar {
  position: sticky !important; top: 0; z-index: 5;
  border-bottom: 1px solid var(--border) !important;
  background: rgba(255,255,255,.86) !important;
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: 6px 8px !important; flex-shrink: 0;
}
.vditor-toolbar__item { border-radius: var(--radius-sm); }
.vditor-toolbar__item button { height: 30px; width: 32px; border-radius: var(--radius-sm); }
.vditor-toolbar__item button:hover { background: rgba(0,95,184,.1); color: var(--brand); }
.vditor-toolbar__item button svg { width: 17px; height: 17px; }
/* 隐藏自定义「插入文件」按钮里图标的错位 */
.vditor-toolbar__item .ic { width: 17px; height: 17px; vertical-align: middle; }
/* WYSIWYG 编辑区：整块可编辑，自己滚动 */
.vditor-wysiwyg {
  flex: 1; min-height: 0; overflow-y: auto !important;
  background: rgba(255,255,255,.42);
}
.vditor-reset { font-size: 14px; line-height: 1.75; }
.vditor-reset img { max-width: 100%; border-radius: var(--radius-md); }
.vditor-reset img.sm-img { display: block; margin: .6em 0; box-shadow: 0 1px 6px rgba(0,0,0,.12); }

/* ---------- 编辑区媒体卡片：把 <a> 伪装成卡片，不改 DOM 结构 ---------- */
/* 通用（音频 / 其他文件） */
.vditor-reset a.sm-media-link {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; padding: 9px 14px 9px 12px; margin: .3em 2px;
  background: rgba(0,95,184,.09);
  border: 1px solid rgba(0,95,184,.18);
  border-radius: var(--radius-md);
  color: var(--brand); text-decoration: none; font-size: 13px;
  vertical-align: middle; cursor: pointer; transition: background .15s, border-color .15s;
}
.vditor-reset a.sm-media-link:hover { background: rgba(0,95,184,.16); border-color: var(--brand); }
.vditor-reset a.sm-media-link::before {
  content: ""; width: 18px; height: 18px; flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--sm-icon, none) center / contain no-repeat;
          mask: var(--sm-icon, none) center / contain no-repeat;
}
.vditor-reset a.sm-kind-audio { --sm-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 3v10.55A4 4 0 1 0 14 17V7h4V3h-6Z"/></svg>'); }
.vditor-reset a.sm-kind-other { --sm-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Zm0 2.5L17.5 8H14V4.5Z"/></svg>'); }

/* ---------- 编辑区里的真实媒体 ---------- */
/* <img>/<video> 是 Vditor 根据正文 HTML 渲染出来的真元素，这里只做尺寸约束 */
.vditor-reset img.sm-img {
  display: block; max-width: 100%; max-height: 420px;
  margin: .6em 0; border-radius: var(--radius-md);
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
.vditor-reset video.sm-video {
  display: block; width: 100%; max-width: 560px;
  margin: .8em 0; border-radius: var(--radius-md);
  background: #000; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.vditor-reset audio.sm-audio { display: block; width: 100%; max-width: 460px; margin: .6em 0; }

/* ============ 媒体播放浮层 ============ */
.sm-player-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  z-index: 40; opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out);
}
.sm-player-mask.show { opacity: 1; pointer-events: auto; }
.sm-player {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh; z-index: 41;
  border-radius: 0; overflow: hidden;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-standard);
}
.sm-player-mask.show + .sm-player, .sm-player.show { opacity: 1; pointer-events: auto; transform: none; }
.sm-player-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.sm-player-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-player-body { background: #000; height: 100%; }
.sm-player-body .artplayer-app { width: 100%; height: 100%; aspect-ratio: auto; }

/* ---------- 详情页里的真实媒体 ---------- */
.post-detail-body img, #postModalBody img {
  display: block; max-width: 100%; max-height: 460px;
  margin: .7em 0; border-radius: var(--radius-md);
}
.post-detail-body video, #postModalBody video {
  display: block; width: 100%; max-width: 100%; max-height: 60vh;
  margin: .8em 0; border-radius: var(--radius-md); background: #000;
}
.post-detail-body audio, #postModalBody audio {
  display: block; width: 100%; max-width: 480px; margin: .6em 0;
}

/* 预览设置面板 */
.editor-previewcfg { padding: 14px 16px; border-radius: var(--radius-lg); margin-top: 14px; }
.epc-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-primary); flex-wrap: wrap; }
.epc-head .ic { width: 18px; height: 18px; color: var(--brand); }
.epc-hint { font-size: 11px; font-weight: 400; color: var(--text-placeholder); margin-left: auto; }
.epc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 12px; }
.epc-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: rgba(255,255,255,.5); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.epc-item:hover { border-color: var(--brand); background: rgba(255,255,255,.9); }
.epc-item:has(input:checked) { border-color: var(--brand); background: rgba(0,95,184,.08); }
.epc-item .ic { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; }
.epc-item input { width: 15px; height: 15px; accent-color: var(--brand); flex-shrink: 0; cursor: pointer; }
.epc-name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epc-kind { font-size: 10px; color: var(--text-placeholder); background: rgba(0,0,0,.05); padding: 1px 7px; border-radius: 999px; }
.epc-empty { font-size: 13px; color: var(--text-placeholder); padding: 8px 2px; }

/* 编辑器内嵌媒体 */
.sm-video-holder { position: relative; margin: .8em 0; border-radius: var(--radius-md); overflow: hidden; background: #000; line-height: 0; }
.sm-video { width: 100%; max-height: 500px; display: block; }
.sm-audio-holder { margin: .7em 0; }
.sm-audio { width: 100%; }
.sm-file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; background: rgba(0,95,184,.08); border-radius: var(--radius-md); color: var(--brand); cursor: pointer; font-size: 13px; }
.sm-file-chip .ic { width: 16px; height: 16px; }

/* 详情正文 / 编辑器内 媒体节点 */
.sm-media { max-width: 100%; border-radius: var(--radius-md); display: block; margin: .6em 0; }
.sm-img { height: auto; }
.sm-file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; background: rgba(0,95,184,.08); border-radius: var(--radius-md); color: var(--brand); cursor: pointer; font-size: 13px; margin: .5em 0; }
.sm-file-chip .ic { width: 16px; height: 16px; }

/* ============ 博客详情弹窗 ============ */
.post-detail { width: min(960px, 94vw); max-height: 90vh; display: flex; flex-direction: column; }
#postModalTitle { margin: 0; font-size: 18px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-detail-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 4px 20px 12px; max-height: 42vh; overflow-y: auto; }
.pd-media-item { border-radius: var(--radius-md); overflow: hidden; background: rgba(0,0,0,.04); display: grid; place-items: center; min-height: 120px; }
.pd-media-item img { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.post-detail-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 12px; }
.post-detail-body { padding: 4px 22px 22px; overflow-y: auto; flex: 1; min-height: 0; }

/* ============ 文件预览页 ============ */
.preview-page { position: relative; z-index: 1; max-width: 1400px; margin: 12px auto 40px; padding: 0 16px; }
.preview-page[hidden] { display: none; }
.preview-page-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-lg); margin-bottom: 14px; }
.preview-title { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.preview-meta { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.preview-page-body {
  padding: 20px; border-radius: var(--radius-lg); min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--mica); backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--mica-border); overflow-y: auto; overflow-x: hidden;
}
.preview-media { max-width: 100%; max-height: 74vh; border-radius: var(--radius-md); display: block; }
.preview-img { object-fit: contain; }
.preview-art { width: min(1100px, 100%); }

/* ArtPlayer 容器 */
.art-host { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-md); overflow: hidden; }
.art-host .artplayer-app { width: 100% !important; height: 100% !important; }

/* 正文 / 详情内嵌媒体 */
.sm-video, .sm-audio { max-width: 100%; border-radius: var(--radius-md); display: block; background: #000; }
.sm-audio { background: transparent; width: 100%; }
.sm-video-holder, .sm-audio-holder { margin: .7em 0; }
.sm-media-loading { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-placeholder); padding: 12px; }

@media (max-width: 1000px) {
  .editor-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .editor-side, .editor-area-wrap { grid-column: 1; grid-row: auto; }
  .editor-side { position: static; }
  .editor-area-wrap { height: auto; min-height: 420px; }
  /* 预览图栏移到上方后，移动端更紧凑 */
  .editor-previewcfg .epc-list { display: flex; flex-wrap: wrap; gap: 8px; }
  .editor-previewcfg .epc-item { flex: 0 0 auto; min-width: 0; }
}

/* 移动端竖屏：编辑器整体适配 */
@media (max-width: 640px) {
  .app-main { height: calc(100vh - 56px); }
  .editor-head { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .editor-head .editor-title { order: 3; flex: 1 1 100%; min-width: 0; }
  .editor-head .editor-mode-label { font-size: 13px; }
  .editor-head .btn { padding: 7px 10px; }
  .editor-main { gap: 10px; }
  .editor-vditor-host { min-height: 320px; }
  .epc-head { flex-wrap: wrap; align-items: center; gap: 6px; }
  .epc-hint { flex-basis: 100%; font-size: 11px; }
  .es-field { margin-bottom: 14px; }
  /* 文件选择器移动端铺满 */
  .picker { width: 96vw; max-height: 88vh; }
}

/* ============ 云盘文件选择器（多选） ============ */
.picker {
  position: fixed; z-index: 22; top: 50%; left: 50%; transform: translate(-50%,-46%) scale(.96);
  opacity: 0; pointer-events: none; width: min(680px, 94vw); max-height: 82vh;
  border-radius: var(--radius-lg); transition: all .22s cubic-bezier(.22,.61,.36,1);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--mica); backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%);
  border: 1px solid var(--mica-border); box-shadow: var(--shadow-hover);
  transition: opacity var(--dur-slow) var(--ease-standard),
              transform var(--dur-slow) var(--ease-standard);
}
.picker.show { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.picker-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.picker-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0; }
.picker-head .ic { width: 20px; height: 20px; color: var(--brand); }
.picker-path { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 9px 18px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,.02); font-size: 13px; min-height: 20px; }
.picker-crumb { background: transparent; border: none; cursor: pointer; color: var(--brand); font-family: var(--font); font-size: 13px; padding: 3px 7px; border-radius: var(--radius-sm); }
.picker-crumb.root { color: var(--text-secondary); font-weight: 600; }
.picker-crumb:hover { background: rgba(0,95,184,.1); }
.picker-sep { color: var(--text-placeholder); }
.picker-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.picker-toolbar .spacer { flex: 1; }
.picker-count { font-size: 12px; color: var(--brand); background: rgba(0,95,184,.12); padding: 3px 10px; border-radius: 999px; display: none; }
.picker-list { flex: 1; overflow-y: auto; padding: 12px 14px; min-height: 220px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; }
.picker-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: rgba(255,255,255,.55); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); overflow: hidden; position: relative;
}
.picker-item .pi-ic { width: 18px; height: 18px; flex-shrink: 0; color: var(--brand); }
.picker-item.dir .pi-ic { color: var(--text-secondary); }
.picker-item .pi-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.picker-item .pi-bad { font-size: 10px; color: var(--text-placeholder); font-style: normal; }
.picker-item .pi-check { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); background: rgba(255,255,255,.7); }
.picker-item .pi-check .ic { width: 12px; height: 12px; stroke-width: 3; }
.picker-item:hover { background: rgba(255,255,255,.92); border-color: var(--brand); }
.picker-item:hover .pi-check { border-color: var(--brand); }
.picker-item.disabled { opacity: .45; cursor: not-allowed; }
.picker-item.is-sel { background: rgba(0,95,184,.12); border-color: var(--brand); }
.picker-item.is-sel .pi-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.picker-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); background: rgba(0,0,0,.02); }
.picker-empty { grid-column: 1 / -1; text-align: center; color: var(--text-placeholder); font-size: 13px; padding: 40px 0; }

/* ============ Toast（顶部显示，TDesign 风格类型提示）============ */
/* Toast：从上方滑入 + 淡入，退出时轻微上移，节奏与弹窗一致 */
.toast {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%) translateY(-16px) scale(.96);
  background: rgba(32,32,32,.94); color: #fff; padding: 9px 18px;
  border-radius: var(--radius-md); font-size: 13px;
  opacity: 0; pointer-events: none; z-index: 80;
  box-shadow: var(--shadow-hover);
  display: inline-flex; align-items: center; gap: 8px; max-width: 90vw;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-standard);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
/* 类型色：与状态语义一致（成功/警告/错误），配色沿用原方案 */
.toast .ic { width: 16px; height: 16px; flex-shrink: 0; }
.toast-success { background: rgba(0,170,94,.96); }
.toast-warning { background: rgba(214,118,0,.96); }
.toast-error { background: rgba(213,57,57,.96); }

/* ============ 响应式 ============ */
@media (max-width: 640px) {
  .toolbar { top: 70px; }
  .usage { width: 100%; margin-left: 0; }
}

/* ============ SVG 图标基础 ============ */
.ic { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; fill: none; stroke: currentColor; overflow: visible; }

/* ============ 无障碍：键盘焦点可见 ============ */
/* 仅键盘导航时显示焦点环，鼠标点击不显示（避免干扰视觉） */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============ 降级动效：尊重系统「减少动效」偏好 ============ */
/* 用户在系统设置里开启「减少动效」时（前庭功能障碍/晕动症人群需要），
   关闭位移、缩放与装饰性循环动画，仅保留必要的透明度过渡以传达状态变化。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  /* 装饰性背景光晕动画完全停止（不影响布局，仅静态呈现） */
  .blob { animation: none !important; }
  /* 进出场保留淡入淡出，但去掉位移与缩放，避免突兀位移感 */
  .modal, .dialog, .picker, .toast, .more-menu,
  .cover-card, .fs-list.grid .fs-row {
    transform: none !important;
  }
  /* 内容加载骨架改为静态底色（保留占位作用，不闪烁） */
  .pv-skeleton,
  .pv-post-body img:not(.pv-img-loaded),
  .post-detail-body img:not(.pv-img-loaded),
  #postModalBody img:not(.pv-img-loaded) {
    animation: none !important;
  }
}

/* ============ 文件系统浏览器 ============ */
.topbar-actions { display: flex; gap: 10px; }

.breadcrumb { flex: 1; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.breadcrumb .crumb { color: var(--text-secondary); cursor: pointer; padding: 3px 8px; border-radius: var(--radius-md); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); white-space: nowrap; }
.breadcrumb .crumb:hover { background: rgba(0,0,0,.06); color: var(--text-primary); }
.breadcrumb .crumb:last-child { color: var(--text-primary); font-weight: 500; }
.breadcrumb .crumb-sep { color: var(--text-placeholder); }

/* 视图切换 */
.view-switch { display: flex; gap: 2px; background: rgba(0,0,0,.04); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; }
.vs-btn {
  display: grid; place-items: center; width: 30px; height: 28px;
  background: transparent; border: none; border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-secondary); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.vs-btn .ic { width: 16px; height: 16px; }
.vs-btn:hover { background: rgba(255,255,255,.7); color: var(--text-primary); }
.vs-btn.active { background: #fff; color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* 图标大小切换 */
.size-switch { display: flex; gap: 2px; background: rgba(0,0,0,.04); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; }
.size-switch[hidden] { display: none; }
.ss-btn {
  min-width: 28px; height: 28px; padding: 0 8px;
  background: transparent; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font); font-size: 12px; color: var(--text-secondary); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.ss-btn:hover { background: rgba(255,255,255,.7); color: var(--text-primary); }
.ss-btn.active { background: #fff; color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.fs-main { position: relative; z-index: 1; max-width: 1020px; margin: 18px auto 60px; padding: 0 16px; }
.fs-main[hidden] { display: none; }
/* 大图标模式：占满窗口宽度 */
.fs-main.wide { max-width: 100%; }
.fs-head, .fs-row {
  display: grid;
  grid-template-columns: 1fr 110px 170px 120px;
  gap: 12px; align-items: center;
}
.fs-head {
  padding: 8px 18px; font-size: 12px; color: var(--text-placeholder);
}
.fs-list {
  background: var(--mica); backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--mica-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.fs-row {
  padding: 10px 18px; border-top: 1px solid rgba(0,0,0,.04); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.fs-row:first-child { border-top: none; }
.fs-row:hover { background: rgba(0,0,0,.035); }
.fs-col-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fs-icon { display: flex; flex-shrink: 0; color: var(--brand); }
.fs-icon .ic { width: 20px; height: 20px; }
/* 彩色文件夹图标（TDesign 风格：暖橙渐变 + 投影） */
.fs-folder-ic { display: inline-flex; color: #f59e0b; flex-shrink: 0; filter: drop-shadow(0 2px 3px rgba(245,158,11,.25)); transition: transform .2s ease, color .2s ease; }
.fs-folder-ic .ic { width: 20px; height: 20px; }
.fs-folder-ic.enc { color: #e5484d; filter: drop-shadow(0 2px 3px rgba(229,72,77,.28)); }
.fs-row:hover .fs-folder-ic { transform: scale(1.08); color: #fbbf24; }
.fs-row:hover .fs-folder-ic.enc { color: #ef4444; }
/* 大图标模式：文件夹彩色方块背景 */
.fs-list.grid .fs-folder-ic {
  width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  box-shadow: 0 4px 12px -3px rgba(245,158,11,.4), inset 0 1px 0 rgba(255,255,255,.6);
}
.fs-list.grid .fs-folder-ic.enc { background: linear-gradient(145deg, #fee2e2, #fecaca); box-shadow: 0 4px 12px -3px rgba(229,72,77,.4), inset 0 1px 0 rgba(255,255,255,.6); }
.fs-list.grid .fs-folder-ic .ic { width: var(--icon-size, 56px); height: var(--icon-size, 56px); }
.fs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text-primary); }
/* 端到端加密锁标识 */
.fs-enc { display: inline-flex; align-items: center; vertical-align: -2px; margin-right: 4px; color: var(--brand); }
.fs-enc .ic { width: 13px; height: 13px; }
.fs-col-size { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.fs-col-time { font-size: 12px; color: var(--text-placeholder); }
.fs-col-actions { display: flex; gap: 6px; justify-content: flex-end; }
.fs-btn {
  font-family: var(--font); font-size: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,.6); color: var(--text-secondary); border-radius: var(--radius-sm);
  padding: 5px 10px; cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); line-height: 1;
  display: inline-flex; align-items: center; gap: 5px;
}
.fs-btn .ic { width: 14px; height: 14px; }
.fs-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.fs-btn.fs-more { padding: 5px 7px; }
.fs-btn.danger:hover { background: #c42b1c; border-color: #c42b1c; }

/* ============ 图标视图（大图标网格）============ */
/* 卡片尺寸固定（--grid-col 固定宽度，不拉伸），图标通过 --icon-size 缩放适应 */
.fs-list.grid {
  --grid-col: 160px;
  --icon-size: 48px;
  background: transparent; border: none; box-shadow: none; backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: grid; grid-template-columns: repeat(auto-fill, var(--grid-col)); gap: 12px; justify-content: start;
}
.fs-list.grid.size-small {
  --grid-col: 120px; --icon-size: 36px;
}
.fs-list.grid.size-large {
  --grid-col: 220px; --icon-size: 64px;
}
.fs-list.grid.size-xl {
  --grid-col: 300px; --icon-size: 88px;
}
.fs-list.grid .fs-row {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 8px; padding: 12px 10px 14px; border: 1px solid var(--mica-border);
  border-radius: var(--radius-lg); background: var(--mica);
  backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  box-shadow: var(--shadow);
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              background var(--dur-fast) var(--ease-out);
}
.fs-list.grid .fs-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); background: rgba(255,255,255,.55); }
.fs-list.grid .fs-col-name { flex-direction: column; gap: 8px; width: 100%; }
/* 大图标模式：图标占位容器与缩略图卡片同比例（16/10），图标在其中居中、等比例缩放，保持完整不溢出 */
.fs-list.grid .fs-icon {
  width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-md);
  background: rgba(0,0,0,.04); display: grid; place-items: center; flex-shrink: 0;
  color: var(--brand);
}
.fs-list.grid .fs-icon .ic {
  width: var(--icon-size); height: var(--icon-size);
  max-width: 100%; max-height: 100%;
}
.fs-list.grid .fs-name { white-space: normal; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fs-list.grid .fs-col-size, .fs-list.grid .fs-col-time { display: none; }
/* 大图标模式隐藏操作按钮（下载/更多已移入预览弹窗） */
.fs-list.grid .fs-col-actions { display: none; }

/* 缩略图卡片：固定尺寸，绝不随图片比例变化，保证文件卡片大小恒定 */
.fs-thumb {
  width: 100%; border-radius: var(--radius-md); overflow: hidden;
  background: #000; display: grid; place-items: center; position: relative;
  aspect-ratio: 16 / 10; /* 固定比例，由 CSS 控制，JS 不再动态修改 */
  flex-shrink: 0;
}
/* 图标或预览图自适应缩放：充满容器但保持完整、不裁切、不放大 */
.fs-thumb img {
  width: 100%; height: 100%;
  object-fit: contain; /* 完整展示，黑边填充，绝不裁切 */
  display: block;
}
.fs-thumb .ic { color: #fff; width: var(--icon-size); height: var(--icon-size); max-width: 100%; max-height: 100%; opacity: .85; }
.fs-thumb .thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; background: rgba(0,0,0,.2);
}
.fs-thumb .thumb-play .ic { width: 28px; height: 28px; opacity: 1; }
/* 有缩略图的行不显示额外小图标 */
.fs-list.grid .fs-thumb + .fs-col-name .fs-icon { display: none; }

/* ============ 更多菜单 ============ */
/* 菜单为「即时反馈」型组件，用最短时长 --dur-fast，展开干脆不拖沓 */
.more-menu {
  position: fixed; z-index: 60; min-width: 160px; padding: 4px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover); opacity: 0; transform: translateY(-4px) scale(.98);
  transform-origin: top right;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-standard);
  pointer-events: none;
}
.more-menu.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.more-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px;
  background: transparent; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; color: var(--text-primary); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out); text-align: left;
}
.more-item .ic { width: 16px; height: 16px; color: var(--text-secondary); }
.more-item:hover { background: rgba(0,0,0,.05); }
.more-item.danger { color: #c42b1c; }
.more-item.danger .ic { color: #c42b1c; }

/* ============ 加载动画（Win11 风格旋转环）=========== */
/* 列表刷新时的覆盖态：半透明遮罩淡入 + 居中旋转环，与全站动效节奏一致 */
.fs-list.loading::after {
  content: ""; position: absolute; inset: 0; z-index: 5;
  background: rgba(243,243,243,.5); backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fs-loading-in var(--dur-base) var(--ease-out);
}
.fs-list.loading::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 6;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 3px solid rgba(0,95,184,.2); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .68s linear infinite;
}
@keyframes fs-loading-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .fs-head { display: none; }
  .fs-row { grid-template-columns: 1fr auto; grid-template-areas: "name actions" "size time"; row-gap: 6px; }
  .fs-col-name { grid-area: name; }
  .fs-col-actions { grid-area: actions; }
  .fs-col-size { grid-area: size; }
  .fs-col-time { grid-area: time; }
  .fs-list.grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .fs-list.grid .fs-col-name { grid-area: auto; }
  .fs-list.grid .fs-col-actions { grid-area: auto; }
  .fs-list.grid .fs-col-size { grid-area: auto; }
}

/* ============ 纯预览页（新标签页）============ */
/* 覆盖 body 的 overflow-y:hidden，恢复预览页滚动 */
.preview-only { overflow-x: hidden; overflow-y: auto; height: 100vh; }
.preview-top { position: sticky; top: 0; z-index: 5; }
.preview-wrap {
  position: relative; z-index: 1; max-width: 100vw; margin: 0 auto;
  padding: 22px 18px 48px; min-height: calc(100vh - 64px);
  display: grid; place-items: center;
}
.preview-loading { color: var(--text-secondary); font-size: 14px; padding: 60px 0; }
/* 博客关联媒体网格：固定卡片，媒体自适应缩放完整展示 */
.pv-post-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.pv-media-item { width: 100%; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); box-shadow: var(--shadow-hover); }
.pv-media-img { width: 100%; aspect-ratio: 16/10; background: #000; display: grid; place-items: center; }
.pv-media-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-media-video { width: 100%; height: 360px; background: #000; }
.pv-media-item audio { width: 100%; padding: 12px; }

.preview-media { width: 100%; max-width: 100%; display: grid; place-items: center; }
.pv-img { max-width: 100%; max-height: 82vh; width: auto; height: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-hover); background: #000; }
.pv-video-native { width: 100%; max-height: 82vh; border-radius: var(--radius-md); background: #000; }
/* 渲染目标与视频容器：确保容器能正确被播放器撑开，避免高度为 0 导致播放器不显示 */
#pvContent { width: 100%; max-width: 100%; display: flex; flex-direction: column; align-items: stretch; }
.pv-media { width: 100%; display: block; }
/* #pvArt 始终保持固定高度，ArtPlayer 渲染后会把该元素自身变为 .art-video-player 根，
   其默认会充满容器高度，因此绝不能把它改成 height:100%（会造成与父容器循环依赖而塌陷为 0） */
#pvArt, #pvArt.art-video-player { width: 100%; height: 70vh; min-height: 400px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-hover); background: #000; }
.pv-audio { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px; background: var(--mica); border: 1px solid var(--mica-border); border-radius: var(--radius-lg); backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%); min-width: min(420px, 90vw); }
.pv-audio-ic { width: 56px; height: 56px; color: var(--brand); }
.pv-audio-meta { font-size: 14px; color: var(--text-secondary); text-align: center; word-break: break-all; }

/* 博客预览正文 */
.pv-post { width: 100%; max-width: 860px; margin: 0 auto; background: var(--mica); border: 1px solid var(--mica-border); border-radius: var(--radius-lg); padding: 26px 30px 34px; backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%); box-shadow: var(--shadow); }
.pv-post-title { font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--text-primary); margin: 0 0 12px; }
.pv-post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pv-post-body { font-size: 15px; line-height: 1.75; color: var(--text-primary); }
/* 帖子打开时的骨架占位与加载动画 */
.pv-skeleton { border-radius: var(--radius-md); background: linear-gradient(90deg, rgba(0,0,0,.05) 25%, rgba(0,0,0,.10) 37%, rgba(0,0,0,.05) 63%); background-size: 400% 100%; animation: pv-shimmer 1.2s ease infinite; }
.pv-skeleton-title { height: 30px; width: 60%; margin: 0 0 12px; }
.pv-skeleton-meta { height: 16px; width: 40%; margin-bottom: 18px; }
.pv-post-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px 0; color: var(--text-secondary); font-size: 14px; }
.pv-post-loading .spinner { margin-right: 0; }
.pv-post-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 8px 0; }
/* 正文图片加载动画：未加载完成时显示 shimmer 骨架占位，加载完成后淡入图片 */
.pv-post-body img:not(.pv-img-loaded),
.post-detail-body img:not(.pv-img-loaded),
#postModalBody img:not(.pv-img-loaded) {
  min-height: 120px;
  background: linear-gradient(90deg, rgba(0,0,0,.05) 25%, rgba(0,0,0,.10) 37%, rgba(0,0,0,.05) 63%);
  background-size: 400% 100%;
  animation: pv-shimmer 1.2s ease infinite;
}
.pv-post-body img.pv-img-loaded,
.post-detail-body img.pv-img-loaded,
#postModalBody img.pv-img-loaded { animation: pv-img-fade .3s ease; }
@keyframes pv-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@keyframes pv-img-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pv-post-body video { width: 100%; max-height: 60vh; border-radius: var(--radius-md); margin: 8px 0; background: #000; }
@media (max-width: 640px) {
  .preview-top { padding: 8px 10px; }
  .preview-top .pv-title { font-size: 14px; }
  .topbar-actions .btn { padding: 7px 10px; }
  .topbar-actions .btn .btn-label { display: none; } /* 移动端只显示图标，节省空间 */
  .preview-wrap { padding: 14px 10px 36px; }
  .pv-post { padding: 18px 16px 24px; }
  .pv-post-title { font-size: 20px; }
  #pvArt { height: 50vh; min-height: 300px; }
  .pv-post-body video { max-height: 40vh; }
  /* 博客关联媒体网格在移动端单列 */
  .pv-post-media { grid-template-columns: 1fr; }
  .pv-media-video { height: 240px; }
}

/* ============ 端到端加密入口按钮 ============ */
/* 已解锁（本地加密生效）时高亮，未解锁时为普通按钮 */
#cryptoBtn.crypto-on {
  color: var(--brand);
  border-color: rgba(0,95,184,.35);
  background: rgba(0,95,184,.08);
}
.crypto-state { margin-top: 6px; }
