/* ============================================================
   本地文件资源管理器 /tools/file-manager
   ★ 变量定义在 :root 并用 [data-theme="light"] 覆盖：
     .fm-mask / .fm-ctx / .fm-toast 是 .fm 的兄弟节点（挂在 body 下），
     变量若只挂在 .fm 上，浮层里的 var() 会解析失败导致背景透明。
   ============================================================ */
:root {
    /* 表面 / 描边（--fm-card 为回归断言锚定值，勿改） */
    --fm-card: #16181c;
    --fm-card-2: #1c2026;
    --fm-card-3: #242a31;
    --fm-line: #32383f;
    --fm-line-2: #454d56;
    --fm-fg: #eef1f3;
    --fm-sub: #b7c1ca;
    --fm-faint: #9ba7b3;
    /* 强调 / 语义色：按钮底色与装饰色分离，保证白字 >= 4.5:1 */
    --fm-accent: #1d9bf0;
    --fm-accent-2: #7cc4fb;
    --fm-accent-soft: rgba(29, 155, 240, .16);
    --fm-accent-btn: #1668c4;
    --fm-accent-btn-h: #0f57a8;
    --fm-on-accent: #ffffff;
    --fm-ok: #34d399;
    --fm-ok-soft: rgba(52, 211, 153, .12);
    --fm-warn: #fbbf24;
    --fm-warn-soft: rgba(251, 191, 36, .12);
    --fm-err: #ff5a67;
    --fm-err-soft: rgba(244, 33, 46, .14);
    --fm-zebra: rgba(127, 127, 127, .045);
    /* 阴影层级：卡片 / 浮层 / 弹窗 */
    --fm-shadow: 0 14px 40px rgba(0, 0, 0, .44);
    --fm-shadow-md: 0 6px 20px rgba(0, 0, 0, .3);
    --fm-shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);
    --fm-r: 14px;
    --fm-r-sm: 9px;
    --fm-r-lg: 18px;
    /* 字号阶梯：收敛为 7 级，正文不低于 13.5px */
    --fm-fs-xs: 11.5px;
    --fm-fs-sm: 12.5px;
    --fm-fs-md: 13.5px;
    --fm-fs-lg: 15px;
    --fm-fs-xl: 18px;
    --fm-fs-2xl: 23px;
    /* 间距阶梯：4 的倍数 */
    --fm-sp-1: 4px;
    --fm-sp-2: 8px;
    --fm-sp-3: 12px;
    --fm-sp-4: 16px;
    --fm-sp-5: 24px;
    --fm-sp-6: 32px;
    /* 组件尺度 */
    --fm-side-w: 252px;
    --fm-row-h: 44px;
    --fm-control-h: 36px;
    --fm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
    --fm-card: #ffffff;
    --fm-card-2: #f5f8fa;
    --fm-card-3: #e9eff3;
    --fm-line: #dde5ea;
    --fm-line-2: #c3cdd6;
    --fm-fg: #0f1419;
    --fm-sub: #4c5a67;
    --fm-faint: #566370;
    --fm-accent: #136ce9;
    --fm-accent-2: #0b57bd;
    --fm-accent-soft: rgba(19, 108, 233, .1);
    --fm-accent-btn: #136ce9;
    --fm-accent-btn-h: #0b57bd;
    --fm-on-accent: #ffffff;
    --fm-ok: #0a7d46;
    --fm-ok-soft: rgba(10, 125, 70, .09);
    --fm-warn: #a35a06;
    --fm-warn-soft: rgba(180, 83, 9, .09);
    --fm-err: #c0263a;
    --fm-err-soft: rgba(192, 38, 58, .09);
    --fm-zebra: rgba(15, 20, 25, .025);
    --fm-shadow: 0 16px 40px rgba(15, 20, 25, .14);
    --fm-shadow-md: 0 6px 20px rgba(15, 20, 25, .1);
    --fm-shadow-sm: 0 1px 2px rgba(15, 20, 25, .06);
}

/* ==================== 页面骨架与满屏 ==================== */
.fm {
    max-width: 100%;
    margin: 0;
    padding: 18px 20px 56px;
    box-sizing: border-box;
    color: var(--fm-fg);
    font-size: 14px;
}
body.page-file-manager-full .app { max-width: 100%; }
body.page-file-manager-full .main-content { max-width: 100%; width: 100%; border-right: 0; min-width: 0; }
body.page-file-manager-full .page-container { max-width: 100%; }
/* ★ 站点 body{overflow-y:scroll} 会让页内 sticky 全失效，把滚动权交还 html */
body.page-file-manager-full { overflow: visible; }

.fm *, .fm *::before, .fm *::after { box-sizing: border-box; }
.fm [hidden], .fm-mask[hidden], .fm-ctx[hidden], .fm-toast[hidden], .fm-insp[hidden] { display: none !important; }
.fm button, .fm input, .fm select, .fm textarea { font-family: inherit; }
.fm button { cursor: pointer; }
.fm button:disabled { opacity: .45; cursor: not-allowed; }
.fm :focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 2px; }

/* ==================== 头部 ==================== */
.fm-hero {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 20px;
    margin-bottom: 14px;
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-r);
    background: linear-gradient(135deg, var(--fm-accent-soft), transparent 62%), var(--fm-card);
    box-shadow: var(--fm-shadow-sm);
}
.fm-hero-ic {
    flex: 0 0 auto;
    width: 52px; height: 52px;
    display: grid; place-items: center;
    font-size: 27px;
    border-radius: 14px;
    background: var(--fm-accent-soft);
    border: 1px solid var(--fm-line);
}
.fm-hero-tx { flex: 1 1 auto; min-width: 0; }
.fm-hero-t { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.fm-hero-sub { margin: 0; color: var(--fm-sub); font-size: 13px; line-height: 1.75; max-width: 92ch; }
.fm-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fm-tag {
    padding: 4px 9px; font-size: 11.5px; color: var(--fm-sub);
    border: 1px solid var(--fm-line); border-radius: 999px; background: var(--fm-card-2);
}
.fm-hero-side { flex: 0 0 216px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.fm-privacy { font-size: 11.5px; color: var(--fm-ok); text-align: right; line-height: 1.5; }
.fm-write { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fm-sub); cursor: pointer; }
.fm-write input { width: 16px; height: 16px; accent-color: var(--fm-err); }
.fm-conn { font-size: 11.5px; color: var(--fm-faint); }
.fm-conn.is-on { color: var(--fm-accent-2); }
.fm-conn.is-write { color: var(--fm-warn); font-weight: 600; }
.fm-fold {
    position: absolute; right: 10px; top: 8px;
    width: 28px; height: 28px; display: grid; place-items: center;
    border: 0; border-radius: 8px; background: transparent; color: var(--fm-sub);
}
.fm-fold:hover { background: var(--fm-card-3); color: var(--fm-fg); }
.fm-fold svg { transition: transform .18s; }
.fm-hero.is-collapsed .fm-fold svg { transform: rotate(-90deg); }
.fm-hero.is-collapsed .fm-hero-sub, .fm-hero.is-collapsed .fm-hero-tags { display: none; }
.fm-hero.is-collapsed { padding-top: 14px; padding-bottom: 14px; }

/* ==================== 三栏工作台 ==================== */
.fm-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 14px; align-items: start; }
.fm-side, .fm-main, .fm-insp {
    background: var(--fm-card);
    border: 1px solid var(--fm-line);
    border-radius: var(--fm-r);
    box-shadow: var(--fm-shadow-sm);
    min-width: 0;
}
.fm-side {
    position: sticky; top: 12px;
    max-height: calc(100dvh - 34px);
    overflow-y: auto;
    padding: 4px 0 12px;
    scrollbar-width: thin;
    overscroll-behavior: contain;
}
.fm-side::-webkit-scrollbar, .fm-tree::-webkit-scrollbar, .fm-items::-webkit-scrollbar,
.fm-insp-body::-webkit-scrollbar, .fm-modal-b::-webkit-scrollbar { width: 9px; height: 9px; }
.fm-side::-webkit-scrollbar-thumb, .fm-tree::-webkit-scrollbar-thumb, .fm-items::-webkit-scrollbar-thumb,
.fm-insp-body::-webkit-scrollbar-thumb, .fm-modal-b::-webkit-scrollbar-thumb { background: var(--fm-line-2); border-radius: 9px; }
.fm-side-h {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px 6px; font-size: 11.5px; font-weight: 700;
    letter-spacing: .6px; color: var(--fm-faint); text-transform: uppercase;
}
.fm-side-act { border: 0; background: transparent; color: var(--fm-accent-2); font-size: 11.5px; padding: 2px 4px; }
.fm-side-act:hover { text-decoration: underline; }

.fm-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.fm-nav button {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 9px 10px; border: 0; border-radius: var(--fm-r-sm);
    background: transparent; color: var(--fm-sub); font-size: 13px; text-align: left;
}
.fm-nav button:hover { background: var(--fm-card-2); color: var(--fm-fg); }
.fm-nav button.is-on { background: var(--fm-accent-soft); color: var(--fm-accent-2); font-weight: 600; }
.fm-nav button b { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--fm-faint); }

.fm-kinds { padding: 0 8px; display: flex; flex-direction: column; gap: 1px; }
.fm-kind {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 6px 10px; border: 0; border-radius: 7px;
    background: transparent; color: var(--fm-sub); font-size: 12.5px; text-align: left;
}
.fm-kind:hover { background: var(--fm-card-2); }
.fm-kind.is-on { background: var(--fm-accent-soft); color: var(--fm-accent-2); font-weight: 600; }
.fm-kind em { font-style: normal; font-size: 10.5px; color: var(--fm-faint); }

.fm-tree { max-height: 280px; overflow: auto; padding: 0 6px; scrollbar-width: thin; }
.fm-tree-row {
    display: flex; align-items: center; gap: 5px; width: 100%;
    padding: 6px 8px; border: 0; border-radius: 7px;
    background: transparent; color: var(--fm-sub); font-size: 12.5px; text-align: left;
}
.fm-tree-row:hover { background: var(--fm-card-2); color: var(--fm-fg); }
.fm-tree-row.is-cur { background: var(--fm-accent-soft); color: var(--fm-accent-2); }
.fm-tree-tw { flex: 0 0 14px; text-align: center; font-size: 11px; color: var(--fm-faint); }
.fm-tree-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-tree-empty { padding: 8px 12px; font-size: 12px; color: var(--fm-faint); }

.fm-space { padding: 2px 14px 6px; }
.fm-space-total { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.fm-space-total b { font-size: 21px; color: var(--fm-fg); }
.fm-space-total span { font-size: 11.5px; color: var(--fm-faint); }
.fm-space-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) 62px; align-items: center; gap: 6px; margin: 5px 0; font-size: 11px; color: var(--fm-sub); }
.fm-space-row > i { display: block; height: 6px; background: var(--fm-card-3); border-radius: 6px; overflow: hidden; }
.fm-space-row > i > u { display: block; height: 100%; border-radius: 6px; }
.fm-space-row em { font-style: normal; text-align: right; color: var(--fm-faint); }
.fm-space-mini { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--fm-line); font-size: 11px; line-height: 1.6; color: var(--fm-faint); }

/* ==================== 主区顶栏 ==================== */
.fm-main { overflow: hidden; }
.fm-crumbs { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--fm-line); }
.fm-navbtn {
    flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center;
    border: 1px solid var(--fm-line); border-radius: 8px;
    background: var(--fm-card-2); color: var(--fm-sub); font-size: 17px; line-height: 1;
}
.fm-navbtn:hover:not(:disabled) { color: var(--fm-accent-2); border-color: var(--fm-accent); }
.fm-crumb { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.fm-crumb::-webkit-scrollbar { display: none; }
.fm-crumb button {
    flex: 0 0 auto; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--fm-sub); font-size: 12.5px;
}
.fm-crumb button:hover { background: var(--fm-card-2); }
.fm-crumb button.is-cur { color: var(--fm-fg); font-weight: 600; }
.fm-crumb-sep { color: var(--fm-faint); font-size: 12px; }
.fm-refresh { margin-left: auto; }

.fm-tools { padding: 10px 12px; border-bottom: 1px solid var(--fm-line); background: var(--fm-card-2); }
.fm-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fm-tools-row2 { margin-top: 8px; }
.fm-import { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-btn {
    min-height: 32px; padding: 6px 11px; border: 1px solid var(--fm-line-2); border-radius: 8px;
    background: var(--fm-card); color: var(--fm-fg); font-size: 12.5px; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .15s;
}
.fm-btn:hover:not(:disabled) { background: var(--fm-card-3); border-color: var(--fm-accent); }
.fm-btn-pri { background: var(--fm-accent); border-color: var(--fm-accent); color: #fff; font-weight: 600; }
.fm-btn-pri:hover:not(:disabled) { background: var(--fm-accent-2); border-color: var(--fm-accent-2); }
.fm-btn.is-danger { color: var(--fm-err); border-color: var(--fm-line-2); }
.fm-btn.is-danger:hover { background: var(--fm-err-soft); border-color: var(--fm-err); }
.fm-search { flex: 1 1 220px; min-width: 160px; display: flex; align-items: center; gap: 6px; padding: 0 9px; height: 34px; border: 1px solid var(--fm-line-2); border-radius: 9px; background: var(--fm-card); }
.fm-search:focus-within { border-color: var(--fm-accent); box-shadow: 0 0 0 3px var(--fm-accent-soft); }
.fm-search-ic { font-size: 13px; }
.fm-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fm-fg); font-size: 13px; }
.fm-search input::-webkit-search-cancel-button { display: none; }
.fm-search button { border: 0; background: transparent; color: var(--fm-faint); font-size: 13px; padding: 3px; }
.fm-viewseg { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--fm-line-2); border-radius: 9px; background: var(--fm-card); }
.fm-viewseg button { width: 32px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--fm-faint); font-size: 15px; }
.fm-viewseg button.is-on { background: var(--fm-accent-soft); color: var(--fm-accent-2); }
.fm-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--fm-sub); white-space: nowrap; cursor: pointer; }
.fm-chk input { width: 15px; height: 15px; accent-color: var(--fm-accent); }
.fm-sel { height: 32px; padding: 0 8px; border: 1px solid var(--fm-line-2); border-radius: 8px; background: var(--fm-card); color: var(--fm-fg); font-size: 12px; }
.fm-sp { flex: 1 1 auto; }

/* ==================== 批量操作条 ==================== */
.fm-ops {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
    padding: 8px 12px; border-bottom: 1px solid var(--fm-line);
    background: var(--fm-card);
}
.fm-ops-count { flex: 0 0 auto; margin-right: 4px; font-size: 12px; color: var(--fm-faint); }
.fm-ops.has-sel .fm-ops-count { color: var(--fm-accent-2); font-weight: 600; }
.fm-ops button {
    padding: 5px 8px; border: 1px solid transparent; border-radius: 7px;
    background: var(--fm-card-2); color: var(--fm-sub); font-size: 12px;
}
.fm-ops button:hover { background: var(--fm-card-3); color: var(--fm-fg); border-color: var(--fm-line-2); }
.fm-ops button.is-danger { color: var(--fm-err); }
.fm-ops button.is-danger:hover { background: var(--fm-err-soft); }
.fm-opsep { width: 1px; height: 18px; background: var(--fm-line); margin: 0 3px; }

.fm-drop-tip { padding: 8px 12px; font-size: 11.5px; color: var(--fm-faint); border-bottom: 1px solid var(--fm-line); }
.fm-dropzone {
    position: fixed; inset: 0; z-index: 100002;
    display: grid; place-items: center;
    background: rgba(15, 20, 25, .68); backdrop-filter: blur(3px);
    color: #fff; font-size: 20px; font-weight: 600;
    pointer-events: none;
}
.fm-dropzone span { padding: 22px 34px; border: 2px dashed rgba(255, 255, 255, .7); border-radius: 18px; background: var(--fm-accent-soft); }

/* ==================== 列表 / 网格 ==================== */
.fm-head, .fm-row {
    display: grid;
    grid-template-columns: 34px minmax(170px, 2fr) 96px 92px 142px minmax(110px, 1fr) 96px;
    align-items: center;
    gap: 0;
}
.fm-head {
    padding: 0 12px; height: 36px;
    border-bottom: 1px solid var(--fm-line);
    background: var(--fm-card-2);
    position: sticky; top: 0; z-index: 3;
    font-size: 11.5px; color: var(--fm-faint);
}
.fm-head [data-sort] { border: 0; background: transparent; color: inherit; text-align: left; font-size: inherit; padding: 5px 4px; border-radius: 5px; }
.fm-head [data-sort]:hover { color: var(--fm-fg); }
.fm-head [data-sort].is-sort { color: var(--fm-accent-2); font-weight: 700; }
.fm-head [data-sort].is-sort::after { content: ' ↕'; }
.fm-c-check { display: grid; place-items: center; }
.fm-c-check input { width: 15px; height: 15px; accent-color: var(--fm-accent); }
.fm-items { max-height: min(64vh, 720px); min-height: 260px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.fm-row {
    padding: 0 12px; min-height: 42px;
    border-bottom: 1px solid var(--fm-line);
    font-size: 12.5px; color: var(--fm-sub);
    cursor: default; user-select: none;
}
.fm-row:nth-child(even) { background: var(--fm-zebra); }
.fm-row:hover { background: var(--fm-card-2); }
.fm-row.is-sel { background: var(--fm-accent-soft); box-shadow: inset 3px 0 0 var(--fm-accent); }
.fm-row.is-drop { background: var(--fm-ok-soft); outline: 1px dashed var(--fm-ok); }
.fm-row.is-trash { opacity: .82; }
.fm-c-name { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 4px; color: var(--fm-fg); }
.fm-ico { flex: 0 0 auto; font-size: 16px; font-style: normal; }
.fm-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-star { flex: 0 0 auto; color: var(--fm-warn); font-size: 12px; }
.fm-c-size, .fm-c-type, .fm-c-time, .fm-c-path { padding: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-c-size { text-align: right; font-variant-numeric: tabular-nums; }
.fm-c-path { font-family: var(--fm-mono); font-size: 11px; color: var(--fm-faint); }
.fm-c-act { display: flex; justify-content: flex-end; gap: 2px; }
.fm-c-act button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--fm-faint); font-size: 13px; }
.fm-c-act button:hover { background: var(--fm-card-3); color: var(--fm-fg); }

.fm-items.is-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 10px; padding: 12px; align-content: start;
}
.fm-items.is-grid .fm-row {
    position: relative;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 3px; min-height: 118px; padding: 10px;
    border: 1px solid var(--fm-line); border-radius: 11px;
    background: var(--fm-card-2);
}
.fm-items.is-grid .fm-row:nth-child(even) { background: var(--fm-card-2); }
.fm-items.is-grid .fm-row:hover { background: var(--fm-card-3); }
.fm-items.is-grid .fm-row.is-sel { background: var(--fm-accent-soft); border-color: var(--fm-accent); }
.fm-items.is-grid .fm-c-check { position: absolute; top: 5px; right: 5px; }
.fm-items.is-grid .fm-c-name { flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 4px 0 6px; }
.fm-items.is-grid .fm-ico { font-size: 30px; }
.fm-items.is-grid .fm-nm { max-width: 100%; font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.fm-items.is-grid .fm-c-size, .fm-items.is-grid .fm-c-type, .fm-items.is-grid .fm-c-time, .fm-items.is-grid .fm-c-path { display: none; }
.fm-items.is-grid .fm-c-act { justify-content: center; margin-top: auto; }
.fm-items.is-grid .fm-more { grid-column: 1 / -1; }
.fm-more { padding: 12px; text-align: center; font-size: 12px; color: var(--fm-warn); }

.fm-empty { padding: 56px 20px; text-align: center; }
.fm-empty-ic { font-size: 42px; margin-bottom: 10px; }
.fm-empty-t { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.fm-empty-d { font-size: 12.5px; color: var(--fm-faint); line-height: 1.7; max-width: 46ch; margin: 0 auto; }
.fm-progress { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--fm-line); font-size: 12px; color: var(--fm-sub); }
.fm-progress-bar { flex: 1 1 auto; height: 7px; background: var(--fm-card-3); border-radius: 7px; overflow: hidden; }
.fm-progress-bar i { display: block; width: 0; height: 100%; background: var(--fm-accent); transition: width .16s; }
.fm-progress button { border: 1px solid var(--fm-line-2); border-radius: 6px; background: var(--fm-card-2); color: var(--fm-sub); font-size: 11.5px; padding: 4px 8px; }

/* ==================== 属性 / 预览面板 ==================== */
.fm-insp {
    position: fixed; z-index: 62; top: 84px; right: 22px; bottom: 56px;
    width: 330px; display: flex; flex-direction: column;
    box-shadow: var(--fm-shadow);
}
body.fm-insp-open .fm-main { margin-right: 344px; }
.fm-insp-h {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px; border-bottom: 1px solid var(--fm-line);
    font-size: 13px; font-weight: 700;
}
.fm-insp-h button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: var(--fm-card-2); color: var(--fm-sub); }
.fm-insp-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px; scrollbar-width: thin; }
.fm-pv-hero { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--fm-line); }
.fm-pv-ic { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; font-size: 25px; border-radius: 10px; background: var(--fm-card-2); }
.fm-pv-hero > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fm-pv-hero b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-pv-hero em { font-style: normal; font-size: 11.5px; color: var(--fm-faint); }
.fm-pv-dl { margin: 12px 0; display: flex; flex-direction: column; gap: 1px; }
.fm-pv-dl > div { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--fm-line); font-size: 12px; }
.fm-pv-dl span { color: var(--fm-faint); }
.fm-pv-dl b { font-weight: 500; color: var(--fm-fg); overflow-wrap: anywhere; }
.fm-pv-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fm-pv-box { border: 1px solid var(--fm-line); border-radius: 10px; background: var(--fm-card-2); padding: 10px; overflow: auto; }
.fm-pv-tip { font-size: 12px; color: var(--fm-faint); line-height: 1.7; text-align: center; padding: 16px 6px; }
.fm-pv-media { display: block; max-width: 100%; max-height: 340px; margin: 0 auto; border-radius: 8px; }
iframe.fm-pv-media { width: 100%; height: 360px; border: 0; background: #fff; }
.fm-pv-text { margin: 0; font-family: var(--fm-mono); font-size: 11.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fm-fg); max-height: 340px; overflow: auto; }

/* ==================== 状态栏 / 使用说明 ==================== */
.fm-status {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 12px; padding: 9px 14px;
    border: 1px solid var(--fm-line); border-radius: 10px;
    background: var(--fm-card); color: var(--fm-faint); font-size: 11.5px;
}
.fm-status-sp { flex: 1 1 auto; }
.fm-help { margin-top: 14px; border: 1px solid var(--fm-line); border-radius: var(--fm-r); background: var(--fm-card); overflow: hidden; }
.fm-help-t {
    display: flex; align-items: center; gap: 8px; padding: 13px 16px;
    cursor: pointer; font-size: 13.5px; font-weight: 700; list-style: none;
}
.fm-help-t::-webkit-details-marker, .fm-help-t::marker { display: none; content: ''; }
.fm-help-caret { margin-left: auto; transition: transform .18s; color: var(--fm-faint); }
.fm-help[open] .fm-help-caret { transform: rotate(180deg); }
.fm-help[open] .fm-help-t { border-bottom: 1px solid var(--fm-line); }
.fm-help-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; padding: 14px 16px 18px; }
.fm-help-card { padding: 12px 14px; border: 1px solid var(--fm-line); border-radius: 10px; background: var(--fm-card-2); }
.fm-help-card h3 { margin: 0 0 7px; font-size: 13px; color: var(--fm-fg); }
.fm-help-card p { margin: 0; font-size: 12px; line-height: 1.8; color: var(--fm-sub); }
.fm-help-card code { padding: 1px 5px; border-radius: 4px; background: var(--fm-card-3); font-family: var(--fm-mono); font-size: 11px; color: var(--fm-accent-2); }
.fm-help-warn { border-color: var(--fm-warn); background: var(--fm-warn-soft); }
.fm-help-warn h3 { color: var(--fm-warn); }
.fm-help-warn p b { color: var(--fm-fg); }

/* ==================== 弹窗 / 右键菜单 / toast ==================== */
.fm-mask {
    position: fixed; inset: 0; z-index: 100001;
    display: flex; align-items: center; justify-content: center;
    padding: 18px; background: rgba(10, 14, 18, .62); backdrop-filter: blur(2px);
}
.fm-modal {
    width: min(520px, 100%); max-height: min(88dvh, 860px);
    display: flex; flex-direction: column;
    border: 1px solid var(--fm-line-2); border-radius: var(--fm-r);
    background: var(--fm-card); box-shadow: var(--fm-shadow);
    color: var(--fm-fg);
}
.fm-modal.is-wide { width: min(820px, 100%); }
.fm-modal-h { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--fm-line); }
.fm-modal-h h3 { margin: 0; font-size: 15px; }
.fm-modal-x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--fm-card-2); color: var(--fm-sub); }
.fm-modal-b { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px; font-size: 13px; line-height: 1.7; scrollbar-width: thin; }
.fm-modal-f { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--fm-line); flex-wrap: wrap; }
.fm-fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 12.5px; color: var(--fm-sub); }
.fm-fld input, .fm-fld select, .fm-form input, .fm-form select {
    width: 100%; height: 36px; padding: 0 10px;
    border: 1px solid var(--fm-line-2); border-radius: 8px;
    background: var(--fm-card-2); color: var(--fm-fg); font-size: 13px;
}
.fm-note { margin: 8px 0; font-size: 12px; line-height: 1.7; color: var(--fm-faint); }
.fm-note.is-warn { color: var(--fm-warn); }
.fm-form { display: flex; flex-direction: column; gap: 8px; }
.fm-form-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 10px; }
.fm-form-row > label { font-size: 12.5px; color: var(--fm-sub); }
.fm-form-chks { grid-template-columns: 82px minmax(0, 1fr); }
.fm-form-chks > .fm-chk, .fm-form-chks label { font-size: 12px; }
.fm-form-row.fm-form-chks { display: flex; flex-wrap: wrap; gap: 14px; }
.fm-rename-preview { margin-top: 14px; border: 1px solid var(--fm-line); border-radius: 10px; overflow: hidden; }
.fm-rp-h { padding: 8px 10px; background: var(--fm-card-2); font-size: 12px; font-weight: 600; color: var(--fm-accent-2); }
.fm-rp-list { max-height: 260px; overflow: auto; scrollbar-width: thin; }
.fm-rp-row { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--fm-line); font-size: 11.5px; }
.fm-rp-row span, .fm-rp-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-rp-row span { color: var(--fm-faint); }
.fm-rp-row b { color: var(--fm-ok); font-weight: 500; }
.fm-rp-row em { font-style: normal; color: var(--fm-faint); text-align: center; }
.fm-rp-row i { font-style: normal; font-size: 10.5px; color: var(--fm-warn); }
.fm-rp-row.is-skip { opacity: .6; }
.fm-rp-row.is-skip b { color: var(--fm-faint); }
.fm-trash-list, .fm-dup-list, .fm-set { display: flex; flex-direction: column; gap: 8px; }
.fm-trash-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--fm-line); border-radius: 9px; background: var(--fm-card-2); font-size: 12.5px; }
.fm-trash-row > span { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-trash-row > em { font-style: normal; font-size: 11px; color: var(--fm-faint); }
.fm-dup-g { border: 1px solid var(--fm-line); border-radius: 10px; overflow: hidden; }
.fm-dup-h { padding: 7px 10px; background: var(--fm-warn-soft); color: var(--fm-warn); font-size: 12px; font-weight: 600; }
.fm-dup-r { display: flex; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--fm-line); font-size: 11.5px; }
.fm-dup-r span { flex: 0 0 52px; color: var(--fm-faint); }
.fm-dup-r b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-family: var(--fm-mono); }
.fm-set h4 { margin: 10px 0 2px; font-size: 12.5px; color: var(--fm-accent-2); }
.fm-set-hrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 9px; border: 1px solid var(--fm-line); border-radius: 9px; font-size: 12.5px; }
.fm-set-hrow > span { flex: 1 1 160px; min-width: 0; }

.fm-ctx {
    position: fixed; z-index: 100003; width: 190px; padding: 5px;
    border: 1px solid var(--fm-line-2); border-radius: 10px;
    background: var(--fm-card); box-shadow: var(--fm-shadow);
}
.fm-ctx button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--fm-fg); font-size: 12.5px; text-align: left; }
.fm-ctx button:hover { background: var(--fm-accent-soft); color: var(--fm-accent-2); }
.fm-ctx button.is-danger { color: var(--fm-err); }
.fm-ctx button.is-danger:hover { background: var(--fm-err-soft); }
.fm-ctx-sep { height: 1px; margin: 4px 0; background: var(--fm-line); }
.fm-toast {
    position: fixed; z-index: 100004; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%); max-width: min(90vw, 620px);
    padding: 10px 18px; border: 1px solid var(--fm-line-2); border-radius: 999px;
    background: var(--fm-card-3); color: var(--fm-fg); font-size: 13px;
    box-shadow: var(--fm-shadow); text-align: center;
}
.fm-toast.is-ok { border-color: var(--fm-ok); color: var(--fm-ok); }
.fm-toast.is-warn { border-color: var(--fm-warn); color: var(--fm-warn); }
.fm-toast.is-err { border-color: var(--fm-err); color: var(--fm-err); }

/* ============================================================
   设计系统优化层：统一字号 / 间距 / 控件尺度与视觉层级。
   置于响应式段之前，窄屏规则可以自然覆盖这里的桌面值。
   ============================================================ */
.fm { padding: 20px 24px 56px; font-size: var(--fm-fs-md); line-height: 1.5; }
.fm :focus-visible { outline: 3px solid var(--fm-accent); outline-offset: 2px; border-radius: 5px; }

/* 头部：缩短阅读跨度、拉开标题与说明的层级 */
.fm-hero {
    gap: 18px; padding: 20px 22px; margin-bottom: 16px;
    border-radius: var(--fm-r-lg); box-shadow: var(--fm-shadow-md);
    background: linear-gradient(115deg, var(--fm-accent-soft), transparent 58%), var(--fm-card);
}
.fm-hero-ic { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
.fm-hero-t { font-size: var(--fm-fs-2xl); line-height: 1.28; letter-spacing: -.01em; margin-bottom: 8px; }
.fm-hero-sub {
    font-size: var(--fm-fs-md); line-height: 1.7; max-width: 76ch;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fm-hero-tags { margin-top: 12px; gap: 7px; }
.fm-tag { font-size: var(--fm-fs-xs); padding: 5px 10px; }
.fm-hero-side { flex-basis: 220px; gap: 10px; }
.fm-privacy { font-size: var(--fm-fs-xs); font-weight: 600; line-height: 1.55; }
.fm-write, .fm-conn { font-size: var(--fm-fs-xs); }
.fm-fold { width: 34px; height: 34px; right: 12px; top: 10px; }

/* 工作台：略收侧栏、加大留白与圆角层级 */
.fm-shell { grid-template-columns: var(--fm-side-w) minmax(0, 1fr); gap: 16px; }
.fm-side, .fm-main, .fm-insp { border-radius: var(--fm-r-lg); }
.fm-side { top: 16px; padding: 6px 0 14px; max-height: calc(100dvh - 40px); }
.fm-side-h { padding: 14px 16px 6px; font-size: var(--fm-fs-xs); letter-spacing: .04em; }
.fm-nav { padding: 0 10px; gap: 3px; }
.fm-nav button { padding: 10px 12px; font-size: var(--fm-fs-md); border-radius: 10px; }
.fm-kinds { padding: 0 10px; gap: 2px; }
.fm-kind { padding: 8px 11px; font-size: var(--fm-fs-sm); border-radius: 8px; }
.fm-tree { padding: 0 10px; max-height: 300px; }
.fm-tree-row { padding: 8px 10px; font-size: var(--fm-fs-sm); border-radius: 8px; }
.fm-space { padding: 2px 16px 8px; }
.fm-space-total b { font-size: var(--fm-fs-2xl); line-height: 1.2; }
.fm-space-total span, .fm-space-row, .fm-space-mini { font-size: var(--fm-fs-xs); }

/* 工具条 / 筛选：统一控件高度与可读字号 */
.fm-crumbs { padding: 12px 14px; gap: 6px; }
.fm-navbtn { width: 34px; height: 34px; border-radius: 9px; }
.fm-crumb button { font-size: var(--fm-fs-md); padding: 6px 9px; }
.fm-tools { padding: 12px 14px; }
.fm-tools-row { gap: 10px; }
.fm-tools-row2 { margin-top: 10px; gap: 8px; }
.fm-btn {
    min-height: var(--fm-control-h); padding: 8px 14px;
    font-size: var(--fm-fs-md); border-radius: 9px;
}
.fm-btn-pri {
    background: var(--fm-accent-btn); border-color: var(--fm-accent-btn);
    color: var(--fm-on-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}
.fm-btn-pri:hover:not(:disabled) { background: var(--fm-accent-btn-h); border-color: var(--fm-accent-btn-h); }
.fm-search { height: var(--fm-control-h); padding: 0 11px; border-radius: 10px; }
.fm-search input { font-size: var(--fm-fs-md); }
.fm-sel { height: var(--fm-control-h); font-size: var(--fm-fs-sm); padding: 0 10px; border-radius: 9px; }
.fm-chk { font-size: var(--fm-fs-sm); gap: 7px; }
.fm-chk input, .fm-c-check input { width: 17px; height: 17px; }
.fm-viewseg button { width: 34px; height: 30px; border-radius: 7px; }
.fm-ops { padding: 10px 14px; gap: 6px; }
.fm-ops button { min-height: 32px; padding: 7px 11px; font-size: var(--fm-fs-sm); border-radius: 8px; }
.fm-ops-count { font-size: var(--fm-fs-sm); }
.fm-drop-tip { padding: 10px 14px; font-size: var(--fm-fs-xs); }

/* 列表：加大行高与正文字号，去掉干扰选中态的斑马纹 */
.fm-head, .fm-row { padding: 0 14px; }
.fm-head { height: 40px; font-size: var(--fm-fs-sm); font-weight: 600; letter-spacing: .03em; }
.fm-row { min-height: var(--fm-row-h); font-size: var(--fm-fs-md); }
.fm-row:nth-child(even) { background: transparent; }
.fm-row.is-sel { box-shadow: inset 3px 0 0 var(--fm-accent), inset 0 0 0 1px var(--fm-accent-soft); }
.fm-c-name { gap: 10px; font-size: var(--fm-fs-md); }
.fm-ico { font-size: 18px; }
.fm-c-size, .fm-c-type, .fm-c-time, .fm-c-path { font-size: var(--fm-fs-sm); font-variant-numeric: tabular-nums; }
.fm-c-path { font-size: var(--fm-fs-xs); }
.fm-c-act button { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
.fm-items.is-grid { gap: 12px; padding: 14px; }
.fm-items.is-grid .fm-row { min-height: 150px; padding: 14px 12px; border-radius: 12px; }
.fm-items.is-grid .fm-ico { font-size: 34px; }
.fm-items.is-grid .fm-nm { font-size: var(--fm-fs-sm); }
.fm-items.is-grid .fm-c-act button { width: 32px; height: 32px; }
.fm-empty { padding: 64px 20px; }
.fm-empty-t { font-size: var(--fm-fs-xl); }
.fm-empty-d { font-size: var(--fm-fs-md); max-width: 42ch; }

/* 属性面板 / 状态栏 / 说明 */
.fm-insp { top: 92px; right: 24px; bottom: 60px; width: 344px; box-shadow: var(--fm-shadow); }
body.fm-insp-open .fm-main { margin-right: 360px; }
.fm-insp-h { padding: 14px 16px; font-size: var(--fm-fs-lg); }
.fm-insp-h button { width: 34px; height: 34px; border-radius: 9px; }
.fm-insp-body { padding: 16px; }
.fm-pv-dl > div { font-size: var(--fm-fs-sm); }
.fm-status { padding: 11px 16px; font-size: var(--fm-fs-sm); border-radius: 12px; }
.fm-help-t { padding: 15px 18px; font-size: var(--fm-fs-lg); }
.fm-help-b { gap: 14px; padding: 16px 18px 20px; }
.fm-help-card { padding: 14px 16px; border-radius: 12px; }
.fm-help-card h3 { font-size: var(--fm-fs-md); }
.fm-help-card p { font-size: var(--fm-fs-sm); line-height: 1.75; }

/* 弹窗 / 菜单 / 提示 */
.fm-modal { border-radius: var(--fm-r-lg); box-shadow: var(--fm-shadow); }
.fm-modal-h { padding: 15px 18px; }
.fm-modal-h h3 { font-size: var(--fm-fs-lg); }
.fm-modal-b { padding: 18px; font-size: var(--fm-fs-md); }
.fm-modal-f { padding: 14px 18px; }
.fm-fld input, .fm-fld select, .fm-form input, .fm-form select { height: 40px; font-size: var(--fm-fs-md); }
.fm-note { font-size: var(--fm-fs-sm); }
.fm-ctx { border-radius: 12px; padding: 6px; }
.fm-ctx button { padding: 10px 12px; font-size: var(--fm-fs-sm); border-radius: 8px; }
.fm-toast { font-size: var(--fm-fs-md); padding: 12px 20px; box-shadow: var(--fm-shadow); }

/* ==================== 响应式 ==================== */
@media (min-width: 1600px) {
    .fm { padding: 24px 32px 64px; }
    .fm-shell { grid-template-columns: 280px minmax(0, 1fr); gap: 18px; }
    .fm-items { max-height: min(68vh, 880px); }
    .fm-items.is-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 1280px) {
    .fm { padding: 18px 20px 56px; }
    .fm-shell { grid-template-columns: 224px minmax(0, 1fr); gap: 14px; }
    .fm-hero-side { flex-basis: 192px; }
    .fm-head, .fm-row { grid-template-columns: 34px minmax(150px, 2fr) 92px 88px 132px 92px; }
    .fm-c-path, .fm-head > .fm-c-path { display: none; }
}
@media (max-width: 1200px) {
    .fm-hero-sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 1080px) {
    body.fm-insp-open .fm-main { margin-right: 0; }
    .fm-insp { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: min(62dvh, 560px); border-radius: 18px 18px 0 0; }
    .fm-head, .fm-row { grid-template-columns: 34px minmax(150px, 2fr) 88px 122px 92px; }
    .fm-c-type, .fm-head > .fm-c-type { display: none; }
}
/* 平板：侧栏压成「分组标题 | 内容」两列紧凑网格，导航 / 类型 / 目录树 / 统计全部保留 */
@media (min-width: 701px) and (max-width: 1080px) {
    .fm-hero-tags { display: none; }
    .fm-hero-sub { -webkit-line-clamp: 2; }
    .fm-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .fm-side {
        position: static; max-height: none; overflow: visible;
        display: flex; flex-direction: column; align-items: stretch;
        gap: 2px; padding: 8px 14px 10px; min-width: 0;
    }
    .fm-side-h { padding: 8px 0 2px; font-size: var(--fm-fs-xs); letter-spacing: 0; text-transform: none; }
    .fm-side-act { font-size: var(--fm-fs-xs); }
    .fm-nav, .fm-kinds, .fm-tree, .fm-space {
        display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center;
        gap: 6px; min-width: 0; padding: 0;
        overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    }
    .fm-nav::-webkit-scrollbar, .fm-kinds::-webkit-scrollbar,
    .fm-tree::-webkit-scrollbar, .fm-space::-webkit-scrollbar { display: none; }
    .fm-nav button, .fm-kind, .fm-tree-row {
        flex: 0 0 auto; width: auto; min-height: 36px; white-space: nowrap;
        padding: 7px 11px; border-radius: 8px;
    }
    .fm-tree-row { padding-left: 12px !important; padding-right: 12px !important; }
    .fm-nav button b { margin-left: 4px; }
    .fm-tree-tw { display: none; }
    .fm-tree-empty { white-space: nowrap; }
    .fm-tree { max-height: none; }
    .fm-space-total { flex: 0 0 auto; flex-direction: row; align-items: baseline; gap: 8px; margin: 0; }
    .fm-space-total b { font-size: var(--fm-fs-lg); }
    .fm-space-row { flex: 0 0 auto; margin: 0; grid-template-columns: 46px 58px 50px; }
    .fm-space-mini { display: none; }
    /* 导入 / 搜索 / 视图切换压到同一行，避免工具栏在平板上堆三层 */
    .fm-tools-row:first-child { flex-wrap: nowrap; gap: 8px; }
    .fm-import { display: flex; flex-wrap: nowrap; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    .fm-import::-webkit-scrollbar { display: none; }
    .fm-import .fm-btn { flex: 0 0 auto; }
    .fm-search { flex: 1 1 0; min-width: 140px; }
    .fm-viewseg { flex: 0 0 auto; }
    .fm-tools-row2 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .fm-tools-row2::-webkit-scrollbar { display: none; }
    .fm-tools-row2 > * { flex: 0 0 auto; }
    .fm-ops { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .fm-ops::-webkit-scrollbar { display: none; }
    .fm-ops > * { flex: 0 0 auto; }
    .fm-items { max-height: min(62vh, 700px); }
}
@media (max-width: 899px) {
    .fm { padding: 14px 14px 48px; }
    .fm-hero { flex-wrap: wrap; }
    .fm-hero-side { flex: 1 1 100%; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .fm-privacy { text-align: left; }
    .fm-shell { grid-template-columns: minmax(0, 1fr); }
    .fm-side { position: static; max-height: none; }
    .fm-head, .fm-row { grid-template-columns: 34px minmax(140px, 2fr) 88px 122px 92px; }
    .fm-items { max-height: 60vh; }
}
/* 手机：把纵向堆叠的侧栏 / 工具条 / 操作条改为单行横向滚动 chip 区，
   让文件列表进入首屏；所有功能仍可横向滑动访问 */
@media (max-width: 767px) {
    .fm { padding: 12px 10px calc(32px + env(safe-area-inset-bottom, 0px)); font-size: var(--fm-fs-md); }
    .fm-hero { padding: 14px 16px 16px; gap: 12px; border-radius: 14px; margin-bottom: 10px; }
    .fm-hero-ic { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; }
    .fm-hero-t { font-size: var(--fm-fs-xl); }
    .fm-hero-sub { font-size: var(--fm-fs-sm); line-height: 1.6; -webkit-line-clamp: 2; -webkit-box-orient: vertical; display: -webkit-box; overflow: hidden; }
    .fm-hero-tags { display: none; }
    .fm-hero-side { gap: 8px 12px; margin-top: 2px; }
    .fm-privacy, .fm-conn, .fm-write { font-size: var(--fm-fs-xs); }
    .fm-fold { width: 40px; height: 40px; top: 6px; right: 6px; }

    .fm-shell { gap: 10px; }
    .fm-side {
        position: static; max-height: none; overflow: visible;
        display: flex; flex-direction: column; gap: 3px;
        padding: 8px 10px 10px; border-radius: 14px;
    }
    .fm-side-h { display: none; }
    .fm-nav, .fm-kinds, .fm-tree, .fm-space {
        display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center;
        gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 0;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .fm-nav::-webkit-scrollbar, .fm-kinds::-webkit-scrollbar,
    .fm-tree::-webkit-scrollbar, .fm-space::-webkit-scrollbar { display: none; }
    .fm-nav::before, .fm-kinds::before, .fm-tree::before, .fm-space::before {
        content: '位置'; flex: 0 0 auto; position: sticky; left: 0; z-index: 1;
        padding: 5px 7px; border-radius: 6px; background: var(--fm-card-3);
        color: var(--fm-faint); font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
    }
    .fm-kinds::before { content: '类型'; }
    .fm-tree::before { content: '目录'; }
    .fm-space::before { content: '占用'; }
    .fm-nav button, .fm-kind, .fm-tree-row {
        flex: 0 0 auto; width: auto; white-space: nowrap; min-height: 38px;
        padding: 8px 11px; border: 1px solid var(--fm-line); border-radius: 999px;
        background: var(--fm-card-2); font-size: var(--fm-fs-sm);
    }
    .fm-tree-row { padding-left: 12px !important; padding-right: 12px !important; }
    .fm-nav button.is-on, .fm-kind.is-on, .fm-tree-row.is-cur { border-color: var(--fm-accent); }
    .fm-tree-tw { display: none; }
    .fm-tree-empty { white-space: nowrap; padding: 8px 10px; }
    .fm-space-total { flex: 0 0 auto; flex-direction: row; align-items: baseline; gap: 8px; margin: 0; }
    .fm-space-total b { font-size: var(--fm-fs-lg); }
    .fm-space-total span, .fm-space-mini { font-size: var(--fm-fs-xs); white-space: nowrap; }
    .fm-space-row { flex: 0 0 auto; margin: 0; grid-template-columns: 46px 58px 50px; font-size: 10.5px; }
    .fm-space-mini { margin: 0; padding: 0; border: 0; }

    .fm-crumbs { padding: 9px 10px; }
    .fm-navbtn { width: 40px; height: 40px; font-size: 18px; }
    .fm-tools { padding: 10px; }
    .fm-tools-row:first-child { flex-wrap: wrap; gap: 8px; }
    .fm-tools-row2 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; }
    .fm-tools-row2::-webkit-scrollbar { display: none; }
    .fm-tools-row2 > * { flex: 0 0 auto; }
    .fm-import { display: flex; flex-wrap: nowrap; gap: 6px; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
    .fm-import::-webkit-scrollbar { display: none; }
    .fm-import .fm-btn { flex: 0 0 auto; }
    .fm-search { flex: 1 1 0; min-width: 0; height: 44px; }
    .fm-search input { font-size: 16px; }
    .fm-viewseg { flex: 0 0 auto; }
    .fm-viewseg button { width: 42px; height: 38px; }
    .fm-sel { height: 40px; font-size: 16px; }
    .fm-chk { min-height: 40px; }
    .fm-btn { min-height: 44px; padding: 10px 14px; font-size: var(--fm-fs-md); white-space: nowrap; }
    .fm-ops { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 10px; gap: 6px; }
    .fm-ops::-webkit-scrollbar { display: none; }
    .fm-ops > * { flex: 0 0 auto; }
    .fm-ops-count { width: auto; }
    .fm-ops button { min-height: 40px; padding: 8px 12px; font-size: var(--fm-fs-sm); }
    .fm-opsep { display: none; }
    .fm-drop-tip { display: none; }

    .fm-head, .fm-row { grid-template-columns: 34px minmax(0, 1fr) 78px 86px; padding: 0 10px; }
    .fm-head { height: 38px; font-size: var(--fm-fs-xs); }
    .fm-c-time, .fm-head > .fm-c-time, .fm-c-act, .fm-head > .fm-c-act { display: none; }
    .fm-row { min-height: 52px; }
    .fm-c-name { gap: 9px; }
    .fm-nm { font-size: var(--fm-fs-md); }
    .fm-ico { font-size: 19px; }
    .fm-c-check input, .fm-chk input { width: 20px; height: 20px; }
    .fm-items { max-height: 58vh; min-height: 220px; }
    .fm-items.is-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; padding: 10px; }
    .fm-items.is-grid .fm-row { min-height: 124px; padding: 12px 10px; }
    .fm-items.is-grid .fm-ico { font-size: 28px; }
    .fm-items.is-grid .fm-c-act button { width: 36px; height: 36px; }

    .fm-status { font-size: var(--fm-fs-xs); padding: 9px 12px; }
    .fm-status #fmStatusSupport { display: none; }
    .fm-modal-b { padding: 14px; }
    .fm-modal-f { padding: 12px 14px; gap: 8px; }
    .fm-modal-f .fm-btn { flex: 1 1 auto; }
    .fm-mask { padding: 0; align-items: flex-end; }
    .fm-modal { width: 100%; max-width: none; max-height: 92dvh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .fm-modal.is-wide { width: 100%; }
    .fm-form-row { grid-template-columns: 72px minmax(0, 1fr); gap: 6px; }
    .fm-fld input, .fm-fld select, .fm-form input, .fm-form select { height: 44px; font-size: 16px; }
    .fm-toast { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 12px; font-size: var(--fm-fs-sm); }
    .fm-insp { height: min(76dvh, 640px); border-radius: 18px 18px 0 0; }
    .fm-insp-h { padding: 13px 16px; }
    .fm-insp-h button { width: 40px; height: 40px; }
    .fm-pv-acts .fm-btn { flex: 1 1 auto; }
}
@media (max-width: 420px) {
    .fm-hero-tags { display: none; }
    .fm-head, .fm-row { grid-template-columns: 32px minmax(0, 1fr) 68px; }
    .fm-c-size, .fm-head > .fm-c-size { display: none; }
    .fm-tools-row2 .fm-sel { flex: 0 0 auto; }
    .fm-help-b { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: none) {
    .fm-btn:hover, .fm-row:hover, .fm-nav button:hover { transform: none; }
    .fm-ops button, .fm-nav button, .fm-kind, .fm-tree-row { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .fm *, .fm *::before, .fm *::after { transition: none !important; animation: none !important; }
}
@media (prefers-contrast: more) {
    .fm-side, .fm-main, .fm-modal, .fm-ctx, .fm-insp { border-width: 2px; }
    .fm-row { border-bottom-color: var(--fm-line-2); }
    .fm-btn, .fm-sel, .fm-search { border-color: var(--fm-line-2); }
}
@media print {
    .fm-side, .fm-tools, .fm-ops, .fm-insp, .fm-status, .fm-help, .fm-fold, .fm-mask, .fm-ctx, .fm-toast { display: none !important; }
    .fm-shell { display: block; }
    .fm-main { border: 0; }
}
