/* ═══════════════════════════════════════════
   文件列表布局优化 — 扩展内容区
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   文件预览 — 文件列表动作与预览层
   预览属于公开课程浏览器，不能依赖仅后台懒加载的 admin.css。
   ═══════════════════════════════════════════ */

.file-table .pv-link {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600;
  color: oklch(0.48 0.10 165); text-decoration: none;
  background: transparent; border: 1.5px solid oklch(0.48 0.10 165);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, opacity 0.15s, transform 0.15s;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  font-family: inherit;
  line-height: inherit;
}
.file-table .pv-link:hover {
  background: oklch(0.48 0.10 165); color: #fff;
}
.file-table.multi-select .pv-link { display: none; }

.dl-normal {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.preview-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: oklch(0 0 0 / 0.88);
  display: flex; flex-direction: column;
  padding: var(--space-md);
  backdrop-filter: blur(8px);
  animation: modalIn 0.2s ease-out;
}

.preview-header {
  display: flex; align-items: center; gap: var(--space-sm);
  color: #fff; padding: 0 var(--space-sm) var(--space-sm);
  flex-shrink: 0;
}
.preview-header .pv-badge { flex-shrink: 0; }
.preview-header .pv-title {
  flex: 1; font-size: 0.85rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0.85;
}
.preview-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  overflow: auto; min-height: 0;
}
.preview-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px; border: none;
  background: oklch(1 0 0 / 0.12); color: #fff;
  font-size: 1.1rem; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.preview-close:hover { background: oklch(1 0 0 / 0.3); }

.pv-dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 18px; border-radius: 6px;
  font-size: 0.82rem; font-weight: 600;
  background: var(--primary); color: #fff;
  border: none; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
  font-family: inherit;
}
.pv-dl-btn:hover { background: var(--primary-dark); }
.pv-dl-btn-hdr { margin-left: auto; font-size: 0.78rem; padding: 5px 14px; }
.pv-viewer { border-radius: var(--radius-md); }

.pv-text-wrap { width: 100%; max-width: 900px; max-height: 100%; margin: 0 auto; overflow: auto; }
.pv-text {
  background: oklch(0.2 0.01 250); color: oklch(0.85 0.005 250);
  padding: var(--space-md); border-radius: var(--radius-md);
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
  font-size: 0.75rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}
.pv-text-code { color: oklch(0.83 0.04 150); }

.pv-unsupported { text-align: center; color: oklch(0.7 0.01 0); }
.pv-unsupported-icon { font-size: 3rem; margin-bottom: var(--space-md); opacity: 0.5; }
.pv-unsupported-text { font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; }
.pv-unsupported-sub { font-size: 0.82rem; opacity: 0.5; margin-bottom: var(--space-lg); }

.pv-mobile-pdf { max-width: 28rem; padding: 24px; }
.fd-preview-body .pv-mobile-pdf { color: var(--ink-soft, #555); }
.pv-mobile-pdf .pv-dl-btn { margin-top: 4px; }

.pv-zip-loading { text-align: center; padding: var(--space-lg); color: var(--ink-faint, #999); font-size: 0.85rem; }
.pv-zip-header {
  padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border-light, #e8e8e8);
  display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap;
}
.pv-zip-filename { font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pv-zip-stats { font-size: 0.75rem; color: var(--ink-faint, #999); margin-left: auto; white-space: nowrap; }
.pv-zip-trunc { font-size: 0.7rem; color: oklch(0.52 0.13 45); background: oklch(0.52 0.13 45 / 0.12); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.pv-zip-tree {
  padding: var(--space-xs) var(--space-xs) var(--space-xs) 0; overflow: auto; max-height: 50vh;
  font-size: 0.78rem; font-family: "SF Mono", "Fira Code", Consolas, monospace; line-height: 1.9;
}
.pv-zip-dir { white-space: nowrap; }
.pv-zip-dir > summary {
  list-style: none; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 4px;
  padding: 1px var(--space-sm); border-radius: var(--radius-sm); color: var(--ink, #333); transition: background 0.12s;
}
.pv-zip-dir > summary::-webkit-details-marker { display: none; }
.pv-zip-dir > summary:hover { background: oklch(0.93 0.02 250 / 0.5); }
.pzd-arrow { display: inline-block; flex: none; width: 0.8em; color: var(--ink-faint, #aaa); font-size: 0.72em; transition: transform 0.15s ease; }
.pv-zip-dir[open] > summary .pzd-arrow { transform: rotate(90deg); }
.pzd-icon { flex: none; }
.pzd-name { font-weight: 600; color: oklch(0.42 0.06 250); }
.pzd-meta { font-size: 0.68em; color: var(--ink-faint, #aaa); margin-left: 8px; font-weight: 400; }
.pzd-children { margin-left: 1.1em; padding-left: 0.5em; border-left: 1px dashed var(--border-light, #e8e8e8); }
.pv-zip-file { display: flex; align-items: center; gap: 4px; white-space: nowrap; padding: 1px var(--space-sm); border-radius: var(--radius-sm); transition: background 0.12s; }
.pv-zip-file:hover { background: oklch(0.95 0.01 250 / 0.6); }
.pzf-icon { flex: none; opacity: 0.75; }
.pv-zip-fname { color: var(--ink, #333); overflow: hidden; text-overflow: ellipsis; }
.pv-zip-fsize { font-size: 0.7rem; color: var(--ink-faint, #aaa); margin-left: auto; padding-right: var(--space-md); flex: none; font-variant-numeric: tabular-nums; }
.pv-zip-empty { padding: var(--space-lg); text-align: center; color: var(--ink-faint, #999); font-size: 0.85rem; }
.pv-zip-footer { padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--border-light, #e8e8e8); text-align: center; }

.fi-preview-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 22px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; background: transparent;
  color: oklch(0.48 0.10 165); border: 1.5px solid oklch(0.48 0.10 165);
  cursor: pointer; text-decoration: none; margin-bottom: 8px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, opacity 0.15s, transform 0.15s;
  font-family: inherit;
}
.fi-preview-btn:hover { background: oklch(0.48 0.10 165); color: #fff; }
.fi-actions {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: var(--space-md); padding-top: var(--space-lg); border-top: 1px solid var(--border-light);
}
.fi-actions .fi-preview-btn { margin-bottom: 0; }
.fi-actions .fi-download-btn { margin-top: 0; }

/* ── 管理模式文件控件 ───────────────────────────────────────── */
.mgmt-new-btn {
  margin-left: auto;
  background: var(--accent, #c97d2d);
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.mgmt-new-btn:hover { opacity: 0.85; }

/* v=175 课程目录工具栏：普通模式「新建课程」申请入口。
   与管理入口「＋ 新建」的区分由图标（文档 vs 文件夹）、文案（完整词 vs 管理短文案）、
   分组（普通操作 vs 琥珀色管理操作）和模式互斥共同表达，不依赖颜色或悬停提示。
   v=176 造型并入工具栏既有家族：档案索引式 8px 圆角、中性描边、与根页签同字号同高。 */
.explorer-view .explorer-top-actions .explorer-newcourse-btn {
  margin-left: auto;
  background: var(--raised);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 6px 13px;
  border-radius: 8px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.explorer-view .explorer-top-actions .explorer-newcourse-btn:hover {
  background: var(--primary-surface);
  border-color: var(--primary-light);
}
.explorer-view .explorer-top-actions .explorer-newcourse-btn:focus-visible {
  outline: 2px solid oklch(from var(--primary) l c h / 0.45);
  outline-offset: 2px;
}
/* 管理按钮同槽位同造型（保留琥珀管理组语义色）；补 1px 同色描边对齐相邻按钮的盒高 */
.explorer-view .explorer-top-actions .mgmt-new-btn {
  padding: 6px 13px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  border: 1px solid var(--accent);
}
.mgmt-new-btn,
.explorer-view .explorer-top-actions .explorer-newcourse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mgmt-new-btn .ui-icon,
.explorer-view .explorer-top-actions .explorer-newcourse-btn .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.mgmt-pen {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.mgmt-pen:hover { opacity: 1; }
.mgmt-pen-sm { font-size: 0.7rem; vertical-align: middle; }
.mgmt-pin { font-size: 0.78rem; }
.file-pin-badge {
  display: inline-block;
  color: var(--star-dark);
  background: var(--star-light);
  border: 1px solid var(--star-border);
  border-radius: 999px;
  padding: 0 6px;
  font-size: 0.7rem;
  line-height: 1.5;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.file-pinned td { background: oklch(0.985 0.012 70); }
.file-pinned:hover td { background: oklch(0.975 0.02 70); }
.file-pinned .ft-name { box-shadow: inset 3px 0 0 var(--star); }
.file-pinned .fn-text { color: var(--star-dark); }
.file-pinned .mgmt-pin { opacity: 1; }

/* ── 文件详情内联编辑 ──────────────────────────────────────── */
.fi-row-desc .fi-value { white-space: pre-wrap; word-break: break-word; }
.fi-edit-input {
  width: 90%;
  padding: 4px 6px;
  border: 1px solid var(--accent, #c97d2d);
  border-radius: 4px;
  font-size: inherit;
  font-family: inherit;
  box-sizing: border-box;
}
.fi-pen {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  vertical-align: middle;
}
.fi-pen:hover { opacity: 1; }

/* 批量操作和新建按钮的窄屏布局属于课程资料页。
   （explorer-newcourse-btn 只出现在目录工具栏，窄屏尺寸由 base.css 的工具栏规则统一） */
@media (max-width: 640px) {
  .batch-dl-bar { flex-wrap: wrap; gap: 8px; }
  .batch-dl-bar .admin-btn-sm { font-size: 0.72rem; padding: 5px 10px; }
  .mgmt-new-btn { font-size: 0.7rem; padding: 3px 8px; }
}

.explorer-view .container {
  max-width: none;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .explorer-view .container { padding: 0 var(--space-md); }
}

/* 超宽屏上限 */
@media (min-width: 2000px) {
  .explorer-view .container {
    max-width: 1800px;
    margin: 0 auto;
  }
}

/* ── 列宽重新分配 ── */
.file-table thead th:nth-child(1) { width: auto; }     /* 文件名 — 自适应占剩余空间 */
.file-table thead th:nth-child(2) { width: 55px; }     /* 类型 */
.file-table thead th:nth-child(3) { width: 75px; }     /* 大小 */
.file-table thead th:nth-child(4) { width: 90px; }     /* 上传者 */
.file-table thead th:nth-child(5) { width: 100px; }    /* 任课教师 */
.file-table thead th:nth-child(6) { width: 60px; }     /* 收藏量 */
.file-table thead th:nth-child(7) { width: 100px; text-align: center; }    /* 下载量 */
@media (min-width: 721px) {
  .file-table thead th.th-download { width: 170px; text-align: center; }
}

/* ── 渐进隐藏列：空间不足时优先显示文件名 ── */

/* 中屏：隐藏任课教师 */
@media (max-width: 1200px) {
  .file-table .ft-teacher,
  .file-table .th-teacher {
    display: none;
  }
}
/* 中窄屏：再隐藏上传者 */
@media (max-width: 1000px) {
  .file-table .ft-uploader,
  .file-table .th-uploader {
    display: none;
  }
}
/* 窄屏：隐藏类型、下载次数，保留文件名/大小/按钮 */
@media (max-width: 768px) {
  .file-table .ft-type-cell,
  .file-table .th-type,
  .file-table .ft-dlcount,
  .file-table .th-dlcount {
    display: none;
  }
  /* 管理模式铅笔图标自动隐藏 */
  .mgmt-pen { display: none; }
  /* 下载列占满剩余宽度 */
  .file-table thead th:nth-child(7) { width: auto; }
}
/* 移动端(<640px)：隐藏预览按钮，单按钮宽度 */
@media (max-width: 640px) {
  .file-table .pv-link { display: none; }
  .file-table thead th:nth-child(7) { width: 84px; }
}

/* 预览弹窗移动端适配 */
@media (max-width: 640px) {
  .preview-overlay { padding: var(--space-xs); }
  .preview-body iframe { border-radius: var(--radius-sm); }
  .pv-text-wrap { max-width: 100%; }
  .pv-text { font-size: 0.7rem; padding: var(--space-sm); }
  .preview-header .pv-title { font-size: 0.78rem; }
  .fi-preview-btn { font-size: 0.8rem; padding: 7px 16px; }
}

/* 文件详情页预览区移动端适配 */
@media (max-width: 640px) {
  .fd-preview-body { max-height: 85vh; }
  .fd-preview-body .pv-viewer { max-height: 75vh; }
  .fd-preview-body .pv-text { max-height: 70vh; }
  .pv-zip-tree { font-size: 0.7rem; max-height: 40vh; }
  .pv-zip-header { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pv-zip-stats { margin-left: 0; }
  .pv-zip-filename { max-width: 100%; }
  .pzd-children { margin-left: 0.6em; padding-left: 0.3em; }
}

/* ═══════════════════════════════════════════════════════════
   文件详情页
   ═══════════════════════════════════════════════════════════ */

.fd-container {
  max-width: none;
  margin: 0 auto;
  padding: 0 32px 40px;
}

.fd-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 768px) {
  .fd-container { padding: 0 16px 40px; }
  .fd-layout { gap: 16px; }
  .fd-top-row { flex-direction: column; gap: 0; margin-bottom: 0; }
  /* 面包屑紧贴导航（12px），单行 13px，分隔符/当前页次级色 */
  .fd-top-row .breadcrumb { padding: 12px 0 0; font-size: 0.8125rem; }
  .fd-top-row .breadcrumb a,
  .fd-top-row .breadcrumb .bc-ellipsis { position: relative; }
  /* 触控区扩展到约 44px 高，不增加视觉行高（叠放进上下留白） */
  .fd-top-row .breadcrumb a::after,
  .fd-top-row .breadcrumb .bc-ellipsis::after {
    content: ''; position: absolute; inset: -8px -2px;
  }
}

/* 顶部信息区 — 单列 flex，宽屏时右侧 uploader 绝对定位 */
.fd-info-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 顶栏：面包屑 + 上传者卡片并排 */
.fd-top-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 12px;
}

.fd-top-row .breadcrumb {
  flex: 1;
  min-width: 0;
}

/* 宽屏：uploader 绝对定位到右侧，不与标题共享行高 */
@media (min-width: 769px) {
  .fd-info-area {
    position: relative;
    padding-right: 180px;
    gap: 12px;
  }
  .fd-info-area .fd-uploader-card {
    position: absolute;
    top: 0;
    right: 0;
    width: 160px;
  }
}

.fd-social-area { display: contents; }


.fd-title-area {
  align-self: start;
}

.fd-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  color: var(--ink, #222);
  word-break: break-word;
}

.fd-editable {
  cursor: text;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s;
}

.fd-editable:hover {
  border-bottom-color: var(--primary);
}

.fd-pen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
  margin-left: 4px;
  opacity: 0.4;
  transition: opacity 0.15s;
  vertical-align: middle;
}

.fd-pen:hover {
  opacity: 1;
}

.fd-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.fd-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.fd-meta-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

.fd-meta-view .fd-meta-icon {
  color: var(--primary);
}

.fd-meta-sep {
  color: var(--ink-faint);
  margin: 0 2px;
  user-select: none;
}

/* 超长文件名截断：省略号收口，完整名悬停/长按 title 可见 */
.fd-meta-file { min-width: 0; max-width: 100%; }
.fd-meta-file .fd-meta-file-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 类型下拉（管理模式） */
.fd-type-dropdown-wrap {
  display: inline-block;
  margin-left: 4px;
}

.fd-type-select {
  font-size: 0.78rem;
  padding: 1px 4px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--raised);
  cursor: pointer;
}

/* 资料说明：轻量表面与侧线区分内容和文件属性 */
.fd-desc-card {
  background: var(--raised);
  background: color-mix(in oklab, var(--raised) 60%, var(--surface));
  border-left: 2px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.fd-desc-label { margin-bottom: 4px; font-size: 12px; font-weight: 400; }
.fd-desc-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 上传者卡片 */
.fdu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--raised);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.fdu-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px oklch(0.45 0.01 55 / 0.06);
}

.fdu-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  flex-shrink: 0;
}

.fdu-info {
  text-align: center;
}

.fdu-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink, #333);
}

.fdu-label {
  font-size: 0.7rem;
  color: var(--ink-faint, #999);
  margin-top: 2px;
}

/* 窄屏：上传者变为紧凑横向行（去卡片底），右侧主页箭头；
   行高 44px 触控，长昵称省略但保留头像与箭头 */
@media (max-width: 768px) {
  .fdu-card {
    flex-direction: row;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
    min-height: 44px;
    box-sizing: border-box;
    background: none;
    border: none;
    border-radius: 0;
  }
  .fdu-card:hover {
    border-color: transparent;
    box-shadow: none;
  }
  .fdu-card:focus-visible {
    outline: 2px solid oklch(from var(--primary) l c h / 0.55);
    outline-offset: 2px;
    border-radius: 6px;
  }
  .fdu-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .fdu-info {
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 1;
    min-width: 0;
  }
  .fdu-name {
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fdu-arrow { margin-left: auto; color: var(--ink-faint); display: inline-flex; }
  .fdu-arrow .ui-icon { width: 14px; height: 14px; }
}

/* 操作按钮区 */
.fd-actions {
  margin: 4px 0;
}

.fd-actions-inner {
  display: flex;
  gap: 10px;
  align-items: center;
}


.fd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 0.88rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}

.fd-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.fd-btn-primary:hover {
  background: var(--primary-dark);
}

.fd-btn-secondary {
  background: var(--raised);
  color: var(--ink);
  border-color: var(--border);
}

.fd-btn-secondary:hover {
  border-color: var(--primary);
  background: oklch(0.97 0.01 250);
}

.fd-btn-danger {
  background: var(--raised);
  color: var(--danger);
  border-color: var(--danger-border);
}

.fd-btn-danger:hover {
  background: var(--danger-light);
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger-border);
}

/* 收藏按钮动效：已收藏状态 */
.fd-btn-fav.favorited {
  background: var(--star-light);
  border-color: var(--star-border);
  color: var(--star-dark);
}

.fd-btn-fav.favorited:hover {
  background: var(--star-light);
  border-color: var(--star-dark);
}

/* v=172 收藏按钮加粗边框（2px 内边框，box-sizing:border-box 保证外尺寸不变） */
.fd-btn-fav { border-width: 2px; }

/* v=172 举报按钮：低调 ghost 风（与收藏按钮同尺寸、更低存在感） */
.fd-btn-report {
  background: transparent;
  color: var(--ink-faint);
  border: 1px solid var(--border-light);
}
.fd-btn-report svg { width: 20px; height: 20px; stroke-width: 1.8; opacity: 0.8; }
.fd-btn-report:hover {
  background: oklch(0.96 0.012 60 / 0.5);
  border-color: oklch(0.72 0.06 50 / 0.6);
  color: oklch(0.52 0.13 45);
}
.fd-btn-report.reported {
  background: oklch(0.96 0 0 / 0.5);
  border-color: var(--border-light);
  color: var(--ink-faint);
  cursor: not-allowed;
  opacity: 0.65;
}
.fd-btn-report.reported:hover { background: oklch(0.96 0 0 / 0.5); border-color: var(--border-light); color: var(--ink-faint); }

/* ══ v=172 举报表单弹窗（iOS 分组多选 · 琥珀旗标色系） ══ */
.report-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: oklch(0 0 0 / 0.45);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.report-dialog {
  width: min(92vw, 560px); max-height: 90vh; overflow-y: auto;
  background: oklch(1 0 0 / 0.97);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid oklch(0.88 0.02 250 / 0.35);
  display: flex; flex-direction: column;
}
.rd-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid oklch(0.92 0.01 250 / 0.5);
  position: relative;
}
.rd-title {
  font-family: var(--serif, Georgia, "Songti SC", serif);
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  letter-spacing: 0.02em;
}
.rd-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.rd-close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: none; font-size: 1rem; cursor: pointer;
  color: var(--ink-faint); padding: 4px 8px; border-radius: 6px; line-height: 1;
}
.rd-close:hover { background: oklch(0.95 0.01 250 / 0.5); color: var(--ink); }
.rd-body { padding: 14px 18px 18px; overflow-y: auto; flex: 1; }

.report-group {
  background: oklch(0.99 0.004 60 / 0.55);
  border: 1px solid oklch(0.9 0.01 250 / 0.35);
  border-radius: var(--radius-md);
  padding: 4px 0 8px; margin-bottom: 12px;
}
.rg-head {
  font-size: 0.78rem; font-weight: 600; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 14px 6px;
}
.rg-options { display: flex; flex-direction: column; }

.report-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid oklch(0.93 0.008 250 / 0.5);
  transition: background 0.12s;
}
.report-option:last-child { border-bottom: none; }
.report-option:hover { background: oklch(0.97 0.01 250 / 0.3); }
.report-option.selected { background: oklch(0.965 0.02 60 / 0.4); }

.ro-cb {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid oklch(0.72 0.02 250 / 0.6);
  background: oklch(1 0 0 / 0.8);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.report-option.selected .ro-cb {
  background: var(--primary); border-color: var(--primary);
}
.ro-cb::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: transparent; transition: background 0.15s;
}
.report-option.selected .ro-cb::after { background: #fff; }

.ro-text { flex: 1; min-width: 0; }
.ro-label { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.ro-desc { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 2px; line-height: 1.45; }

.rd-field { width: 100%; margin-top: 8px; }
.rd-field label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.rd-field input {
  width: 100%; padding: 7px 10px; box-sizing: border-box;
  border: 1px solid oklch(0.82 0.02 250 / 0.4); border-radius: 8px;
  font-size: 0.85rem; font-family: inherit; background: oklch(1 0 0 / 0.7);
}
.rd-field input:focus { outline: none; border-color: var(--primary); }

.rd-detail-group textarea {
  width: 100%; min-height: 64px; padding: 8px 10px; box-sizing: border-box;
  border: 1px solid oklch(0.82 0.02 250 / 0.4); border-radius: 8px;
  font-size: 0.85rem; font-family: inherit; resize: vertical;
  background: oklch(1 0 0 / 0.7);
}
.rd-detail-group textarea:focus { outline: none; border-color: var(--primary); }
.rd-hint { font-size: 0.72rem; color: var(--ink-faint); margin-top: 6px; }
.rd-hint-error { color: oklch(0.5 0.15 25); font-weight: 500; }

.rd-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; margin-top: 4px; cursor: pointer;
  background: oklch(0.985 0.006 60 / 0.6);
  border: 1px solid oklch(0.9 0.02 55 / 0.5);
  border-radius: var(--radius-md);
}
.rd-check input { width: 16px; height: 16px; accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.rd-check strong { font-size: 0.85rem; color: var(--text); }
.rd-check-desc { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 2px; line-height: 1.45; }

.rd-error {
  color: oklch(0.5 0.15 25); font-size: 0.82rem;
  padding: 0 22px 4px;
}
.rd-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 14px 22px 18px;
  border-top: 1px solid oklch(0.92 0.01 250 / 0.5);
}
.rd-actions .admin-btn { padding: 8px 22px; font-size: 0.88rem; }

/* 上传者头像图片 */
.fdu-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .fdu-avatar-img {
    width: 28px;
    height: 28px;
  }
}

/* 预览区 */
.fd-preview-area {
  background: #fff;
  border: 1px solid var(--border-light, #e0e0e0);
  border-radius: 12px;
  overflow: hidden;
}

.fd-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink, #333);
  border-bottom: 1px solid var(--border-light, #e8e8e8);
}

/* 移动端预览头：16px/600 标题，不重复显示扩展名徽章，提示右对齐 12px */
@media (max-width: 768px) {
  .fd-preview-header { font-size: 1rem; padding: 10px 12px; }
  .fd-preview-header .ext-badge { display: none; }
}

.pv-hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--ink-faint, #999);
  font-weight: 400;
  white-space: nowrap;
}

.fd-preview-body {
  min-height: 400px;
  max-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

/* 加载/失败状态按内容收缩，成功预览继续使用原查看器尺寸。 */
.fd-preview-body:has(.pv-unsupported) { min-height: 0; }
.fd-preview-body > .pv-unsupported { padding: 16px; }

.fd-preview-body .pv-viewer {
  width: 100%;
  height: 100%;
  min-height: 400px;
  max-height: calc(100vh - 60px);
}

.fd-preview-body .pv-text-wrap {
  width: 100%;
  height: 100%;
}

.fd-preview-body .pv-text {
  max-height: calc(100vh - 100px);
  overflow: auto;
}

/* 管理模式类型下拉 */
.mgmt-type-dropdown-wrap {
  display: inline-block;
  margin-left: 3px;
}

.mgmt-type-select {
  font-size: 0.72rem;
  padding: 0px 2px;
  border: 1px solid var(--border-light, #ddd);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  max-width: 70px;
}

/* 收藏量列宽 */
.file-table th.th-favcount,
.file-table td.ft-favcount {
  width: 60px;
  text-align: center;
}

/* 暗色主题：文件高亮行、预览与举报弹窗统一使用语义表面。 */
html[data-bnu-theme="dark"] .file-pinned td { background: var(--star-light); }
html[data-bnu-theme="dark"] .file-pinned:hover td { background: var(--star-light); }
html[data-bnu-theme="dark"] .fd-btn-secondary:hover { background: var(--primary-surface); }
html[data-bnu-theme="dark"] .fd-btn-report:hover,
html[data-bnu-theme="dark"] .fd-btn-report.reported,
html[data-bnu-theme="dark"] .fd-btn-report.reported:hover {
  background: var(--surface);
  border-color: var(--border-light);
  color: var(--ink-faint);
}
html[data-bnu-theme="dark"] .report-dialog {
  background: var(--raised);
  border-color: var(--border);
}
html[data-bnu-theme="dark"] .rd-head,
html[data-bnu-theme="dark"] .rd-actions {
  border-color: var(--border-light);
}
html[data-bnu-theme="dark"] .report-group {
  background: var(--surface);
  border-color: var(--border);
}
html[data-bnu-theme="dark"] .report-option {
  border-color: var(--border-light);
}
html[data-bnu-theme="dark"] .report-option:hover { background: var(--primary-surface); }
html[data-bnu-theme="dark"] .report-option.selected { background: var(--accent-light); }
html[data-bnu-theme="dark"] .ro-cb,
html[data-bnu-theme="dark"] .rd-detail-group textarea,
html[data-bnu-theme="dark"] .rd-check,
html[data-bnu-theme="dark"] .fd-preview-area,
html[data-bnu-theme="dark"] .mgmt-type-select {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
html[data-bnu-theme="dark"] .rd-close:hover { background: var(--primary-surface); }

/* ═══════════════════════════════════════════════════════════
   v=204 移动端（≤768px）课程资料列表：纵向资料行 + 底部筛选面板
   桌面表格布局不受影响（explorer-render 按断点渲染不同 DOM）。
   ═══════════════════════════════════════════════════════════ */

/* 标题行：课程名 + 上传主按钮；资料数量在课程名下方 */
@media (max-width: 768px) {
  .mf-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 10px;
  }
  .mf-head-text { flex: 1 1 auto; min-width: 0; }
  .mf-course-name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .mf-count-line {
    margin-top: 3px;
    font-size: 0.74rem;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .mf-count-line .fa-codes { max-width: 100%; flex: 0 1 auto; }
  .mf-upload-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }
  .mf-upload-btn:hover { background: var(--primary-dark); }

  /* 工具栏：合并筛选入口（显示当前条件）+ 轻量批量下载文字按钮 */
  .mf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
  }
  .mf-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 12px;
    max-width: 74%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--raised);
    color: var(--ink);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
  }
  .mf-filter-btn .ui-icon { width: 14px; height: 14px; color: var(--ink-faint); flex: 0 0 auto; }
  .mf-filter-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mf-caret { color: var(--ink-faint); font-size: 0.7rem; flex: 0 0 auto; }
  .mf-text-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 4px;
    border: none;
    background: none;
    color: var(--primary);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
  }

  /* 资料列表：类型图标 + 标题/辅助信息 + 下载小按钮 */
  .mf-list {
    background: var(--raised);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
  }
  .mf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    min-height: 64px;
    border-bottom: 1px solid var(--border-light);
  }
  .mf-row:last-child { border-bottom: none; }
  .mf-glyph { flex: 0 0 auto; display: inline-flex; }
  .mf-glyph .ext-badge { margin-right: 0; }
  .mf-text {
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
  }
  .mf-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .mf-meta {
    font-size: 0.72rem;
    color: var(--ink-faint);
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .mf-pin-badge { margin-left: 5px; vertical-align: 1px; }
  .mf-dl {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 44px;
    padding: 4px 9px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    border-radius: 8px;
    background: var(--primary-surface);
    color: var(--primary);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
  }
  .mf-dl .ui-icon { width: 15px; height: 15px; }
  .mf-dl-disabled {
    background: var(--surface);
    color: var(--ink-faint);
    cursor: default;
  }
  .mf-chk-label {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mf-chk-label input[type="checkbox"],
  .mf-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
  }

  /* 批量模式：上方全选/计数，下方「下载所选（N）」 */
  .mf-batch-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 2px 8px;
    font-size: 0.78rem;
    color: var(--ink-soft);
  }
  .mf-select-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    cursor: pointer;
  }
  .mf-selected-count { color: var(--ink-faint); }
  .mf-batch-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
  }
  .mf-batch-dl {
    flex: 1 1 auto;
    min-height: 44px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
  }
  .mf-batch-dl:disabled { opacity: 0.5; cursor: not-allowed; }
  .mf-batch-mgmt {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--danger-border);
    background: var(--raised);
    color: var(--danger);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }
  .mf-list-end {
    text-align: center;
    font-size: 0.72rem;
    color: var(--ink-faint);
    margin-top: 14px;
  }
  .mf-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .mf-bottom .file-pagination {
    padding: 14px 0 4px;
    flex-basis: 100%;
  }
  .mf-empty {
    padding: 36px 16px;
    text-align: center;
    color: var(--ink-faint);
    font-size: 0.85rem;
  }
  .mf-row.highlight-row { animation: highlight-fade 2.5s ease forwards; }

  .mf-text:focus-visible,
  .mf-dl:focus-visible,
  .mf-filter-btn:focus-visible,
  .mf-text-btn:focus-visible,
  .mf-upload-btn:focus-visible,
  .mf-batch-dl:focus-visible,
  .mf-batch-mgmt:focus-visible {
    outline: 2px solid oklch(from var(--primary) l c h / 0.55);
    outline-offset: 2px;
  }
}

/* ── 移动端底部面板骨架（筛选排序；仅移动端创建） ── */
/* 批量工具条的 display 规则会盖过 hidden 属性，显式恢复默认隐藏行为 */
.mf-batch-tools[hidden],
.mf-batch-footer[hidden] { display: none; }

.mf-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: flex-end;
}
.mf-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.2 0.02 250 / 0.45);
}
.mf-sheet {
  position: relative;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--raised);
  border-radius: 18px 18px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px oklch(0.2 0.02 250 / 0.18);
}
.mf-sheet-handle {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 2px auto 12px;
}
.mf-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.mf-sheet-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.mf-sheet-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mf-sheet-close .ui-icon { width: 15px; height: 15px; }
.mf-sheet-close:focus-visible,
.mf-sheet-option:focus-visible,
.mf-sheet-btn:focus-visible {
  outline: 2px solid oklch(from var(--primary) l c h / 0.55);
  outline-offset: 2px;
}
.mf-sheet-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 4px 0 8px;
}
.mf-sheet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.mf-sheet-option {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.mf-sheet-option[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-surface);
  color: var(--primary);
  font-weight: 600;
}
.mf-sheet-footer {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.mf-sheet-btn {
  min-height: 44px;
  border-radius: 9px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.mf-sheet-reset {
  flex: 1 1 auto;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--ink);
}
.mf-sheet-apply {
  flex: 2 1 auto;
  border: none;
  background: var(--primary);
  color: #fff;
}
@media (prefers-reduced-motion: no-preference) {
  .mf-sheet { animation: mf-sheet-in 0.22s ease-out; }
  @keyframes mf-sheet-in {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: none; opacity: 1; }
  }
}

/* 移动端详情：内容、属性、上传者与统计、操作、预览依次排列。 */
@media (max-width: 768px) {
  .fd-top-row { margin-bottom: 16px; }
  .fd-info-area { gap: 16px; min-width: 0; }
  .fd-title-area { width: 100%; min-width: 0; }
  .fd-title { font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
  .fd-desc-area { margin-top: 8px; }
  .fd-desc-area[hidden] { display: none; }
  .fdm-desc { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
  .fdm-attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
  .fdm-attr { display: flex; align-items: baseline; gap: 8px; min-width: 0; line-height: 20px; }
  .fdm-attr-label { flex: 0 0 auto; font-size: 12px; color: var(--ink-faint); }
  .fdm-attr-value { min-width: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
  .fdm-attr-type { color: var(--primary); }
  .fdm-filename { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--ink-faint); }
  .fdm-filename > :first-child { flex-shrink: 0; }
  .fdm-filename > :last-child { min-width: 0; overflow-wrap: anywhere; }
  .fdm-add-field { display: inline-flex; max-width: 100%; }
  .fdm-attr .fi-edit-input, .fdm-add-field .fi-edit-input { width: 100%; min-width: 0; box-sizing: border-box; }
  .fd-social-area { display: flex; align-items: center; gap: 16px; min-width: 0; }
  .fd-social-area .fd-uploader-card { flex: 1; min-width: 0; }
  .fd-social-area .fdu-card { padding: 0; gap: 8px; }
  .fdu-arrow { display: none; }
  .fd-meta2 { flex: 0 0 132px; min-width: 0; }
  .fdm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
  .fdm-stat { display: flex; flex-direction: column; gap: 2px; line-height: 1.4; min-width: 0; }
  .fdm-stat b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere; }
  .fdm-stat span { font-size: 11px; color: var(--ink-faint); }
  .fd-actions { margin: 0; }
  .fd-actions-inner { gap: 8px; flex-wrap: nowrap; }
  .fd-actions-inner .fd-btn { height: 44px; min-height: 44px; box-sizing: border-box; border-radius: 8px; justify-content: center; }
  .fd-actions-inner .fd-btn-primary { flex: 1; min-width: 0; padding: 0 8px; }
  .fd-actions-inner .fdm-icon-btn { flex: 0 0 44px; width: 44px; padding: 0; border-width: 1px; }
  .fd-actions-inner .fd-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
  .fd-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .fd-btn-secondary:hover { background: var(--surface); }
  .fd-preview-area,
  html[data-bnu-theme="dark"] .fd-preview-area { border: none; border-radius: 0; background: transparent; }
  .fd-preview-header { border: none; padding: 0 0 8px; font-size: 16px; }
  .fd-preview-header .pv-badge { display: none; }
  .fd-preview-body { min-height: 0; background: var(--raised); border: 1px solid var(--border-light); border-radius: 8px; }
  .fd-preview-body .pv-viewer { height: auto; min-height: 0; }
  .fd-preview-body .pv-text { margin: 0; }
  .fd-preview-body .pv-unsupported { width: 100%; padding: 16px; box-sizing: border-box; color: var(--ink-soft); }
  .fd-preview-body .pv-unsupported-icon { margin: 0 0 8px; font-size: 20px; }
  .fd-preview-body .pv-unsupported-icon .ui-icon { width: 20px; height: 20px; }
  .fd-preview-body .pv-unsupported-text { font-size: 14px; line-height: 1.6; }
  .fd-preview-body .pv-unsupported-sub { font-size: 12px; margin-bottom: 8px; opacity: 1; color: var(--ink-faint); }
}
@media (min-width: 769px) {
  .fdu-arrow { display: none; }
}

/* 预览加载失败重试按钮（桌面/移动共用） */
.pv-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.pv-retry-btn .ui-icon { width: 14px; height: 14px; }
.pv-retry-btn:focus-visible {
  outline: 2px solid oklch(from var(--primary) l c h / 0.55);
  outline-offset: 2px;
}

/* 暗色主题：移动端面板与资料行使用语义变量，仅补个别写死色 */
html[data-bnu-theme="dark"] .mf-sheet-backdrop { background: oklch(0 0 0 / 0.55); }
html[data-bnu-theme="dark"] .mf-sheet { box-shadow: 0 -8px 32px oklch(0 0 0 / 0.4); }
