/*!
 * 万能格式转换工作台 /tools/filee —— 样式
 * 设计令牌定义在 :root（浮层是 .fe 的兄弟节点，变量必须全局可继承）
 */
:root {
  --fe-bg: var(--bg-secondary, #16181c);
  --fe-card: var(--bg-elevated, #15202b);
  --fe-card-2: rgba(127, 127, 127, .075);
  --fe-line: var(--border-color, #2f3336);
  --fe-line-2: color-mix(in srgb, var(--text-primary, #e7e9ea) 15%, transparent);
  --fe-fg: var(--text-primary, #e7e9ea);
  --fe-sub: #9aa4ae;
  --fe-faint: #8b96a1;              /* 对卡片底 ≈5.2:1，旧值 4.4:1 不达 AA */
  --fe-accent: var(--accent, #1d9bf0);
  /* 主按钮填充色单独调暗：#1d9bf0 配白字仅 3.0:1，不达 AA */
  --fe-accent-fill: color-mix(in srgb, var(--accent, #1d9bf0) 65%, #062033);
  --fe-ok: #4ac45b;
  --fe-warn: #e0aa35;
  --fe-err: #ff6b62;
  --fe-ok-soft: rgba(63, 185, 80, .13);
  --fe-warn-soft: rgba(210, 153, 34, .14);
  --fe-err-soft: rgba(248, 81, 73, .13);
  --fe-accent-soft: rgba(29, 155, 240, .13);
  --fe-zebra: rgba(127, 127, 127, .055);
  --fe-r: 14px;
  --fe-r-sm: 9px;
  --fe-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  --fe-shadow-sm: 0 2px 10px rgba(0, 0, 0, .10);
  --fe-shadow-lg: 0 18px 56px rgba(0, 0, 0, .38);
}
[data-theme="light"] {
  --fe-card: #ffffff;
  --fe-card-2: rgba(15, 20, 25, .04);
  --fe-line-2: rgba(15, 20, 25, .16);
  --fe-sub: #5b6672;
  --fe-faint: #64707d;
  --fe-accent-fill: color-mix(in srgb, var(--accent, #1d9bf0) 68%, #062033);
  --fe-ok: #1a7f37;
  --fe-warn: #9a6700;
  --fe-err: #cf222e;
  --fe-zebra: rgba(15, 20, 25, .038);
  --fe-shadow: 0 6px 20px rgba(15, 20, 25, .09);
  --fe-shadow-lg: 0 18px 48px rgba(15, 20, 25, .20);
}
/* 站点 body 默认 overflow-y:scroll 会让页内 sticky 全部失效，本页交还滚动权给 html */
body.page-filee-full { overflow: visible; }
body.fe-modal-open { overflow: hidden; }
body.page-filee-full .app,
body.page-filee-full .main-content,
body.page-filee-full .page-container { max-width: 100%; width: 100%; }
body.page-filee-full .main-content { border-right: 0; min-width: 0; }

.fe { box-sizing: border-box; width: 100%; padding: 22px 26px 72px; color: var(--fe-fg); font-size: 14px; }
.fe *, .fe *::before, .fe *::after { box-sizing: border-box; }
.fe [hidden] { display: none !important; }
.fe button, .fe input, .fe select { font-family: inherit; }
.fe :focus-visible { outline: 2px solid var(--fe-accent); outline-offset: 2px; }
.fe a { color: var(--fe-accent); }

/* ================= 头部 ================= */
.fe-hero { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px;
  border: 1px solid var(--fe-line); border-radius: var(--fe-r); margin-bottom: 16px;
  background: var(--fe-card); box-shadow: var(--fe-shadow); }
.fe-hero::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, color-mix(in srgb, var(--fe-accent) 9%, transparent), transparent 62%); }
.fe-hero-ic { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; font-size: 27px;
  border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--fe-accent) 26%, var(--fe-card)), var(--fe-card));
  border: 1px solid var(--fe-line-2); position: relative; }
.fe-hero-tx { flex: 1 1 auto; min-width: 0; position: relative; }
.fe-hero-t { margin: 0 0 7px; font-size: 23px; line-height: 1.3; letter-spacing: .2px; }
.fe-hero-sub { margin: 0; color: var(--fe-sub); line-height: 1.75; max-width: 96ch; font-size: 13px; }
.fe-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.fe-tag { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--fe-line-2);
  background: var(--fe-card-2); color: var(--fe-sub); white-space: nowrap; }
.fe-hero-acts { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.fe-src { font-size: 12px; text-decoration: none; white-space: nowrap; }
.fe-src:hover { text-decoration: underline; }
.fe-icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--fe-line-2); background: var(--fe-card-2); color: var(--fe-fg); cursor: pointer; font-size: 16px; }
.fe-icon-btn:hover { border-color: var(--fe-accent); background: var(--fe-accent-soft); }

/* ================= 统计条 ================= */
.fe-stat { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px;
  border: 1px solid var(--fe-line); border-radius: var(--fe-r); overflow: hidden; background: var(--fe-card); }
.fe-stat-i { padding: 11px 14px; border-left: 1px solid var(--fe-line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fe-stat-i:first-child { border-left: 0; }
.fe-stat-i b { font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.fe-stat-i em { font-style: normal; font-size: 11.5px; color: var(--fe-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-stat-i:nth-child(1) b { color: var(--fe-accent); }
.fe-stat-i:nth-child(5) b { color: var(--fe-warn); }
.fe-stat-i:nth-child(6) b { color: var(--fe-ok); }

/* ================= 页签 ================= */
.fe-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--fe-line); }
.fe-tab { padding: 10px 18px; border: 0; border-bottom: 2px solid transparent; background: transparent;
  color: var(--fe-sub); font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.fe-tab:hover { color: var(--fe-fg); }
.fe-tab.is-on { color: var(--fe-accent); border-bottom-color: var(--fe-accent); font-weight: 600; }

/* ================= 卡片 / 网格 ================= */
.fe-work { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 16px; align-items: start; }
.fe-col-a, .fe-col-b { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fe-card { border: 1px solid var(--fe-line); border-radius: var(--fe-r); background: var(--fe-card); padding: 14px 16px; min-width: 0; contain: layout style; }
.fe-list, .fe-targets, .fe-hist, .fe-modal-b, .fe-help-table-wrap, .fe-tabs {
  scrollbar-width: thin; scrollbar-color: var(--fe-line-2) transparent;
}
.fe-card-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; margin-bottom: 11px; }
.fe-card-h > span:first-child { flex: 0 1 auto; }
.fe-count { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--fe-accent-soft); color: var(--fe-accent); font-weight: 600; }
.fe-hint { margin-left: auto; font-size: 11.5px; color: var(--fe-faint); font-weight: 400; text-align: right; }
.fe-link { margin-left: auto; background: none; border: 0; color: var(--fe-accent); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.fe-card-h .fe-link + .fe-link { margin-left: 0; }
.fe-link:hover { text-decoration: underline; }
.fe-link-danger { color: var(--fe-err); }

/* ================= 投放区 ================= */
.fe-drop { text-align: center; padding: 26px 18px; border: 2px dashed var(--fe-line-2); border-radius: var(--fe-r);
  cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.fe-drop:hover, .fe-drop.is-over { border-color: var(--fe-accent); background: var(--fe-accent-soft); }
.fe-drop.is-over { transform: scale(1.005); }
.fe-drop-ic { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.fe-drop-t { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.fe-drop-s { color: var(--fe-sub); font-size: 12px; line-height: 1.7; max-width: 52ch; margin: 0 auto 13px; }
.fe-drop-btns { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* ================= 按钮 ================= */
.fe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 6px 13px;
  border: 1px solid var(--fe-line-2); border-radius: var(--fe-r-sm); background: var(--fe-card-2);
  color: var(--fe-fg); font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: border-color .16s, background .16s; }
.fe-btn:hover { border-color: var(--fe-accent); background: var(--fe-accent-soft); }
.fe-btn:disabled { opacity: .5; cursor: not-allowed; }
/* 纯色兜底 + color-mix 主题适配：老浏览器不支持 color-mix 时也不会透明 */
.fe-btn-pri { background: #1470ae; background: var(--fe-accent-fill);
  border-color: #1470ae; border-color: var(--fe-accent-fill); color: #fff; font-weight: 600; }
.fe-btn-pri:hover { background: #0f5c90; background: color-mix(in srgb, var(--fe-accent-fill) 86%, #000);
  border-color: #0f5c90; border-color: color-mix(in srgb, var(--fe-accent-fill) 86%, #000); }
.fe-btn-lg { min-height: 42px; padding: 9px 18px; font-size: 13.5px; }
.fe-btn-xs { min-height: 28px; padding: 3px 9px; font-size: 11.5px; }

/* ================= 文件队列 ================= */
.fe-list { display: flex; flex-direction: column; gap: 7px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.fe-list::-webkit-scrollbar { width: 9px; }
.fe-list::-webkit-scrollbar-thumb { background: var(--fe-line-2); border-radius: 9px; }
.fe-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 10px; border: 1px solid var(--fe-line); border-radius: var(--fe-r-sm);
  background: var(--fe-card-2); contain: layout style; }
.fe-item.is-unknown { border-color: color-mix(in srgb, var(--fe-err) 55%, var(--fe-line)); }
.fe-item.is-running { border-color: var(--fe-warn); background: var(--fe-warn-soft); }
.fe-item.is-done { border-color: color-mix(in srgb, var(--fe-ok) 50%, var(--fe-line)); }
.fe-item.is-error { border-color: var(--fe-err); background: var(--fe-err-soft); }
.fe-item-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  background: var(--fe-card); border: 1px solid var(--fe-line); font-size: 17px; }
.fe-item-main { min-width: 0; }
.fe-item-name { font-size: 12.8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-item-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 3px; font-size: 11px; color: var(--fe-sub); }
.fe-badge { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: var(--fe-card); border: 1px solid var(--fe-line); text-transform: uppercase; }
.fe-badge-to { color: var(--fe-accent); border-color: color-mix(in srgb, var(--fe-accent) 45%, var(--fe-line)); }
.fe-badge-ok { color: var(--fe-ok); border-color: color-mix(in srgb, var(--fe-ok) 45%, var(--fe-line)); }
.fe-badge-err { color: var(--fe-err); border-color: color-mix(in srgb, var(--fe-err) 45%, var(--fe-line)); }
.fe-item-err { color: var(--fe-err); font-size: 11px; margin-top: 3px; word-break: break-word; }
.fe-item-acts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fe-empty { text-align: center; color: var(--fe-faint); font-size: 12.5px; padding: 22px 8px; }
.fe-hist { display: flex; flex-direction: column; gap: 5px; max-height: 180px; overflow-y: auto; }
.fe-hist-row { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--fe-sub);
  padding: 5px 8px; border-radius: 7px; background: var(--fe-card-2); cursor: pointer; }
.fe-hist-row:hover { background: var(--fe-accent-soft); color: var(--fe-fg); }
.fe-hist-row b { color: var(--fe-fg); font-weight: 600; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-hist-row time { margin-left: auto; font-size: 10.5px; white-space: nowrap; }

/* ================= 目标格式 ================= */
.fe-search { width: 100%; height: 36px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--fe-line-2);
  background: var(--fe-card-2); color: var(--fe-fg); font-size: 13px; margin-bottom: 10px; }
.fe-search::-webkit-search-cancel-button { display: none; }
.fe-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.fe-cat { border: 1px solid var(--fe-line-2); background: var(--fe-card-2); color: var(--fe-sub);
  border-radius: 999px; padding: 4px 10px; font-size: 11.5px; cursor: pointer; }
.fe-cat.is-on { border-color: var(--fe-accent); color: var(--fe-accent); background: var(--fe-accent-soft); }
.fe-targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 7px;
  max-height: 268px; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.fe-fmt { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; min-height: 52px;
  padding: 7px 9px; border: 1px solid var(--fe-line); border-radius: var(--fe-r-sm);
  background: var(--fe-card-2); color: var(--fe-fg); cursor: pointer; text-align: left; }
.fe-fmt:hover { border-color: var(--fe-accent); }
.fe-fmt.is-on { border-color: var(--fe-accent); background: var(--fe-accent-soft); box-shadow: inset 3px 0 0 var(--fe-accent); }
.fe-fmt:disabled { opacity: .38; cursor: not-allowed; }
.fe-fmt b { font-size: 12.5px; font-weight: 600; }
.fe-fmt span { font-size: 10.5px; color: var(--fe-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fe-target-info { margin-top: 10px; font-size: 11.5px; color: var(--fe-sub); line-height: 1.6; min-height: 18px; }

/* ================= 路径链 ================= */
.fe-path-chain { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 30px; }
.fe-path-node { font-size: 11.5px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--fe-line-2);
  background: var(--fe-card-2); white-space: nowrap; }
.fe-path-node.is-fmt { border-color: var(--fe-accent); color: var(--fe-accent); font-weight: 600; }
.fe-path-arrow { color: var(--fe-faint); font-size: 12px; }
.fe-path-eng { font-size: 10px; color: var(--fe-faint); padding: 0 2px; }
.fe-path-note { margin-top: 9px; font-size: 11.5px; color: var(--fe-sub); line-height: 1.65; }

/* ================= 设置 ================= */
.fe-opts { display: flex; flex-direction: column; gap: 7px; }
.fe-opt-group { border: 1px solid var(--fe-line); border-radius: var(--fe-r-sm); background: var(--fe-card-2); padding: 0 11px; }
.fe-opt-group > summary { cursor: pointer; padding: 8px 0; font-size: 12.5px; font-weight: 600; list-style: none; }
.fe-opt-group > summary::-webkit-details-marker { display: none; }
.fe-opt-group > summary::before { content: '▸'; display: inline-block; margin-right: 6px; transition: transform .16s; }
.fe-opt-group[open] > summary::before { transform: rotate(90deg); }
.fe-opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 2px 0 11px; }
.fe-opt { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--fe-sub); min-width: 0; }
.fe-opt > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-opt input[type="number"], .fe-opt input[type="text"], .fe-opt select {
  width: 100%; height: 32px; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--fe-line-2);
  background: var(--fe-card); color: var(--fe-fg); font-size: 12.5px; }
.fe-opt input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--fe-accent); }
.fe-opt input[type="color"] { width: 100%; height: 32px; padding: 2px; border: 1px solid var(--fe-line-2); border-radius: 7px; background: var(--fe-card); }
.fe-opt input[type="range"] { width: 100%; accent-color: var(--fe-accent); }
.fe-opt-ctl { display: flex; align-items: center; gap: 7px; }
.fe-opt-ctl output { font-size: 11px; color: var(--fe-fg); min-width: 34px; text-align: right; }
/* 桌面右栏较长时，转换/打包按钮始终吸在视口底部可达（body 已交还滚动权） */
.fe-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  position: sticky; bottom: 0; z-index: 6; padding: 10px 12px;
  border: 1px solid var(--fe-line); border-radius: var(--fe-r-sm);
  background: var(--fe-card); box-shadow: var(--fe-shadow-sm); }
.fe-progress { flex: 1 1 100%; height: 6px; border-radius: 6px; background: var(--fe-card-2); overflow: hidden; }
.fe-progress > div { height: 100%; width: 0; background: var(--fe-accent); transition: width .2s; }
.fe-note { flex: 1 1 100%; font-size: 11.5px; color: var(--fe-sub); min-height: 16px; line-height: 1.6; }

/* ================= 图谱页 ================= */
.fe-graph-card { max-width: 100%; }
.fe-graph-sub { color: var(--fe-sub); font-size: 12.5px; line-height: 1.8; max-width: 100ch; margin: 0 0 14px; }
.fe-graph-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.fe-graph-form .fe-opt { min-width: 150px; }
.fe-graph-form .fe-opt select { height: 36px; }
.fe-graph-arrow { font-size: 20px; color: var(--fe-accent); padding-bottom: 4px; }
.fe-graph-path { padding: 10px; border: 1px dashed var(--fe-line-2); border-radius: var(--fe-r-sm); margin-bottom: 14px; }
.fe-graph-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 10px; }
.fe-graph-cell { border: 1px solid var(--fe-line); border-radius: var(--fe-r-sm); padding: 10px 12px; background: var(--fe-card-2); }
.fe-graph-cell h3 { margin: 0 0 8px; font-size: 12.5px; }
.fe-graph-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fe-graph-chip { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--fe-line-2);
  background: var(--fe-card); cursor: pointer; color: var(--fe-sub); }
.fe-graph-chip:hover, .fe-graph-chip.is-on { border-color: var(--fe-accent); color: var(--fe-accent); }

/* ================= 帮助页 ================= */
.fe-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.fe-help-grid h2 { font-size: 15px; margin: 0 0 10px; }
.fe-help-ol, .fe-help-ul { margin: 0; padding-left: 20px; color: var(--fe-sub); font-size: 12.5px; line-height: 1.85; }
.fe-help-ol li, .fe-help-ul li { margin-bottom: 5px; }
.fe-help-table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--fe-line); border-radius: var(--fe-r-sm); }
.fe-help-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.fe-help-table th, .fe-help-table td { padding: 6px 9px; border-bottom: 1px solid var(--fe-line); text-align: left; vertical-align: top; }
.fe-help-table thead th { position: sticky; top: 0; z-index: 2; background: var(--fe-card); font-weight: 600; }
.fe-help-table tbody tr:nth-child(even) td { background: var(--fe-zebra); }
.fe-help-p { font-size: 12.5px; color: var(--fe-sub); line-height: 1.85; margin: 0 0 10px; }
.fe-help-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; }

/* ================= 圆环 ================= */
.fe-donut { position: fixed; z-index: 100050; width: 306px; height: 306px; border-radius: 50%;
  border: 1px solid var(--fe-line-2); background: color-mix(in srgb, var(--fe-card) 88%, transparent);
  box-shadow: var(--fe-shadow-lg); backdrop-filter: blur(12px); pointer-events: auto; }
.fe-donut-hole { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 116px; height: 116px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; text-align: center; padding: 8px;
  border: 1px solid var(--fe-line-2); background: var(--fe-card); z-index: 2; }
.fe-donut-hole b { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-donut-hole span { font-size: 10px; color: var(--fe-sub); line-height: 1.4; }
.fe-donut-ring { position: absolute; inset: 0; }
.fe-donut-slice { position: absolute; left: 50%; top: 50%; width: 84px; height: 40px; margin: -20px 0 0 -42px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 1px solid var(--fe-line-2); border-radius: 9px; background: var(--fe-card);
  color: var(--fe-fg); font-size: 11.5px; font-weight: 600; cursor: pointer;
  transform: rotate(var(--fe-a, 0deg)) translateY(-112px) rotate(var(--fe-na, 0deg));
  transition: border-color .14s, background .14s, box-shadow .14s; }
.fe-donut-slice span { font-size: 9px; color: var(--fe-faint); font-weight: 400; }
.fe-donut-slice:hover, .fe-donut-slice.is-hot { border-color: var(--fe-accent); background: var(--fe-accent-soft);
  box-shadow: 0 0 0 3px var(--fe-accent-soft); }
.fe-donut-foot { position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 10.5px; color: var(--fe-sub); background: var(--fe-card);
  border: 1px solid var(--fe-line-2); border-radius: 999px; padding: 4px 11px; box-shadow: var(--fe-shadow); }

/* ================= 弹层 / toast ================= */
.fe-mask { position: fixed; inset: 0; z-index: 100100; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0, 0, 0, .62); }
.fe-modal { width: min(860px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column;
  border-radius: var(--fe-r); border: 1px solid var(--fe-line-2); background: var(--fe-card);
  box-shadow: var(--fe-shadow-lg); isolation: isolate; }
.fe-modal-sm { width: min(440px, 100%); }
.fe-modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--fe-line); font-size: 14px; }
.fe-modal-b { padding: 16px; overflow: auto; flex: 1 1 auto; min-height: 0; font-size: 13px; }
.fe-modal-f { padding: 11px 16px; border-top: 1px solid var(--fe-line); display: flex; justify-content: flex-end; gap: 8px; }
.fe-modal-b pre { white-space: pre-wrap; word-break: break-word; font: 12px/1.7 ui-monospace, Consolas, monospace;
  margin: 0; padding: 12px; background: var(--fe-card-2); border-radius: 8px; max-height: 58vh; overflow: auto; }
.fe-modal-b img { max-width: 100%; height: auto; display: block; margin: 0 auto; background: #fff; }
.fe-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--fe-line); font-size: 12.5px; }
.fe-set-row select, .fe-set-row input[type="number"] { height: 32px; min-width: 90px; padding: 4px 8px;
  border: 1px solid var(--fe-line-2); border-radius: 7px; background: var(--fe-card-2); color: var(--fe-fg); }
.fe-set-row input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--fe-accent); }
.fe-set-note { color: var(--fe-sub); font-size: 11.5px; line-height: 1.7; margin: 12px 0 0; }
.fe-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 100200; max-width: min(90vw, 560px); padding: 9px 16px; border-radius: 999px;
  background: var(--fe-card); border: 1px solid var(--fe-line-2); box-shadow: var(--fe-shadow-lg);
  font-size: 12.5px; text-align: center; }
.fe-toast.is-err { border-color: var(--fe-err); color: var(--fe-err); }
.fe-toast.is-ok { border-color: var(--fe-ok); color: var(--fe-ok); }

/* ================= 响应式 ================= */
@media (min-width: 1600px) {
  .fe { padding: 26px 34px 80px; }
  .fe-work { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 18px; }
  .fe-targets { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
  .fe-hero-t { font-size: 25px; }
}
@media (min-width: 1920px) {
  .fe { padding: 30px 44px 88px; }
  .fe-work { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 20px; }
  .fe-targets { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .fe-help-grid { gap: 18px; }
}
@media (max-width: 1180px) {
  /* 单栏：按「投放 → 目标 → 路径 → 执行 → 队列 → 设置 → 历史」的真实操作顺序重排。
     旧版 order:-1 把整个右列（含长设置区）放到投放区之前，流程是倒的。 */
  .fe-work { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fe-col-a, .fe-col-b { display: contents; }
  .fe-drop { order: 1; }
  .fe-target-card { order: 2; }
  .fe-path-card { order: 3; }
  .fe-actions { order: 4; position: static; }
  .fe-queue-card { order: 5; }
  .fe-opts-card { order: 6; }
  .fe-hist-card { order: 7; }
  .fe-list { max-height: 340px; }
  .fe-targets { max-height: 224px; }
  /* 平板用两列设置区，减少纵向滚动 */
  .fe-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fe-opt-group { min-width: 0; }
  .fe-help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .fe { padding: 16px 14px 64px; }
  .fe-stat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fe-stat-i:nth-child(4) { border-left: 0; }
  .fe-stat-i:nth-child(n+4) { border-top: 1px solid var(--fe-line); }
  .fe-help-grid { grid-template-columns: minmax(0, 1fr); }
  .fe-opts { grid-template-columns: minmax(0, 1fr); }
  .fe-hero { padding: 15px 16px; }
  .fe-hero-ic { width: 42px; height: 42px; font-size: 22px; }
  .fe-hero-t { font-size: 19px; }
  .fe-targets { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
@media (max-width: 767px) {
  .fe { padding: 12px 11px 60px; }
  .fe-hero { flex-wrap: wrap; gap: 10px; }
  .fe-hero-acts { flex-direction: row; width: 100%; justify-content: flex-end; }
  .fe-hero-sub { font-size: 12.5px; }
  .fe-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fe-stat-i { padding: 9px 11px; }
  .fe-stat-i:nth-child(odd) { border-left: 0; }
  .fe-stat-i:nth-child(n+3) { border-top: 1px solid var(--fe-line); }
  .fe-stat-i b { font-size: 17px; }
  .fe-tabs { overflow-x: auto; scrollbar-width: none; margin-inline: -11px; padding-inline: 11px; }
  .fe-tabs::-webkit-scrollbar { display: none; }
  .fe-tab { padding: 10px 13px; font-size: 12.5px; flex: 0 0 auto; min-height: 44px; }
  .fe-card { padding: 12px; }
  .fe-opt-grid { grid-template-columns: minmax(0, 1fr); }
  /* 手机端 16px 输入防 iOS 聚焦缩放；所有可点区域 ≥40px */
  .fe-search, .fe-opt input[type="number"], .fe-opt input[type="text"], .fe-opt select,
  .fe-set-row select, .fe-set-row input[type="number"] { font-size: 16px; height: 40px; }
  .fe-btn { min-height: 40px; font-size: 13px; }
  .fe-btn-xs { min-height: 36px; }
  .fe-cat { min-height: 40px; padding: 8px 13px; font-size: 12.5px; }
  .fe-link { min-height: 40px; padding: 8px 6px; font-size: 12.5px; }
  .fe-icon-btn { width: 40px; height: 40px; }
  .fe-opt input[type="checkbox"] { width: 22px; height: 22px; }
  .fe-item-acts .fe-btn { min-height: 36px; padding: 5px 10px; }
  .fe-item { grid-template-columns: 30px minmax(0, 1fr); }
  .fe-item-ic { width: 30px; height: 30px; font-size: 15px; }
  .fe-item-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .fe-targets { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); max-height: 210px; }
  .fe-fmt { min-height: 56px; }
  .fe-mask { padding: 0; align-items: flex-end; }
  .fe-modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); }
  .fe-donut { width: 264px; height: 264px; }
  .fe-donut-slice { width: 72px; height: 36px; margin: -18px 0 0 -36px; font-size: 10.5px;
    transform: rotate(var(--fe-a, 0deg)) translateY(-96px) rotate(var(--fe-na, 0deg)); }
  .fe-donut-hole { width: 100px; height: 100px; }
  .fe-donut-foot { font-size: 10px; white-space: normal; max-width: 88vw; text-align: center; }
  .fe-graph-matrix { grid-template-columns: minmax(0, 1fr); }
  .fe-help-table thead th { position: static; }
  .fe-graph-form .fe-opt { min-width: 0; flex: 1 1 100%; }
  .fe-graph-form .fe-btn { width: 100%; }
}
@media (max-width: 420px) {
  .fe-hero-t { font-size: 17px; }
  /* 不再隐藏功能徽章：为省空间 display:none 掉文字标签是反模式，只收紧字号与间距 */
  .fe-hero-tags { gap: 4px; }
  .fe-tag { font-size: 10.5px; padding: 3px 7px; }
  .fe-actions .fe-btn { flex: 1 1 100%; }
  .fe-actions .fe-btn-lg { flex: 1 1 100%; }
  .fe-cats { gap: 4px; }
  .fe-cat { padding: 6px 9px; font-size: 11.5px; }
  .fe-stat-i { padding: 8px 9px; }
  .fe-stat-i b { font-size: 16px; }
  .fe-stat-i em { font-size: 11px; }
}
@media (hover: none) {
  .fe-drop:hover { transform: none; }
  .fe-fmt:hover { box-shadow: none; }
  .fe-btn:hover { border-color: var(--fe-line-2); background: var(--fe-card-2); }
  .fe-btn-pri:hover { background: var(--fe-accent-fill); border-color: var(--fe-accent-fill); }
  .fe-cat:hover, .fe-link:hover { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .fe *, .fe *::before, .fe *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
@media print {
  .fe-tabs, .fe-actions, .fe-drop, .fe-hero-acts, .fe-donut, .fe-mask, .fe-toast { display: none !important; }
  .fe { padding: 0; }
  .fe-card, .fe-item { contain: none; box-shadow: none; }
  .fe-actions { position: static; }
  .fe-list, .fe-targets, .fe-hist { max-height: none; overflow: visible; }
}
