/* ============================================================
   工具箱 · 共享设计系统 (site.css)
   零依赖 · 支持亮/暗主题 · 响应式 · 护眼浅色（暖米白底 + 暖灰字 + 低饱和点缀）
   ============================================================ */

:root {
  /* 品牌色（柔和钢蓝 → 雾紫，低饱和，护眼不刺眼） */
  --brand: #5f80b8;
  --brand-2: #8a72b0;
  --brand-grad: linear-gradient(135deg, #5f80b8 0%, #8a72b0 100%);

  /* 护眼浅色主题（暖米白底 + 暖灰字，避免纯白纯黑刺眼） */
  --bg: #f4f3ee;
  --bg-soft: #ecebe4;
  --surface: #faf9f5;
  --surface-2: #f1f0ea;
  --surface-glass: rgba(255, 255, 255, 0.6);
  --border: rgba(60, 55, 45, 0.10);
  --border-strong: rgba(60, 55, 45, 0.18);
  --text: #34322c;
  --text-soft: #5f5c54;
  --text-mute: #948f84;
  --shadow-sm: 0 1px 3px rgba(50, 45, 35, 0.05), 0 1px 2px rgba(50, 45, 35, 0.03);
  --shadow-md: 0 14px 36px rgba(50, 45, 35, 0.08);
  --shadow-lg: 0 30px 70px rgba(50, 45, 35, 0.12);
  --ring: rgba(95, 128, 184, 0.28);
  --glow: 0 10px 30px rgba(95, 128, 184, 0.16);

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 24px;
  --maxw: 1200px;

  /* 衍生 token：供颜色转换等工具专属样式复用，避免写死值 */
  --panel-2: var(--surface-2);
  --muted: var(--text-mute);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
}

[data-theme="dark"] {
  /* 深空玻璃 · 极光微光 */
  --bg: #08090e;
  --bg-soft: #0e1018;
  --surface: #14161f;
  --surface-2: #191c27;
  --surface-glass: color-mix(in srgb, var(--surface) 70%, transparent);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #eef1f8;
  --text-soft: #aab2c5;
  --text-mute: #6f7891;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.65);
  --ring: rgba(124, 140, 255, 0.45);
  --glow: 0 0 0 1px rgba(124, 140, 255, 0.22), 0 12px 36px rgba(99, 102, 241, 0.30);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

/* 极光氛围光：暗色更明显，亮色极淡，固定铺底营造纵深 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(124, 108, 255, 0.16), transparent 60%),
    radial-gradient(900px 480px at 2% 108%, rgba(56, 189, 248, 0.10), transparent 55%);
  transition: opacity .3s ease;
}
[data-theme="light"] body::before {
  background: radial-gradient(1100px 600px at 85% -15%, rgba(150, 168, 205, 0.10), transparent 60%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航（毛玻璃） ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: saturate(1.5) blur(18px);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 20px;
  height: 64px; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-grad); display: grid; place-items: center;
  color: #fff; font-size: 18px; box-shadow: var(--shadow-sm);
}
.brand .logo span { transform: translateY(-1px); }
.nav .spacer { flex: 1; }

.nav-search {
  position: relative; flex: 1; max-width: 360px;
}
.nav-search input {
  width: 100%; height: 40px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 0 16px 0 40px; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.nav-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring), 0 4px 18px rgba(109, 139, 255, 0.18); }
.nav-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-mute); font-size: 16px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-soft); cursor: pointer;
  display: grid; place-items: center; font-size: 16px; line-height: 1; transition: .2s;
}
.icon-btn:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); box-shadow: var(--glow); }

/* 语言切换器 */
.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface-2); flex: none;
}
.lang-btn {
  border: 0; background: transparent; color: var(--text-soft); font-size: 13px; font-weight: 800;
  padding: 7px 9px; cursor: pointer; transition: .15s; line-height: 1; font-family: inherit;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 18px rgba(109, 139, 255, 0.30); }

/* ---------------- Hero ---------------- */
.hero { padding: 64px 0 34px; text-align: center; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(28px, 5vw, 44px); font-weight: 850; letter-spacing: -.5px;
}
.hero h1 .grad {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 auto; max-width: 620px; color: var(--text-soft); font-size: 17px; }
.hero .stats { margin-top: 22px; display: inline-flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.hero .stats b { font-size: 22px; color: var(--text); }
.hero .stats span { color: var(--text-mute); font-size: 13px; display: block; }

/* ---------------- 分类过滤条 ---------------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 8px 0 32px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .18s; user-select: none;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(109, 139, 255, 0.30); }

/* ---------------- 工具卡片网格 ---------------- */
.section-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 16px; font-size: 20px; font-weight: 800; }
.section-title .bar { width: 4px; height: 20px; border-radius: 4px; background: var(--brand-grad); box-shadow: 0 0 12px rgba(124, 108, 255, 0.5); }
.section-title .count { font-size: 13px; font-weight: 600; color: var(--text-mute); background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  padding-bottom: 60px;
}
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface-glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; cursor: pointer; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 42%);
  opacity: 0; transition: opacity .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--glow); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card .top { display: flex; align-items: flex-start; justify-content: space-between; }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 24px; background: var(--surface-2); border: 1px solid var(--border);
}
.card .badge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent);
}
.card .badge.soon { color: var(--text-mute); background: var(--surface-2); }
.card h3 { margin: 4px 0 0; font-size: 16px; font-weight: 750; letter-spacing: .2px; }
.card p { margin: 0; font-size: 13.5px; color: var(--text-soft); flex: 1; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card .tags .t { font-size: 11px; color: var(--text-mute); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
.card .go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand); }
.card.disabled { cursor: not-allowed; opacity: .72; }
.card.disabled:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }

.empty { text-align: center; color: var(--text-mute); padding: 60px 0; grid-column: 1 / -1; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 30px 0; color: var(--text-mute); font-size: 13px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.site-footer a:hover { color: var(--brand); }

/* ---------------- 工具页通用外壳 ---------------- */
.tool-header {
  width: 100%; border-bottom: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tool-header .nav { height: 60px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; transition: .2s; }
.back-link:hover { color: var(--brand); background: var(--surface-2); }
.tool-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.tool-title .ico { font-size: 22px; }

.tool-main { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 64px; }

/* ---------------- 通用工具内页 UI ---------------- */
.tool-layout { display: grid; gap: 18px; }
@media (min-width: 860px) { .tool-layout.two { grid-template-columns: 1fr 1fr; } }
.panel-pad { padding: 18px; }

.io {
  width: 100%; min-height: 300px; resize: vertical; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); border-radius: var(--radius-sm);
  padding: 14px; font-size: 14px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; outline: none;
}
.io:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring), 0 4px 18px rgba(109, 139, 255, 0.18); }
.io[readonly] { background: var(--surface); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.status-line { font-size: 13.5px; min-height: 20px; margin-top: 10px; }
.status-line.ok { color: #1a9c5b; }
.status-line.err { color: #e0455e; }

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; font-weight: 600; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg .mini { border: 0; background: var(--surface-2); color: var(--text-soft); padding: 8px 14px; cursor: pointer; font-size: 13.5px; font-weight: 700; font-family: inherit; }
.seg .mini.active { background: var(--brand-grad); color: #fff; }

.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-soft); }
.check input { width: 16px; height: 16px; }

.hint { font-size: 12.5px; color: var(--text-mute); margin-top: 6px; }

.io-select, .io-input {
  height: 40px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 10px; padding: 0 12px; font-size: 14px; font-family: inherit; outline: none;
}
.io-select:focus, .io-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring), 0 4px 18px rgba(109, 139, 255, 0.18); }
.io-color { width: 42px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: 4px; cursor: pointer; }
.dl-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* JSON 树形视图 */
.jtree { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; }
.jtree .node { padding-left: 18px; }
.jtree .caret { cursor: pointer; user-select: none; display: inline-block; width: 14px; color: var(--text-mute); }
.jtree .caret.leaf { visibility: hidden; }
.jtree .key { color: var(--brand); }
.jtree .str { color: #1a9c5b; }
.jtree .num { color: #c47f1a; }
.jtree .bool { color: var(--brand-2); }
.jtree .null { color: var(--text-mute); }
.jtree .collapsed > .children { display: none; }
.jtree .count { color: var(--text-mute); }

/* JSON 表格视图 */
.jtable { font-size: 14px; }
.jtable .table-wrap { overflow-x: auto; }
.jtable .json-table { width: 100%; border-collapse: collapse; min-width: 280px; }
.jtable .json-table th,
.jtable .json-table td {
  padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap; vertical-align: top;
}
.jtable .json-table thead th {
  position: sticky; top: 0; background: var(--surface); color: var(--text-soft);
  font-weight: 600; font-size: 12.5px; letter-spacing: .02em; border-bottom: 1px solid var(--border-strong);
}
.jtable .json-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--text) 4%, transparent); }
.jtable .json-table tbody tr:hover { background: var(--brand-soft); }
.jtable .json-table .row-idx { color: var(--text-mute); font-variant-numeric: tabular-nums; width: 1%; }
.jtable .json-table .key-cell { color: var(--brand); font-weight: 600; }
.jtable .t-null { color: var(--text-mute); font-style: italic; }
.jtable .t-bool { color: var(--brand-2); font-weight: 600; }
.jtable .t-num { color: #c47f1a; font-variant-numeric: tabular-nums; }
.jtable .t-obj { color: var(--text-soft); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.jtable .t-mute { color: var(--text-mute); font-style: italic; }
.jtable .t-coll { color: var(--brand); font-weight: 600; font-size: 12px; }

/* 可展开子数据（对象/数组 -> 列表） */
.jtable .cell-expand { margin: 2px 0; }
.jtable .cell-expand > summary {
  cursor: pointer; list-style: none; user-select: none; padding: 2px 0; outline: none;
}
.jtable .cell-expand > summary::-webkit-details-marker { display: none; }
.jtable .cell-expand > summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--text-mute); transition: transform .15s ease; }
.jtable .cell-expand[open] > summary::before { content: "▾"; }
.jtable .cell-body { padding: 4px 0 6px 16px; }
.jtable .cell-list { display: flex; flex-direction: column; gap: 3px; }
.jtable .cell-list-item { padding: 3px 0; border-bottom: 1px dashed var(--border); }
.jtable .cell-list-item:last-child { border-bottom: none; }

/* 嵌套迷你表（对象子字段） */
.jtable .kv-mini { margin: 0; min-width: 0; font-size: 13px; }
.jtable .kv-mini th, .jtable .kv-mini td { padding: 6px 12px; }
.jtable .kv-mini thead { display: none; }
/* 嵌套表格不吸顶，避免滚动时错位 */
.jtable .json-table .json-table thead th { position: static; background: var(--surface); }

.jtable .table-empty { padding: 40px 14px; text-align: center; color: var(--text-mute); }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: .18s; white-space: nowrap;
}
.btn:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); color: var(--brand); box-shadow: var(--glow); }
.btn.primary { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 24px rgba(109, 139, 255, 0.28); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 12px 32px rgba(124, 108, 255, 0.42); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.panel {
  background: var(--surface-glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .nav { gap: 12px; flex-wrap: nowrap; height: auto; }
  .brand { font-size: 16px; }
  .brand .logo { width: 30px; height: 30px; font-size: 16px; }
  .brand > span:not(.logo) { display: none; }   /* 移动端只留 logo，避免英文长品牌名换行 */
  .nav-search { display: none; }
  .hero { padding: 40px 0 24px; }

  /* 工具页统一页头：窄屏两行紧凑布局，文字绝不竖排 */
  .tool-header .nav { flex-wrap: wrap; height: auto; align-items: center; gap: 8px 10px; padding: 10px 14px; }
  .tool-header .spacer { display: none; }
  .tool-header .back-link { order: 1; flex: 0 0 auto; font-size: 13px; padding: 7px 10px; }
  .tool-header .back-link .bk-txt { display: none; }            /* 窄屏只留箭头，腾出空间 */
  .tool-header .tool-title { order: 2; flex: 1 1 auto; min-width: 0; font-size: 16px; }
  .tool-header .tool-title > span:not(.ico) { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tool-header #themeToggle { order: 3; flex: 0 0 auto; }
  /* 语言切换器：整行等分分段控件，杜绝拥挤/竖排 */
  .tool-header .lang-switch { order: 4; flex: 1 1 100%; width: 100%; flex-wrap: nowrap; border-radius: 12px; padding: 3px; }
  .tool-header .lang-btn { flex: 1 1 0; text-align: center; padding: 8px 2px; }
}
@media (max-width: 400px) {
  .tool-header .tool-title { font-size: 15px; }
  .tool-header .nav { padding: 8px 12px; }
}

/* ---------- 颜色转换工具 ---------- */
.color-main { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.color-preview { width: 120px; height: 120px; border-radius: 14px; border: 1px solid var(--border); flex: none; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.color-preview.small { width: 64px; height: 64px; border-radius: 10px; }
.color-controls { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 200px; }
.color-controls input[type="color"] { width: 56px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; }
.fmt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.fmt-row { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.fmt-label { font-weight: 600; width: 56px; flex: none; color: var(--muted); }
.fmt-val { flex: 1; font-family: var(--mono); font-size: 14px; word-break: break-all; }
.field-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.field-row label { color: var(--muted); font-size: 14px; }
.field-row input[type="range"] { flex: 1; min-width: 140px; }
.mix-bar { height: 16px; border-radius: 8px; margin: 4px 0 16px; border: 1px solid var(--border); }
.mix-result { display: flex; gap: 14px; align-items: center; }
.mix-meta { display: flex; flex-direction: column; gap: 8px; }
.mix-meta code { font-family: var(--mono); font-size: 15px; }
.wcag-preview { display: flex; gap: 16px; align-items: center; }
.wcag-chip { width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 26px; border: 1px solid var(--border); }
.wcag-ratio { font-size: 15px; margin-bottom: 8px; }
.wcag-ratio strong { font-family: var(--mono); }
.wcag-grid { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 8px; }
.wcag-cell { font-size: 12.5px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); }
.wcag-cell.ok { background: rgba(46,160,67,.14); color: #1a7f37; border-color: rgba(46,160,67,.4); }
.wcag-cell.fail { background: rgba(207,34,46,.12); color: #cf2200; border-color: rgba(207,34,46,.35); }

/* ===== PDF 工具 ===== */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab {
  padding: 8px 16px; border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--text-mute); border-radius: 999px; cursor: pointer; font-size: 14px;
  transition: all .15s ease;
}
.tab:hover { color: var(--text); border-color: var(--brand); }
.tab.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(109, 139, 255, 0.28); }
.tabpane { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.drop {
  border: 1.5px dashed var(--border); border-radius: 14px; padding: 22px;
  text-align: center; background: var(--bg-soft); transition: border-color .15s, background .15s;
}
.drop.drag { border-color: var(--brand); background: var(--brand-soft); }
.drop p { margin: 0 0 12px; color: var(--text-mute); font-size: 14px; }

.filelist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.filelist li {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px;
}
.filelist .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .meta { color: var(--text-mute); font-size: 12px; }
.filelist .mini {
  border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 8px;
  padding: 3px 9px; cursor: pointer; font-size: 12.5px;
}
.filelist .mini:hover { border-color: var(--brand); color: var(--brand); }
.filelist .mini.del:hover { border-color: #e0455e; color: #e0455e; }

.dl-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dl-list a {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--brand); text-decoration: none; font-size: 13.5px;
}
.dl-list a:hover { border-color: var(--brand); }
.dl-list .sz { color: var(--text-mute); font-size: 12px; margin-left: auto; }

.field { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.field > label { min-width: 92px; color: var(--text-mute); font-size: 13.5px; }
.field input[type="text"], .field select, .field input[type="range"] { flex: 1; min-width: 160px; }
.field .io-color { width: 44px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; }
