:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef1f8;
  --border: #e6e9f2;
  --border-strong: #d5dae7;
  --text: #171b26;
  --muted: #687089;
  --faint: #98a0b4;
  --accent: #3567f5;
  --accent-2: #7b5cff;
  --accent-soft: #eef2ff;
  --accent-line: #c9d6ff;
  --green: #0f9d6e;
  --green-soft: #e6f8f1;
  --amber: #b26a00;
  --amber-soft: #fdf3e1;
  --red: #d64545;
  --red-soft: #fdecec;
  --violet: #7b5cff;
  --violet-soft: #f2edff;
  --shadow: 0 1px 2px rgba(20, 30, 60, 0.04), 0 10px 30px rgba(20, 30, 60, 0.05);
  --shadow-lg: 0 24px 60px rgba(16, 24, 48, 0.18);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 240px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #0e1118;
  --surface: #161a24;
  --surface-2: #1b202d;
  --surface-3: #222839;
  --border: #262c3b;
  --border-strong: #333a4d;
  --text: #e9ecf5;
  --muted: #9aa3ba;
  --faint: #6e778e;
  --accent: #5b83ff;
  --accent-2: #9a7bff;
  --accent-soft: #1a2440;
  --accent-line: #2c3d6e;
  --green: #34c796;
  --green-soft: #122e27;
  --amber: #e0a43c;
  --amber-soft: #2e2414;
  --red: #ff7a7a;
  --red-soft: #341c1f;
  --violet: #a98bff;
  --violet-soft: #251d3d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0; }
::selection { background: rgba(53, 103, 245, 0.22); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 通用 ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spacer { flex: 1; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.section-title { font-size: 15px; font-weight: 650; margin-bottom: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 550; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; color: #fff; box-shadow: 0 6px 18px rgba(53, 103, 245, 0.24); }
.btn-primary:hover { filter: brightness(1.05); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-soft:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); background: var(--red-soft); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-xs { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field-hint { font-size: 11.5px; color: var(--faint); line-height: 1.5; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%; border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 9px; padding: 9px 11px; font-size: 13.5px; color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; min-height: 38px;
}
textarea { resize: vertical; line-height: 1.65; min-height: 76px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
input[type="range"] { accent-color: var(--accent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--muted);
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.blue { background: var(--accent-soft); color: var(--accent); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.gray { background: var(--surface-3); color: var(--muted); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 14.5px; font-weight: 650; }
.card-body { padding: 18px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon { width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty h3 { font-size: 15px; margin-bottom: 6px; }
.empty p { font-size: 13px; color: var(--faint); max-width: 420px; margin: 0 auto 16px; }

/* ---------- 登录 ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--surface); }
.login-art {
  position: relative; padding: 54px 60px; color: #eef2ff; overflow: hidden;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(123, 92, 255, 0.35), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(53, 103, 245, 0.35), transparent 55%),
    linear-gradient(145deg, #0e1630, #101a3a 55%, #0b1228);
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
}
.login-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
}
.login-art > * { position: relative; z-index: 1; }
.login-art h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.32; letter-spacing: -0.5px; font-weight: 700; }
.login-lead { max-width: 520px; color: rgba(230, 236, 255, 0.72); font-size: 15px; line-height: 1.85; }
.login-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; max-width: 430px; }
.login-steps li { display: flex; gap: 14px; align-items: center; }
.login-steps li > span { font-family: var(--mono); font-size: 12px; color: #9db4ff; border: 1px solid rgba(160, 185, 255, 0.28); border-radius: 8px; padding: 6px 8px; }
.login-steps strong { display: block; font-size: 14.5px; }
.login-steps small { color: rgba(225, 232, 255, 0.6); font-size: 12.5px; }
.login-art-footer { margin-top: 8px; color: rgba(210, 220, 255, 0.42); font-size: 12px; letter-spacing: 0.3px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--surface); }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-card-head { margin-bottom: 8px; }
.login-card-head h2 { font-size: 24px; }
.login-card-head p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.login-card .btn { height: 44px; margin-top: 4px; }
.login-hint { font-size: 12px; color: var(--faint); text-align: center; line-height: 1.6; }
.form-error { background: var(--red-soft); color: var(--red); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 20px rgba(53, 103, 245, 0.3);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: 0.2px; }
.brand-text small { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.brand-lg .brand-mark { width: 44px; height: 44px; border-radius: 13px; }
.brand-lg .brand-text strong { font-size: 17px; }
.brand-lg .brand-text small { font-size: 12px; color: rgba(220, 228, 255, 0.6); }

/* ---------- 应用骨架 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px 14px; z-index: 30;
}
.sidebar .brand { padding: 0 8px 20px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 11px; border-radius: 9px;
  color: var(--muted); font-size: 13.5px; font-weight: 550; transition: background 0.15s, color 0.15s;
}
.nav a svg { width: 17px; height: 17px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a.active svg { stroke-width: 2; }
.nav a em {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 650; min-width: 20px; text-align: center;
  background: var(--surface-3); color: var(--muted); border-radius: 6px; padding: 1px 6px;
}
.nav a.active em { background: var(--accent); color: #fff; }
.nav-label { font-size: 11px; font-weight: 650; letter-spacing: 0.8px; color: var(--faint); text-transform: uppercase; padding: 22px 12px 8px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.user-card:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dbe4ff, #e9e2ff); color: var(--accent); font-weight: 700; font-size: 13px;
}
[data-theme="dark"] .avatar { background: var(--accent-soft); }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-meta strong { font-size: 12.5px; }
.user-meta small { font-size: 11px; color: var(--faint); margin-top: 2px; }
.user-card .icon-btn { margin-left: auto; width: 30px; height: 30px; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 0 30px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ai-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--violet-soft); color: var(--violet); font-size: 11.5px; font-weight: 650;
}
.ai-pill svg { width: 14px; height: 14px; }
.ai-pill.mock { background: var(--amber-soft); color: var(--amber); }
.view { width: 100%; max-width: 1420px; margin: 0 auto; padding: 28px 30px 70px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 25px; letter-spacing: -0.3px; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- 概览 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; transition: border-color 0.15s, transform 0.15s;
}
.stat:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.stat .stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.stat .stat-icon.violet { background: var(--violet-soft); color: var(--violet); }
.stat .stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat .stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.stat .stat-label { color: var(--muted); font-size: 12.5px; margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.stat .stat-sub { margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.stat .stat-arrow { position: absolute; right: 16px; top: 18px; color: var(--faint); opacity: 0; transition: opacity 0.15s; }
.stat:hover .stat-arrow { opacity: 1; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: 0.3px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }
td.actions .icon-btn { width: 30px; height: 30px; }
td.actions .icon-btn svg { width: 15px; height: 15px; }
.cell-title { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.cell-title .thumb { width: 40px; height: 30px; border-radius: 6px; object-fit: cover; background: var(--surface-3); flex: none; }
.cell-title .title-text { font-weight: 600; font-size: 13px; line-height: 1.45; }
.cell-title .title-meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

/* ---------- 采集源 ---------- */
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.source-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.source-card-head { padding: 17px 18px 13px; display: flex; align-items: flex-start; gap: 12px; }
.source-type { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.source-type.rss { background: var(--amber-soft); color: var(--amber); }
.source-type.json { background: var(--green-soft); color: var(--green); }
.source-type svg { width: 18px; height: 18px; }
.source-title { font-size: 14.5px; font-weight: 650; }
.source-url { font-size: 11.5px; color: var(--faint); font-family: var(--mono); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.source-card-body { padding: 0 18px 14px; }
.source-stats { display: flex; gap: 18px; padding: 12px 0 14px; border-top: 1px dashed var(--border); margin-top: 4px; }
.source-stat strong { display: block; font-size: 17px; font-weight: 650; }
.source-stat small { color: var(--faint); font-size: 11px; }
.source-card-foot { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.switch { position: relative; width: 34px; height: 20px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }

/* ---------- 素材库 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.toolbar .search input { padding-left: 34px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.tab {
  position: relative; padding: 12px 12px 11px; font-size: 13px; color: var(--muted); font-weight: 550;
  border: none; background: none; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab em { font-style: normal; font-size: 11px; margin-left: 6px; color: var(--faint); }
.tab.active em { color: var(--accent); }
.batch-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); font-size: 12.5px; }
.batch-bar strong { color: var(--accent); }

/* ---------- 编辑台 ---------- */
.editor-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.editor-head .back { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.editor-head .back:hover { color: var(--accent); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 20px; align-items: start; }
.editor-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.editor-tabs { display: flex; align-items: center; gap: 2px; padding: 6px; background: var(--surface-3); border-radius: 10px; }
.editor-tabs .tab { border: none; padding: 7px 12px; border-radius: 7px; font-size: 12.5px; }
.editor-tabs .tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); border: none; }
.editor-fields { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.editor-title-input {
  font-size: 22px !important; font-weight: 650 !important; letter-spacing: -0.2px;
  border: none !important; padding: 4px 0 !important; min-height: 46px; background: transparent !important;
  resize: none; overflow: hidden; line-height: 1.45; display: block; width: 100%; font-family: var(--font);
}
.editor-title-input:focus { box-shadow: none !important; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.meta-grid .full { grid-column: 1 / -1; }
.cover-field { display: flex; gap: 10px; }
.cover-field .cover-preview { width: 84px; height: 62px; border-radius: 8px; background: var(--surface-3); object-fit: cover; flex: none; border: 1px solid var(--border); }
.toolbar-editor {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 7px 8px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0;
  position: sticky; top: 60px; z-index: 5;
}
.tool-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; border: none; background: transparent; color: var(--muted); cursor: pointer; }
.tool-btn:hover { background: var(--surface-3); color: var(--text); }
.tool-btn svg { width: 16px; height: 16px; }
.tool-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.tool-text { width: auto; padding: 0 8px; font-size: 12px; font-weight: 600; }
.editor-body-wrap { padding: 18px 22px 22px; }
.rich-editor { min-height: 430px; outline: none; font-size: 15.5px; line-height: 1.95; color: var(--text); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--faint); }
.rich-editor p { margin: 0 0 1.1em; }
.rich-editor h2 { font-size: 20px; margin: 1.5em 0 0.6em; font-weight: 700; }
.rich-editor h3 { font-size: 17px; margin: 1.3em 0 0.5em; font-weight: 650; }
.rich-editor img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.preview-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.preview-body h2, .preview-body h3 { margin: 1.2em 0 0.5em; line-height: 1.4; }
.preview-body p { margin: 0 0 1em; }
.preview-body ul, .preview-body ol { padding-left: 1.4em; margin: 0 0 1em; }
.rich-editor blockquote { margin: 1em 0; padding: 8px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); color: var(--muted); }
.rich-editor ul, .rich-editor ol { padding-left: 1.4em; margin: 0 0 1em; }
.rich-editor li { margin: 0.25em 0; }
.rich-editor a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.editor-footer { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); font-size: 12px; color: var(--faint); }
.save-state { display: inline-flex; align-items: center; gap: 6px; }
.save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.save-state.dirty .dot { background: var(--amber); }

.raw-block { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--surface-2); }
.raw-block h4 { font-size: 12px; color: var(--faint); font-weight: 600; margin-bottom: 7px; letter-spacing: .3px; }
.raw-content { font-size: 14px; line-height: 1.85; max-height: 420px; overflow: auto; }
.raw-content img { max-width: 100%; border-radius: 8px; }

.checks { display: flex; flex-direction: column; gap: 10px; }
.check-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.check-item .check-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--faint); flex: none; }
.check-item .check-dot.ok { background: var(--green-soft); color: var(--green); }
.check-item .check-dot svg { width: 12px; height: 12px; }
.score-ring { --score: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--score) * 1%), var(--surface-3) 0); flex: none; }
.score-ring > div { width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.score-ring strong { font-size: 22px; line-height: 1; }
.score-ring small { font-size: 10px; color: var(--faint); display: block; margin-top: 2px; }

/* ---------- AI 面板 ---------- */
.ai-panel { position: sticky; top: 80px; display: flex; flex-direction: column; overflow: hidden; }
.ai-panel-head {
  padding: 16px 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), color-mix(in srgb, var(--accent-2) 10%, var(--surface)));
  border-bottom: 1px solid var(--border);
}
.ai-panel-head .row { gap: 9px; }
.ai-orb { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 14px rgba(90, 90, 255, .3); }
.ai-orb svg { width: 17px; height: 17px; }
.ai-panel-head h3 { font-size: 14px; }
.ai-panel-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ai-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 14px 16px 4px; }
.ai-action {
  display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 550; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ai-action:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.ai-action:disabled { opacity: .5; cursor: wait; }
.ai-action svg { width: 14px; height: 14px; color: var(--accent); }
.ai-action.primary { grid-column: 1 / -1; height: 42px; border: none; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 13.5px; box-shadow: 0 8px 20px rgba(53,103,245,.22); }
.ai-action.primary svg { color: #fff; }
.ai-custom { padding: 12px 16px 16px; }
.ai-custom textarea { font-size: 12.5px; min-height: 66px; }
.ai-result { margin: 0 16px 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ai-result-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.ai-result-body { padding: 12px; font-size: 12.5px; line-height: 1.7; max-height: 300px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.ai-result-body.html-preview :is(p, h2, h3) { margin: 0 0 .7em; }
.ai-result-body img { max-width: 100%; border-radius: 6px; }
.ai-result-foot { display: flex; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.ai-stats { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0 16px 14px; font-size: 11px; color: var(--faint); }
.ai-mock-note { margin: 0 16px 14px; padding: 9px 11px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 11.5px; line-height: 1.6; }

/* ---------- 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 960px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .third { grid-column: span 1; }
.settings-card .card-head p { color: var(--faint); font-size: 12px; margin-top: 3px; }
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.setting-row:last-child { border-bottom: none; padding-bottom: 0; }
.setting-row:first-child { padding-top: 0; }
.setting-row .setting-copy strong { display: block; font-size: 13px; }
.setting-row .setting-copy small { color: var(--faint); font-size: 12px; }
.prompt-accordion { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.prompt-accordion + .prompt-accordion { margin-top: 8px; }
.prompt-accordion summary { padding: 11px 14px; cursor: pointer; font-size: 12.5px; font-weight: 600; background: var(--surface-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.prompt-accordion summary::-webkit-details-marker { display: none; }
.prompt-accordion summary::before { content: "›"; font-size: 16px; color: var(--faint); transition: transform .15s; }
.prompt-accordion[open] summary::before { transform: rotate(90deg); }
.prompt-accordion textarea { border: none; border-radius: 0; border-top: 1px solid var(--border); min-height: 110px; font-size: 12.5px; }
.settings-savebar { position: sticky; bottom: 18px; z-index: 10; display: flex; align-items: center; gap: 12px; justify-content: flex-end; padding: 12px 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 960px; }
.settings-savebar .hint { margin-right: auto; }

/* ---------- 发布 ---------- */
.publish-hero { display: flex; align-items: center; gap: 20px; padding: 22px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.publish-hero h2 { font-size: 18px; }
.publish-hero p { color: var(--muted); font-size: 13px; margin-top: 5px; max-width: 640px; }
.export-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.export-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.export-card strong { font-size: 13px; }
.export-card small { color: var(--faint); font-size: 11.5px; line-height: 1.5; }
.export-card .row { margin-top: 8px; gap: 6px; }
.adapter-state { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--green); }
.adapter-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 日志 ---------- */
.log-error { color: var(--red); font-size: 11.5px; max-width: 340px; }
.usage { font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ---------- 弹窗 / 抽屉 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(12, 18, 32, 0.48); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fade-in .12s ease; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 48px); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: pop-in .16s ease; }
.modal.lg { width: min(920px, 100%); }
.modal.xl { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-head p { color: var(--faint); font-size: 12px; margin-top: 3px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.modal-foot .hint { margin-right: auto; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.99); } }

.form-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 20px; margin: 0 -20px 18px; }
.form-tabs .tab { padding: 10px 12px; font-size: 12.5px; }
.test-result { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.test-result-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12px; }
.test-entry { padding: 10px 13px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.test-entry:last-child { border-bottom: none; }
.test-entry strong { display: block; font-weight: 600; }
.test-entry small { color: var(--faint); font-size: 11px; display: block; margin-top: 3px; }
.test-preview { padding: 14px; font-size: 12.5px; line-height: 1.7; max-height: 280px; overflow: auto; background: var(--surface-2); }
.test-preview img { max-width: 100%; border-radius: 6px; }

/* ---------- 提示 ---------- */
.toast-root { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  min-width: 220px; max-width: 420px; display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; animation: slide-in .18s ease; pointer-events: auto;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast svg { width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }
.toast.success svg { color: var(--green); }
.toast.error svg { color: var(--red); }
@keyframes slide-in { from { opacity: 0; transform: translateX(14px); } }

.loading { display: inline-flex; gap: 6px; align-items: center; color: var(--faint); font-size: 12.5px; }
.spinner { width: 15px; height: 15px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- 响应式 ---------- */
.mobile-only { display: none; }
@media (max-width: 1180px) {
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .ai-panel { position: static; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; width: 250px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(10,16,30,.45); z-index: 25; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .view { padding: 20px 16px 60px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; background: radial-gradient(700px 400px at 50% -10%, var(--accent-soft), transparent 70%), var(--surface); }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .editor-source-hint, #save-state, .hide-mobile { display: none !important; }
  .editor-tabs { overflow-x: auto; overflow-y: hidden; }
  .editor-tabs .tab { flex: none; }
  .stat { padding: 14px; }
  .stat .stat-icon { width: 30px; height: 30px; border-radius: 8px; margin-bottom: 10px; }
  .stat .stat-icon svg { width: 16px; height: 16px; }
  .stat .stat-value { font-size: 22px; }
  .stat .stat-label { font-size: 11.5px; }
  .stat .stat-sub { font-size: 10.5px; margin-top: 6px; }
  .stat .stat-arrow { display: none; }
  .meta-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .editor-fields { padding: 15px; }
  .editor-body-wrap { padding: 14px 15px 18px; }
  .modal-mask { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); }
  .export-actions { grid-template-columns: 1fr; }
  .toolbar .search { max-width: none; }
  .topbar-actions .btn span { display: none; }
  .library-table th:nth-child(3), .library-table td:nth-child(3),
  .library-table th:nth-child(5), .library-table td:nth-child(5),
  .library-table th:nth-child(6), .library-table td:nth-child(6),
  .library-table th:nth-child(7), .library-table td:nth-child(7),
  .draft-table th:nth-child(2), .draft-table td:nth-child(2),
  .draft-table th:nth-child(4), .draft-table td:nth-child(4),
  .draft-table th:nth-child(5), .draft-table td:nth-child(5),
  .draft-table th:nth-child(6), .draft-table td:nth-child(6) { display: none; }
  .library-table th, .library-table td, .draft-table th, .draft-table td { padding: 8px; }
  .library-table .cell-title, .library-table .cell-title > div { min-width: 0; }
  .batch-bar { flex-wrap: wrap; }
  .overview-runs th:nth-child(2), .overview-runs td:nth-child(2),
  .overview-runs th:nth-child(4), .overview-runs td:nth-child(4) { display: none; }
  .overview-runs th, .overview-runs td { padding: 9px 10px; }
  .overview-runs td { white-space: nowrap; }
  .overview-runs td:first-child { max-width: 150px; white-space: normal; }
}

/* ---------- 补充组件 ---------- */
.seg { display: inline-flex; gap: 3px; padding: 4px; background: var(--surface-3); border-radius: 10px; width: fit-content; }
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; min-height: 32px; }
.inline-check small { color: var(--faint); font-size: 11.5px; font-weight: 400; }
.inline-check.full { grid-column: 1 / -1; }
a.stat { display: block; color: inherit; }
.btn.disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.view-loading { padding: 6px 0; display: flex; flex-direction: column; gap: 10px; }
.rich-editor:focus { outline: none; }
.toolbar-editor { flex-wrap: wrap; }
.source-card-foot .icon-btn:hover { color: var(--red); background: var(--red-soft); }
@media (max-width: 640px) {
  .seg { width: 100%; }
  .seg label { flex: 1; }
  .seg span { width: 100%; justify-content: center; padding: 0 8px; }
  .inline-check { align-items: flex-start; }
}

input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
@media (max-width: 420px) {
  .editor-head { flex-wrap: wrap; }
  .editor-head .hint { max-width: 100%; }
  .editor-title-input { font-size: 19px !important; }
}

.cell-title .title-text { color: var(--text); }
.cell-title a.title-text:hover { color: var(--accent); }

.editor-title-input:focus { box-shadow: none !important; }

/* ---------- 分类工作区 / 字段映射 / 识别 ---------- */
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eyebrow .hint { font-size: 12px; }
.workspace-tabs {
  display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 5px; margin-bottom: 20px; width: fit-content; max-width: 100%;
  overflow-x: auto;
}
.workspace-tabs a {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 15px;
  border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.workspace-tabs a:hover { background: var(--surface-2); color: var(--text); }
.workspace-tabs a.active { background: var(--accent-soft); color: var(--accent); }
.workspace-tabs a em { font-style: normal; font-size: 11px; background: var(--surface-3); color: var(--faint); border-radius: 5px; padding: 1px 6px; }
.workspace-tabs a.active em { background: var(--accent); color: #fff; }

.field-table-head {
  display: grid; grid-template-columns: 1.1fr .9fr 2fr 1fr .8fr .9fr .9fr 36px;
  gap: 6px; padding: 0 4px 8px; font-size: 11px; color: var(--faint); font-weight: 600;
}
.field-row {
  display: grid; grid-template-columns: 1.1fr .9fr 2fr 1fr .8fr .9fr .9fr 36px;
  gap: 6px; align-items: center; padding: 6px 4px; border-top: 1px solid var(--border);
}
.field-row input, .field-row select { min-height: 34px; padding: 6px 8px; font-size: 12.5px; border-radius: 7px; }
.field-row select { padding-right: 24px; }
.field-row .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.field-row .icon-btn:hover { color: var(--red); background: var(--red-soft); }
.mini-check { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.field-tag { font-style: normal; font-size: 10px; color: var(--violet); background: var(--violet-soft); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.custom-fields { border-top: 1px dashed var(--border); padding-top: 16px; }

.recognize-card { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
.recognize-card > div { color: var(--text); }
@media (max-width: 900px) {
  .field-table-head { display: none; }
  .field-row { grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; padding: 10px; }
  .field-row .icon-btn { grid-column: 2; justify-self: end; }
  .field-row input[data-prop="selector"] { grid-column: 1 / -1; }
  .field-row label.mini-check { justify-self: start; }
}

/* 移动端卡片式素材列表 */
.mobile-list { display: none; }
@media (max-width: 640px) {
  .library-table-wrap, .draft-table-wrap { display: none; }
  .mobile-list { display: flex; flex-direction: column; }
  .mobile-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border-bottom: 1px solid var(--border); color: var(--text); min-width: 0;
  }
  .mobile-item:last-child { border-bottom: none; }
  .mobile-item:hover { background: var(--surface-2); }
  .mobile-thumb { width: 52px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--surface-3); flex: none; }
  .mobile-item-main { flex: 1; min-width: 0; }
  .mobile-item-title { font-size: 13px; font-weight: 600; line-height: 1.45; margin-bottom: 3px; }
  .mobile-item .badge { flex: none; }
  .mobile-item > svg { color: var(--faint); flex: none; }
}

.library-table, .draft-table { table-layout: fixed; }
.library-table .cell-title, .library-table .cell-title > div, .draft-table .cell-title { min-width: 0; }
.library-table td, .draft-table td { overflow: hidden; }

.library-table td.actions, .draft-table td.actions { overflow: visible; }

/* ---------- 官网搭建（规划中） ---------- */
.nav a em.soon { background: var(--amber-soft); color: var(--amber); }
.module-hero {
  display: flex; align-items: center; gap: 18px; padding: 26px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface));
  margin-bottom: 20px;
}
.module-hero-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; flex: none;
  box-shadow: 0 10px 24px rgba(53, 103, 245, 0.25);
}
.module-hero-icon svg { width: 26px; height: 26px; }
.module-hero h2 { font-size: 20px; margin-bottom: 6px; }
.module-hero p { color: var(--muted); font-size: 13.5px; line-height: 1.75; max-width: 760px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.module-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.module-card .module-index { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 1px; }
.module-card .module-icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin: 16px 0 12px;
}
.module-card h3 { font-size: 15px; margin-bottom: 6px; }
.module-card p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.module-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.module-node {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600;
}
.module-node.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.module-arrow { color: var(--faint); font-size: 14px; }
.question-list { display: flex; flex-direction: column; }
.question-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.question-item:last-child { border-bottom: none; padding-bottom: 0; }
.question-item strong { display: block; font-size: 12.5px; }
.question-item .hint { margin-top: 2px; }
.question-item .badge { margin-left: auto; }
.question-num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--muted);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; margin-top: 1px;
}
.module-stat strong { font-size: 22px; display: block; line-height: 1.1; }
.module-stat span { font-size: 11.5px; color: var(--faint); }
@media (max-width: 980px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .module-grid { grid-template-columns: 1fr; }
  .module-hero { flex-wrap: wrap; padding: 20px; }
  .module-hero .badge { margin-left: 0; }
}

/* ---------- 二级目录 ---------- */
.nav-group { display: flex; flex-direction: column; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 18px; padding-left: 12px; border-left: 1px solid var(--border); }
.nav-sub a { height: 30px; border-radius: 7px; padding: 0 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); gap: 0; }
.nav-sub a:hover { background: var(--surface-2); color: var(--text); }
.nav-sub a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-sub a.active::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-right: 7px; }
.nav-sub a.active { padding-left: 8px; }

.plan-list { display: flex; flex-direction: column; }
.plan-row { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.plan-row:last-child { border-bottom: none; padding-bottom: 0; }
.plan-row:first-child { padding-top: 0; }
.plan-icon {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent); flex: none;
}
.plan-icon svg { width: 15px; height: 15px; }
.plan-row strong { display: block; font-size: 12.5px; }
.plan-row .hint { margin-top: 2px; }

.sidebar { overflow-y: auto; }
.sidebar::-webkit-scrollbar { width: 6px; }

/* ---------- 站点切换 ---------- */
.site-switch {
  margin: 10px 14px 6px; padding: 10px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); display: flex; align-items: center; gap: 10px;
  text-align: left; cursor: pointer; color: var(--text);
}
.site-switch:hover { border-color: var(--accent-line); background: var(--surface-2); }
.site-avatar {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 12px; font-weight: 700; flex: none;
}
.site-switch-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.site-switch-text strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-switch-text small { font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.site-caret { width: 14px; height: 14px; color: var(--faint); transform: rotate(90deg); flex: none; }
.site-picker { display: flex; flex-direction: column; gap: 6px; }
.site-picker-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; color: var(--text);
}
.site-picker-item:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.site-picker-item.current { border-color: var(--accent); background: var(--accent-soft); }
.site-picker-item strong { display: block; font-size: 12.5px; }
.site-picker-item small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.site-picker-item .badge { margin-left: auto; }

/* ---------- 发布目标多选 ---------- */
.target-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.target-option {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
  font-size: 12.5px; cursor: pointer;
}
.target-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.target-option input { accent-color: var(--accent); }

/* ---------- 字段 JSON 导入 ---------- */
.field-import { margin-bottom: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.field-import textarea { width: 100%; font-family: var(--mono); font-size: 11.5px; }

/* ---------- 截图字段预览 ---------- */
.custom-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.custom-shots a { display: block; width: 112px; height: 72px; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.custom-shots img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 合并详情 PC / M 预览 */
.dp-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
#merge-device-stage { background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:18px; overflow:auto; }
.device-pc { max-width:980px; margin:0 auto; border:1px solid var(--border-strong); border-radius:12px; overflow:hidden; background:var(--surface); box-shadow:var(--shadow); }
.device-pc-bar { display:flex; align-items:center; gap:6px; padding:9px 14px; background:var(--surface-3); border-bottom:1px solid var(--border); }
.device-pc-bar i { width:8px; height:8px; border-radius:50%; background:var(--faint); }
.device-pc-bar span { margin-left:12px; color:var(--muted); font-size:11px; font-family:var(--mono); }
.dp-pc { padding:28px 32px 36px; }
.dp-breadcrumb { font-size:12px; color:var(--muted); margin-bottom:18px; }
.dp-hero { display:flex; gap:16px; align-items:center; }
.dp-icon { width:72px; height:72px; border-radius:16px; object-fit:cover; background:var(--surface-2); flex:none; }
.dp-hero h1 { font-size:26px; line-height:1.35; margin:0 0 8px; }
.dp-meta { color:var(--muted); font-size:13px; }
.dp-badges { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.dp-badges span { background:var(--accent-soft); color:var(--accent); border-radius:999px; padding:3px 10px; font-size:12px; }
.dp-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:28px; margin-top:26px; }
.dp-main { min-width:0; }
.dp-cover { width:100%; max-height:400px; object-fit:cover; border-radius:12px; margin-bottom:22px; }
.dp-content { line-height:1.95; font-size:15px; }
.dp-content img, .dp-mobile .dp-content img { max-width:100%; height:auto; border-radius:8px; }
.dp-content h2, .dp-content h3 { margin:1.2em 0 .5em; line-height:1.4; }
.dp-side { border-left:1px solid var(--border); padding-left:22px; }
.dp-side h3 { font-size:16px; margin:0 0 12px; }
.dp-fact { display:flex; flex-direction:column; gap:3px; padding:9px 0; border-bottom:1px dashed var(--border); }
.dp-fact span { font-size:12px; color:var(--muted); }
.dp-fact strong { font-size:13px; font-weight:500; word-break:break-all; white-space:pre-line; }
.dp-section { margin-top:28px; padding-top:20px; border-top:1px solid var(--border); }
.dp-section h2 { font-size:19px; margin:0 0 12px; }
.dp-shots { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.dp-shots img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:8px; border:1px solid var(--border); }
.dp-log div { line-height:1.9; font-size:14px; }
.device-mobile { width:390px; max-width:100%; margin:0 auto; border:1px solid var(--border-strong); border-radius:34px; overflow:hidden; background:var(--surface); box-shadow:var(--shadow-lg); }
.device-mobile-bar { height:24px; background:var(--surface-3); }
.device-mobile-head { display:flex; align-items:center; justify-content:space-between; padding:10px 18px; border-bottom:1px solid var(--border); font-size:14px; }
.dp-mobile .dp-cover { border-radius:0; max-height:220px; margin:0; }
.dp-mobile-body { padding:16px 18px 30px; }
.dp-mobile-title { display:flex; gap:10px; align-items:center; }
.dp-mobile-title .dp-icon { width:54px; height:54px; border-radius:13px; }
.dp-mobile-title h1 { font-size:20px; line-height:1.4; margin:0; }
.dp-mobile-meta { color:var(--muted); font-size:12px; margin:10px 0 14px; }
.dp-mobile-facts { display:grid; gap:6px; padding:12px; background:var(--surface-2); border-radius:10px; margin-bottom:18px; }
.dp-mobile .dp-content { font-size:14px; line-height:1.9; }
.dp-mobile .dp-shots { grid-template-columns:repeat(2,1fr); }
.dp-mobile .dp-side { display:none; }
.dp-mobile .dp-section h2 { font-size:17px; }
@media (max-width:800px) { .dp-layout { grid-template-columns:1fr; } .dp-side { border-left:0; padding-left:0; border-top:1px solid var(--border); padding-top:16px; } .dp-pc { padding:20px; } }

/* PC / M 站采集子列表 */
.source-channel-tabs { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 18px; padding:6px; background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.source-channel-tab { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:8px; color:var(--muted); font-size:13px; font-weight:600; }
.source-channel-tab em { font-style:normal; font-size:11px; background:var(--surface-3); color:var(--muted); border-radius:999px; padding:1px 7px; }
.source-channel-tab.active { background:var(--accent-soft); color:var(--accent); }
.source-channel-tab.active em { background:var(--accent); color:#fff; }

/* 采集源列表 */
.source-search { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 14px; }
.source-search input { width:min(420px,100%); padding:9px 12px; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface); color:var(--text); }
.source-list-card { overflow:hidden; }
.source-list { table-layout:auto; }
.source-list th { white-space:nowrap; font-size:12px; color:var(--muted); }
.source-list td { vertical-align:middle; font-size:13px; }
.source-list-name { font-weight:600; max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-list-url { font-size:11.5px; color:var(--muted); max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px; }
.source-list .btn-xs { padding:4px 9px; font-size:11.5px; }
@media (max-width:800px) { .source-list-card { overflow-x:auto; } .source-list { min-width:760px; } }

/* 采集源站点 LOGO */
.source-logo { position:relative; width:32px; height:32px; border-radius:8px; overflow:hidden; flex:none; display:inline-flex; align-items:center; justify-content:center; background:var(--accent-soft); color:var(--accent); font-size:13px; font-weight:700; }
.source-logo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:var(--surface); }
.source-list-site { display:flex; align-items:center; gap:10px; min-width:0; }

.source-logo { background-size:cover; background-position:center; background-repeat:no-repeat; }
.source-logo span { position:relative; z-index:0; }

/* 采集源启用状态按钮 */
.enable-pill { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px; border:1px solid var(--border-strong); background:var(--surface-2); color:var(--muted); font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; }
.enable-pill .dot { width:7px; height:7px; border-radius:50%; background:var(--faint); }
.enable-pill.on { background:var(--green-soft); border-color:color-mix(in srgb, var(--green) 30%, transparent); color:var(--green); }
.enable-pill.on .dot { background:var(--green); }
.enable-pill:disabled { opacity:.6; cursor:wait; }

/* 源站 LOGO 横向比例：2:1，完整等比缩放 */
.source-logo { width:56px; height:28px; border-radius:6px; background-size:contain; background-position:center; background-repeat:no-repeat; }
.source-card .source-logo { width:48px; height:24px; }

/* 编辑台空间优化：主编辑区加宽、侧栏收窄 */
@media (min-width: 1181px) {
  .view { max-width: 1600px; padding-left: 26px; padding-right: 26px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
  .editor-fields { padding: 16px 18px; gap: 14px; }
  .editor-body-wrap { padding: 16px 20px 20px; }
  .editor-title-input { font-size: 24px !important; }
  .editor-head { gap: 10px; }
}

/* 编辑页按 70 / 30 平铺 */
@media (min-width: 1181px) {
  .editor-layout { grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr); gap: 16px; }
  .editor-main { width: 100%; }
  .ai-panel { width: 100%; }
}

/* 编辑台细排 */
.cover-field { display:grid; grid-template-columns:auto minmax(0,1fr); gap:16px; align-items:center; }
.cover-meta { display:flex; flex-direction:column; gap:8px; min-width:0; }
.cover-meta input { max-width:760px; }
.cover-meta .field-hint { max-width:760px; }
@media (min-width:1181px) {
  .editor-fields { gap:18px; }
  .editor-fields > .meta-grid { padding-bottom:16px; border-bottom:1px dashed var(--border); }
  .custom-fields { padding-top:18px; }
  .custom-fields .form-grid { gap:14px 18px; }
  .editor-tabs { padding:5px; }
  .editor-tabs .tab { padding:8px 14px; }
  .editor-head { padding-bottom:2px; }
  .editor-head .btn { min-height:34px; }
  .ai-panel { border-radius:16px; }
}

/* 编辑台大画布版式 */
.view:has(.editor-layout) { width:100%; max-width:none; padding:24px 32px 80px; }
@media (min-width:1181px) {
  .editor-layout { grid-template-columns:minmax(0,1fr) 280px; gap:18px; }
  .editor-layout.ai-collapsed { grid-template-columns:minmax(0,1fr); }
  .editor-layout.ai-collapsed .ai-panel { display:none; }
  .editor-fields { padding:24px 28px 22px; gap:18px; }
  .editor-title-input { font-size:30px !important; min-height:56px; letter-spacing:-.4px; }
  .editor-section-head { display:flex; align-items:center; justify-content:space-between; padding:2px 0 2px; border-bottom:1px solid var(--border); margin-top:2px; }
  .editor-section-head > div { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
  .editor-section-head b { font-size:14px; letter-spacing:.02em; }
  .editor-section-head span { font-size:11.5px; color:var(--faint); }
  .editor-section-body { margin:8px 28px 0; }
  .meta-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px 18px; padding-bottom:18px; }
  .meta-grid .field.full { grid-column:1 / -1; }
  .custom-fields .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 18px; }
  .custom-fields .form-grid .field.full { grid-column:1 / -1; }
  .editor-body-wrap { padding:22px 28px 28px; }
  .rich-editor { min-height:560px; font-size:16px; }
  .editor-main > .card { border-radius:18px; box-shadow:0 1px 2px rgba(20,30,60,.03),0 14px 38px rgba(20,30,60,.04); }
  .ai-panel { width:280px; border-radius:16px; }
}
@media (min-width:1181px) and (max-width:1350px) {
  .custom-fields .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .meta-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.editor-head .back { white-space:nowrap; flex:none; }

.meta-grid.meta-grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.custom-fields.bare { border-top:0; padding-top:0; }

/* 截图编辑：大图预览 + 排序 */
.screenshot-field { gap:10px; }
.screenshot-grid { display:flex; flex-wrap:wrap; align-items:flex-start; gap:14px; min-height:40px; }
.screenshot-item { margin:0; padding:8px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); display:flex; flex-direction:column; gap:7px; }
.screenshot-frame { width:240px; height:150px; display:flex; align-items:center; justify-content:center; overflow:hidden; border-radius:8px; background:repeating-conic-gradient(#e9edf5 0 25%, #f7f9fc 0 50%) 0 0/18px 18px; }
.screenshot-frame img { width:100%; height:100%; object-fit:contain; display:block; }
.screenshot-item.vertical .screenshot-frame { width:150px; height:230px; }
.shot-actions { display:flex; align-items:center; justify-content:center; gap:5px; }
.shot-btn { width:28px; height:26px; border:1px solid var(--border-strong); background:var(--surface); color:var(--muted); border-radius:7px; cursor:pointer; font-size:14px; line-height:1; }
.shot-btn:hover:not(:disabled) { border-color:var(--accent); color:var(--accent); }
.shot-btn.danger:hover { border-color:var(--red); color:var(--red); }
.shot-btn:disabled { opacity:.35; cursor:not-allowed; }
.screenshot-source { display:none; }
@media (max-width:700px) {
  .screenshot-frame { width:180px; height:120px; }
  .screenshot-item.vertical .screenshot-frame { width:120px; height:180px; }
}

/* 正文底部元信息 */
.editor-meta-bottom { display:grid; grid-template-columns:180px 220px minmax(0,1fr); align-items:end; gap:14px 18px; padding:14px 28px; border-top:1px dashed var(--border); background:var(--surface-2); }
.editor-meta-bottom input[readonly] { background:transparent; border-color:transparent; padding-left:0; color:var(--text); font-weight:600; }
.editor-meta-bottom .field-hint { padding-bottom:9px; }
@media (max-width:760px) {
  .editor-meta-bottom { grid-template-columns:1fr 1fr; padding:14px 16px; }
  .editor-meta-bottom .field-hint { grid-column:1 / -1; padding-bottom:0; }
}

/* 封面 / ICON 合并媒体模块 */
.media-edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.media-edit-card { border:1px solid var(--border); border-radius:12px; padding:14px; background:var(--surface-2); display:flex; flex-direction:column; gap:10px; }
.media-edit-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.media-edit-head b { font-size:13px; }
.media-edit-frame { display:flex; align-items:center; justify-content:center; min-height:230px; border-radius:9px; background:repeating-conic-gradient(#e9edf5 0 25%, #f7f9fc 0 50%) 0 0/18px 18px; border:1px solid var(--border); }
.media-edit-frame img { display:block; border-radius:8px; background:var(--surface); }
.media-url summary { cursor:pointer; color:var(--muted); font-size:12px; }
.media-url input { margin-top:8px; font-size:12px; }
@media (max-width:760px) {
  .media-edit-grid { grid-template-columns:1fr; }
  .media-edit-frame { min-height:180px; }
}

/* 紧凑字段 / SEO 常显 / 只读权限 */
.seo-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; }
.seo-grid .field.full { grid-column:1 / -1; }
.custom-fields.basic-fields .form-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px 14px; }
.custom-fields .form-grid { gap:12px 14px; }
.custom-fields .field > span { font-size:12px; }
.custom-fields input[type="text"], .custom-fields input[type="number"] { height:36px; font-size:13px; }
.custom-fields textarea { min-height:58px; font-size:13px; line-height:1.6; }
.custom-fields .field.full textarea { min-height:64px; }
.permission-readonly { padding:12px 14px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); }
.permission-chips { display:flex; flex-wrap:wrap; gap:7px; }
.permission-chips span { padding:4px 9px; border-radius:999px; background:var(--surface); border:1px solid var(--border); color:var(--muted); font-size:12px; }
@media (max-width:1350px) {
  .custom-fields.basic-fields .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .seo-grid { grid-template-columns:1fr; }
  .custom-fields.basic-fields .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.media-edit-single { display:grid; grid-template-columns:auto minmax(0,1fr); gap:18px; align-items:center; padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); }
.media-edit-single .cover-meta { justify-content:center; }
.media-edit-single .media-edit-frame { min-height:0; width:fit-content; padding:0; background:none; border:0; }
@media (max-width:760px) { .media-edit-single { grid-template-columns:1fr; } }

/* 文件大小 / 年龄 / 下载方式 / 更新日志 */
.size-control { display:flex; gap:6px; }
.size-control input[type="number"] { flex:1; min-width:0; }
.size-control select { width:76px; flex:none; }
.download-method-checks { display:flex; flex-wrap:wrap; gap:14px; padding:2px 0 4px; }
.download-method-checks label { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text); cursor:pointer; }
.download-panels { display:flex; flex-direction:column; gap:10px; }
.download-panel { display:grid; grid-template-columns:minmax(0,1fr) 140px; gap:12px; padding:12px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); }
.download-panel[hidden] { display:none; }
.download-panel[data-download-panel="direct"], .download-panel[data-download-panel="local"] { grid-template-columns:1fr; }
.changelog-editor { padding:0 28px 4px; }
.changelog-editor textarea { width:100%; min-height:170px; font-size:13px; line-height:1.7; }
.permission-collapse { border:1px solid var(--border); border-radius:10px; background:var(--surface-2); padding:0 14px; }
.permission-collapse summary { display:flex; align-items:baseline; gap:10px; padding:12px 0; cursor:pointer; list-style:none; }
.permission-collapse summary::-webkit-details-marker { display:none; }
.permission-collapse summary b { font-size:13px; }
.permission-collapse summary span { font-size:11.5px; color:var(--faint); }
.permission-collapse[open] { padding-bottom:12px; }

/* 顶部原文地址 + 标签 chip */
.editor-source-top { display:flex; align-items:center; gap:10px; padding:0 0 10px; border-bottom:1px dashed var(--border); }
.editor-source-top > span { flex:none; font-size:12px; font-weight:600; color:var(--muted); }
.editor-source-top input { flex:1; height:32px; border:0; background:transparent; color:var(--faint); font-size:11.5px; padding:0; }
.tag-editor { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-height:42px; padding:5px 8px; border:1px solid var(--border-strong); border-radius:9px; background:var(--surface); }
.tag-chips { display:flex; flex-wrap:wrap; gap:6px; }
.tag-chip { display:inline-flex; align-items:center; gap:4px; padding:4px 8px; border-radius:999px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:600; white-space:nowrap; }
.tag-chip:nth-child(5n+2) { background:var(--green-soft); color:var(--green); }
.tag-chip:nth-child(5n+3) { background:var(--amber-soft); color:var(--amber); }
.tag-chip:nth-child(5n+4) { background:var(--violet-soft, #f1ecff); color:var(--violet, #7c5cff); }
.tag-chip:nth-child(5n+5) { background:var(--red-soft); color:var(--red); }
.tag-chip button { border:0; background:none; color:currentColor; opacity:.65; cursor:pointer; font-size:13px; line-height:1; padding:0; }
.tag-chip button:hover { opacity:1; }
.tag-editor > input { flex:1; min-width:140px; height:28px; border:0 !important; padding:0 !important; background:transparent !important; font-size:13px; }

/* 下载方式：紧凑多选 */
.download-method-checks { gap:8px; }
.download-method-checks label { padding:6px 10px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--muted); }
.download-method-checks label:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.download-method-checks input { accent-color:var(--accent); }
.download-panel { padding:10px 12px; gap:10px; }
.download-panel .field > span { font-size:11.5px; }

/* 智能编辑工作台 */
.smart-dock { position:relative; overflow:hidden; display:grid; grid-template-columns:minmax(180px,auto) 1fr auto; align-items:center; gap:14px 22px; margin:0 0 16px; padding:14px 18px; border-radius:16px; border:1px solid rgba(120,140,255,.25); background:linear-gradient(115deg,#0e1324,#151b33 48%,#0d2230); color:#eef2ff; box-shadow:0 14px 34px rgba(10,18,45,.16); }
.smart-dock::before { content:""; position:absolute; width:260px; height:260px; right:-80px; top:-150px; border-radius:50%; background:radial-gradient(circle,rgba(90,120,255,.35),transparent 65%); pointer-events:none; }
.smart-dock::after { content:""; position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size:26px 26px; mask-image:linear-gradient(90deg,transparent,#000 40%,#000 70%,transparent); pointer-events:none; opacity:.5; }
.smart-dock > * { position:relative; z-index:1; }
.smart-dock-brand { display:flex; align-items:center; gap:10px; min-width:0; }
.smart-orb { width:34px; height:34px; flex:none; border-radius:11px; display:grid; place-items:center; background:linear-gradient(135deg,#536dff,#28d6d0); color:#fff; box-shadow:0 0 0 1px rgba(255,255,255,.15),0 0 22px rgba(74,120,255,.55); animation:smart-pulse 3.2s ease-in-out infinite; }
.smart-orb svg { width:17px; height:17px; }
.smart-dock-brand b { display:block; font-size:13px; letter-spacing:.04em; }
.smart-dock-brand span:last-child { display:block; margin-top:1px; font-size:10.5px; color:#98a6d8; letter-spacing:.08em; }
.smart-metrics { display:flex; align-items:center; justify-content:center; gap:0; min-width:0; }
.smart-metrics > span { display:flex; align-items:baseline; gap:4px; padding:0 16px; border-left:1px solid rgba(255,255,255,.12); white-space:nowrap; }
.smart-metrics > span:first-child { border-left:0; }
.smart-metrics em { font-style:normal; font-size:10px; color:#8e9bc7; letter-spacing:.08em; }
.smart-metrics b { font:600 18px/1.1 "Cascadia Code",Consolas,monospace; color:#fff; }
.smart-metrics i { font-style:normal; font-size:10px; color:#8e9bc7; }
.smart-actions { display:flex; gap:6px; justify-content:flex-end; }
.smart-chip { display:inline-flex; align-items:center; gap:5px; height:30px; padding:0 10px; border:1px solid rgba(160,180,255,.24); border-radius:8px; background:rgba(255,255,255,.06); color:#dbe3ff; font-size:11.5px; font-weight:600; cursor:pointer; white-space:nowrap; }
.smart-chip svg { width:13px; height:13px; }
.smart-chip:hover { background:rgba(255,255,255,.12); border-color:rgba(160,180,255,.45); }
.smart-chip.primary { background:linear-gradient(135deg,#5067ff,#28c8c0); border-color:transparent; color:#fff; box-shadow:0 4px 14px rgba(60,110,255,.3); }
.smart-advice { grid-column:1 / -1; display:flex; align-items:center; gap:6px; margin:0; padding-top:9px; border-top:1px solid rgba(255,255,255,.09); font-size:11.5px; color:#9eabd4; }
.smart-advice svg { width:13px; height:13px; color:#5fe0d3; flex:none; }
@keyframes smart-pulse { 0%,100% { box-shadow:0 0 0 1px rgba(255,255,255,.15),0 0 18px rgba(74,120,255,.4); } 50% { box-shadow:0 0 0 1px rgba(255,255,255,.25),0 0 30px rgba(40,214,208,.6); } }
@media (max-width:1100px) {
  .smart-dock { grid-template-columns:1fr auto; }
  .smart-metrics { justify-content:flex-start; }
  .smart-actions { grid-column:1 / -1; justify-content:flex-start; }
}

/* AI 悬浮入口 + 居中弹窗 */
.editor-layout { grid-template-columns:minmax(0,1fr) !important; }
.ai-panel { display:none; }
body.ai-modal-open { overflow:hidden; }
body.ai-modal-open .ai-panel { display:flex; position:fixed; z-index:130; top:50%; left:50%; transform:translate(-50%,-50%); width:min(760px,calc(100vw - 32px)); max-height:calc(100vh - 48px); overflow-y:auto; border-radius:20px; box-shadow:0 30px 90px rgba(15,23,42,.28),0 0 0 1px var(--border); }
.ai-modal-backdrop { position:fixed; inset:0; z-index:120; background:rgba(12,18,32,.42); backdrop-filter:blur(5px); }
.ai-modal-backdrop[hidden] { display:none; }
.ai-modal-close { width:30px; height:30px; flex:none; border:0; border-radius:8px; background:var(--surface-2); color:var(--muted); display:grid; place-items:center; cursor:pointer; }
.ai-modal-close svg { width:15px; height:15px; }
.ai-modal-close:hover { background:var(--surface-3); color:var(--text); }
.ai-fab { position:fixed; right:28px; bottom:34px; z-index:140; display:inline-flex; align-items:center; gap:8px; height:46px; padding:0 16px 0 8px; border:1px solid rgba(255,255,255,.18); border-radius:999px; background:linear-gradient(135deg,#263a70,#1b5c66); color:#fff; font-size:12.5px; font-weight:600; letter-spacing:.03em; cursor:pointer; opacity:.5; box-shadow:0 10px 26px rgba(16,30,60,.25); transition:opacity .18s ease, transform .18s ease, box-shadow .18s ease; }
.ai-fab:hover, .ai-fab.active { opacity:1; transform:translateY(-2px); box-shadow:0 14px 30px rgba(16,30,60,.34); }
.ai-fab-orb { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,#5d7cff,#2dd4bf); box-shadow:0 0 0 1px rgba(255,255,255,.2); }
.ai-fab-orb svg { width:15px; height:15px; }
.ai-fab.active .ai-fab-orb { animation:smart-pulse 2.8s ease-in-out infinite; }
@media (max-width:760px) { .ai-fab { right:16px; bottom:20px; } body.ai-modal-open .ai-panel { width:calc(100vw - 20px); max-height:calc(100vh - 24px); border-radius:16px; } }

/* AI 对话弹窗内容 */
.ai-chat-log { padding:14px 18px 0; }
.ai-chat-msg { display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-radius:12px; background:var(--surface-2); border:1px solid var(--border); }
.ai-chat-avatar { width:26px; height:26px; flex:none; border-radius:8px; display:grid; place-items:center; background:linear-gradient(135deg,#5d7cff,#2dd4bf); color:#fff; font-size:10px; font-weight:700; }
.ai-chat-msg b { display:block; font-size:12.5px; margin-bottom:3px; }
.ai-chat-msg p { margin:0; color:var(--muted); font-size:11.5px; line-height:1.65; }
.ai-chat-label { display:block; margin-bottom:6px; color:var(--muted); font-size:11.5px; font-weight:600; }
body.ai-modal-open .ai-actions { grid-template-columns:repeat(3,minmax(0,1fr)); padding:14px 18px 8px; }
body.ai-modal-open .ai-custom { padding:8px 18px 12px; }
body.ai-modal-open #ai-result { margin:0 18px 12px; }
body.ai-modal-open #ai-stats { padding:0 18px 16px; }
@media (max-width:620px) { body.ai-modal-open .ai-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* 编辑页整体氛围背景 */
.view:has(.editor-layout) {
  position:relative;
  isolation:isolate;
  background:
    radial-gradient(1100px 560px at 4% -8%, rgba(92,110,255,.18), transparent 62%),
    radial-gradient(900px 520px at 98% 4%, rgba(45,212,191,.14), transparent 58%),
    radial-gradient(700px 420px at 75% 100%, rgba(124,92,255,.06), transparent 65%),
    linear-gradient(180deg,#f6f8fd 0%,#eef2f9 52%,#f8fafc 100%);
}
.view:has(.editor-layout)::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(50,70,120,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50,70,120,.055) 1px, transparent 1px);
  background-size:32px 32px;
  mask-image:linear-gradient(180deg, rgba(0,0,0,.7), transparent 62%);
}
.editor-main > .card {
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(10px);
  border-color:rgba(150,165,200,.28);
  box-shadow:0 1px 2px rgba(20,30,60,.03),0 22px 55px rgba(25,40,80,.07);
}
@media (max-width:760px) {
  .view:has(.editor-layout) { background:linear-gradient(180deg,#f7f9fd,#f2f5fa); }
  .view:has(.editor-layout)::before { display:none; }
}

/* 编辑页：渐变光束背景 + 更紧凑字段 */
.view:has(.editor-layout) {
  background:
    radial-gradient(900px 520px at 2% -12%, rgba(92,110,255,.24), transparent 62%),
    radial-gradient(820px 460px at 102% 2%, rgba(45,212,191,.19), transparent 58%),
    radial-gradient(700px 460px at 68% 108%, rgba(155,92,255,.12), transparent 64%),
    linear-gradient(180deg,#f4f7ff 0%,#edf2fb 46%,#f7f9fd 100%);
}
.view:has(.editor-layout)::after {
  content:"";
  position:absolute;
  inset:-8% -4% auto;
  height:64%;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(116deg, transparent 8%, rgba(95,116,255,.17) 26%, rgba(120,145,255,.05) 38%, transparent 48%),
    linear-gradient(64deg, transparent 52%, rgba(45,212,191,.14) 64%, transparent 76%),
    repeating-linear-gradient(116deg, transparent 0 96px, rgba(255,255,255,.18) 98px, transparent 106px);
  filter:blur(26px);
  opacity:.9;
  mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.55) 55%,transparent 100%);
}
.editor-main > .card { box-shadow:0 24px 65px rgba(24,40,80,.09),0 0 0 1px rgba(110,130,220,.08); }
.editor-fields { padding:20px 24px 16px; gap:12px; }
.editor-title-input { font-size:28px !important; min-height:50px; }
.editor-section-head { padding:0 0 6px; }
.editor-section-head b { font-size:13.5px; }
.editor-section-head span { font-size:11px; }
.meta-grid { gap:10px 14px; padding-bottom:12px; }
.field { gap:4px; }
.field > span, .label { font-size:12px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea { min-height:34px; padding-top:7px; padding-bottom:7px; }
.custom-fields .form-grid { gap:10px 12px; }
.custom-fields textarea { min-height:52px; }
.custom-fields.basic-fields .form-grid { gap:10px 12px; }
.editor-body-wrap { padding:18px 24px 22px; }
.rich-editor { min-height:470px; }
.editor-meta-bottom { padding:10px 24px; gap:10px 14px; }
.editor-tabs { margin:10px 14px 0 !important; }
.changelog-editor { padding:0 24px 2px; }
.changelog-editor textarea { min-height:140px; }
@media (min-width:1500px) {
  .custom-fields.basic-fields .form-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .editor-fields { padding:16px; }
  .editor-body-wrap { padding:14px 16px 18px; }
  .view:has(.editor-layout)::after { display:none; }
}

/* 更明显的渐变光束 + 半透明主卡片 */
.view:has(.editor-layout)::after {
  opacity:1;
  filter:blur(32px);
  background:
    linear-gradient(116deg, transparent 2%, rgba(84,106,255,.32) 20%, rgba(126,145,255,.12) 33%, transparent 45%),
    linear-gradient(62deg, transparent 48%, rgba(31,205,190,.24) 62%, rgba(31,205,190,.05) 72%, transparent 82%),
    repeating-linear-gradient(116deg, transparent 0 90px, rgba(255,255,255,.22) 94px, transparent 104px);
}
.editor-main > .card {
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(247,250,255,.84));
  border-color:rgba(120,145,220,.24);
}
.editor-main .editor-fields,
.editor-main .editor-body-wrap { background:transparent; }

/* 后台字段 / 字段注释字号 */
.field > span,
.label { font-size:15px !important; }
.custom-fields .field > span { font-size:15px !important; }
.field-hint { font-size:13px !important; }

/* 字段字号 13 / 注释 12；正文统一 15，H3 单独保留标题字号 */
.field > span,
.label { font-size:13px !important; }
.custom-fields .field > span { font-size:13px !important; }
.field-hint { font-size:12px !important; }
.rich-editor { font-size:15px !important; }
.rich-editor p,
.rich-editor div,
.rich-editor li,
.rich-editor blockquote,
.rich-editor td,
.rich-editor th,
.rich-editor figcaption,
.rich-editor h1,
.rich-editor h2,
.rich-editor h4 { font-size:15px; }
.rich-editor h3 { font-size:18px; line-height:1.5; }

/* 编辑字段框继续压缩 */
.editor-fields { padding:16px 20px 14px; gap:10px; }
.editor-section-head { padding:0 0 4px; }
.editor-section-head b { font-size:13px; }
.meta-grid { gap:8px 12px; padding-bottom:8px; }
.seo-grid { gap:8px 12px; }
.field { gap:3px; }
.editor-fields input[type="text"],
.editor-fields input[type="number"],
.editor-fields input[type="search"],
.editor-fields select,
.editor-fields textarea,
.editor-meta-bottom input { min-height:31px; padding:5px 9px; font-size:13px; }
.editor-fields textarea { min-height:44px; line-height:1.55; }
.custom-fields .form-grid { gap:8px 10px; }
.custom-fields textarea { min-height:46px; }
.custom-fields .field-hint { line-height:1.4; }
.tag-editor { min-height:36px; padding:3px 6px; }
.tag-chip { padding:3px 7px; font-size:11.5px; }
.editor-title-input { font-size:26px !important; min-height:46px; }
.media-edit-single { padding:10px; gap:12px; }
.media-edit-frame { min-height:0; }
.editor-body-wrap { padding:14px 20px 18px; }
.rich-editor { min-height:420px; }
.editor-meta-bottom { padding:8px 20px; }
.changelog-editor { padding:0 20px 2px; }

/* 封面 + 截图合并媒体模块 */
.media-combined { display:grid; grid-template-columns:180px minmax(0,1fr); gap:16px; padding:12px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); align-items:stretch; }
.media-cover-panel { display:flex; flex-direction:column; gap:8px; align-items:center; }
.media-cover-frame { width:100%; display:flex; align-items:center; justify-content:center; min-height:0; }
.media-cover-frame img { display:block; border-radius:9px; background:var(--surface); }
.media-cover-actions { display:flex; flex-direction:column; align-items:center; gap:5px; }
.media-cover-actions .field-hint { font-size:11px !important; text-align:center; }
.media-shots-panel { min-width:0; display:flex; flex-direction:column; gap:8px; }
.media-shots-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.media-shots-head > div { display:flex; align-items:baseline; gap:8px; }
.media-shots-head b { font-size:13px; }
.media-shots-panel .screenshot-grid { gap:10px; align-content:flex-start; }
.media-shots-panel .screenshot-item { padding:5px; border-radius:9px; gap:4px; }
.media-shots-panel .screenshot-frame { width:168px; height:104px; border-radius:6px; }
.media-shots-panel .screenshot-item.vertical .screenshot-frame { width:104px; height:168px; }
.media-shots-panel .shot-btn { width:24px; height:22px; border-radius:6px; font-size:12px; }
@media (max-width:900px) {
  .media-combined { grid-template-columns:1fr; }
  .media-cover-panel { flex-direction:row; justify-content:flex-start; }
  .media-shots-panel .screenshot-frame { width:140px; height:88px; }
  .media-shots-panel .screenshot-item.vertical .screenshot-frame { width:88px; height:140px; }
}

/* 基础字段连续栅格 */
.custom-fields.basic-fields .form-grid { gap:1px; padding:1px; border:1px solid var(--border); border-radius:11px; background:var(--border); overflow:hidden; }
.custom-fields.basic-fields .field { padding:7px 9px; background:var(--surface); border-radius:0; gap:2px; }
.custom-fields.basic-fields .field.full { grid-column:1 / -1; }
.custom-fields.basic-fields .field > span { font-size:13px !important; color:var(--muted); }
.custom-fields.basic-fields input,
.custom-fields.basic-fields select,
.custom-fields.basic-fields textarea { border:0 !important; background:transparent !important; padding:1px 0 !important; min-height:23px; box-shadow:none !important; font-size:13px; }
.custom-fields.basic-fields input:focus,
.custom-fields.basic-fields select:focus,
.custom-fields.basic-fields textarea:focus { outline:none; box-shadow:inset 0 -2px var(--accent) !important; }
.custom-fields.basic-fields textarea { min-height:34px; resize:vertical; }
.custom-fields.basic-fields .size-control { gap:4px; }
.custom-fields.basic-fields .size-control select { width:66px; }

/* AI 助手更醒目的常驻入口 + 主动建议 */
.ai-fab { right:30px; bottom:32px; height:48px; opacity:.78; border-color:rgba(255,255,255,.28); box-shadow:0 12px 30px rgba(16,30,60,.3),0 0 0 0 rgba(83,109,255,.35); }
.ai-fab::before { content:""; position:absolute; inset:-5px; border-radius:999px; border:1px solid rgba(83,109,255,.35); opacity:0; transform:scale(.96); transition:opacity .2s ease, transform .2s ease; pointer-events:none; }
.ai-fab:hover { opacity:1; transform:translateY(-2px); box-shadow:0 16px 36px rgba(16,30,60,.38); }
.ai-fab:hover::before { opacity:1; transform:scale(1); }
.ai-fab.active { opacity:1; }
.ai-fab-key { margin-left:2px; padding-left:8px; border-left:1px solid rgba(255,255,255,.24); color:rgba(255,255,255,.68); font-size:10px; font-weight:500; letter-spacing:.04em; }
.ai-nudge { position:fixed; right:30px; bottom:92px; z-index:139; width:min(330px,calc(100vw - 32px)); padding:13px; border:1px solid rgba(130,150,220,.35); border-radius:14px; background:rgba(255,255,255,.97); box-shadow:0 18px 45px rgba(20,35,70,.2); backdrop-filter:blur(12px); }
.ai-nudge[hidden] { display:none; }
.ai-nudge-top { display:flex; gap:9px; align-items:flex-start; }
.ai-nudge-icon { width:28px; height:28px; flex:none; border-radius:9px; display:grid; place-items:center; background:linear-gradient(135deg,#536dff,#28d6d0); color:#fff; }
.ai-nudge-icon svg { width:14px; height:14px; }
.ai-nudge-top b { display:block; font-size:12.5px; margin:1px 0 3px; }
.ai-nudge-top p { margin:0; color:var(--muted); font-size:11.5px; line-height:1.55; }
.ai-nudge-actions { display:flex; justify-content:flex-end; gap:6px; margin-top:10px; }
@media (max-width:760px) { .ai-fab { right:16px; bottom:20px; } .ai-nudge { right:16px; bottom:80px; } .ai-fab-key { display:none; } }

/* 空字段收纳 */
.basic-empty-toggle { display:inline-flex; align-items:center; gap:5px; height:24px; padding:0 8px; border:1px dashed var(--border-strong); border-radius:999px; background:transparent; color:var(--muted); font-size:11px; cursor:pointer; }
.basic-empty-toggle:hover { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
.basic-empty-toggle em { font-style:normal; min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:var(--surface-3); color:var(--faint); font-size:10px; display:inline-grid; place-items:center; }
.basic-empty-fields { margin-top:1px; }

/* 空字段：显示为可添加框，而不是空白输入框 */
.custom-fields.basic-fields .field.empty-field { background:#fbfcff; }
.custom-fields.basic-fields .field.empty-field > input:not([type="hidden"]),
.custom-fields.basic-fields .field.empty-field > textarea,
.custom-fields.basic-fields .field.empty-field > select,
.custom-fields.basic-fields .field.empty-field > .size-control { display:none; }
.custom-fields.basic-fields .field.empty-field.editing > input:not([type="hidden"]),
.custom-fields.basic-fields .field.empty-field.editing > textarea,
.custom-fields.basic-fields .field.empty-field.editing > select { display:block; }
.custom-fields.basic-fields .field.empty-field.editing > .size-control { display:flex; }
.empty-add { width:100%; min-height:25px; border:1px dashed var(--border-strong); border-radius:6px; background:transparent; color:var(--faint); font-size:11.5px; cursor:pointer; }
.empty-add:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.empty-field.editing .empty-add { display:none; }

/* 媒体素材精修：大截图 + 图标排序 */
.media-combined { grid-template-columns:200px minmax(0,1fr); gap:18px; padding:14px; align-items:start; }
.media-cover-panel { padding:8px; border-radius:12px; background:linear-gradient(160deg,rgba(255,255,255,.85),rgba(242,246,255,.9)); border:1px solid var(--border); }
.media-cover-frame { padding:6px; border-radius:11px; background:repeating-conic-gradient(#e9edf5 0 25%,#f7f9fc 0 50%) 0 0/18px 18px; }
.media-cover-frame img { border-radius:9px; box-shadow:0 8px 20px rgba(25,40,80,.12); }
.media-shots-head { padding-bottom:2px; }
.media-shots-head b { font-size:14px; }
.media-shots-panel .screenshot-grid { gap:14px; }
.media-shots-panel .screenshot-item { position:relative; padding:7px; border-radius:12px; background:var(--surface); border-color:var(--border); box-shadow:0 4px 14px rgba(25,40,80,.06); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.media-shots-panel .screenshot-item:hover { transform:translateY(-2px); border-color:rgba(100,120,255,.35); box-shadow:0 12px 26px rgba(30,50,100,.12); }
.media-shots-panel .screenshot-frame { position:relative; width:220px; height:140px; border-radius:8px; overflow:hidden; background:#eef2f9; }
.media-shots-panel .screenshot-item.vertical .screenshot-frame { width:140px; height:210px; }
.screenshot-frame img { width:100%; height:100%; object-fit:cover; }
.shot-index { position:absolute; left:8px; top:8px; padding:2px 6px; border-radius:6px; background:rgba(16,24,44,.62); color:#fff; font:600 10px/1.4 "Cascadia Code",Consolas,monospace; letter-spacing:.08em; backdrop-filter:blur(4px); }
.shot-actions { display:flex; justify-content:center; gap:4px; padding-top:7px; }
.shot-btn { width:30px; height:27px; border-radius:7px; border:1px solid var(--border); background:var(--surface-2); color:var(--muted); display:grid; place-items:center; }
.shot-btn svg { width:14px; height:14px; }
.shot-btn.flip, .shot-btn svg.flip { transform:rotate(180deg); }
.shot-btn:hover:not(:disabled) { background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent); }
.shot-btn.danger:hover { background:var(--red-soft); border-color:rgba(220,80,80,.3); color:var(--red); }
.shot-btn:disabled { opacity:.3; cursor:not-allowed; }
@media (max-width:900px) {
  .media-combined { grid-template-columns:1fr; }
  .media-cover-panel { display:flex; align-items:center; gap:12px; }
  .media-shots-panel .screenshot-frame { width:170px; height:108px; }
  .media-shots-panel .screenshot-item.vertical .screenshot-frame { width:108px; height:170px; }
}

/* 字段可读性提升 */
.field > span,
.label { font-size:14px !important; }
.custom-fields .field > span,
.custom-fields.basic-fields .field > span { font-size:14px !important; color:var(--text); }
.field-hint { font-size:13px !important; line-height:1.55; }
.editor-fields input[type="text"],
.editor-fields input[type="number"],
.editor-fields input[type="search"],
.editor-fields select,
.editor-fields textarea,
.editor-meta-bottom input { font-size:14px; min-height:33px; }
.custom-fields textarea { font-size:14px; min-height:50px; }
.editor-fields { gap:11px; }

/* 截图横向滑动 + 分割线 */
.media-shots-panel { border-left:1px solid var(--border); padding-left:18px; }
.media-shots-panel .screenshot-grid { display:flex; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity; scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent; padding:2px 2px 8px; }
.media-shots-panel .screenshot-grid::-webkit-scrollbar { height:6px; }
.media-shots-panel .screenshot-grid::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:999px; }
.media-shots-panel .screenshot-grid::-webkit-scrollbar-track { background:transparent; }
.media-shots-panel .screenshot-item { flex:0 0 auto; scroll-snap-align:start; }
.shot-scroll-controls { display:inline-flex; gap:2px; padding:2px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
.shot-scroll-controls button { width:25px; height:23px; border:0; border-radius:6px; background:transparent; color:var(--muted); display:grid; place-items:center; cursor:pointer; }
.shot-scroll-controls button:hover { background:var(--surface); color:var(--accent); }
.shot-scroll-controls svg { width:13px; height:13px; }
.shot-scroll-controls svg.flip { transform:rotate(180deg); }
@media (max-width:900px) {
  .media-shots-panel { border-left:0; padding-left:0; }
}

/* 全局字体：等线 */
:root {
  --font: "DengXian", "等线", "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* 等线字体下整体字号 +1 */
body { font-size:15px; }
.field > span,
.label,
.custom-fields .field > span,
.custom-fields.basic-fields .field > span { font-size:15px !important; }
.field-hint { font-size:14px !important; }
.editor-fields input[type="text"],
.editor-fields input[type="number"],
.editor-fields input[type="search"],
.editor-fields select,
.editor-fields textarea,
.editor-meta-bottom input { font-size:15px; }
.custom-fields textarea { font-size:15px; }
.editor-title-input { font-size:27px !important; }
.editor-section-head b { font-size:14px; }
.editor-section-head span { font-size:12px; }
.rich-editor { font-size:16px !important; }
.rich-editor p,
.rich-editor div,
.rich-editor li,
.rich-editor blockquote,
.rich-editor td,
.rich-editor th,
.rich-editor figcaption,
.rich-editor h1,
.rich-editor h2,
.rich-editor h4 { font-size:16px; }
.rich-editor h3 { font-size:19px; }
.tag-chip { font-size:12.5px; }
.editor-source-top > span { font-size:13px; }
.editor-source-top input { font-size:12.5px; }

/* 媒体模块：封面垂直居中，截图再放大 */
.media-combined { align-items:center; }
.media-cover-panel { align-self:center; }
.media-shots-panel .screenshot-frame { width:280px; height:176px; }
.media-shots-panel .screenshot-item.vertical .screenshot-frame { width:176px; height:264px; }
.media-shots-panel .screenshot-item { padding:8px; }
.media-shots-panel .screenshot-grid { gap:16px; }
.shot-actions { padding-top:8px; }
@media (max-width:900px) {
  .media-shots-panel .screenshot-frame { width:200px; height:126px; }
  .media-shots-panel .screenshot-item.vertical .screenshot-frame { width:126px; height:200px; }
}

/* 全局字体：微软雅黑 / 宋体 */
:root {
  --font: "Microsoft YaHei", "宋体", SimSun, sans-serif;
}

/* 截图再放大，排序控件同步放大 */
.media-shots-panel .screenshot-frame { width:330px; height:208px; }
.media-shots-panel .screenshot-item.vertical .screenshot-frame { width:208px; height:312px; }
.media-shots-panel .screenshot-item { padding:9px; }
.media-shots-panel .screenshot-grid { gap:18px; }
.shot-actions { gap:6px; padding-top:9px; }
.shot-btn { width:38px; height:34px; border-radius:8px; }
.shot-btn svg { width:16px; height:16px; }
.shot-scroll-controls { gap:3px; padding:3px; border-radius:9px; }
.shot-scroll-controls button { width:30px; height:28px; border-radius:7px; }
.shot-scroll-controls svg { width:15px; height:15px; }
.shot-index { padding:3px 7px; font-size:11px; }
@media (max-width:900px) {
  .media-shots-panel .screenshot-frame { width:240px; height:150px; }
  .media-shots-panel .screenshot-item.vertical .screenshot-frame { width:150px; height:240px; }
  .shot-btn { width:34px; height:30px; }
}

/* 正文区域上下间距压缩 */
.editor-body-wrap { padding:10px 20px 14px; }
.rich-editor { min-height:360px; line-height:1.72; }
.rich-editor p { margin:0 0 .65em; }
.rich-editor h1,
.rich-editor h2,
.rich-editor h3,
.rich-editor h4 { margin:.75em 0 .35em; }
.rich-editor h1:first-child,
.rich-editor h2:first-child,
.rich-editor h3:first-child,
.rich-editor h4:first-child { margin-top:0; }
.rich-editor ul,
.rich-editor ol { margin:.45em 0 .7em; padding-left:1.4em; }
.rich-editor li { margin:.15em 0; }
.rich-editor blockquote { margin:.55em 0; padding:.35em 0 .35em 12px; }
.rich-editor img { margin:.55em 0; }
.toolbar-editor { padding:6px 8px; }

/* 正文编辑：收窄横向宽度，增高纵向展示 */
.editor-body-wrap { padding:12px 56px 20px; }
.rich-editor { width:100%; max-width:820px; margin:0 auto; min-height:540px; padding:6px 2px; }
@media (max-width:900px) {
  .editor-body-wrap { padding:10px 16px 16px; }
  .rich-editor { max-width:none; min-height:420px; }
}

/* 正文占编辑区约 80%，左侧起始 */
.editor-body-wrap { padding:12px 20px 20px; }
.rich-editor { width:80%; max-width:none; margin:0; }
@media (max-width:900px) { .rich-editor { width:100%; } }

/* 正文还原为初始全宽排版 */
.editor-body-wrap { padding:18px 24px 22px; }
.rich-editor {
  width:100%;
  max-width:none;
  margin:0;
  min-height:430px;
  padding:0;
  line-height:1.95;
}
.rich-editor p { margin:0 0 1.1em; }
.rich-editor h1,
.rich-editor h2,
.rich-editor h3,
.rich-editor h4 { margin:1em 0 .5em; }
.rich-editor h1:first-child,
.rich-editor h2:first-child,
.rich-editor h3:first-child,
.rich-editor h4:first-child { margin-top:0; }
.rich-editor ul,
.rich-editor ol { margin:.7em 0 1em; padding-left:1.5em; }
.rich-editor li { margin:.25em 0; }
.rich-editor blockquote { margin:.8em 0; padding:.5em 0 .5em 14px; }
.rich-editor img { margin:.7em 0; }
@media (max-width:900px) {
  .editor-body-wrap { padding:14px 16px 18px; }
  .rich-editor { min-height:400px; }
}

/* 09pc 预览弹窗给足桌面宽度，避免触发窄屏重排 */
.modal.preview { width:min(1240px,100%); }
.modal.preview .modal-body { padding-left:14px; padding-right:14px; }

/* 正文独立滚动编辑框 */
.editor-body-wrap { padding-bottom:14px; }
.rich-editor {
  height:clamp(420px, 52vh, 560px);
  min-height:420px;
  max-height:560px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-right:8px;
  scrollbar-width:thin;
  scrollbar-color:var(--border-strong) transparent;
}
.rich-editor::-webkit-scrollbar { width:8px; }
.rich-editor::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:999px; border:2px solid transparent; background-clip:content-box; }
.rich-editor::-webkit-scrollbar-track { background:transparent; }
@media (max-width:900px) {
  .rich-editor { height:360px; min-height:360px; max-height:480px; }
}

/* 正文编辑框加高，字号回调一档 */
.rich-editor {
  height:clamp(560px, 68vh, 760px);
  min-height:560px;
  max-height:760px;
  font-size:15px !important;
  line-height:1.8;
}
.rich-editor p,
.rich-editor div,
.rich-editor li,
.rich-editor blockquote,
.rich-editor td,
.rich-editor th,
.rich-editor figcaption,
.rich-editor h1,
.rich-editor h2,
.rich-editor h4 { font-size:15px; }
.rich-editor h3 { font-size:18px; }
@media (max-width:900px) {
  .rich-editor { height:440px; min-height:440px; max-height:560px; font-size:15px !important; }
}

/* 正文滚动条加大，便于拖动 */
.rich-editor {
  scrollbar-width:auto;
  scrollbar-color:var(--border-strong) transparent;
  scrollbar-gutter:stable;
}
.rich-editor::-webkit-scrollbar { width:14px; }
.rich-editor::-webkit-scrollbar-thumb {
  min-height:48px;
  background:var(--border-strong);
  border-radius:999px;
  border:3px solid transparent;
  background-clip:padding-box;
}
.rich-editor::-webkit-scrollbar-thumb:hover { background:var(--muted); background-clip:padding-box; }
.rich-editor::-webkit-scrollbar-track { background:transparent; }

/* 正文滚到边界后继续带动页面滚动 */
.rich-editor {
  overscroll-behavior-y: auto;
  overscroll-behavior-x: contain;
}

/* 正文右侧 AI 修改面板 */
.body-workspace { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:14px; align-items:stretch; }
.body-ai-panel { height:clamp(560px,68vh,760px); display:flex; flex-direction:column; gap:9px; padding:12px; border:1px solid var(--border); border-radius:12px; background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(247,250,255,.92)); overflow-y:auto; }
.body-ai-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.body-ai-head b { display:block; font-size:13px; }
.body-ai-head span:last-child { display:block; margin-top:2px; font-size:10.5px; color:var(--faint); }
.body-ai-badge { width:26px; height:26px; border-radius:8px; display:grid; place-items:center; background:linear-gradient(135deg,#5168ff,#2cc9c2); color:#fff; font-size:10px; font-weight:700; }
.body-ai-block { display:flex; flex-direction:column; gap:5px; min-height:0; }
.body-ai-label { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:11.5px; font-weight:600; }
.body-ai-label button { border:0; background:none; color:var(--accent); font-size:11px; cursor:pointer; padding:0; }
.body-ai-panel textarea { resize:vertical; border:1px solid var(--border); border-radius:8px; background:var(--surface); font-size:12.5px; line-height:1.6; }
#body-ai-source { height:98px; color:var(--muted); }
#body-ai-prompt { height:72px; }
.body-ai-chips { display:flex; flex-wrap:wrap; gap:5px; }
.body-ai-chips button { border:1px solid var(--border); border-radius:999px; background:var(--surface-2); color:var(--muted); font-size:10.5px; padding:3px 8px; cursor:pointer; }
.body-ai-chips button:hover { color:var(--accent); border-color:var(--accent-line); background:var(--accent-soft); }
.body-ai-run { width:100%; justify-content:center; }
.body-ai-result-block { flex:1; min-height:150px; }
.body-ai-output { flex:1; min-height:100px; max-height:230px; overflow:auto; padding:8px 9px; border:1px solid var(--border); border-radius:8px; background:var(--surface); font-size:12.5px; line-height:1.7; }
.body-ai-output:empty::before { content:"生成结果会出现在这里。"; color:var(--faint); }
.body-ai-output p { margin:0 0 .55em; }
.body-ai-output img { max-width:100%; }
.body-ai-result-block .btn-block { width:100%; }
@media (max-width:1100px) {
  .body-workspace { grid-template-columns:1fr; }
  .body-ai-panel { height:auto; max-height:520px; }
  .body-ai-output { max-height:180px; }
}

/* AI 修改面板加大 + 正文上下间距收紧 */
.body-workspace { grid-template-columns:minmax(0,1fr) 400px; gap:16px; }
.body-ai-panel { padding:14px; gap:10px; }
#body-ai-source { height:112px; font-size:13px; }
#body-ai-prompt { height:84px; font-size:13px; }
.body-ai-output { min-height:120px; max-height:270px; font-size:13px; }
.body-ai-chips button { font-size:11px; padding:4px 9px; }
.body-ai-run { min-height:36px; }
.rich-editor { line-height:1.75; }
.rich-editor p { margin:0 0 .72em; }
.rich-editor h1,
.rich-editor h2,
.rich-editor h3,
.rich-editor h4 { margin:.7em 0 .3em; }
.rich-editor ul,
.rich-editor ol { margin:.45em 0 .7em; }
.rich-editor li { margin:.18em 0; }
.rich-editor blockquote { margin:.55em 0; }
.rich-editor img { margin:.5em 0; }
@media (max-width:1100px) {
  .body-workspace { grid-template-columns:1fr; }
  #body-ai-source { height:90px; }
  #body-ai-prompt { height:70px; }
}

/* 更新日志内容字号 */
.changelog-editor textarea { font-size:15px !important; line-height:1.75; }
.update-log-list,
.update-log-list p,
.update-log-list li,
.update-log-list div { font-size:15px; line-height:1.75; }

/* 全站字体：15px Helvetica Neue 字体栈 */
:root {
  --font: "Helvetica Neue", Helvetica, "PingFang SC", Tahoma, Arial, sans-serif;
}
html, body { font-family: var(--font); font-size: 15px; }
button, input, select, textarea { font-family: var(--font); }

/* 编辑区小字号统一不低于 12px */
.editor-head .hint,
.editor-main .editor-section-head span,
.editor-main .editor-source-top input,
.editor-main .media-shots-head .hint,
.editor-main .media-cover-actions .field-hint,
.editor-main .body-ai-head span:last-child,
.editor-main .body-ai-label,
.editor-main .body-ai-chips button,
.editor-main .editor-footer .hint,
.editor-main .save-state,
.editor-main .basic-empty-toggle,
.editor-main .basic-empty-toggle em,
.editor-main .shot-index { font-size:12px; }
.editor-main .body-ai-head b { font-size:13px; }

/* 编辑区辅助文字最小 14px，加粗内容 15px */
.editor-head .hint,
.editor-main .editor-section-head span,
.editor-main .editor-source-top input,
.editor-main .media-shots-head .hint,
.editor-main .media-cover-actions .field-hint,
.editor-main .body-ai-head span:last-child,
.editor-main .body-ai-label,
.editor-main .body-ai-chips button,
.editor-main .editor-footer .hint,
.editor-main .save-state,
.editor-main .basic-empty-toggle,
.editor-main .basic-empty-toggle em,
.editor-main .shot-index { font-size:14px; }
.editor-main b,
.editor-main strong { font-size:15px; }

/* 正文与右侧 AI 修改按 2:1 分配，AI 占三分之一 */
.body-workspace { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }

/* 名称改为内容信息内的普通字段 */
.editor-name-input {
  width:100%;
  min-height:38px;
  padding:7px 10px !important;
  border:1px solid var(--border-strong) !important;
  border-radius:8px;
  background:var(--surface) !important;
  color:var(--text);
  font-size:16px !important;
  font-weight:600 !important;
  line-height:1.45;
  resize:none;
  overflow:hidden;
}
.editor-name-input:focus { outline:2px solid var(--accent-soft); border-color:var(--accent) !important; }

/* 名称与一句话介绍编辑框等高 */
.editor-name-input,
#edit-summary {
  height:42px !important;
  min-height:42px !important;
  max-height:42px !important;
  padding:8px 10px !important;
  line-height:1.4;
  box-sizing:border-box;
}

/* 更新日志折叠：最近 / 历史 */
.changelog-collapse { margin:10px 0 0; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); overflow:hidden; }
.changelog-toggle { width:100%; display:flex; align-items:center; gap:12px; padding:10px 14px; border:0; background:transparent; cursor:pointer; color:var(--text); text-align:left; }
.changelog-toggle:hover { background:var(--surface-3); }
.changelog-title { display:flex; align-items:baseline; gap:9px; flex:1; min-width:0; }
.changelog-title b { font-size:14px; }
.changelog-title em { font-style:normal; font-size:12px; color:var(--faint); }
.changelog-count { font-size:12px; color:var(--faint); white-space:nowrap; }
.changelog-chevron { width:15px; height:15px; transition:transform .16s ease; color:var(--faint); }
.changelog-toggle.open .changelog-chevron { transform:rotate(90deg); }
.changelog-body { padding:0 14px 14px; border-top:1px solid var(--border); }
.changelog-block { padding:12px 0; border-bottom:1px dashed var(--border); }
.changelog-block:last-of-type { border-bottom:0; }
.changelog-version { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.changelog-version span { font-size:12px; color:var(--muted); font-weight:600; }
.changelog-version b { font-size:12px; color:var(--accent); font-weight:600; }
.changelog-text { font-size:15px; line-height:1.75; color:var(--text); }
.changelog-history-item { margin:9px 0 0; padding:9px 10px; border-radius:8px; background:var(--surface); }
.changelog-history-item strong { display:block; margin-bottom:4px; color:var(--accent); font-size:12px; }
.changelog-empty-history { padding:8px 0; }
.changelog-raw { margin-top:10px; }
.changelog-raw summary { color:var(--muted); font-size:12px; cursor:pointer; }
.changelog-raw textarea { margin-top:8px; min-height:140px; font-size:15px; }

/* 压缩编辑页底部空间，保证正文框架完整可见 */
.view:has(.editor-layout) { padding-bottom:34px !important; }
.editor-body-wrap { padding-bottom:8px; }
.body-workspace { scroll-margin-bottom:24px; }
.editor-meta-bottom { padding:6px 20px; }
.editor-footer { padding:6px 16px; }

/* 最近 / 历史更新内容可直接编辑 */
.changelog-text[contenteditable="true"] { min-height:38px; padding:7px 9px; border:1px solid transparent; border-radius:8px; background:var(--surface); outline:none; }
.changelog-text[contenteditable="true"]:hover { border-color:var(--border); }
.changelog-text[contenteditable="true"]:focus { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); background:var(--surface); }
.changelog-history-item .changelog-text[contenteditable="true"] { background:transparent; padding:5px 7px; }
.changelog-history-item .changelog-text[contenteditable="true"]:focus { background:var(--surface); }

/* 最近 / 历史更新使用明确编辑框 */
.changelog-input {
  width:100%;
  min-height:72px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface);
  color:var(--text);
  font-size:15px;
  line-height:1.75;
  resize:vertical;
}
.changelog-input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.changelog-history-item .changelog-input { min-height:58px; }

/* 更新日志编辑框随内容自适应，不在框内滚动 */
.changelog-input {
  height:auto;
  min-height:52px;
  max-height:none;
  overflow:hidden;
  resize:none;
  field-sizing:content;
}

/* 更新日志与正文 AI 面板按钮字号 */
.changelog-title b { font-size:15px; }
.changelog-title em,
.changelog-count,
.changelog-version span { font-size:14px; }
.changelog-version b { font-size:15px; }
.body-ai-label span { font-size:14px; }
.body-ai-label button,
[data-copy-source],
[data-copy-result],
[data-apply-body-ai] { font-size:14px; }
.body-ai-chips button { font-size:14px; }

/* 灰色字段标签/注释统一使用 Helvetica Neue 字体栈 */
.field > span,
.label,
.field-hint,
.editor-main .hint,
.editor-section-head,
.editor-section-head b,
.editor-section-head span,
.changelog-title b,
.changelog-title em,
.changelog-count,
.changelog-version span,
.body-ai-head b,
.body-ai-head span,
.body-ai-label,
.body-ai-label button {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", Tahoma, Arial, sans-serif;
}

/* 字段名称取消加粗 */
.field > span,
.label,
.custom-fields .field > span,
.custom-fields.basic-fields .field > span {
  font-weight:400;
}

/* 字段名称使用默认正文颜色 */
.field > span,
.label,
.custom-fields .field > span,
.custom-fields.basic-fields .field > span {
  color:var(--text);
}

/* 字段名称恢复弱化灰色 */
.field > span,
.label,
.custom-fields .field > span,
.custom-fields.basic-fields .field > span {
  color:var(--muted);
}

/* 原文地址点击复制 */
.editor-source-link {
  flex:1;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--faint);
  font-family:var(--font);
  font-size:12.5px;
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  cursor:copy;
}
.editor-source-link:hover { color:var(--accent); text-decoration:underline; }

/* 插件鲸鱼娘立绘 */
.whale-girl-img { width:100%; height:100%; object-fit:cover; object-position:center 38%; display:block; border-radius:inherit; }
.ai-orb,
.ai-chat-avatar,
.ai-fab-orb,
.ai-nudge-icon { overflow:hidden; background:#eef6ff; }
.ai-fab { height:50px; padding-left:7px; }
.ai-fab-orb { width:36px; height:36px; border-radius:50%; }
.ai-fab-orb .whale-girl-img { border-radius:50%; }
.ai-chat-avatar { border-radius:8px; }

/* 会动的鲸鱼娘角色 */
.whale-companion {
  position:fixed;
  right:22px;
  bottom:92px;
  z-index:138;
  width:152px;
  height:170px;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  transform-origin:50% 100%;
  animation:whale-companion-float 4.6s ease-in-out infinite, whale-blink 6.2s ease-in-out infinite;
  filter:drop-shadow(0 10px 16px rgba(20,45,95,.22));
  transition:opacity .2s ease;
}
.whale-girl-character {
  display:block;
  width:152px;
  height:160px;
  object-fit:contain;
  object-position:center bottom;
  transform-origin:50% 100%;
  animation:whale-character-sway 5.4s ease-in-out infinite;
}
.whale-bubble {
  position:absolute;
  top:44px;
  right:112px;
  z-index:2;
  padding:3px 9px;
  border:1px solid rgba(120,150,220,.45);
  border-radius:999px 999px 3px 999px;
  background:rgba(255,255,255,.95);
  color:#31548f;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
  animation:whale-bubble-pulse 3.2s ease-in-out infinite;
}
@keyframes whale-companion-float {
  0%,100% { transform:translateY(0) rotate(-.8deg); }
  50% { transform:translateY(-7px) rotate(.8deg); }
}
@keyframes whale-character-sway {
  0%,100% { transform:rotate(-1.4deg) scale(1); }
  50% { transform:rotate(1.6deg) scale(1.015); }
}
@keyframes whale-blink {
  0%,92%,100% { filter:drop-shadow(0 10px 16px rgba(20,45,95,.22)) brightness(1); }
  94% { filter:drop-shadow(0 10px 16px rgba(20,45,95,.22)) brightness(1.06); }
  96% { filter:drop-shadow(0 10px 16px rgba(20,45,95,.22)) brightness(1); }
}
@keyframes whale-bubble-pulse {
  0%,100% { transform:translateY(0) scale(1); opacity:.9; }
  50% { transform:translateY(-3px) scale(1.03); opacity:1; }
}
.whale-companion:hover { animation-play-state:paused; filter:drop-shadow(0 14px 22px rgba(20,45,95,.3)); }
.whale-companion:hover .whale-girl-character { transform:scale(1.06) rotate(2deg); }
body.ai-modal-open .whale-companion { opacity:0; pointer-events:none; animation-play-state:paused; }
body:has(.ai-nudge:not([hidden])) .whale-companion { opacity:0; pointer-events:none; }
@media (max-width:760px) {
  .whale-companion { right:10px; bottom:78px; width:118px; height:136px; }
  .whale-girl-character { width:118px; height:128px; }
  .whale-bubble { font-size:11px; top:16px; right:82px; }
}

/* 鲸鱼娘互动 */
.whale-heart {
  position:absolute;
  z-index:5;
  color:#ff6f9c;
  font-size:18px;
  pointer-events:none;
  text-shadow:0 2px 5px rgba(255,110,155,.3);
  animation:whale-heart-float 1.2s ease-out forwards;
}
@keyframes whale-heart-float {
  0% { opacity:1; transform:translateY(0) scale(.7); }
  35% { opacity:1; transform:translateY(-12px) scale(1.15); }
  100% { opacity:0; transform:translateY(-42px) scale(1.3); }
}
.whale-girl-character {
  animation:whale-character-sway 4.6s ease-in-out infinite, whale-character-bounce 6.4s ease-in-out infinite;
}
@keyframes whale-character-bounce {
  0%, 88%, 100% { scale:1 1; }
  91% { scale:1.02 .96; }
  94% { scale:.99 1.02; }
  97% { scale:1 1; }
}
@keyframes whale-companion-float {
  0%,100% { transform:translateY(0) rotate(-.8deg); }
  32% { transform:translateY(-7px) rotate(.7deg); }
  36% { transform:translateY(-2px) rotate(.2deg); }
  44% { transform:translateY(-5px) rotate(-.2deg); }
  70% { transform:translateY(0) rotate(.4deg); }
}

/* 养成系鲸鱼娘桌宠 */
.pet-dock {
  position:fixed;
  right:22px;
  bottom:92px;
  z-index:138;
  width:152px;
  height:160px;
  transform-origin:50% 100%;
  animation:whale-companion-float 4.6s ease-in-out infinite;
}
.whale-companion {
  position:relative;
  right:auto;
  bottom:auto;
  width:152px;
  height:160px;
  animation:none;
}
.whale-girl-character { width:152px; height:160px; }
.pet-happy {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center bottom;
  opacity:0;
  pointer-events:none;
  transform-origin:50% 100%;
}
.pet-dock.reacting .whale-girl-character { opacity:0; }
.pet-dock.reacting .pet-happy { opacity:1; animation:pet-happy-pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pet-happy-pop {
  0% { opacity:0; transform:scale(.72) rotate(-5deg); }
  65% { opacity:1; transform:scale(1.06) rotate(2deg); }
  100% { opacity:1; transform:scale(1) rotate(0); }
}
.pet-stats {
  position:absolute;
  right:0;
  left:auto;
  bottom:calc(100% + 8px);
  width:190px;
  padding:9px 10px;
  border:1px solid rgba(120,150,220,.42);
  border-radius:12px;
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 28px rgba(20,40,90,.16);
  backdrop-filter:blur(10px);
  opacity:0;
  visibility:hidden;
  transform:translateY(6px);
  transition:opacity .18s ease, transform .18s ease, visibility .18s;
  pointer-events:none;
}
.pet-dock:hover .pet-stats,
.pet-dock:focus-within .pet-stats {
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}
.pet-stats-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:5px; }
.pet-stats-head b { color:#31548f; font-size:13px; }
.pet-stats-head span { padding:1px 6px; border-radius:999px; background:#edf4ff; color:#4168a8; font-size:11px; font-weight:600; }
.pet-bar { display:flex; align-items:center; gap:5px; height:18px; color:#667791; font-size:11px; }
.pet-bar > span { width:28px; flex:none; }
.pet-bar > i { flex:1; height:5px; border-radius:999px; background:#e8edf5; overflow:hidden; }
.pet-bar > i > em { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#6f8cff,#2dd4bf); transition:width .35s ease; }
.pet-bar > b { width:23px; text-align:right; color:#31548f; font-size:10px; }
.pet-exp { display:flex; align-items:center; gap:5px; margin-top:2px; padding-top:5px; border-top:1px dashed #dfe7f3; color:#7b89a1; font-size:10px; }
.pet-exp > i { flex:1; height:4px; border-radius:999px; background:#edf1f7; overflow:hidden; }
.pet-exp > i > em { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#ffb86b,#ff7b9c); transition:width .35s ease; }
.pet-exp > b { color:#9a6a8e; font-size:10px; }
.pet-actions { position:absolute; left:-38px; bottom:4px; display:flex; flex-direction:column; gap:5px; }
.pet-action {
  width:32px;
  height:30px;
  border:1px solid rgba(120,150,220,.4);
  border-radius:9px;
  background:rgba(255,255,255,.94);
  color:#4168a8;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(20,40,90,.1);
}
.pet-action:hover { background:#edf4ff; transform:translateX(-2px); }
.pet-action.busy { opacity:.5; pointer-events:none; }
body.ai-modal-open .pet-dock,
body:has(.ai-nudge:not([hidden])) .pet-dock { opacity:0; pointer-events:none; }
@media (max-width:760px) {
  .pet-dock { right:10px; bottom:78px; width:118px; height:128px; }
  .whale-companion { width:118px; height:128px; }
  .whale-girl-character { width:118px; height:128px; }
  .pet-stats { width:170px; }
  .pet-actions { left:-34px; }
}

.pet-level-chip {
  position:absolute;
  left:-4px;
  bottom:16px;
  z-index:4;
  padding:2px 7px;
  border:1px solid rgba(120,150,220,.38);
  border-radius:999px;
  background:rgba(255,255,255,.95);
  color:#4168a8;
  font-size:11px;
  font-weight:700;
  box-shadow:0 3px 8px rgba(20,40,90,.12);
}

/* Live2D 看板娘接入 */
.pet-dock { right:14px; bottom:64px; width:300px; height:300px; }
.pet-live2d-slot { position:relative; width:300px; height:300px; }
.pet-live2d-slot #waifu {
  position:relative !important;
  right:auto !important;
  bottom:auto !important;
  margin:0 !important;
  transform:none !important;
  line-height:0;
  z-index:1;
}
.pet-live2d-slot #waifu:hover { transform:none !important; }
.pet-live2d-slot #live2d { width:300px; height:300px; display:block; }
.pet-live2d-slot #waifu-tips { z-index:5; }
#waifu-tool, #waifu-toggle { display:none !important; }
.pet-live2d-loading {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#7d8ba3;
  font-size:12px;
  border:1px dashed rgba(120,150,220,.28);
  border-radius:16px;
  background:rgba(255,255,255,.55);
}
body.live2d-ready .pet-live2d-loading { display:none; }
body.live2d-failed .pet-live2d-loading { display:grid; }
.pet-dock.reacting .pet-live2d-slot { animation:pet-happy-pop .5s cubic-bezier(.2,1.4,.4,1); }
.pet-level-chip { left:2px; bottom:8px; }
.pet-bubble { top:22px; right:auto; left:4px; }
@media (max-width:760px) {
  .pet-dock { right:8px; bottom:56px; width:220px; height:220px; }
  .pet-live2d-slot, .pet-live2d-slot #live2d { width:220px; height:220px; }
  .pet-stats { width:172px; }
  .pet-actions { left:-32px; bottom:6px; }
}

/* 鼠标指针样式：参考 SeeMac 的 .cur 光标 */
html, body {
  cursor: url('/assets/mouse/mouse1.cur'), default;
}
a,
button,
[role="button"],
summary,
label[for],
select,
.clickable {
  cursor: url('/assets/mouse/mouse2.cur'), pointer !important;
}
input[type="text"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea,
[contenteditable="true"] {
  cursor: text;
}

/* 桌宠底部工具条、食物菜单与聊天 */
.pet-dock { right:14px; bottom:18px; }
.pet-actions { left:-38px; bottom:52px; }
.pet-toolbar {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:7;
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:4px;
  padding:5px;
  border:1px solid rgba(120,150,220,.35);
  border-radius:10px 10px 12px 12px;
  background:rgba(255,255,255,.94);
  box-shadow:0 -4px 14px rgba(20,40,90,.08);
  backdrop-filter:blur(8px);
}
.pet-tool {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-height:27px;
  padding:3px 5px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#4168a8;
  font-size:11px;
  cursor:url('/assets/mouse/mouse2.cur'), pointer !important;
}
.pet-tool:hover { background:#edf4ff; }
.pet-tool svg { width:11px; height:11px; }
.pet-tool b { color:#31548f; font-size:11px; }
.pet-food-menu {
  position:absolute;
  right:100%;
  bottom:56px;
  z-index:9;
  width:184px;
  margin-right:8px;
  padding:7px;
  border:1px solid rgba(120,150,220,.4);
  border-radius:12px;
  background:rgba(255,255,255,.98);
  box-shadow:0 14px 30px rgba(20,40,90,.2);
}
.pet-food-menu[hidden] { display:none; }
.pet-food-title { padding:2px 5px 5px; color:#667791; font-size:11px; }
.pet-food-menu button {
  display:grid;
  grid-template-columns:20px 1fr auto;
  align-items:center;
  gap:4px;
  width:100%;
  padding:5px 6px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#31548f;
  font-size:12px;
  text-align:left;
}
.pet-food-menu button:hover { background:#edf4ff; }
.pet-food-menu small { color:#9aa8bd; font-size:10px; }
.pet-dock.stats-open .pet-stats,
.pet-dock:focus-within .pet-stats {
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}
.pet-chat-panel {
  position:fixed;
  right:14px;
  bottom:330px;
  z-index:146;
  width:min(310px, calc(100vw - 28px));
  padding:12px;
  border:1px solid rgba(120,150,220,.42);
  border-radius:14px;
  background:rgba(255,255,255,.98);
  box-shadow:0 18px 42px rgba(20,35,70,.22);
  backdrop-filter:blur(12px);
}
.pet-chat-panel[hidden] { display:none; }
.pet-chat-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding-bottom:8px; border-bottom:1px solid #e8eef8; }
.pet-chat-head b { display:block; color:#31548f; font-size:13px; }
.pet-chat-head span { display:block; margin-top:2px; color:#9aa8bd; font-size:10px; }
.pet-chat-head button { border:0; background:transparent; color:#8a9ab2; font-size:18px; line-height:1; cursor:pointer; }
.pet-chat-log { display:flex; flex-direction:column; gap:7px; max-height:230px; min-height:100px; overflow-y:auto; padding:9px 2px; }
.pet-chat-msg { max-width:86%; padding:6px 9px; border-radius:10px; font-size:12px; line-height:1.55; }
.pet-chat-msg.pet { align-self:flex-start; background:#eef4ff; color:#31548f; border-bottom-left-radius:3px; }
.pet-chat-msg.me { align-self:flex-end; background:#5f7cff; color:#fff; border-bottom-right-radius:3px; }
.pet-chat-form { display:flex; gap:6px; padding-top:8px; border-top:1px solid #e8eef8; }
.pet-chat-form input { flex:1; min-width:0; height:30px; padding:4px 8px; border:1px solid #dce5f2; border-radius:7px; font-size:12px; outline:none; }
.pet-chat-form input:focus { border-color:#6f8cff; box-shadow:0 0 0 2px rgba(111,140,255,.12); }
.pet-chat-form button { height:30px; padding:0 10px; border:0; border-radius:7px; background:#5f7cff; color:#fff; font-size:12px; cursor:pointer; }
body.ai-modal-open .pet-chat-panel { display:none; }
@media (max-width:760px) {
  .pet-dock { right:8px; bottom:14px; }
  .pet-chat-panel { right:8px; bottom:262px; }
  .pet-food-menu { width:164px; }
}

/* 桌宠缩小到原来的 2/3，状态仅点击显示 */
.pet-dock { width:200px; height:200px; right:14px; bottom:18px; }
.pet-live2d-slot, .pet-live2d-slot #live2d { width:200px; height:200px; }
.pet-toolbar { padding:4px; gap:3px; }
.pet-tool { min-height:24px; padding:2px 3px; font-size:10px; gap:2px; }
.pet-tool b { font-size:10px; }
.pet-tool svg { width:10px; height:10px; }
.pet-actions { left:-36px; bottom:42px; }
.pet-food-menu { width:174px; bottom:42px; }
.pet-dock:not(.stats-open):hover .pet-stats,
.pet-dock:not(.stats-open):focus-within .pet-stats {
  opacity:0;
  visibility:hidden;
  transform:translateY(6px);
  pointer-events:none;
}
.pet-dock.stats-open .pet-stats {
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}
.pet-dock.stats-open #waifu-tips { opacity:0 !important; }
.pet-chat-panel { bottom:232px; }
@media (max-width:760px) {
  .pet-dock { width:170px; height:170px; bottom:12px; }
  .pet-live2d-slot, .pet-live2d-slot #live2d { width:170px; height:170px; }
  .pet-chat-panel { bottom:196px; }
  .pet-actions { left:-32px; bottom:38px; }
}

/* 状态面板放到角色左侧，避开底部按钮和对话气泡 */
.pet-stats {
  right:calc(100% + 46px);
  bottom:48px;
  width:190px;
}
@media (max-width:760px) {
  .pet-stats { right:calc(100% + 38px); bottom:38px; width:172px; }
}

/* 状态面板只由按钮控制显隐 */
.pet-stats[hidden] { display:none !important; }
.pet-dock .pet-stats:not([hidden]) {
  display:block;
  visibility:visible !important;
  opacity:1 !important;
  transform:translateY(0) !important;
  pointer-events:auto !important;
}

/* 九妹放大 */
.pet-dock { width:250px; height:250px; }
.pet-live2d-slot, .pet-live2d-slot #live2d { width:250px; height:250px; }
.pet-actions { left:-38px; bottom:50px; }
.pet-chat-panel { bottom:288px; }
.pet-tool-avatar { width:14px; height:14px; border-radius:50%; object-fit:cover; flex:none; }
@media (max-width:760px) {
  .pet-dock { width:200px; height:200px; }
  .pet-live2d-slot, .pet-live2d-slot #live2d { width:200px; height:200px; }
  .pet-chat-panel { bottom:230px; }
}

/* 六个按钮仅在悬浮九妹时显示 */
.pet-actions,
.pet-toolbar {
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(4px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s;
}
.pet-dock:hover .pet-actions,
.pet-dock:hover .pet-toolbar,
.pet-dock:focus-within .pet-actions,
.pet-dock:focus-within .pet-toolbar,
.pet-dock.stats-open .pet-actions,
.pet-dock.stats-open .pet-toolbar {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
@media (hover:none) {
  .pet-actions,
  .pet-toolbar { opacity:1; visibility:visible; pointer-events:auto; transform:none; }
}

/* 悬浮到按钮时的缓冲连接区，避免按钮瞬间收回 */
.pet-dock.pet-hover .pet-actions,
.pet-dock.pet-hover .pet-toolbar {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.pet-actions::after {
  content:"";
  position:absolute;
  right:-16px;
  top:-6px;
  bottom:-6px;
  width:18px;
}

/* AI 聊天状态 */
.pet-chat-head span b { display:inline; color:#5f7cff; font-size:10px; }
.pet-chat-msg.typing { opacity:.6; font-style:italic; }
.pet-chat-form button:disabled { opacity:.5; cursor:wait; }

/* 采集列表 */
.collect-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.collect-stat-grid .stat-card { display:flex; flex-direction:column; gap:2px; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow-sm); }
.collect-stat-grid .stat-label { color:var(--muted); font-size:12px; }
.collect-stat-grid .stat-card strong { color:var(--text); font-size:23px; line-height:1.2; }
.collect-stat-grid .stat-card small { color:var(--faint); font-size:11px; }
.collect-source-name { font-weight:600; color:var(--text); margin-bottom:2px; }
.collect-source-url { max-width:420px; color:var(--faint); font-size:11.5px; }
.collect-table td { vertical-align:middle; }
@media (max-width:760px) {
  .collect-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .collect-source-url { max-width:220px; }
}

/* 九妹全局悬浮与收起 */
#pet-global { position:relative; z-index:138; }
.pet-hide {
  position:absolute;
  top:4px;
  right:4px;
  z-index:12;
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border:1px solid rgba(120,150,220,.35);
  border-radius:50%;
  background:rgba(255,255,255,.92);
  color:#7186a6;
  font-size:15px;
  line-height:1;
  cursor:url('/assets/mouse/mouse2.cur'), pointer !important;
  opacity:0;
  transition:opacity .16s ease;
}
.pet-dock:hover .pet-hide,
.pet-dock.pet-hover .pet-hide { opacity:1; }
.pet-restore {
  display:none;
  position:fixed;
  right:10px;
  bottom:-6px;
  z-index:152;
  width:74px;
  height:46px;
  padding:0;
  border:0;
  background:transparent;
  overflow:hidden;
  cursor:url('/assets/mouse/mouse2.cur'), pointer !important;
}
.pet-restore img {
  width:74px;
  height:74px;
  object-fit:cover;
  object-position:center 18%;
  transform:translateY(-16px);
  display:block;
}
.pet-global.pet-collapsed .pet-dock,
.pet-global.pet-collapsed .pet-chat-panel { display:none; }
.pet-global.pet-collapsed .pet-restore { display:block; }
body.ai-modal-open .pet-hide { display:none; }

/* 字段编辑框垂直间距微调 */
.field { gap:6px; }
input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
select {
  min-height:40px;
  padding:9px 12px;
  line-height:1.4;
}
textarea {
  padding:10px 12px;
  line-height:1.7;
}
.field > span,
.label { line-height:1.45; }
.meta-grid,
.seo-grid,
.form-grid { row-gap:14px; }

/* 截图排序/删除按钮加大点击区域 */
.shot-actions { gap:6px; padding-top:9px; }
.shot-btn {
  width:44px;
  height:40px;
  border-radius:10px;
  background:var(--surface);
  box-shadow:0 2px 6px rgba(25,40,80,.06);
}
.shot-btn svg { width:19px; height:19px; }
.shot-scroll-controls { gap:4px; padding:4px; border-radius:10px; }
.shot-scroll-controls button { width:40px; height:36px; border-radius:8px; }
.shot-scroll-controls svg { width:18px; height:18px; }
.shot-btn:active:not(:disabled),
.shot-scroll-controls button:active { transform:scale(.96); }
@media (max-width:760px) {
  .shot-btn { width:40px; height:36px; }
  .shot-scroll-controls button { width:36px; height:32px; }
}

/* 截图操作按钮：整体工具栏样式 */
.media-shots-panel .shot-actions,
.screenshot-field .shot-actions {
  align-self:center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:3px 5px;
  border:1px solid #e2e9f4;
  border-radius:11px;
  background:#f5f8fd;
  box-shadow:0 2px 6px rgba(25,40,80,.05);
}
.shot-actions .shot-btn {
  width:36px;
  height:32px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#6f8099;
  display:grid;
  place-items:center;
  box-shadow:none;
  transition:background .15s ease, color .15s ease, transform .12s ease;
}
.shot-actions .shot-btn svg { width:16px; height:16px; }
.shot-actions .shot-btn:hover:not(:disabled) { background:#fff; color:var(--accent); box-shadow:0 1px 4px rgba(25,40,80,.1); }
.shot-actions .shot-btn:active:not(:disabled) { transform:scale(.95); }
.shot-actions .shot-btn.danger {
  position:relative;
  margin-left:10px;
  color:#a96a76;
}
.shot-actions .shot-btn.danger::before {
  content:"";
  position:absolute;
  left:-7px;
  top:6px;
  bottom:6px;
  width:1px;
  background:#dce5f1;
}
.shot-actions .shot-btn.danger:hover:not(:disabled) { background:#fff1f3; color:var(--red); }
.shot-actions .shot-btn:disabled { opacity:.28; cursor:not-allowed; }
.shot-scroll-controls {
  gap:3px;
  padding:3px;
  border:1px solid #e2e9f4;
  border-radius:10px;
  background:#f5f8fd;
}
.shot-scroll-controls button { width:34px; height:30px; border-radius:7px; color:#6f8099; }
.shot-scroll-controls button:hover { background:#fff; color:var(--accent); }
.shot-scroll-controls svg { width:16px; height:16px; }
@media (max-width:760px) {
  .shot-actions .shot-btn { width:34px; height:30px; }
  .shot-scroll-controls button { width:32px; height:28px; }
}

/* 截图操作按钮再放大一档，图标更清晰 */
.shot-actions .shot-btn { width:38px; height:34px; }
.shot-actions .shot-btn svg { width:18px; height:18px; }
.shot-scroll-controls button { width:36px; height:32px; }
.shot-scroll-controls svg { width:17px; height:17px; }

/* 正文 AI 结果操作：复制 / 应用并排 */
.body-ai-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}
.body-ai-actions .btn {
  width:100%;
  min-height:32px;
  justify-content:center;
  gap:4px;
  white-space:nowrap;
}
.body-ai-actions .btn svg { width:13px; height:13px; }
.body-ai-actions .btn:disabled { opacity:.45; cursor:not-allowed; }

/* 后台按钮统一淡蓝渐变 */
.btn {
  background:linear-gradient(135deg,#f5faff 0%,#dfeeff 100%);
  border-color:#cfe2f8;
  color:#2f5f9e;
  box-shadow:0 3px 9px rgba(91,148,220,.10);
}
.btn:hover {
  background:linear-gradient(135deg,#eaf5ff 0%,#d2e7ff 100%);
  border-color:#b9d7f8;
  color:#24558f;
}
.btn-primary {
  background:linear-gradient(135deg,#b7d6ff 0%,#85b9ff 100%);
  border:1px solid #91c1ff;
  color:#17457e;
  box-shadow:0 5px 14px rgba(91,148,220,.20);
}
.btn-primary:hover {
  background:linear-gradient(135deg,#a8ccff 0%,#78b0ff 100%);
  border-color:#7fb3fb;
  color:#103b6e;
}
.btn-soft {
  background:linear-gradient(135deg,#f4faff 0%,#e3f1ff 100%);
  border-color:#d4e8fb;
  color:#356aa8;
}
.btn-soft:hover { background:linear-gradient(135deg,#eaf5ff 0%,#d7ebff 100%); border-color:#bcd9f8; }
.btn-ghost {
  background:linear-gradient(135deg,rgba(245,250,255,.8),rgba(226,242,255,.8));
  border-color:transparent;
  color:#55799f;
}
.btn-ghost:hover { background:linear-gradient(135deg,#eaf5ff,#d8ebff); color:#2f5f9e; }
.btn-danger {
  background:var(--red-soft);
  border-color:color-mix(in srgb,var(--red) 30%,transparent);
  color:var(--red);
  box-shadow:none;
}
.btn-danger:hover { background:var(--red-soft); border-color:var(--red); color:var(--red); }
.icon-btn {
  background:linear-gradient(135deg,#f7fbff 0%,#e8f3ff 100%);
  border-color:#dceafa;
  color:#5b7fa8;
}
.icon-btn:hover { background:linear-gradient(135deg,#eef7ff 0%,#d9ecff 100%); color:#2f5f9e; }

/* SEO 标题百度下拉 */
.seo-title-field { position:relative; }
.seo-title-row { display:flex; align-items:center; gap:8px; min-width:0; }
.seo-title-row input { flex:1; min-width:0; }
.seo-suggest-btn { height:40px; padding:0 12px; flex:none; white-space:nowrap; }
.seo-suggest-panel {
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  z-index:40;
  padding:10px;
  border:1px solid #cfe2f8;
  border-radius:12px;
  background:rgba(255,255,255,.98);
  box-shadow:0 16px 36px rgba(25,50,95,.18);
  backdrop-filter:blur(10px);
}
.seo-suggest-panel[hidden] { display:none; }
.seo-suggest-head { display:flex; align-items:center; gap:6px; padding:0 3px 8px; border-bottom:1px solid #e8eef8; color:#6b7e99; font-size:11.5px; }
.seo-suggest-head b { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#31548f; font-size:12px; }
.seo-suggest-head em { margin-left:auto; font-style:normal; color:#93a4bb; font-size:10.5px; }
.seo-suggest-list { max-height:280px; overflow-y:auto; padding-top:5px; }
.seo-suggest-item {
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px 7px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#31548f;
  text-align:left;
  font-size:12.5px;
  cursor:url('/assets/mouse/mouse2.cur'), pointer !important;
}
.seo-suggest-item:hover { background:#eef6ff; }
.seo-suggest-item > span { width:20px; flex:none; color:#9aacc3; font:600 10.5px/1.4 "Cascadia Code",Consolas,monospace; }
.seo-suggest-item > b { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.seo-suggest-item > svg { width:12px; height:12px; flex:none; color:#7fa8d8; opacity:0; }
.seo-suggest-item:hover > svg { opacity:1; }
.seo-suggest-empty { padding:14px 8px; color:#8092aa; font-size:12px; text-align:center; }
@media (max-width:760px) {
  .seo-title-row { align-items:stretch; }
  .seo-suggest-btn { padding:0 10px; }
}

/* 百度下拉一次展示完整 10 条 */
.seo-suggest-list { max-height:380px; }

/* 查询下拉已移到名称字段 */
.seo-title-row .seo-suggest-btn { height:42px; }

/* SEO 三要素 AI 优化入口 */
.editor-section-head .seo-ai-btn {
  flex:none;
  margin-left:auto;
  height:30px;
  padding:0 10px;
  font-size:11.5px;
  white-space:nowrap;
}
.editor-section-head .seo-ai-btn svg { width:13px; height:13px; }

/* SEO AI 优化入口强化 */
.seo-ai-wrap {
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  flex:none;
}
.seo-ai-note {
  color:var(--faint);
  font-size:10.5px;
  line-height:1.4;
  white-space:nowrap;
}
.editor-section-head .seo-ai-btn {
  height:32px;
  padding:0 12px;
  font-size:12px;
  font-weight:600;
  border:1px solid #5b98f8 !important;
  background:linear-gradient(135deg,#79b0ff 0%,#4d8df7 100%) !important;
  color:#fff !important;
  box-shadow:0 5px 14px rgba(77,141,247,.28);
  letter-spacing:.02em;
}
.editor-section-head .seo-ai-btn:hover {
  background:linear-gradient(135deg,#68a4ff 0%,#3f80ef 100%) !important;
  border-color:#3f80ef !important;
  color:#fff !important;
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(77,141,247,.34);
}
.editor-section-head .seo-ai-btn svg { width:14px; height:14px; }
@media (max-width:760px) {
  .seo-ai-note { display:none; }
}

/* 内容信息 / SEO 三要素：字段名在左，编辑控件在右 */
.horizontal-fields {
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-bottom:4px;
}
.horizontal-fields .field {
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  align-items:center;
  gap:12px;
  min-width:0;
}
.horizontal-fields .field.full { grid-column:auto; }
.horizontal-fields .field > span {
  align-self:center;
  min-width:0;
  text-align:left;
  line-height:1.4;
  white-space:nowrap;
}
.horizontal-fields .field:has(textarea) { align-items:start; }
.horizontal-fields .field:has(textarea) > span { padding-top:9px; }
.horizontal-fields .seo-title-row { min-width:0; }
.horizontal-fields .seo-suggest-panel { left:124px; right:0; }
.horizontal-fields .tag-editor { min-width:0; }
.horizontal-fields .field > input,
.horizontal-fields .field > textarea,
.horizontal-fields .field > .seo-title-row,
.horizontal-fields .field > .tag-editor { min-width:0; }
@media (max-width:760px) {
  .horizontal-fields { gap:10px; }
  .horizontal-fields .field { grid-template-columns:82px minmax(0,1fr); gap:8px; }
  .horizontal-fields .seo-suggest-panel { left:90px; }
  .horizontal-fields .field > span { white-space:normal; font-size:13px; }
}

/* 横向字段排版精修 */
.horizontal-fields { gap:0; padding:2px 0 2px; }
.horizontal-fields .field {
  grid-template-columns:96px minmax(0,1fr);
  gap:14px;
  padding:9px 0;
  border-bottom:1px dashed #edf2f8;
  align-items:center;
}
.horizontal-fields .field:last-child { border-bottom:0; }
.horizontal-fields .field > span {
  color:#7c8ea7;
  font-size:14px;
  text-align:right;
  padding-right:2px;
}
.horizontal-fields .field:has(textarea) > span { padding-top:10px; }
.horizontal-fields .seo-suggest-panel { left:110px; }
@media (max-width:760px) {
  .horizontal-fields .field { grid-template-columns:82px minmax(0,1fr); gap:8px; padding:8px 0; }
  .horizontal-fields .field > span { text-align:left; font-size:13px; }
  .horizontal-fields .seo-suggest-panel { left:90px; }
}

/* 横向字段恢复左对齐，SEO 标题/关键词同排 */
.horizontal-fields { gap:12px; padding:0 0 4px; }
.horizontal-fields .field {
  grid-template-columns:112px minmax(0,1fr);
  gap:12px;
  padding:0;
  border-bottom:0;
}
.horizontal-fields .field > span {
  color:var(--muted);
  font-size:14px;
  text-align:left;
  padding-right:0;
}
.horizontal-fields .field:has(textarea) > span { padding-top:9px; }
.horizontal-fields .seo-title-row {
  width:100%;
  max-width:560px;
  justify-content:flex-start;
}
.horizontal-fields .seo-title-row .editor-name-input {
  flex:0 1 380px;
  width:380px;
  max-width:calc(100% - 118px);
}
.horizontal-fields .seo-pair {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px;
  min-width:0;
}
.horizontal-fields .seo-pair .field {
  grid-template-columns:84px minmax(0,1fr);
  gap:8px;
  padding:0;
  border-bottom:0;
}
.horizontal-fields .seo-pair .field > span { white-space:nowrap; }
.horizontal-fields .seo-suggest-panel {
  left:124px;
  right:auto;
  width:min(540px, calc(100% - 124px));
}
@media (max-width:900px) {
  .horizontal-fields .seo-pair { grid-template-columns:1fr; gap:12px; }
}
@media (max-width:760px) {
  .horizontal-fields .field { grid-template-columns:82px minmax(0,1fr); gap:8px; }
  .horizontal-fields .seo-pair .field { grid-template-columns:82px minmax(0,1fr); gap:8px; }
  .horizontal-fields .seo-title-row { max-width:100%; }
  .horizontal-fields .seo-title-row .editor-name-input { flex:1 1 auto; width:auto; max-width:none; }
  .horizontal-fields .seo-suggest-panel { left:90px; right:0; width:auto; }
  .horizontal-fields .field > span { font-size:13px; }
}

/* SEO 标题/关键词与 SEO 描述右侧编辑框对齐 */
.horizontal-fields .seo-pair .field {
  grid-template-columns:112px minmax(0,1fr);
  gap:12px;
}
@media (max-width:760px) {
  .horizontal-fields .seo-pair .field { grid-template-columns:82px minmax(0,1fr); gap:8px; }
}

/* SEO AI 优化独立说明行 */
.seo-ai-row {
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 12px;
  border:1px solid #dfeaf8;
  border-radius:10px;
  background:linear-gradient(135deg,#f9fcff 0%,#edf6ff 100%);
}
.seo-ai-copy { flex:1; min-width:0; }
.seo-ai-copy b { display:block; margin-bottom:2px; color:#31548f; font-size:12.5px; }
.seo-ai-copy span { display:block; color:#8b9bb1; font-size:11.5px; line-height:1.55; }
.seo-ai-row .seo-ai-btn {
  flex:none;
  height:32px;
  padding:0 12px;
  font-size:12px;
  font-weight:600;
  border:1px solid #5b98f8 !important;
  background:linear-gradient(135deg,#79b0ff 0%,#4d8df7 100%) !important;
  color:#fff !important;
  box-shadow:0 5px 14px rgba(77,141,247,.28);
}
.seo-ai-row .seo-ai-btn:hover {
  background:linear-gradient(135deg,#68a4ff 0%,#3f80ef 100%) !important;
  color:#fff !important;
  transform:translateY(-1px);
}
.seo-ai-row .seo-ai-btn svg { width:14px; height:14px; }
@media (max-width:760px) {
  .seo-ai-row { align-items:flex-start; flex-direction:column; gap:8px; }
  .seo-ai-row .seo-ai-btn { align-self:flex-end; }
}

/* SEO AI 说明整体置灰 */
.seo-ai-copy b { color:#7c8ea7; font-weight:600; }

/* AI 优化按钮前置 */
.seo-ai-row { align-items:center; }
.seo-ai-row .seo-ai-btn { order:-1; }
.seo-ai-copy { padding-top:1px; }
@media (max-width:760px) {
  .seo-ai-row .seo-ai-btn { align-self:flex-start; }
}

/* SEO AI 说明在前，注释字号 14px */
.seo-ai-row { gap:16px; padding:10px 14px; align-items:center; }
.seo-ai-copy span { font-size:14px; line-height:1.55; color:#7c8ea7; }
.seo-ai-row .seo-ai-btn { order:0; margin-left:auto; }
@media (max-width:760px) {
  .seo-ai-row .seo-ai-btn { align-self:flex-end; }
}

/* ---------- A 风格：Linear / Notion 现代工作台 ---------- */
:root { --sidebar-w: 236px; }
body { background:#f7f9fd; }
.sidebar {
  background:#fbfcfe;
  border-right-color:#e9eef6;
  padding:18px 14px 14px;
}
.sidebar .brand { padding:0 8px 18px; }
.nav { gap:2px; }
.nav a {
  height:36px;
  border-radius:8px;
  font-size:13px;
  font-weight:500;
  color:#64748b;
}
.nav a:hover { background:#f1f5fb; color:#1f3352; }
.nav a.active {
  background:#edf3ff;
  color:#315be0;
  font-weight:600;
}
.nav a.active em { background:#315be0; color:#fff; }
.nav a em { background:#f1f5fa; color:#8b99ac; border-radius:5px; font-size:10.5px; }
.nav-label {
  padding:20px 12px 7px;
  color:#a3afc0;
  font-size:10px;
  letter-spacing:.1em;
}
.topbar {
  height:64px;
  background:rgba(255,255,255,.84);
  border-bottom:1px solid #edf1f7;
  padding:0 30px;
}
.topbar-title { color:#5f6f86; font-size:13px; font-weight:500; }
.module-nav {
  position:sticky;
  top:64px;
  z-index:19;
  display:flex;
  align-items:center;
  gap:24px;
  height:46px;
  padding:0 30px;
  overflow-x:auto;
  background:rgba(255,255,255,.72);
  border-bottom:1px solid #edf1f7;
  backdrop-filter:blur(14px);
}
.module-nav[hidden] { display:none; }
.module-nav a {
  display:flex;
  align-items:center;
  height:46px;
  flex:none;
  padding:0 1px;
  border-bottom:2px solid transparent;
  color:#8b99ac;
  font-size:13px;
  font-weight:500;
  text-decoration:none;
}
.module-nav a:hover { color:#315be0; }
.module-nav a.active {
  color:#315be0;
  border-bottom-color:#315be0;
  font-weight:600;
}
.view {
  max-width:1480px;
  padding:22px 30px 54px;
  background:
    radial-gradient(760px 360px at 8% -12%,rgba(86,123,255,.07),transparent 62%),
    radial-gradient(620px 300px at 100% 0%,rgba(45,212,191,.055),transparent 58%);
}
.view:has(.editor-layout) { padding:18px 30px 42px; }
.page-head { margin-bottom:18px; }
.page-head h1 { font-size:27px; letter-spacing:-.7px; }
.page-head p { color:#8695a9; font-size:12.5px; }
.view .card {
  border-color:#e8eef6;
  border-radius:14px;
  box-shadow:0 5px 20px rgba(35,55,95,.035);
}
.tabs { gap:2px; }
.tab { font-size:12.5px; }
.tab.active { color:#315be0; }
.badge { border-radius:999px; }
.btn { border-radius:9px; }
.btn-sm { border-radius:8px; }
@media (max-width:760px) {
  .module-nav { top:56px; height:42px; gap:18px; padding:0 16px; }
  .module-nav a { height:42px; font-size:12.5px; }
  .view { padding:16px 16px 42px; }
  .view:has(.editor-layout) { padding:14px 16px 34px; }
}

/* 编辑器关键词 / 符号替换 */
.horizontal-fields .seo-title-row { max-width: 680px; }
.horizontal-fields .seo-title-row .editor-name-input { flex: 1 1 380px; }
.horizontal-fields .keyword-replace-btn { flex: none; }
.replace-modal { display:flex; flex-direction:column; gap:14px; }
.replace-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.replace-symbols, .replace-scopes { display:flex; flex-direction:column; gap:7px; }
.replace-symbols > span, .replace-scopes > span { color:#7c8ea7; font-size:12px; }
.replace-symbols > div, .replace-scopes > div { display:flex; flex-wrap:wrap; gap:6px; }
.replace-symbols button {
  height:26px;
  padding:0 8px;
  border:1px solid #dce8f7;
  border-radius:7px;
  background:linear-gradient(135deg,#f8fbff,#eaf4ff);
  color:#607896;
  font-size:11px;
  cursor:pointer;
}
.replace-symbols button:hover { border-color:#b9d5f5; color:#315be0; }
.replace-scopes label { display:inline-flex; align-items:center; gap:5px; color:#5f728e; font-size:12px; white-space:nowrap; }
.replace-scopes input { accent-color:#4d8df7; }
@media (max-width:760px) {
  .horizontal-fields .seo-title-row { max-width:100%; flex-wrap:wrap; }
  .horizontal-fields .seo-title-row .editor-name-input { flex-basis:100%; width:100%; max-width:none; }
  .replace-fields { grid-template-columns:1fr; }
}
