.fd-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.fd-crumb{font-size:18px;font-weight:600;min-width:0;word-break:break-all}
.fd-crumb span{color:var(--muted);margin:0 4px}
.fd-crumb a{color:var(--blue)}
.fd-crumb small{font-size:13px;color:var(--muted);font-weight:400}
.fd-btns{display:flex;gap:8px}
.fd-chips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.fd-chip{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);background:#fff;border-radius:14px;padding:4px 10px;font-size:13px;cursor:pointer;font-family:inherit;color:var(--text);max-width:100%}
.fd-chip.on{background:var(--pink);border-color:var(--pink);color:#fff}
.fd-chip small{opacity:.7}
.fd-chip .x{margin-left:2px;opacity:.6;font-size:12px}
.fd-chip .x:hover{opacity:1}
.fd-previews{display:flex;flex-wrap:wrap;gap:6px;max-height:180px;overflow-y:auto}
.fd-previews img{width:64px;height:64px;object-fit:cover;border-radius:6px}
.fd-big{width:100%;max-height:260px;object-fit:contain;background:#fafafa;border-radius:8px}
.fd-move{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid #efefef;padding-top:12px;font-size:14px}
.fd-move select{flex:1;min-width:0;padding:8px;border:1px solid var(--border);border-radius:6px;font-family:inherit}
.fd-move[hidden]{display:none}
.fd-foot{justify-content:space-between;border-top:1px solid #efefef;padding-top:12px}
.sx-card .tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.sx-card .tags i{font-style:normal;font-size:11px;background:rgba(255,255,255,.25);border-radius:8px;padding:0 6px}
/* 卡片「入档」弹出菜单 */
.fd-pop{position:fixed;z-index:600;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.15);padding:6px;min-width:180px;max-width:min(260px,calc(100vw - 16px));max-height:min(320px,calc(100vh - 16px));overflow-y:auto}
.fd-pop[hidden]{display:none}
.fd-pop-title{font-size:12px;color:var(--muted);padding:4px 8px 6px}
.fd-pop button{display:block;width:100%;text-align:left;border:none;background:none;padding:9px 10px;border-radius:6px;font-size:14px;cursor:pointer;font-family:inherit;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fd-pop button:hover{background:#f3f3f3}
.fd-pop .fd-pop-new{color:var(--blue);border-top:1px solid #efefef;border-radius:0 0 6px 6px}
.fd-pop-empty{font-size:13px;color:var(--muted);padding:6px 10px}
/* 卡片上的 [字体库▾][入档] */
.fd-arch{display:flex;gap:4px;align-items:center;min-width:0}
.fd-arch select{flex:1;min-width:0;height:26px;border:none;border-radius:13px;padding:0 6px;font-size:12px;font-family:inherit;background:rgba(255,255,255,.92);color:var(--text);cursor:pointer}
.fd-arch .act{flex-shrink:0}
.fd-btns .btn.on{background:var(--text);color:#fff;border-color:var(--text)}
/* 批量操作条 */
.fd-batch-bar{position:sticky;bottom:0;z-index:30;margin-top:14px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 -4px 16px rgba(0,0,0,.08);padding:8px 12px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.fd-batch-bar[hidden]{display:none}
.fd-batch-tools,.fd-batch-main{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}
.fd-batch-main{margin-left:auto}
.fd-batch-tools .btn{padding:6px 8px;color:var(--blue)}
.fd-batch-n b{color:var(--blue)}
.fd-batch-main select{min-width:0;max-width:180px;padding:7px 8px;border:1px solid var(--border);border-radius:6px;font-family:inherit;font-size:13px}
.fd-batch-main select[hidden]{display:none}
.fd-batch-main .btn{padding:7px 12px;font-size:13px}
.fd-batch-main .btn:disabled{opacity:.45;cursor:default}
@media (max-width:560px){.fd-batch-main{margin-left:0;width:100%}.fd-batch-main select{flex:1;max-width:none}.fd-batch-bar{padding:8px}}
/* 批量条固定在视口底部、与内容区对齐（祖先 overflow 会让 sticky 失效，改用 fixed） */
.fd-batch-bar{position:fixed;bottom:12px;left:calc(max(15%,135px) + 32px);right:32px;margin:0}
.card-grid.batching{padding-bottom:110px}
@media (max-width:600px){.fd-batch-bar{left:8px;right:8px;bottom:8px}.card-grid.batching{padding-bottom:150px}}
body.mobile-mode .fd-batch-bar{left:calc(50% - 187px);right:auto;width:374px}
body:has(.fd-batch-bar:not([hidden])) .pf-toast{bottom:150px;z-index:700}
/* 单张入档浮层：5 行 x 1 列 */
.fd-pick{position:fixed;inset:0;z-index:800;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;padding:16px}
.fd-pick[hidden]{display:none}
.fd-pick-box{background:#fff;border-radius:14px;width:100%;max-width:320px;padding:16px;box-shadow:0 12px 40px rgba(0,0,0,.25);display:flex;flex-direction:column;gap:10px}
.fd-pick-title{font-size:15px;font-weight:600;word-break:break-all}
.fd-pick-list{display:grid;grid-template-columns:1fr;gap:6px}
.fd-pick-row{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border:1px solid var(--border);border-radius:10px;cursor:pointer;font-size:14px;min-width:0}
.fd-pick-row:hover,.fd-pick-row:focus-within{border-color:#0095f6;background:#f3f9ff}
.fd-pick-row input{width:18px;height:18px;accent-color:#0095f6;flex-shrink:0}
.fd-pick-row .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fd-pick-row.new{color:var(--blue);border-style:dashed}
.fd-pick-cancel{align-self:flex-end}
/* 侧栏节点被飞入时脉冲 */
@keyframes fdPulse{0%{box-shadow:0 0 0 0 rgba(0,149,246,.55);background:#e7f3ff}100%{box-shadow:0 0 0 12px rgba(0,149,246,0);background:transparent}}
.fd-pulse{animation:fdPulse .7s ease-out}
@media (prefers-reduced-motion:reduce){.fd-pulse{animation:none;background:#e7f3ff}}
/* 浮层改为锚定在勾选框下方（暗色遮罩保留，用于点外部取消） */
.fd-pick{display:block;padding:0;background:rgba(0,0,0,.2)}
.fd-pick[hidden]{display:none}
.fd-pick-box{position:fixed;width:260px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow-y:auto;padding:12px;gap:8px;border-radius:12px}
.fd-pick-title{font-size:14px}
.fd-pick-row{min-height:40px}
.fd-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;min-width:0}
.fd-title-row .fd-crumb{margin:0;min-width:0;overflow-wrap:anywhere}
.fd-title-acts{display:flex;align-items:center;gap:24px}
.fd-title-acts .btn{padding:5px 12px;font-size:13px}
#view-folders .fd-head{margin-top:4px}
/* v25 防跳动：字体库名占固定最小宽度，行内重命名输入框锁定为同宽 */
#fontName{display:inline-block;max-width:16em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.fd-title-row .fd-inline-title{box-sizing:border-box;max-width:16em;vertical-align:bottom}
#msBatchBtn,#fontBatchBtn{min-width:6.5em}
@media (max-width:560px){#fontName{max-width:10em}}
#deleteFont[hidden]{display:none !important}
.fd-title-row .fd-inline-title{padding:2px 4px;font:inherit;font-weight:700}
#fontName[hidden]{display:none !important}
.fd-title-row .fd-inline-title{padding:0 2px}
/* v26 标题区始终预留 5 个汉字宽，进入重命名不移位 */
#fontName{min-width:calc(5em + 6px)}
/* v27 字号阶梯：面包屑弱化、当前名称 700；页内操作按钮 13/500 */
.fd-crumb{font-size:18px;font-weight:500}
.fd-crumb a,.fd-crumb>span{color:var(--muted)}
.fd-crumb a:hover{color:var(--blue)}
.fd-crumb b{font-weight:700;color:var(--text)}
.fd-crumb small{font-size:13px;font-weight:400}
.fd-btns .btn,.fd-title-acts .btn,body.mobile-mode .fd-btns .btn{font-size:13px;font-weight:500}
@media (max-width:600px){.fd-crumb{font-size:16px}.fd-btns .btn{font-size:13px;font-weight:500}}
body.mobile-mode .fd-crumb{font-size:16px}
/* v29 标签筛选行 + 标题搜索（右侧） */
.fd-filter{display:flex;align-items:flex-start;gap:8px 16px;flex-wrap:wrap;margin:6px 0}
.fd-filter .fd-chips{flex:1 1 300px;min-width:0;margin:0}
.fd-search{display:flex;align-items:center;gap:6px;flex:0 0 auto;margin-left:auto}
.fd-search input{width:180px;padding:6px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;background:#fff;color:var(--text)}
.fd-search input:focus{outline:none;border-color:var(--blue)}
.fd-search .btn{padding:6px 12px;font-size:13px;font-weight:500}
@media (max-width:600px){.fd-search{flex:1 1 100%;margin-left:0}.fd-search input{flex:1;width:auto;min-width:0}}
body.mobile-mode .fd-search{flex:1 1 100%;margin-left:0}
body.mobile-mode .fd-search input{flex:1;width:auto;min-width:0}
/* 无限滚动底部状态（固定高度，避免跳动） */
.fd-more{min-height:44px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px;padding:8px 0}
.fd-more.loading::before{content:"";width:14px;height:14px;margin-right:8px;border:2px solid var(--border);border-top-color:var(--blue);border-radius:50%;animation:fdspin .8s linear infinite}
@keyframes fdspin{to{transform:rotate(360deg)}}
.fd-test-link[hidden]{display:none}
/* 测试批量上传页 */
.tu-wrap{padding-top:8px}
.tu-on{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:10px}
.tu-on[hidden],.tu-off[hidden]{display:none}
.tu-off{margin-top:10px;padding:12px;border:1px dashed var(--border);border-radius:10px;color:var(--muted);font-size:13px}
.tu-stat{font-size:13px;color:var(--muted)}
.tu-log{flex-basis:100%;max-height:50vh;overflow:auto;font-size:12px;line-height:1.7;color:var(--text);background:#fff;border:1px solid var(--border);border-radius:8px;padding:8px 10px}
.tu-log:empty{display:none}
/* v29 计数占位，筛选/加载时标题旁按钮不移位 */
#msCount,#fontItems{display:inline-block;min-width:6.5em;white-space:nowrap}
.fd-filter .fd-chips{min-height:30px}
/* v33 「清除」始终占位在「搜索」右侧：无内容禁用（灰），有内容/有搜索时品牌色可点 */
.fd-search input::-webkit-search-cancel-button{-webkit-appearance:none;display:none}
.fd-search-clear{flex-shrink:0;white-space:nowrap;padding:6px 12px;border-radius:8px;font-family:inherit;font-size:13px;font-weight:500;border:1px solid var(--pink);background:#fff;color:var(--pink);cursor:pointer}
.fd-search-clear:hover:not(:disabled){background:var(--pink);color:#fff}
.fd-search-clear:disabled{border-color:var(--border);background:#f5f5f5;color:#b0b0b0;cursor:default}
/* v34 背景字体选择器（固定宽度，不随选项变化跳动） */
.fd-bp{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);white-space:nowrap}
.fd-bp select{width:6.5em;padding:6px 8px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;background:#fff;color:var(--text)}
.fd-bp select:disabled{color:#b0b0b0}
.fd-btns{align-items:center}

/* 标题校验：错误行始终占位，出现/消失不跳动 */
.fd-field-err{display:block;min-height:18px;line-height:18px;font-size:12px;color:#ed4956;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ad-dialog input.invalid{border-color:#ed4956}
.fd-systag-row{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}
.fd-systag{display:block;min-height:34px;line-height:20px;padding:6px 10px;border:1px dashed #9fb7d6;border-radius:8px;background:#f5f8fc;color:#3b5f8a;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* v39 手机上批量栏按钮多了「批量删除」：字体库选择单独占一行，避免被挤成只剩箭头 */
@media (max-width:560px){.fd-batch-main select{flex:1 1 calc(100% - 90px)}.fd-batch-main .btn{flex:1 1 auto}.card-grid.batching{padding-bottom:200px}body:has(.fd-batch-bar:not([hidden])) .pf-toast{bottom:200px}}

/* v40 背景字颜色：固定尺寸色块按钮 + 浮层（position:fixed，不影响布局） */
.fd-bpc{width:30px;height:30px;flex:0 0 30px;padding:0;margin-left:4px;border:1px solid var(--border);border-radius:8px;background:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}
.fd-bpc i{display:block;width:16px;height:16px;border-radius:50%;background:var(--bp-color,#dd2222)}
.fd-bpc:hover{border-color:#999}
.fd-bpc-pop{position:fixed;z-index:900;display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 16px);padding:10px;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.15)}
.fd-bpc-pop[hidden]{display:none}
.fd-bpc-pop .sw{width:26px;height:26px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #ccc;cursor:pointer;padding:0}
.fd-bpc-pop .sw.on{box-shadow:0 0 0 2px #333}
.fd-bpc-pop .custom{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:var(--muted);cursor:pointer}
.fd-bpc-pop input[type=color]{width:30px;height:26px;padding:0;border:1px solid var(--border);border-radius:6px;background:#fff;cursor:pointer}

/* v46 上传门槛：卡豆不足时按钮变灰（位置不变），点击弹出浮层提示（绝对定位，不挤压布局） */
.fd-title-acts{position:relative}
.fd-title-acts .btn.kadou-low,.tu-on .btn.kadou-low{background:#c7c7c7;border-color:#c7c7c7;color:#fff;cursor:not-allowed}
.fd-up-tip{position:absolute;top:calc(100% + 6px);right:0;z-index:30;width:max-content;max-width:calc(100vw - 24px);box-sizing:border-box;background:#fff4e5;color:#b76e00;border:1px solid #f3d19e;border-radius:8px;padding:6px 10px;font-size:13px;box-shadow:0 4px 14px rgba(0,0,0,.08)}
.fd-up-tip[hidden]{display:none}
.tu-low{color:#b76e00;margin-left:8px;font-size:13px}

/* v50 HEIC 等无法预览时的占位（与预览图同尺寸） */
.fd-previews .up-ph{width:64px;height:64px;display:flex;align-items:center;justify-content:center;text-align:center;padding:6px;box-sizing:border-box;background:#f3f3f3;color:#8e8e8e;font-size:12px;border-radius:8px}
.ad-dialog .msg{min-height:20px;line-height:20px}  /* v50 提示文字出现/消失时对话框高度不变（按钮不动） */

/* v52 手稿库头部：等级完成度 + 未完成入口；未完成背景字视图 */
.fd-tpl{display:inline-block;cursor:not-allowed}
.fd-tpl .btn[disabled]{pointer-events:none;opacity:.55}
/* v67 三行筛选：声母 / 韵母 / 标签（每行独立换行，行标签固定宽度，按钮不跳动） */
.fd-filter .fd-chips{flex-direction:column;gap:6px}
.fd-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:28px}
.fd-row-label{flex:none;width:3em;font-size:12px;color:var(--muted)}
.fd-chip.py{font-family:ui-monospace,Menlo,Consolas,monospace}
@media (max-width:600px){.fd-row{gap:5px}.fd-row-label{width:100%}}
/* v70 手稿库显示范围：已完成 / 未完成 / 全部（单选分段按钮，固定宽度不跳动） */
.fd-mode{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden;flex:none;vertical-align:middle}
.fd-mode button{border:0;background:#fff;padding:4px 10px;font-size:13px;font-family:inherit;color:var(--text);cursor:pointer;min-width:4em;line-height:20px}
.fd-mode button+button{border-left:1px solid var(--border)}
.fd-mode button.on{background:var(--pink);color:#fff}
/* v71 显示范围按钮内的数量（等宽数字 + 最小宽度，数字变化不跳动） */
.fd-mode .n{font-weight:400;font-variant-numeric:tabular-nums;display:inline-block;min-width:2.2em;text-align:left}
.fd-mode button{min-width:0}
@media (max-width:600px){.fd-mode button{padding:4px 7px}.fd-mode .n{min-width:1.8em}}
.fd-hz{font-size:22px;line-height:22px;font-family:"KaiTi","STKaiti",serif;color:var(--text)}
.fd-foot-r{display:flex;gap:8px}
/* v73 垃圾箱 */
.tr-acts{display:flex;gap:8px;flex-wrap:wrap}
.tr-acts .n{font-weight:400;font-variant-numeric:tabular-nums;display:inline-block;min-width:1.6em;text-align:left}
.tr-hint{margin:6px 0 0;font-size:13px;color:#b45309;background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:6px 10px}
.tr-confirm{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;padding:8px 10px;border:1px solid #fecaca;background:#fef2f2;border-radius:8px;font-size:13px;color:#991b1b}
.tr-confirm span{flex:1 1 220px}
.tr-confirm[hidden]{display:none}
#trAll{min-width:6.5em}

/* v80 手稿库「模版」行：按当前筛选的字下载 PDF（提示文字固定占位，按钮不跳动） */
.fd-tplrow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:4px 0 10px;padding-top:8px;border-top:1px dashed var(--border)}
.fd-tplbtns{display:inline-flex;flex-wrap:wrap;gap:6px}
.fd-tplrow .fd-chip[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
.fd-tplpages{font-size:13px;color:var(--muted)}
.fd-tplpages select{margin-left:4px;padding:3px 6px;border:1px solid var(--border);border-radius:6px;background:#fff;font-family:inherit}
.fd-tplhelp{font-size:13px;color:var(--blue,#0095f6)}
.fd-tpltip{flex-basis:100%;margin:0;min-height:20px;line-height:20px;font-size:13px;color:#666}
.fd-tpltip.warn{color:#b76e00}.fd-tpltip.err{color:#ed4956}.fd-tpltip.ok{color:#1a7f37}
@media (max-width:600px){.fd-tpltip{min-height:60px}}
.fd-tplrow .fd-chip.hl{box-shadow:0 0 0 3px rgba(193,53,132,.35);border-color:#c13584}  /* v82 从模版夹「开始选字」进入时高亮 */
.fd-tplbtns .fd-chip{display:inline-flex;align-items:center}.fd-tplbtns .fd-chip .tpl-ico{margin-right:3px}  /* v83 版式图标 */
/* v104 笔型切换「硬笔 | 软笔」（两个按钮同宽，切换不跳）；v105 页数下拉硬笔 1～7、软笔 1～32，宽度固定（两位数也不变宽） */
.fd-pen{display:inline-flex;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#fff;flex:0 0 auto}
.fd-pen-b{border:0;background:#fff;color:var(--text);font:inherit;font-size:13px;padding:4px 11px;min-width:3.6em;cursor:pointer;line-height:1.4}
.fd-pen-b+.fd-pen-b{border-left:1px solid var(--border)}
.fd-pen-b.on{background:var(--pink);color:#fff}
.fd-tplpages select{width:4.2em}

/* v85 手稿缩放（手稿管理对话框，图片下方）：提示行固定高度，状态变化不挪动按钮 */
.fd-scale{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:13px;color:var(--muted)}
.fd-scale-in{display:inline-flex !important;flex-direction:row !important;align-items:center;gap:4px;margin:0 !important;white-space:nowrap}
.fd-scale-in input{width:64px !important;padding:4px 6px !important;text-align:right;font-size:13px}
.fd-scale .btn-sm{padding:4px 10px;font-size:13px;min-width:52px}
.fd-scale-tip{flex:1 1 100%;min-height:36px;line-height:18px;font-size:12px;color:var(--muted)}
.fd-scale-tip.err{color:#ed4956}.fd-scale-tip.ok{color:#2e7d32}
.fd-scale-total{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--text,#222)}
.fd-scale-keep{display:inline-flex !important;flex-direction:row !important;align-items:center;gap:4px;margin:0 !important;flex:1 1 100%;font-size:13px;color:var(--text,#222);cursor:pointer}
.fd-scale-keep input{width:auto !important;margin:0}
.fd-scale-keep-tip{color:var(--muted);font-size:12px}
/* v85 手稿库「选字」：放在标题搜索下面，提示行固定占一行 */
.fd-sbox{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:0 0 auto;margin-left:auto}
.fd-sbox .fd-search{margin-left:0}
.fd-pick-tip{margin:0;min-height:18px;line-height:18px;font-size:12px;color:var(--muted);max-width:330px;text-align:right}
.fd-pick-tip.warn{color:#b26a00}
@media (max-width:600px){.fd-sbox{flex:1 1 100%;margin-left:0;align-items:stretch}.fd-pick-tip{max-width:none;text-align:left}}
body.mobile-mode .fd-sbox{flex:1 1 100%;margin-left:0;align-items:stretch}
body.mobile-mode .fd-pick-tip{max-width:none;text-align:left}
/* v87 背景字体 / 批量选择移到模版行右侧；字体库操作行（未完成 = 模版、已完成 = 生成字体） */
/* v96：背景字体在版式按钮左边（.fd-bpbox），批量选择紧跟「版式说明 ›」（.fd-batch）；批量选择 / 完成选择同宽，切换不跳 */
.fd-bpbox{display:inline-flex;align-items:center;gap:6px}
.fd-tplrow .fd-batch{min-width:6.5em;padding-left:10px;padding-right:10px}
.fd-act{display:none;align-items:center;flex-wrap:wrap;gap:6px 10px}
#fontActRow[data-mode="todo"] .fd-act-todo,#fontActRow[data-mode="done"] .fd-act-done{display:inline-flex}
#fontActRow[data-mode="all"] .fd-act-all{display:inline;font-size:13px;color:#888}
#fontActRow[data-mode="all"] #fontActTip{display:none}
.fd-fmt{display:inline-flex;align-items:center;gap:3px;font-size:13px;color:var(--text);cursor:pointer;white-space:nowrap}
.fd-fmt input{margin:0}
@media (max-width:600px){.fd-tplrow .fd-bpbox{flex-basis:100%}}
/* 生成字体结果浮层 */
.fg-box{max-width:min(920px,calc(100vw - 24px))}
.fg-box h3{margin:0 0 8px}
.fg-info{margin:0 0 10px;font-size:13px;color:#555}
.fg-prev{display:block;max-width:100%;height:auto;border:1px solid var(--border);border-radius:8px;background:#fff}
.fg-prev-wrap{max-height:56vh;overflow:auto;margin-bottom:12px}
.fg-files{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}
.fg-files .btn small{font-weight:400;color:inherit;opacity:.75;margin-left:4px}
.fg-note{font-size:12px;color:#888;margin:6px 0 0}
#fontActRow[data-mode="all"] .fd-row-label{display:none}
#fontActRow .fd-row-label{width:auto;min-width:3em;white-space:nowrap}
@media (max-width:600px){#fontActRow .fd-row-label{width:100%}}
/* v93 新建 / 修改字体表单（js/fontfiles.js）：正文可滚动，底部按钮固定在框底（不会因提示变长而跳动） */
.fff-box{width:min(720px,calc(100vw - 24px));max-width:min(720px,calc(100vw - 24px));height:min(700px,calc(100vh - 32px));max-height:calc(100vh - 32px);display:flex;flex-direction:column;padding-bottom:0;overflow:hidden}
.fff-box h3{margin:0 0 8px}
.fff-body{overflow:auto;flex:1 1 auto;min-height:0;margin:0 -4px;padding:0 4px}
.fff-ro{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;background:#f7f7f8;border-radius:8px;padding:8px 12px;margin:0 0 10px}
.fff-ro i{font-style:normal;color:var(--muted);margin-right:6px}
.fff-ro .fff-sib{flex-basis:100%}
.fff-row{display:grid;grid-template-columns:118px minmax(0,1fr) minmax(0,1fr);gap:4px 12px;align-items:start;margin:0 0 10px}
.fff-l{font-size:14px;font-weight:600;padding-top:7px}
.fff-l em{color:#c0392b;font-style:normal;margin-left:2px}
.fff-row input:not([type]),.fff-row input[name]{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:8px;padding:7px 10px;font-size:14px;font-family:inherit}
.fff-row input[type=checkbox]{width:auto}
.fff-row input[aria-invalid=true]{border-color:#c0392b;background:#fff8f7}
.fff-note{font-size:12px;line-height:1.5;color:#777;padding-top:4px;min-height:2.6em}
.fff-note.err{color:#c0392b;font-weight:600}
.fff-fmts{display:flex;flex-wrap:wrap;gap:4px 12px;padding-top:6px}
.fff-zip{font-size:12px;color:#777;margin:2px 0 10px}
.fff-foot{flex:none;background:#fff;border-top:1px solid var(--border);margin:0 -22px;padding:10px 22px 14px}
.fff-tip{font-size:13px;color:#666;margin:0 0 8px;min-height:2.8em;line-height:1.4}
.fff-tip.ok{color:#1a7f37}.fff-tip.err{color:#c0392b}.fff-tip.warn{color:#b76e00}
.fff-btns{display:flex;gap:8px}
.fff-btns .btn{width:96px;justify-content:center;text-align:center}
.fg-loading{display:flex;align-items:center;justify-content:center;min-height:160px;color:#999;border:1px dashed var(--border);border-radius:8px}
@media (max-width:600px){.fff-row{grid-template-columns:1fr;gap:2px}.fff-l{padding-top:0}.fff-note{min-height:0}.fff-btns .btn{flex:1 1 0;width:auto}}
body.mobile-mode .fff-row{grid-template-columns:1fr;gap:2px}body.mobile-mode .fff-l{padding-top:0}body.mobile-mode .fff-note{min-height:0}body.mobile-mode .fff-btns .btn{flex:1 1 0;width:auto}
/* v94 */
.fff-warn{margin:-4px 0 10px 130px;font-size:12px;color:#b76e00;line-height:1.5}
.fg-empty{color:#b76e00}
@media (max-width:600px){.fff-warn{margin-left:0}}
body.mobile-mode .fff-warn{margin-left:0}
/* v99 「退出批量」移到左边操作组（紧跟「取消全选」），和右边的数据操作（删除 / 转字体库 / 批量退回）分开，避免误点 */
.fd-batch-tools .fd-batch-exit{color:var(--text,#333);padding:6px 10px;margin-left:4px}


/* 入库字体库：双字体等级字与补缺、符号专页 */
.fd-grade{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:6px 0 8px;padding:8px 0;border-top:1px dashed var(--border)}
.fd-grade-tf{display:inline-flex;align-items:center;gap:6px;font-size:13px}
.fd-grade-tf select{min-width:12em;max-width:20em}
/* t1224：普通库 setupGrade 已给等级控件设 hidden，但 .fd-grade/.fd-grade-tf/.fd-mode/.btn 的 display 会盖掉 [hidden]。作用域内强制隐藏；#fontSymbolsLink 除外。 */
#fontGradeRow[hidden],.fd-grade[hidden]{display:none!important}
.fd-grade .fd-grade-tf[hidden],.fd-grade label[hidden],.fd-grade button[hidden]:not(#fontSymbolsLink),.fd-grade .fd-mode[hidden],.fd-grade p.hint[hidden],#fontGradeApply[hidden],#fontGradeClear[hidden],#fontGradeFilter[hidden],#fontGradeTip[hidden]{display:none!important}
.fd-grade-band{margin-left:8px;font-size:13px}
.fd-sym-link{margin-left:auto;font-size:13px}
.fd-sym-grid{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.fd-sym{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:4px;background:#fff;height:48px;font-size:22px;line-height:1}
.fd-sym.half{width:calc(50% - 6px);max-width:48px}
.fd-sym.full{width:calc(100% - 0px);max-width:96px}
@media (min-width:600px){.fd-sym.half{width:48px}.fd-sym.full{width:96px}}

.fd-replace{display:flex;align-items:center;gap:8px;margin:8px 0 4px;flex-wrap:wrap}
.fd-replace-hint{font-size:12px;color:#666;line-height:1.4}
.fd-sym{flex-direction:column;height:auto;min-height:48px;padding:4px 2px;gap:2px}
.fd-sym img{display:block;width:100%;height:36px;object-fit:contain;background:#fafafa;border-radius:2px}
.fd-sym b{font-size:11px;font-weight:500;line-height:1.2}
.fd-sym small{font-size:10px;color:#888;line-height:1.2}
.fd-sym.missing{opacity:.55}

/* t1141：符号专页改为字体夹内筛选，半角半格、全角整格卡片 */
.fd-grade [data-gfilter="symbols"].on,
#fontSymbolsLink.on{background:var(--pink);border-color:var(--pink);color:#fff}
#fontSymbolsLink{border:1px solid var(--border);background:#fff;border-radius:14px;padding:4px 12px;cursor:pointer;font-family:inherit;color:var(--text)}
.card-grid.compact.sym-mode{--cols:16}
@container (max-width:1000px){.card-grid.compact.sym-mode{--cols:12}}
@container (max-width:760px){.card-grid.compact.sym-mode{--cols:10}}
@container (max-width:560px){.card-grid.compact.sym-mode{--cols:6}}
.card-grid.sym-mode .sx-card.sym-full{grid-column:span 2}
.card-grid.sym-mode .sx-card.sym-half{grid-column:span 1}
.card-grid.sym-mode .sx-card.sym-missing{opacity:.55}

.fd-pdf-opts{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px 12px;font-size:13px;color:#666}
.fd-pdf-opts .pdf-opt{display:inline-flex;align-items:center;gap:4px}
.fd-pdf-opts .fg-preset{font:inherit;padding:1px 8px;border:1px solid #d8d8d8;background:#fff;border-radius:4px;cursor:pointer}
.fd-pdf-opts .fg-preset.on{border-color:#b54434;color:#b54434}
.fd-pdf-opts .pdf-fg{width:28px;height:22px;padding:0;border:1px solid #d8d8d8;background:#fff;cursor:pointer}
.qt-pdf-opts{display:flex;margin:8px 0 4px}
