/* ============================================================
   WorkBench · 少女粉主题
   ============================================================ */
:root {
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px rgba(255, 138, 180, 0.18);
  --shadow-sm: 0 8px 20px rgba(255, 138, 180, 0.14);
  --sidebar-w: 244px;
  --ok: #2fbf87;
  --warn: #ff9f43;
  --err: #ff5b7f;
}

/* 蜜桃粉（默认） */
[data-theme='peach'] {
  --bg: #fff2f6;
  --bg-2: #ffe8f0;
  --panel: #ffffff;
  --panel-2: #fff6fa;
  --sidebar: #ffffff;
  --line: #ffdbe7;
  --text: #4a2f3a;
  --muted: #ab8391;
  --soft: #7c5c68;
  --brand: #ff6fa5;
  --brand-2: #ff8fb3;
  --brand-soft: #ffc3da;
  --brand-ghost: #fff0f6;
  --hero-a: #ffb0cd;
  --hero-b: #ff8fb3;
  --accent-1: #ffb5c9;
  --accent-2: #d9b8ff;
  --accent-3: #ffd59e;
  --accent-4: #a8e6cf;
}
/* 樱花白 */
[data-theme='sakura'] {
  --bg: #fff7fa;
  --bg-2: #fdeef4;
  --panel: #ffffff;
  --panel-2: #fff9fb;
  --sidebar: #fffdfe;
  --line: #f3dde6;
  --text: #5a4750;
  --muted: #a99aa1;
  --soft: #82717a;
  --brand: #f38fb1;
  --brand-2: #f7a9c4;
  --brand-soft: #fbd6e4;
  --brand-ghost: #fdf2f7;
  --hero-a: #f9c5d8;
  --hero-b: #f4a6c2;
  --accent-1: #f8bccd;
  --accent-2: #cdbdf0;
  --accent-3: #ffe0b2;
  --accent-4: #b8e6d5;
}
/* 薰衣草 */
[data-theme='lavender'] {
  --bg: #f8f3fd;
  --bg-2: #f2e9fb;
  --panel: #ffffff;
  --panel-2: #faf5ff;
  --sidebar: #fffdff;
  --line: #e7dcf6;
  --text: #4b3e5c;
  --muted: #9d90ae;
  --soft: #74648a;
  --brand: #b57be6;
  --brand-2: #c79bf0;
  --brand-soft: #e4cdf8;
  --brand-ghost: #f6eefe;
  --hero-a: #d3b6f5;
  --hero-b: #f19fce;
  --accent-1: #e0b6f0;
  --accent-2: #b6c4f5;
  --accent-3: #ffcfe6;
  --accent-4: #b8e6d5;
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }
h1, h2, h3 { margin: 0; }
a { color: var(--brand); }

.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

/* ---------- 侧边栏 ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex; flex-direction: column;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; font-weight: 800; font-size: 1.1rem; }
.brand small { display: block; font-weight: 500; font-size: 0.66rem; color: var(--muted); letter-spacing: .06em; margin-top: 2px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 900;
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b));
  box-shadow: 0 8px 18px rgba(255, 111, 165, 0.35);
}
.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav-group { margin: 14px 12px 4px; font-size: 0.68rem; color: var(--muted); letter-spacing: .08em; }
.nav button {
  border: 0; background: transparent; width: 100%;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--soft); cursor: pointer; text-align: left; font-size: .9rem;
  transition: .18s;
}
.nav button:hover { background: var(--brand-ghost); color: var(--text); }
.nav button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: var(--shadow-sm); font-weight: 700;
}
.nav-ic { width: 20px; text-align: center; font-size: .95rem; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.theme-row { display: flex; gap: 8px; padding: 4px 8px 12px; }
.theme-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.theme-dot.active { box-shadow: 0 0 0 2px var(--brand); transform: scale(1.08); }
.t-peach { background: linear-gradient(135deg, #ffb0cd, #ff8fb3); }
.t-sakura { background: linear-gradient(135deg, #f9c5d8, #f4a6c2); }
.t-lavender { background: linear-gradient(135deg, #d3b6f5, #f19fce); }
.sync-row { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: .8rem; padding: 0 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 5px rgba(47, 191, 135, .14); flex: none; }
.sidebar-foot p { margin: 8px 8px 0; color: var(--muted); font-size: .7rem; }

/* ---------- 主区 ---------- */
main { min-width: 0; padding: 24px clamp(16px, 3vw, 40px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 3px; color: var(--brand); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.02em; outline: none; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 14px; height: 42px; width: min(30vw, 280px);
  box-shadow: var(--shadow-sm);
}
.search.grow { width: 100%; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: .88rem; }
#menuToggle { display: none; }

/* ---------- 按钮 ---------- */
.primary, .secondary, .ghost {
  border-radius: 999px; padding: 10px 18px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: .18s; font-size: .86rem; white-space: nowrap;
}
.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 22px rgba(255, 111, 165, .3); }
.primary:hover { transform: translateY(-1px); filter: brightness(1.03); }
.secondary { background: var(--panel); border-color: var(--line); color: var(--brand); box-shadow: var(--shadow-sm); }
.secondary:hover { background: var(--brand-ghost); }
.ghost { background: transparent; border-color: var(--line); color: var(--soft); }
.ghost:hover { background: var(--brand-ghost); color: var(--text); }
.ghost.small, .primary.small { padding: 6px 12px; font-size: .78rem; }
.danger { color: var(--err) !important; border-color: #ffd0da; }
.danger:hover { background: #fff0f3; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- 卡片 / 布局 ---------- */
.section { display: none; animation: fade .28s ease; }
.section.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 1.02rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.grid-2.align-start { align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.muted.small { margin: 8px 0 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--hero-a), var(--hero-b));
  border-radius: var(--radius); padding: 28px 30px; margin-bottom: 18px;
  color: #fff; box-shadow: var(--shadow);
}
.hero-eyebrow { margin: 0 0 6px; font-size: .82rem; opacity: .95; }
.hero h2 { font-size: 1.5rem; margin-bottom: 8px; }
.hero-sub { margin: 0 0 16px; opacity: .95; max-width: 560px; font-size: .9rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .primary { background: #fff; color: var(--brand); box-shadow: 0 10px 22px rgba(0,0,0,.12); }
.hero .ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.hero .ghost:hover { background: rgba(255,255,255,.16); }
.hero-badge { position: absolute; right: -10px; top: -20px; font-size: 160px; opacity: .16; line-height: 1; }

/* ---------- 指标卡 ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px 18px; display: flex; align-items: center; gap: 14px;
}
.metric-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; flex: none; color: #fff; }
.metric-body { min-width: 0; }
.metric-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.metric-label { font-size: .78rem; color: var(--muted); }
.metric-sub { font-size: .72rem; color: var(--soft); }

/* ---------- 图表 ---------- */
.chart-wrap { width: 100%; min-height: 60px; }
.chart-empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: .86rem; }
.chart-axis { fill: var(--muted); font-size: 10px; }
.chart-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.sparkline { overflow: visible; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut-center { fill: var(--text); font-size: 20px; font-weight: 800; }
.donut-sub { fill: var(--muted); font-size: 10px; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: .82rem; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* ---------- 榜单 / 列表 ---------- */
.board-list { display: flex; flex-direction: column; gap: 10px; }
.board-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); transition: .18s; cursor: pointer; }
.board-item:hover { border-color: var(--brand-soft); transform: translateX(2px); }
.board-rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--brand-ghost); color: var(--brand); flex: none; }
.board-item.top .board-rank { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.board-main { flex: 1; min-width: 0; }
.board-title { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-meta { font-size: .74rem; color: var(--muted); }
.board-growth { font-weight: 800; color: var(--ok); font-size: .9rem; }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .82rem; background: var(--panel-2); }
.empty { padding: 30px; text-align: center; color: var(--muted); font-size: .86rem; }

/* ---------- 表单 ---------- */
.field-label { display: block; font-size: .82rem; font-weight: 600; color: var(--soft); margin: 14px 0 6px; }
.field-label.full { grid-column: 1 / -1; }
input[type='text'], input[type='url'], input[type='password'], input[type='number'],
input[type='search'], input[type='datetime-local'], select, textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px; outline: none; transition: .16s; font-size: .88rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field-label { margin-top: 10px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--soft); }
.inline-field select { width: auto; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.check-line { display: flex; align-items: flex-start; gap: 8px; font-size: .84rem; color: var(--soft); margin: 12px 0; line-height: 1.5; }
.check-line input { width: auto; margin-top: 3px; }
.check-line-group { margin-top: 8px; }
.pill { background: var(--brand-ghost); color: var(--brand); border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 700; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.inline { display: inline-flex; }
.chips button {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--soft);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: .82rem; transition: .16s;
}
.chips button:hover { border-color: var(--brand-soft); }
.chips button.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; font-weight: 700; }
.segmented { display: inline-flex; background: var(--brand-ghost); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented.wrap { flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; color: var(--soft); padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: .82rem; transition: .16s; }
.segmented button.active { background: #fff; color: var(--brand); font-weight: 700; box-shadow: var(--shadow-sm); }

/* ---------- 找选题 ---------- */
.find-search { display: flex; gap: 10px; flex-wrap: wrap; }
.find-list { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; }
.find-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); cursor: pointer; transition: .16s; }
.find-card:hover, .find-card.active { border-color: var(--brand); background: var(--brand-ghost); }
.find-card .ft { font-weight: 700; font-size: .9rem; }
.find-card .fm { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.detail-panel { padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--panel-2); min-height: 200px; }
.detail-panel h4 { margin: 0 0 8px; }
.detail-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.detail-metrics div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .82rem; }
.detail-metrics b { display: block; font-size: 1.05rem; }

/* ---------- 写内容 / 检查 ---------- */
.check-result { min-height: 120px; }
.check-score { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.score-ring { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; color: #fff; flex: none; }
.check-issue { display: flex; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: .84rem; margin-bottom: 6px; }
.check-issue.ok { background: #eafaf3; color: #1f8f63; }
.check-issue.warn { background: #fff5e8; color: #c67912; }
.check-issue.error { background: #fff0f3; color: var(--err); }
.suggest-list { margin: 10px 0 0; padding-left: 18px; font-size: .84rem; color: var(--soft); }
.suggest-list li { margin: 4px 0; }
.ai-panel { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 16px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; cursor: pointer; }
.switch input { width: auto; }
.ai-config { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 16px 16px; background: var(--panel-2); margin: 12px 0; }
.ai-result { margin-top: 14px; }
.ai-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; background: var(--panel-2); }
.ai-block h5 { margin: 0 0 6px; font-size: .84rem; color: var(--brand); }
.ai-titles button { display: block; width: 100%; text-align: left; margin: 4px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: .86rem; }
.ai-titles button.active { border-color: var(--brand); background: var(--brand-ghost); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.wb { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.wb th, table.wb td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.wb th { color: var(--muted); font-weight: 600; font-size: .78rem; }
table.wb tbody tr:hover, table.wb tbody tr:hover { background: var(--brand-ghost); }
table.wb .num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.tag.ok { background: #eafaf3; color: #1f8f63; }
.tag.warn { background: #fff5e8; color: #c67912; }
.tag.err { background: #fff0f3; color: var(--err); }
.tag.info { background: var(--brand-ghost); color: var(--brand); }

/* ---------- 策略库 ---------- */
.strategy-list { display: flex; flex-direction: column; gap: 12px; }
.strategy-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: var(--panel-2); }
.strategy-card.enabled { border-color: var(--brand-soft); box-shadow: var(--shadow-sm); }
.strategy-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.strategy-name { font-weight: 800; font-size: 1rem; }
.strategy-meta { font-size: .76rem; color: var(--muted); margin: 6px 0 10px; }
.strategy-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.advice-list { display: flex; flex-direction: column; gap: 10px; }
.advice-item { padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--panel-2); border-radius: 0 10px 10px 0; font-size: .86rem; }
.protect-card { background: linear-gradient(135deg, var(--brand-ghost), var(--panel)); }
.protect-list { margin: 0; padding-left: 18px; font-size: .86rem; color: var(--soft); }
.protect-list li { margin: 8px 0; }

/* ---------- 采集 ---------- */
.source-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.source-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.src-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.src-top strong { font-size: .95rem; }
.status { font-size: .72rem; padding: 3px 10px; border-radius: 999px; background: #eafaf3; color: #1f8f63; font-weight: 700; }
.status.warn { background: #fff5e8; color: #c67912; }
.source-card button { margin-top: 12px; }

/* ---------- 备份 ---------- */
.dropzone {
  display: block; border: 2px dashed var(--brand-soft); border-radius: var(--radius-sm);
  padding: 28px; text-align: center; color: var(--soft); cursor: pointer; transition: .16s; background: var(--panel-2);
}
.dropzone:hover, .dropzone.drag { background: var(--brand-ghost); border-color: var(--brand); }
.danger-card { border-color: #ffd0da; }

/* ---------- 作战板 ---------- */
.weeks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.week-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: var(--panel-2); }
.week-card h4 { font-size: .95rem; margin-bottom: 4px; color: var(--brand); }
.week-card .wk-sub { font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.task-line { display: flex; align-items: flex-start; gap: 8px; font-size: .84rem; margin: 6px 0; cursor: pointer; }
.task-line input { margin-top: 3px; }
.task-line.done span { text-decoration: line-through; color: var(--muted); }

/* ---------- 对话框 ---------- */
.dialog {
  border: 0; border-radius: var(--radius); padding: 24px; width: min(520px, 92vw);
  box-shadow: 0 30px 80px rgba(180, 80, 120, .3); color: var(--text); background: var(--panel);
}
.dialog.wide { width: min(680px, 94vw); }
.dialog::backdrop { background: rgba(80, 30, 55, .35); backdrop-filter: blur(3px); }
.dialog h3 { margin-bottom: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dialog-result { font-size: .84rem; color: var(--soft); margin: 8px 0; min-height: 1.2em; }
.plan-info { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: .86rem; margin: 10px 0; }
.plan-info b { color: var(--brand); }
.recipient { font-weight: 800; color: var(--brand); word-break: break-all; background: var(--brand-ghost); padding: 8px 12px; border-radius: 8px; }
.code-preview { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: .76rem; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.restore-modes { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.radio-card { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--panel-2); }
.radio-card span { font-size: .84rem; }
.radio-card strong { display: block; margin-bottom: 3px; }
.radio-card input { width: auto; margin-top: 3px; }
.deleted-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.diagnosis { border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; padding: 12px 14px; font-size: .84rem; margin: 8px 0; background: var(--panel-2); }
.diagnosis small { display: block; color: var(--muted); }

/* ---------- Toast ---------- */
.wb-toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translate(-50%, 20px); background: #4a2f3a; color: #fff;
  padding: 12px 22px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  box-shadow: 0 16px 40px rgba(0,0,0,.24); opacity: 0; pointer-events: none;
  transition: .28s; z-index: 999; max-width: 90vw;
}
.wb-toast.show { opacity: 1; transform: translate(-50%, 0); }
.wb-toast[data-kind='err'] { background: var(--err); }
.wb-toast[data-kind='warn'] { background: var(--warn); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-2, .form-grid, .weeks { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .source-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-105%);
    transition: transform .24s; box-shadow: 0 0 60px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: none; }
  #menuToggle { display: inline-flex; }
  .search { width: 160px; }
  .hero-badge { display: none; }
}
