/* ============================================================
   丽人圈自媒体系统 — 设计系统
   灵感：高定女性品牌 · 玫瑰/紫罗兰/香槟金 · 柔光玻璃质感
   ============================================================ */

:root {
  /* 色彩 */
  --bg: #faf5f7;
  --bg-2: #f5e8ee;
  --card: #ffffff;
  --card-2: #fbf1f6;
  --line: #eedae3;
  --line-strong: #e3bccf;
  --text: #3a2432;
  --muted: #8d7481;
  --accent: #d6336c;
  --accent-mid: #b23ad0;
  --accent-2: #8b3fd6;
  --accent-3: #c9a24b; /* 香槟金 */
  --ok: #0f9d6e;
  --err: #e11d48;

  /* 背景光晕（随配色联动） */
  --glow-1: #ffeaf2;
  --glow-2: #f0e6ff;
  --glow-3: #fdeef4;

  /* 渐变（随配色预设联动） */
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 55%, var(--accent-2) 100%);
  --logo-grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-mid) 60%, var(--accent-2) 100%);
  --grad-soft: linear-gradient(135deg, rgba(214, 51, 108, .10), rgba(139, 63, 214, .10));

  /* 阴影（玫瑰柔光） */
  --shadow-sm: 0 2px 10px rgba(120, 60, 90, .06);
  --shadow-md: 0 12px 34px rgba(190, 60, 110, .12);
  --shadow-lg: 0 24px 60px rgba(160, 50, 100, .18);

  /* 圆角 & 间距 */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* 字体 */
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Georgia", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1000px 520px at 12% -8%, var(--glow-1) 0%, transparent 60%),
    radial-gradient(900px 480px at 92% -6%, var(--glow-2) 0%, transparent 55%),
    radial-gradient(1200px 700px at 50% 120%, var(--glow-3) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

::selection { background: rgba(214, 51, 108, .18); color: var(--text); }

/* 细滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e8ccd9; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   顶栏 — 品牌 Hero
   ============================================================ */
.topbar {
  position: relative;
  padding: 46px 20px 8px;
  text-align: center;
}
.topbar-inner { max-width: 820px; margin: 0 auto; }
.eyebrow {
  font-size: 11px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 600;
  margin-bottom: 14px;
}
.logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--logo-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.logo-accent { font-weight: 500; }
.logo-mark {
  width: clamp(26px, 4vw, 36px);
  height: clamp(26px, 4vw, 36px);
  display: inline-block;
  vertical-align: -5px;
  margin-right: 8px;
  filter: drop-shadow(0 3px 6px rgba(214, 51, 108, .25));
}
.logo-mark .petal { fill: var(--accent); opacity: .92; }
.logo-mark .petal.alt { fill: var(--accent-2); opacity: .86; }
.logo-mark .center { fill: var(--accent-3); }
.sub {
  color: var(--muted);
  margin: 14px auto 0;
  font-size: 14.5px;
  letter-spacing: .04em;
  max-width: 560px;
  line-height: 1.8;
}
.userbox {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   主容器 & 卡片
   ============================================================ */
.wrap {
  max-width: 780px;
  margin: 20px auto 70px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.98));
  border: 1px solid rgba(238, 218, 227, .9);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

/* ============================================================
   页签 — 悬浮胶囊
   ============================================================ */
.tabs {
  display: flex;
  gap: 6px;
  margin: -6px -6px 20px;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 18px;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  padding: 11px 14px;
  border-radius: 13px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .22s cubic-bezier(.4, 0, .2, 1);
}
.tab:hover { color: var(--text); background: rgba(255,255,255,.7); }
.tab.active {
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(214, 51, 108, .32);
}
.panel.hidden { display: none; }

/* ============================================================
   拖拽上传区
   ============================================================ */
.drop {
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: var(--card-2);
}
.drop:hover, .drop.drag {
  border-color: var(--accent);
  background: linear-gradient(180deg, #fff0f6, #fbf1f6);
  box-shadow: inset 0 0 0 4px rgba(214,51,108,.06);
}
.drop-inner { pointer-events: none; }
.drop-icon { font-size: 44px; margin-bottom: 12px; filter: drop-shadow(0 4px 10px rgba(214,51,108,.18)); }
.hint { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.6; }

/* ============================================================
   表单控件
   ============================================================ */
textarea {
  width: 100%;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  font-size: 15px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.75;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(214, 51, 108, .10);
}
.gen-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.gen-row input, .gen-row select {
  flex: 1;
  min-width: 0;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.gen-btn {
  padding: 11px 20px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(214, 51, 108, .28);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.gen-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(214, 51, 108, .38); filter: brightness(1.03); }
.gen-btn:active { transform: translateY(0); }
.gen-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.gen-btn.secondary {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.gen-btn.secondary:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-md); }

/* 高级选项 */
.opts { margin-top: 16px; }
.opts summary {
  cursor: pointer;
  color: var(--muted);
  user-select: none;
  font-size: 14px;
  padding: 6px 0;
}
.opts summary:hover { color: var(--accent); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.grid label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.grid input[type=text], .grid input[type=number], .grid select {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.grid input[type=color] {
  height: 38px;
  padding: 3px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.grid .row { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.grid .row input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
.grid .full { grid-column: 1 / -1; }
.slice-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

/* 主运行按钮 */
.run {
  margin-top: 20px;
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: var(--grad);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(214, 51, 108, .34);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.run:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(214, 51, 108, .44); filter: brightness(1.03); }
.run:active { transform: translateY(0); }
.run:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }

/* ============================================================
   进度 / 队列 / 输出
   ============================================================ */
.progress-card .progress-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 9px; }
.bar { height: 10px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
#bar-fill {
  height: 100%;
  width: 0;
  background: var(--grad);
  border-radius: 999px;
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 12px rgba(214, 51, 108, .5);
}
.msg { color: var(--muted); font-size: 13px; margin-top: 9px; }
#result-video { width: 100%; max-height: 60vh; border-radius: var(--r-md); background: #000; }
.downloads, .outputs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.downloads a, .outputs a, .outputs .item {
  padding: 9px 15px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: all .18s;
}
.downloads a:hover, .outputs a:hover { border-color: var(--accent); color: var(--accent); background: var(--card); }
.hidden { display: none; }
h3 { margin: 6px 0 14px; font-size: 16px; font-weight: 700; letter-spacing: .01em; }

.job {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--card-2);
  transition: box-shadow .2s, transform .2s;
}
.job:hover { box-shadow: var(--shadow-sm); }
.job-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; gap: 10px; }
.job-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fill { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width .3s; }
.job-msg { font-size: 13px; color: var(--muted); margin: 9px 0; }
.job-result video { width: 100%; max-height: 50vh; border-radius: var(--r-md); background: #000; margin-top: 6px; }
.job-result .downloads { margin-top: 9px; }

/* ============================================================
   成片 / 数字人 / AIGC 结果展示态
   ============================================================ */
.result-frame {
  margin-top: 10px;
  border-radius: var(--r-md);
  padding: 14px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.result-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.result-video {
  width: 100%;
  max-height: 52vh;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .20);
}
.result-img { width: 100%; max-width: 220px; border-radius: 12px; box-shadow: var(--shadow-md); }
.result-audio { width: 100%; max-width: 320px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.result-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  font-size: 13px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
  transition: all .18s;
}
.result-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.result-btn.primary {
  background: var(--grad);
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(214, 51, 108, .30);
}
.result-btn.primary:hover { color: #fff; filter: brightness(1.05); }

/* ============================================================
   消息中心 & 弹层
   ============================================================ */
.msg-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--err);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.theme-btn { position: relative; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(40, 20, 32, .42);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
/* 关键修复：.hidden 需覆盖 .modal 的 display:flex，否则弹窗无法关闭 */
.modal.hidden { display: none; }
.modal-card {
  animation: modalIn .28s cubic-bezier(.22, .61, .36, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 80vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-title { font-weight: 700; font-size: 16px; }
.modal-actions { margin-bottom: 12px; }
.asset-card.unread { border-color: var(--accent); background: linear-gradient(180deg, rgba(214,51,108,.06), var(--card-2)); }
.cmd-card input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ============================================================
   排期月历
   ============================================================ */
.cal-head { font-weight: 700; margin: 6px 0 10px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-2);
  padding: 4px;
  font-size: 11px;
  overflow: hidden;
}
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.has { border-color: var(--line-strong); }
.cal-day { font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.cal-item {
  background: var(--grad);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   徽章 / 标签
   ============================================================ */
.badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.badge-running, .badge-scheduled { background: var(--grad); color: #fff; border-color: transparent; }
.badge-done, .badge-published { background: var(--ok); color: #fff; border-color: transparent; }
.badge-error, .badge-failed { background: var(--err); color: #fff; border-color: transparent; }
.badge-draft { background: var(--card); color: var(--muted); }
.tag {
  background: rgba(214, 51, 108, .12);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}
.tagchip {
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12px;
  cursor: pointer;
  transition: all .18s;
}
.tagchip:hover { border-color: var(--accent); color: var(--accent); background: var(--card); }

/* ============================================================
   素材库
   ============================================================ */
.assets-login { text-align: center; padding: 20px 0; }
.assets-login-title { margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.assets-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.assets-upload input[type=file] { flex: 1 1 100%; color: var(--muted); font-size: 13px; }
.assets-upload input[type=text] {
  flex: 1 1 30%;
  min-width: 130px;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 14px;
}
.assets-filters { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.assets-filters input, .assets-filters select {
  flex: 1;
  min-width: 120px;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 14px;
}
.asset-tags-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.asset-list { display: flex; flex-direction: column; gap: 12px; }
.asset-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  transition: all .2s;
}
.asset-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.asset-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: #000; }
.asset-card audio, .asset-card video { max-width: 200px; max-height: 96px; border-radius: 8px; }
.asset-info { flex: 1; min-width: 0; }
.asset-title { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.asset-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.asset-actions { display: flex; flex-direction: column; gap: 7px; }
.mini {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all .18s;
}
.mini:hover { border-color: var(--accent); color: var(--accent); }
.mini.danger { color: var(--err); border-color: var(--err); background: transparent; }
.mini.danger:hover { background: var(--err); color: #fff; }

/* ============================================================
   子页签（分发/数据/选题/商业）
   ============================================================ */
.dist-subs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.dist-sub, .ana-sub, .intel-sub, .biz-sub, .team-sub {
  flex: 1;
  min-width: 72px;
  padding: 10px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .2s;
}
.dist-sub:hover, .ana-sub:hover, .intel-sub:hover, .biz-sub:hover, .team-sub:hover { color: var(--text); border-color: var(--line-strong); }
.dist-sub.active, .ana-sub.active, .intel-sub.active, .biz-sub.active, .team-sub.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(214, 51, 108, .28);
}
.dist-sub-panel, .ana-sub-panel { display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   统计卡片 & 图表
   ============================================================ */
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat {
  flex: 1 1 104px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-v {
  font-size: 22px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-l { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { width: 120px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 14px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 999px; transition: width .4s; }
.bar-val { width: 60px; font-size: 12px; text-align: right; color: var(--text); }

/* ============================================================
   首页模块
   ============================================================ */
.home-hero { text-align: center; padding: 18px 12px 16px; }
.home-eyebrow {
  font-size: 10.5px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 600;
  margin-bottom: 12px;
}
.home-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4.5vw, 30px);
  font-weight: 700;
  letter-spacing: .02em;
}
.home-sub { color: var(--muted); margin-top: 10px; font-size: 14px; }
.home-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.home-mod {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 10px;
  text-align: center;
  cursor: pointer;
  transition: all .22s cubic-bezier(.4, 0, .2, 1);
}
.home-mod:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.home-mod-icon { font-size: 30px; filter: drop-shadow(0 4px 8px rgba(214,51,108,.15)); }
.home-mod-name { font-weight: 600; margin-top: 8px; font-size: 15px; }
.home-mod-desc { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.home-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }
.home-actions .gen-btn { width: auto; padding: 12px 26px; }

/* ============================================================
   杂项 & 页脚
   ============================================================ */
.linkbtn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; text-decoration: underline; }
.error-text { color: var(--err); font-size: 14px; }
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 20px;
  letter-spacing: .02em;
}

/* 移动端底部导航（桌面隐藏） */
.bottom-nav { display: none; }

/* 顶部阅读进度条 */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--grad);
  z-index: 200;
  border-radius: 0 999px 999px 0;
  box-shadow: 0 0 10px rgba(214, 51, 108, .5);
  transition: width .12s linear;
}

/* 面板转场动画（淡入 + 微缩放 + 去模糊） */
.panel:not(.hidden) { animation: panelIn .42s cubic-bezier(.22, .61, .36, 1); }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ============================================================
   装饰性渐变光斑（品牌插画氛围）
   ============================================================ */
.topbar { position: relative; }
.topbar::before, .topbar::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
  z-index: 0;
}
.topbar::before {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(214, 51, 108, .30), transparent 70%);
  top: -110px; left: -70px;
  animation: float 16s ease-in-out infinite;
}
.topbar::after {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(139, 63, 214, .26), transparent 70%);
  top: -90px; right: -60px;
  animation: float 20s ease-in-out infinite reverse;
}
.topbar-inner { position: relative; z-index: 1; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 24px) scale(1.07); }
}

/* ============================================================
   主题控制（右上角浮动）
   ============================================================ */
.theme-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.theme-btn {
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--card-2);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all .2s;
}
.theme-btn:hover { transform: rotate(18deg) scale(1.06); }
.accent-dots { display: flex; gap: 7px; }
.dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: all .18s;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.dot:hover { transform: scale(1.22); }
.dot.active { border-color: var(--text); transform: scale(1.14); }
.dot[data-accent="mist"] { background: linear-gradient(135deg, #d6336c, #8b3fd6); }
.dot[data-accent="rose"] { background: linear-gradient(135deg, #c4728a, #9c6a92); }
.dot[data-accent="gold"] { background: linear-gradient(135deg, #c98d4b, #b0793f); }
.dot[data-accent="lavender"] { background: linear-gradient(135deg, #8e5fd0, #6a45c9); }

/* ============================================================
   品牌配色预设（含配套中性色 & 光晕，随 --grad 联动）
   ============================================================ */
[data-accent="mist"] {
  --accent: #d6336c; --accent-mid: #b23ad0; --accent-2: #8b3fd6; --accent-3: #c9a24b;
  --bg: #faf5f7; --bg-2: #f5e8ee; --card-2: #fbf1f6;
  --line: #eedae3; --line-strong: #e3bccf;
  --glow-1: #ffeaf2; --glow-2: #f0e6ff; --glow-3: #fdeef4;
}
[data-accent="rose"] {
  --accent: #c4728a; --accent-mid: #b8709a; --accent-2: #9c6a92; --accent-3: #b9936f;
  --bg: #faf6f3; --bg-2: #f5eae6; --card-2: #fbf2ee;
  --line: #eedfd7; --line-strong: #e3c7bc;
  --glow-1: #ffebe6; --glow-2: #f3e6ea; --glow-3: #f7ebe6;
}
[data-accent="gold"] {
  --accent: #c98d4b; --accent-mid: #cf9a55; --accent-2: #b0793f; --accent-3: #d4a95c;
  --bg: #faf7f1; --bg-2: #f5efe1; --card-2: #fbf5e8;
  --line: #eee4cd; --line-strong: #e3d2b2;
  --glow-1: #fff2dc; --glow-2: #f5ecd6; --glow-3: #fbf0da;
}
[data-accent="lavender"] {
  --accent: #8e5fd0; --accent-mid: #7d4fd0; --accent-2: #6a45c9; --accent-3: #c9a24b;
  --bg: #f8f6fb; --bg-2: #efeaf6; --card-2: #f6f1fb;
  --line: #e6ddf0; --line-strong: #d4c6e4;
  --glow-1: #f0e9ff; --glow-2: #e6e2ff; --glow-3: #f0eaf8;
}

/* ============================================================
   深色主题
   ============================================================ */
[data-theme="dark"] {
  --bg: #1e1520;
  --bg-2: #2a1c28;
  --card: #2a1d27;
  --card-2: #342330;
  --line: #443040;
  --line-strong: #5c3f52;
  --text: #f4e8ef;
  --muted: #b69aa8;
  --glow-1: rgba(214, 51, 108, .20);
  --glow-2: rgba(139, 63, 214, .18);
  --glow-3: rgba(214, 51, 108, .10);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .40);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}
[data-theme="dark"] body {
  background:
    radial-gradient(1000px 520px at 12% -8%, var(--glow-1) 0%, transparent 60%),
    radial-gradient(900px 480px at 92% -6%, var(--glow-2) 0%, transparent 55%),
    radial-gradient(1200px 700px at 50% 120%, var(--glow-3) 0%, transparent 55%),
    var(--bg);
}
[data-theme="dark"] .card {
  background: linear-gradient(180deg, rgba(42, 29, 39, .92), rgba(42, 29, 39, .98));
}
[data-theme="dark"] .tag { background: rgba(214, 51, 108, .22); color: #f2a1c0; }
[data-theme="dark"] .topbar::before { background: radial-gradient(circle, rgba(214, 51, 108, .26), transparent 70%); }
[data-theme="dark"] .topbar::after { background: radial-gradient(circle, rgba(139, 63, 214, .22), transparent 70%); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #54354a; border-color: var(--bg); }

/* ============================================================
   触控 & 无障碍
   ============================================================ */
body { -webkit-tap-highlight-color: transparent; }
button, .tab, .mini, .tagchip, .dot, .theme-btn, a, .result-btn, .home-mod {
  touch-action: manipulation;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.tab:focus-visible, .nav-tab:focus-visible, .dist-sub:focus-visible,
.ana-sub:focus-visible, .intel-sub:focus-visible, .biz-sub:focus-visible {
  outline-offset: 1px;
}

/* 尊重系统「减弱动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   移动端适配
   ============================================================ */
@media (max-width: 640px) {
  .topbar { padding: 32px 14px 6px; }
  .wrap { padding: 0 10px; }
  .card { padding: 18px; border-radius: var(--r-lg); }
  .tabs { gap: 4px; }
  .tab { padding: 9px 11px; font-size: 13px; }
  .grid { grid-template-columns: 1fr; }
  .slice-opts { grid-template-columns: 1fr; }
  .gen-row input, .gen-row select { flex: 1 1 100%; }
  .asset-card { flex-direction: column; }
  .asset-thumb { width: 100%; height: auto; max-height: 180px; object-fit: cover; }
  .asset-card audio, .asset-card video { max-width: 100%; }
  .stat { flex: 1 1 44%; }
  .home-modules { grid-template-columns: 1fr 1fr; }
  .bar-label { width: 80px; }
  .assets-upload input[type=text], .assets-filters input { flex: 1 1 100%; }
  .dist-sub, .ana-sub, .intel-sub, .biz-sub, .team-sub { flex: 1 1 30%; }
  .theme-bar { top: 10px; right: 10px; padding: 6px 8px; }
  .theme-btn { width: 30px; height: 30px; font-size: 14px; }
  .dot { width: 14px; height: 14px; }

  /* 底部导航 */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 90;
    background: var(--card);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(120, 60, 90, .10);
    backdrop-filter: blur(12px);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 2px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 11px;
  }
  .nav-tab .nav-ico { font-size: 20px; line-height: 1; }
  .nav-tab:hover { background: transparent; color: var(--accent); }
  .nav-tab.active {
    color: var(--accent);
    background: transparent;
    box-shadow: none;
    font-weight: 600;
  }
  .wrap { padding-bottom: 84px; }
  .foot { padding-bottom: 92px; }
}

/* ============================================================
   专业布局优化（覆盖式，追加在最后）
   ============================================================ */
.wrap { max-width: 1000px; }
.card { padding: 28px; }
.tabs { margin-bottom: 24px; }
.tab { padding: 12px 16px; font-size: 14px; }
@media (min-width: 641px) {
  .tabs {
    position: sticky;
    top: 10px;
    z-index: 40;
    background: var(--card);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
  }
}
/* 标题加左侧渐变竖条，更专业 */
h3 { display: flex; align-items: center; gap: 9px; }
h3::before {
  content: '';
  width: 4px; height: 16px;
  border-radius: 3px;
  background: var(--grad);
  flex-shrink: 0;
}
.stat { border-radius: 14px; padding: 18px 14px; }
.stat-v { font-size: 24px; }
.home-modules { gap: 14px; }
.home-mod { border-radius: 16px; padding: 22px 12px; }
.home-mod-icon { font-size: 34px; }
/* 宽屏下选项网格三列、切片两列 */
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .slice-opts { grid-template-columns: repeat(2, 1fr); }
}
/* 输入框/按钮统一更圆润 */
.gen-btn, .run { border-radius: 12px; }
textarea, .gen-row input, .gen-row select { border-radius: 12px; }
/* 卡片 hover 更轻盈 */
.card { transition: box-shadow .25s, transform .25s; }
.card:hover { transform: translateY(-1px); }

/* ============================================================
   侧边栏导航 / 骨架屏 / 空状态 / 分区卡片（专业版）
   ============================================================ */
@media (min-width: 900px) {
  .main-card { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
  .main-card .tabs {
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 76px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }
  .main-card .tab { flex: none; width: 100%; text-align: left; justify-content: flex-start; }
  .main-card .content { min-width: 0; }
}

/* 骨架屏 */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  height: 64px;
  margin-bottom: 10px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* 空状态 */
.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state .ico { font-size: 42px; opacity: .6; margin-bottom: 8px; }

/* 首页分区卡片 */
.dash-section {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 14px;
}
.dash-section .dash-title { font-weight: 700; font-size: 14px; margin-bottom: 12px; }


