/* ================================================================
   小红AI · Apple.com 风格设计系统
   参考：apple.com 官网视觉语言
   字体：SF Pro Display / SF Pro Text / PingFang SC
   色调：#F5F5F7 背景 · #1D1D1F 主文字 · #0066CC 蓝色 CTA
   ================================================================ */

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Apple.com 官网色板 ── */
  --bg:          #F5F5F7;      /* apple.com 页面背景 */
  --surface:     #FFFFFF;
  --surface-2:   #FBFBFD;      /* 浅一级面板 */
  --surface-3:   #F5F5F7;

  --border:      #D2D2D7;      /* apple.com 分割线 */
  --border-2:    #AEAEB2;

  --text:        #1D1D1F;      /* apple.com 主文字 */
  --text-2:      #3D3D3F;
  --text-3:      #6E6E73;      /* apple.com 次要文字 */
  --text-4:      #AEAEB2;

  /* Apple 蓝 — CTA 主色 */
  --blue:        #0066CC;
  --blue-hover:  #004999;
  --blue-light:  #E8F0FB;
  --blue-bg:     #EBF3FF;

  /* 中性强调 */
  --accent:      #1D1D1F;
  --accent-2:    #3D3D3F;
  --accent-light: rgba(29,29,31,.05);
  --accent-hover: rgba(29,29,31,.09);

  /* 功能色（节制使用） */
  --green:       #1DB954;
  --green-bg:    #F0FAF4;
  --orange:      #FF9F0A;
  --orange-bg:   #FFF8EE;
  --red:         #FF3B30;
  --red-bg:      #FFF2F1;

  /* 圆角 — Apple 官网实测 */
  --radius:      18px;
  --radius-sm:   14px;
  --radius-xs:   10px;
  --radius-pill: 980px;

  /* 阴影 — Apple 极其克制 */
  --shadow-sm:   0 2px 8px rgba(0,0,0,.04);
  --shadow:      0 4px 16px rgba(0,0,0,.08);
  --shadow-md:   0 8px 32px rgba(0,0,0,.10);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.14);

  --header-h:    44px;   /* Apple 导航栏标准高度 */
}

/* ── 全局 ── */
body {
  font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', 'PingFang SC',
               'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -.022em;
}

/* ================================================================
   HEADER — Apple.com 导航栏
   半透明毛玻璃，无阴影，细分割线
   ================================================================ */
.header {
  background: rgba(250,250,252,.88);
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  border-bottom: .5px solid rgba(0,0,0,.1);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 9900; height: var(--header-h);
}
.header-inner {
  max-width: 100%;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 12px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.logo-icon { font-size: 20px; line-height: 1; }
.logo-text {
  font-size: 17px; font-weight: 800; color: var(--text);
  letter-spacing: -.6px;
}
.logo-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .4px;
  background: linear-gradient(135deg,#FF2442,#FF6B8A);
  color: #fff;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase;
}

/* Header tagline */
.header-tagline {
  font-size: 12px; color: var(--text-3); letter-spacing: -.01em;
  margin-left: 8px;
}

/* ================================================================
   LAYOUT
   ================================================================ */
.main-wrap {
  padding: calc(var(--header-h) + 10px) 10px 16px;
  height: 100vh; overflow: hidden;
}

.tab-content { display: none; }
.tab-content.active { display: flex; gap: 8px; align-items: flex-start; }
#tab-history.active, #tab-templates.active { display: block; height: auto; overflow: visible; }
#tab-history, #tab-templates {
  height: calc(100vh - var(--header-h) - 28px); overflow-y: auto;
}

/* 三栏布局 */
.four-col {
  height: calc(100vh - var(--header-h) - 26px);
  overflow: hidden;
}

/* ================================================================
   COLUMN CARDS — Apple 卡片风格
   白色面板 · 细圆角 · 轻阴影 · 无粗边框
   ================================================================ */
.col {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
  transition: box-shadow .2s;
}
.col:hover { box-shadow: var(--shadow); }

/* 列宽 */
.col-search  { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; }
.col-rewrite { flex: 1.2; min-width: 0; }
.col-output  { flex: 1.4; min-width: 0; }

/* 列标题栏 */
.col-header {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
}
.col-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px; letter-spacing: -.2px;
}
.col-title i { color: var(--text-4); font-size: 12px; }

/* ================================================================
   左栏搜索组件
   ================================================================ */
.xhs-header { background: var(--surface); }
.xhs-header-left { display: flex; align-items: center; gap: 7px; }
.xhs-header-right { display: flex; align-items: center; gap: 6px; }

/* 跳动点 */
.xhs-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: .65; }
}
.xhs-live-label {
  font-size: 9px; font-weight: 600; letter-spacing: .5px;
  color: var(--green); background: var(--green-bg);
  padding: 2px 7px; border-radius: var(--radius-pill);
}
.xhs-count-badge {
  font-size: 10px; font-weight: 600; color: var(--text-3);
  background: var(--surface-3); padding: 2px 9px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
}

/* 清空按钮 */
.ht-btn-expand {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 11px; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.ht-btn-expand:hover {
  background: var(--accent-light); border-color: var(--border-2); color: var(--text);
}

/* 搜索栏 */
.huitun-search-bar {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  display: flex; gap: 6px; align-items: center; flex-shrink: 0;
  background: var(--surface-2);
}

/* 输入框 — Apple 风格 */
.s-input {
  flex: 1; border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 7px 12px; font-size: 13px;
  color: var(--text); background: var(--surface); outline: none;
  font-family: inherit; transition: all .2s;
  -webkit-appearance: none;
  letter-spacing: -.01em;
}
.s-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.15);
}
.s-input::placeholder { color: var(--text-4); }

/* 搜索按钮 — Apple 蓝 */
.s-btn {
  flex-shrink: 0; width: 34px; height: 34px;
  background: var(--blue); color: white;
  font-size: 13px; border: none; border-radius: var(--radius-xs);
  cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center;
}
.s-btn:hover { background: var(--blue-hover); transform: scale(1.04); }
.s-btn:active { transform: scale(.97); }
.s-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* 快捷标签 */
.search-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.stag {
  font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text-3); cursor: pointer; transition: all .15s;
  letter-spacing: -.01em;
}
.stag:hover {
  background: var(--blue-light); border-color: rgba(0,102,204,.3); color: var(--blue);
}

/* ================================================================
   左栏：筛选排序 / 空状态 / 加载 / 错误
   ================================================================ */
.xhs-filter-row {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--surface-2);
}
.xhs-filter-label { font-size: 11px; color: var(--text-4); flex-shrink: 0; }
.xhs-sort-chip {
  font-size: 11px; font-weight: 500; padding: 3px 10px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  color: var(--text-3); cursor: pointer; transition: all .15s;
  letter-spacing: -.01em;
}
.xhs-sort-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.xhs-sort-chip.active { background: var(--blue); border-color: transparent; color: white; }

/* 空状态 */
.xhs-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px; text-align: center; gap: 0;
}
.xhs-empty-icon { font-size: 38px; margin-bottom: 14px; opacity: .4; }
.xhs-empty-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 6px; letter-spacing: -.3px;
}
.xhs-empty-sub {
  font-size: 13px; color: var(--text-3); line-height: 1.6;
  margin-bottom: 20px; letter-spacing: -.01em;
}
.xhs-hot-suggest { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

/* 加载 */
.xhs-loading {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.xhs-loading-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-3); letter-spacing: -.01em;
}
.loading-dots { display: flex; gap: 6px; }
.loading-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-2);
  animation: blink 1.2s infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }

/* 错误 */
.xhs-error {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 20px; text-align: center;
}
.xhs-error-icon { font-size: 34px; margin-bottom: 12px; opacity: .55; }
.xhs-error #xhsErrorMsg {
  font-size: 13px; color: var(--text-3); line-height: 1.6; letter-spacing: -.01em;
}

/* ================================================================
   笔记列表容器
   ================================================================ */
.xhs-notes-list {
  flex: 1; overflow-y: auto; padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 双列瀑布流，贴近小红书 App */
  gap: 8px;
  align-items: start;
}
.xhs-notes-list::-webkit-scrollbar { width: 3px; }
.xhs-notes-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ================================================================
   笔记卡片 — Apple 卡片风格
   白底 · 圆角 · 无彩色边框 · hover 轻阴影
   ================================================================ */
.xhs-note-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: visible; transition: all .2s;
  cursor: default; position: relative;
  display: flex; flex-direction: column;
}
/* ─── 笔记卡片：封面区（小红书 3:4 标准比例） ─── */
.xhs-cover-wrap {
  position: relative; width: 100%;
  aspect-ratio: 3 / 4;            /* 小红书标准封面比例 */
  background: linear-gradient(135deg, #EAEAED 0%, #D8D8E0 100%);
  overflow: hidden; flex-shrink: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.xhs-cover-wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .4s ease;
}
.xhs-note-card:hover .xhs-cover-wrap img { transform: scale(1.06); }
.xhs-note-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.xhs-note-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12), var(--shadow);
}

/* 封面 placeholder（无图 or 图加载失败） */
.xhs-cover-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  background: linear-gradient(135deg,#E8E8F0 0%,#D0D0DC 100%);
}
.xhs-cover-placeholder .ph-emoji { font-size: 26px; opacity: .7; }
.xhs-cover-placeholder .ph-text {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: -.2px; text-align: center; padding: 0 14px;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* 示例数据角标 */
.xhs-mock-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; font-weight: 700;
  background: rgba(255,149,0,.9); color: #fff;
  padding: 2px 7px; border-radius: 20px;
  backdrop-filter: blur(4px); letter-spacing: .2px;
}

/* 排名角标（浮在封面上） */
.xhs-rank-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 11px; font-weight: 700; color: white;
  min-width: 22px; height: 22px; border-radius: var(--radius-pill);
  padding: 0 6px;
  background: rgba(0,0,0,.52);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px) saturate(160%);
  letter-spacing: -.01em;
}
.xhs-rank-badge.rank-1 { background: linear-gradient(135deg,#FFD700,#F7B500); }
.xhs-rank-badge.rank-2 { background: linear-gradient(135deg,#C0C0C0,#8E8E93); }
.xhs-rank-badge.rank-3 { background: linear-gradient(135deg,#CD7F32,#A2845E); }

/* 内容区 */
.xhs-note-body { padding: 10px 12px 12px; flex: 1; min-width: 0; }
.xhs-note-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.5; margin-bottom: 5px; letter-spacing: -.2px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.xhs-note-author {
  font-size: 11px; color: var(--text-4);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 7px; letter-spacing: -.01em;
}
.xhs-author-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface-3); flex-shrink: 0;
  border: 1px solid var(--border); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: var(--text-3);
}

/* 数据指标 */
.xhs-note-stats { display: flex; gap: 12px; margin-bottom: 8px; }
.xhs-stat {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--text-3); font-weight: 500; letter-spacing: -.01em;
}
.xhs-stat-icon { font-size: 10px; opacity: .65; }

/* 标签 */
.xhs-note-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 9px; }
.xhs-note-tag {
  font-size: 10px; color: var(--blue);
  background: var(--blue-bg); padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: -.01em;
}

/* 操作按钮 */
.xhs-note-actions {
  display: flex; gap: 6px;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.xhs-action-btn {
  flex: 1; font-size: 12px; font-weight: 500; padding: 6px 0;
  border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-3);
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  letter-spacing: -.01em;
}
.xhs-action-btn:hover {
  border-color: var(--border-2); color: var(--text); background: var(--accent-light);
}
.xhs-action-btn.primary {
  background: var(--blue); border-color: transparent; color: white; font-weight: 600;
}
.xhs-action-btn.primary:hover { background: var(--blue-hover); }

/* ================================================================
   左栏：两大按钮来源选择器
   ================================================================ */
.source-picker {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px 20px 16px; gap: 14px;
  text-align: center;
}

/* 左下角 AI 配置按钮 */
.col-search-footer {
  flex-shrink: 0;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
}
.ai-config-btn {
  width: 100%; height: 38px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px; font-weight: 500; color: var(--text-3);
  cursor: pointer; transition: all .18s;
  letter-spacing: -.01em;
}
.ai-config-btn:hover {
  background: var(--blue-bg); border-color: var(--blue);
  color: var(--blue);
}
.ai-config-btn i { font-size: 12px; }
.ai-config-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-4); flex-shrink: 0;
  transition: background .2s;
}
.ai-config-btn.configured .ai-config-dot { background: var(--green); }
.ai-config-btn.configured { color: var(--text-2); }

/* 改写空状态步骤条 */
.re-steps {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px; flex-wrap: wrap; justify-content: center;
}
.re-step {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 20px;
}
.re-step-num {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.re-step-arrow { font-size: 10px; color: var(--text-4); }
.source-picker-hint {
  font-size: 12px; color: var(--text-3); line-height: 1.6;
  margin: 0 0 6px; letter-spacing: -.01em;
}

/* 两个大按钮 —— 放大 200% */
.source-btn {
  width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 28px 20px 24px;
  border-radius: 18px; border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer; transition: all .22s;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.source-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.1);
}
.source-btn-icon {
  font-size: 44px; line-height: 1; display: block;
}
.source-btn-label {
  font-size: 20px; font-weight: 700; color: var(--text);
  letter-spacing: -.4px; display: block;
}
.source-btn-sub {
  font-size: 12px; color: var(--text-3); line-height: 1.5;
  display: block; max-width: 220px;
}
.source-btn-pro {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 20px;
  background: linear-gradient(135deg,#FF9500,#FF6B00);
  color: white; letter-spacing: .2px;
}

/* 小红书按钮——红色渐变边框 */
.source-btn-xhs {
  border-color: rgba(255,36,66,.2);
  background: linear-gradient(160deg, #fff 0%, #fff9fa 100%);
}
.source-btn-xhs:hover {
  border-color: rgba(255,36,66,.45);
  background: linear-gradient(160deg, #fff 0%, #fff0f2 100%);
  box-shadow: 0 10px 32px rgba(255,36,66,.12);
}

/* 灰豚按钮——蓝色渐变边框 */
.source-btn-ht {
  border-color: rgba(0,102,204,.2);
  background: linear-gradient(160deg, #fff 0%, #f5f9ff 100%);
}
.source-btn-ht:hover {
  border-color: rgba(0,102,204,.4);
  background: linear-gradient(160deg, #fff 0%, #eaf3ff 100%);
  box-shadow: 0 10px 32px rgba(0,102,204,.12);
}

/* ================================================================
   小红书等待输入卡片（点击小红书按钮后展示）
   ================================================================ */
.xhs-wait-card {
  width: 100%; display: flex; flex-direction: column;
  align-items: center; gap: 14px; text-align: center;
  padding: 8px 4px 0;
}
.xwc-icon { font-size: 40px; line-height: 1; }
.xwc-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: -.3px;
}
.xwc-steps {
  display: flex; flex-direction: column; gap: 8px;
  width: 100%; text-align: left;
  background: var(--surface-2); border-radius: 12px;
  padding: 12px 14px;
}
.xwc-step {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: var(--text-2); line-height: 1.5;
}
.xwc-num {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.xwc-input-wrap {
  display: flex; gap: 7px; width: 100%;
}
.xwc-input {
  flex: 1; height: 38px; padding: 0 12px;
  font-size: 12px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.xwc-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.1);
}
.xwc-btn {
  height: 38px; padding: 0 14px; flex-shrink: 0;
  background: var(--blue); color: white;
  font-size: 12px; font-weight: 700;
  border: none; border-radius: 10px;
  cursor: pointer; transition: background .15s;
  display: flex; align-items: center; gap: 5px;
  font-family: inherit; white-space: nowrap;
}
.xwc-btn:hover { background: var(--blue-hover); }
.xwc-hint { font-size: 11px; min-height: 16px; width: 100%; text-align: left; }
.xwc-back {
  font-size: 11px; color: var(--text-3);
  background: none; border: none; cursor: pointer;
  padding: 4px 0; transition: color .15s;
  font-family: inherit;
}
.xwc-back:hover { color: var(--blue); }

/* ================================================================
   全屏平台浏览弹窗
   ================================================================ */
.plat-modal {
  position: fixed; inset: 0; z-index: 9800;
  display: flex; flex-direction: column;
  background: var(--bg);
  animation: modalFadeIn .2s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* 顶部操作栏 */
.plat-modal-bar {
  height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(250,250,252,.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: .5px solid rgba(0,0,0,.1);
  gap: 12px;
}
.plat-modal-bar-left {
  display: flex; flex-direction: column; gap: 1px;
}
.plat-modal-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  letter-spacing: -.3px;
}
.plat-modal-hint {
  font-size: 11px; color: var(--text-3);
}
.plat-modal-close {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 20px;
  background: rgba(118,118,128,.12); border: none;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all .15s; white-space: nowrap;
  font-family: inherit;
}
.plat-modal-close:hover {
  background: rgba(118,118,128,.2); color: var(--text);
}

/* iframe 区域 */
.plat-modal-frame {
  flex: 1; width: 100%; border: none;
  min-height: 0;
}

/* 底部链接输入 */
.plat-modal-footer {
  flex-shrink: 0;
  background: rgba(250,250,252,.95);
  backdrop-filter: blur(20px);
  border-top: .5px solid rgba(0,0,0,.1);
  padding: 12px 20px 14px;
}
.plat-modal-footer-inner { max-width: 900px; margin: 0 auto; }
.plat-modal-footer-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  margin-bottom: 8px; display: flex; align-items: center; gap: 5px;
  letter-spacing: -.01em;
}
.plat-modal-footer-row {
  display: flex; gap: 8px;
}
.plat-modal-input {
  flex: 1; height: 40px; padding: 0 14px;
  font-size: 13px; color: var(--text);
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.plat-modal-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
  background: #fff;
}
.plat-modal-confirm {
  height: 40px; padding: 0 20px;
  background: var(--blue); color: white;
  font-size: 13px; font-weight: 700;
  border: none; border-radius: 10px;
  cursor: pointer; transition: background .15s;
  white-space: nowrap; display: flex; align-items: center; gap: 6px;
  font-family: inherit;
}
.plat-modal-confirm:hover { background: var(--blue-hover); }
.plat-modal-url-hint {
  font-size: 11px; margin-top: 6px; min-height: 16px;
  letter-spacing: -.01em;
}

/* ================================================================
   灰豚工具栏 & 登录横幅（保留兼容）
   ================================================================ */
.ht-login-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 8px; padding: 10px 12px;
  background: linear-gradient(135deg, #FFF8EE, #FFF3E0);
  border: 1px solid rgba(255,149,0,.25);
  border-radius: var(--radius-sm); flex-shrink: 0;
}
.ht-login-icon { font-size: 22px; flex-shrink: 0; }
.ht-login-title { font-size: 12px; font-weight: 700; color: var(--text); }
.ht-login-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ht-login-btn {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; font-weight: 700; padding: 5px 12px;
  border-radius: 20px; border: none;
  background: var(--orange); color: white; cursor: pointer;
  transition: opacity .15s;
}
.ht-login-btn:hover { opacity: .85; }

/* ================================================================
   平台搜索栏（站内平台面板顶部）
   ================================================================ */
.plat-search-bar {
  flex-shrink: 0; padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.plat-search-row {
  display: flex; gap: 6px; margin-bottom: 8px;
}
.plat-search-input {
  flex: 1; height: 32px; padding: 0 11px;
  font-size: 12px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.plat-search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.1);
  background: var(--surface);
}
.plat-search-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--blue); color: white; border: none;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 12px;
  transition: background .15s;
}
.plat-search-btn:hover { background: var(--blue-hover); }

/* 分类标签条 */
.plat-cat-tabs {
  display: flex; gap: 5px; flex-wrap: nowrap; overflow-x: auto;
  scrollbar-width: none; padding-bottom: 2px;
}
.plat-cat-tabs::-webkit-scrollbar { display: none; }
.plat-cat-tab {
  flex-shrink: 0; font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-3);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.plat-cat-tab:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.plat-cat-tab.active {
  background: var(--blue); border-color: transparent;
  color: white;
}

/* 站内笔记列表 */
.plat-notes-wrap {
  flex: 1; overflow-y: auto; padding: 10px 10px 6px;
  display: flex; flex-direction: column; gap: 7px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.plat-notes-wrap::-webkit-scrollbar { width: 4px; }
.plat-notes-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* 站内笔记卡片 */
.plat-note-card {
  display: flex; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 10px;
  cursor: pointer; transition: all .18s;
  position: relative; overflow: hidden;
}
.plat-note-card:hover {
  border-color: var(--blue); background: var(--blue-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,102,204,.1);
}
/* 封面图 */
.pnc-cover {
  width: 58px; height: 78px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden;
  background: var(--surface-3);
  position: relative;
}
.pnc-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.plat-note-card:hover .pnc-cover img { transform: scale(1.06); }
.pnc-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}
/* 排名徽章 */
.pnc-rank {
  position: absolute; top: 4px; left: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  background: rgba(0,0,0,.35); color: white;
}
.pnc-rank.r1 { background: linear-gradient(135deg,#FFD700,#F7B500); color:#fff; }
.pnc-rank.r2 { background: linear-gradient(135deg,#C0C0C0,#9E9E9E); color:#fff; }
.pnc-rank.r3 { background: linear-gradient(135deg,#CD7F32,#A2845E); color:#fff; }
/* 内容 */
.pnc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pnc-title {
  font-size: 12px; font-weight: 700; color: var(--text);
  line-height: 1.5; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.pnc-author {
  font-size: 11px; color: var(--text-3);
  display: flex; align-items: center; gap: 4px;
}
.pnc-author-avatar {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; overflow: hidden; flex-shrink: 0;
}
.pnc-stats {
  display: flex; gap: 9px; margin-top: auto;
}
.pnc-stat {
  font-size: 10px; color: var(--text-3); font-weight: 500;
  display: flex; align-items: center; gap: 2px;
}
.pnc-hot-score {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700;
  color: var(--red);
}
.pnc-tags {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.pnc-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 10px;
  background: var(--blue-bg); color: var(--blue);
  font-weight: 500;
}
/* 改写按鈕（悬停显示） */
.pnc-rewrite-btn {
  position: absolute; right: 8px; bottom: 8px;
  padding: 4px 10px; border-radius: 12px;
  background: var(--blue); color: white;
  font-size: 10px; font-weight: 700; border: none;
  cursor: pointer; transition: all .15s;
  opacity: 0; transform: translateY(4px);
  display: flex; align-items: center; gap: 3px;
}
.plat-note-card:hover .pnc-rewrite-btn {
  opacity: 1; transform: none;
}
.pnc-rewrite-btn:hover { background: var(--blue-hover); transform: scale(1.04); }

/* 灰豚热榜头部 */
.ht-rank-header {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 8px;
}
.ht-rank-title {
  font-size: 14px; font-weight: 800; color: var(--text);
  letter-spacing: -.3px;
}
.ht-rank-sub {
  font-size: 11px; color: var(--text-3);
}

/* 灰豚卡片额外：热度条 */
.ht-heat-bar {
  height: 3px; border-radius: 2px; margin-top: 4px;
  background: linear-gradient(90deg, #FF2442, #FF6B35);
  transition: width .4s;
}

/* ================================================================
   平台放大按钮 & 全屏遮罩层
   ================================================================ */
.plat-expand-btn {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-3); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.plat-expand-btn:hover {
  background: var(--blue-bg); border-color: var(--blue); color: var(--blue);
}
/* ================================================================
   展开全屏模态层
   ================================================================ */
.plat-expand-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: var(--bg);
  display: flex; flex-direction: column;
}
.plat-expand-bar {
  height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.plat-expand-content {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin;
}
.plat-expand-content .plat-note-card { max-width: 800px; width: 100%; margin: 0 auto; }
.plat-expand-content .pnc-cover { width: 90px; height: 120px; }
.plat-expand-content .pnc-title { font-size: 14px; -webkit-line-clamp: 3; }
.plat-expand-close {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all .15s;
}
.plat-expand-close:hover {
  background: var(--blue-bg); border-color: var(--blue); color: var(--blue);
}

/* fadeIn */
@keyframes fadeIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:none} }

/* ================================================================
   改写模式 Tabs
   ================================================================ */
.rewrite-mode-tabs {
  display: flex; gap: 3px;
  background: var(--surface-3); padding: 3px; border-radius: var(--radius-pill);
}
.rmode {
  font-size: 11px; font-weight: 500; padding: 4px 12px;
  border-radius: var(--radius-pill); border: none;
  color: var(--text-3); cursor: pointer; transition: all .18s;
  letter-spacing: -.01em; background: transparent;
}
.rmode:hover { color: var(--text); background: var(--accent-light); }
.rmode.active {
  background: var(--surface); color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.1), 0 0 0 .5px rgba(0,0,0,.06);
}

/* 改写空状态 */
.rewrite-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 36px 24px; text-align: center;
}
.re-icon { font-size: 42px; margin-bottom: 14px; opacity: .5; }
.re-title {
  font-size: 17px; font-weight: 600; color: var(--text);
  margin-bottom: 6px; letter-spacing: -.4px;
}
.re-sub { font-size: 13px; color: var(--text-3); margin-bottom: 28px; letter-spacing: -.01em; }
.re-modes { display: flex; gap: 10px; }
.re-mode-card {
  width: 108px; padding: 16px 12px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  border: 1px solid var(--border); text-align: center;
  transition: all .2s;
}
.re-mode-card:hover {
  border-color: var(--border-2); box-shadow: var(--shadow-sm); transform: translateY(-2px);
}
.re-mode-card p { font-size: 13px; font-weight: 600; color: var(--text); margin: 6px 0 4px; letter-spacing: -.2px; }
.re-mode-card small { font-size: 11px; color: var(--text-3); line-height: 1.5; letter-spacing: -.01em; }
.re-mode-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: var(--text); color: white;
  padding: 3px 9px; border-radius: var(--radius-pill); letter-spacing: .1px;
}

/* 改写工作台 */
#rewriteWorkspace {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 14px; gap: 10px;
}

/* 原文预览块 */
.source-preview {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 11px; flex-shrink: 0;
}
.sp-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sp-tag {
  font-size: 10px; font-weight: 600; color: var(--text-3);
  background: var(--surface-3); padding: 2px 8px;
  border-radius: var(--radius-pill); flex-shrink: 0;
  border: 1px solid var(--border); letter-spacing: .1px;
}
.sp-title {
  font-size: 12px; font-weight: 600; color: var(--text); flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px;
}
.sp-meta { font-size: 10px; color: var(--text-4); flex-shrink: 0; }
.sp-body {
  font-size: 11px; color: var(--text-3); line-height: 1.6;
  max-height: 42px; overflow: hidden; position: relative; letter-spacing: -.01em;
}
.sp-body::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 18px;
  background: linear-gradient(transparent, var(--surface-2));
}

/* Output Tabs */
.output-tabs {
  display: flex; gap: 0; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.otab {
  font-size: 11px; font-weight: 500; padding: 8px 12px;
  color: var(--text-3); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s; white-space: nowrap; letter-spacing: -.01em;
}
.otab:hover { color: var(--text); }
.otab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

.output-area { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.output-loading {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  font-size: 13px; color: var(--text-3); letter-spacing: -.01em;
}
.output-wait {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-4); letter-spacing: -.01em;
}

.ot-panel { display: none; flex: 1; overflow-y: auto; padding: 12px; gap: 8px; flex-direction: column; }
.ot-panel.active { display: flex; }
.ot-panel::-webkit-scrollbar { width: 3px; }
.ot-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.ot-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}

/* 底部生成按钮区 */
.rewrite-footer {
  padding: 10px 14px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center; flex-shrink: 0;
}

/* ================================================================
   主要按钮 — Apple 风格
   ================================================================ */
/* 大 CTA 按钮 — Apple 蓝 */
.btn-generate {
  flex: 1; padding: 12px 20px;
  background: var(--blue); color: white;
  font-size: 15px; font-weight: 600; letter-spacing: -.2px;
  border: none; border-radius: var(--radius-pill);
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit;
}
.btn-generate:hover { background: var(--blue-hover); transform: scale(1.01); box-shadow: 0 4px 16px rgba(0,102,204,.28); }
.btn-generate:active { transform: scale(.98); }
.btn-generate.loading { opacity: .65; cursor: not-allowed; }

/* 小按钮 */
.btn-sm {
  padding: 6px 13px; font-size: 12px; font-weight: 500;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2);
  cursor: pointer; transition: all .15s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; letter-spacing: -.01em;
}
.btn-sm:hover { border-color: var(--border-2); color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }
.btn-sm:active { transform: scale(.97); }
.btn-sm.btn-primary {
  background: var(--blue); border-color: transparent; color: white; font-weight: 600;
}
.btn-sm.btn-primary:hover { background: var(--blue-hover); box-shadow: 0 2px 8px rgba(0,102,204,.3); }
.btn-sm.btn-danger { color: var(--red); border-color: rgba(255,59,48,.2); background: var(--red-bg); }
.btn-sm.btn-danger:hover { background: var(--red); color: white; border-color: transparent; }
.btn-sm.btn-save { color: var(--orange); border-color: rgba(255,159,10,.2); background: var(--orange-bg); }

.copy-mini {
  margin-left: auto; font-size: 11px; font-weight: 500; color: var(--blue);
  background: none; border: none; cursor: pointer; padding: 2px 6px;
  border-radius: 6px; transition: all .15s; letter-spacing: -.01em;
}
.copy-mini:hover { background: var(--blue-bg); }

/* ================================================================
   右栏：多账号成品直出
   ================================================================ */
.version-config {
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--surface-2); flex-wrap: wrap;
}
.vc-label { font-size: 11px; font-weight: 600; color: var(--text-3); flex-shrink: 0; letter-spacing: -.01em; }
.vc-chips { display: flex; gap: 4px; }
.vc-chip {
  font-size: 11px; font-weight: 500; padding: 4px 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  color: var(--text-3); cursor: pointer; transition: all .15s;
  background: var(--surface); letter-spacing: -.01em;
}
.vc-chip:hover { border-color: var(--border-2); color: var(--text); }
.vc-chip.active { background: var(--text); border-color: transparent; color: white; font-weight: 600; }

.output-col-actions { display: flex; gap: 6px; }

/* 空状态 */
.output-col-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px; text-align: center; gap: 0;
}
.oce-icon { font-size: 38px; margin-bottom: 14px; opacity: .45; }
.oce-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; letter-spacing: -.3px; }
.oce-sub { font-size: 13px; color: var(--text-3); line-height: 1.6; margin-bottom: 20px; letter-spacing: -.01em; }
.oce-features { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.oce-feat {
  font-size: 11px; color: var(--text-3); background: var(--surface-2);
  padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  letter-spacing: -.01em;
}

.output-col-loading {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  font-size: 13px; color: var(--text-3); letter-spacing: -.01em;
}

/* 成品列表 */
.versions-list {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.versions-list::-webkit-scrollbar { width: 3px; }
.versions-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* 成品版本卡片 */
.version-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: all .2s;
}
.version-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }

.vc-header {
  padding: 10px 13px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2);
}
.vc-account-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 7px; letter-spacing: -.2px;
}
.acct-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.vc-header-actions { display: flex; gap: 5px; }
.nc-btn {
  height: 28px; padding: 0 10px; font-size: 11px; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-3);
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 4px; letter-spacing: -.01em;
}
.nc-btn:hover { border-color: var(--border-2); color: var(--text); background: var(--accent-light); }
.nc-btn.primary {
  background: var(--blue); border-color: transparent; color: white; font-weight: 600;
}
.nc-btn.primary:hover { background: var(--blue-hover); }

/* 规则徽章 */
.rule-badges {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.rbadge {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill);
  letter-spacing: -.01em;
}
.rbadge.ok   { background: var(--green-bg);  color: #1A7A3A; }
.rbadge.warn { background: var(--orange-bg); color: #8A5A00; }
.rbadge.fail { background: var(--red-bg);    color: #C0392B; }

.vc-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }

.vc-section {}
.vc-section-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.vcs-label { font-size: 11px; font-weight: 600; color: var(--text-3); flex: 1; letter-spacing: -.01em; }
.vcs-copy {
  font-size: 10px; font-weight: 500; color: var(--blue);
  background: none; border: none; cursor: pointer; padding: 2px 7px;
  border-radius: 6px; transition: all .15s; letter-spacing: -.01em;
}
.vcs-copy:hover { background: var(--blue-bg); }
.vc-section-body {}

/* ── 版本卡片：封面 Canvas 区 ── */
.vc-cover-wrap {
  display: flex; gap: 12px; align-items: flex-start;
}
.vc-cover-canvas {
  width: 90px; height: 120px; border-radius: 8px;
  flex-shrink: 0; display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.vc-cover-meta { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.cover-text-label { font-size: 10px; font-weight: 600; color: var(--text-4); letter-spacing: .2px; }
.cover-text-value { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.5; white-space: pre-line; letter-spacing: -.2px; }
.cov-status { font-size: 10px; font-weight: 500; }
.cov-status.ok   { color: #10B981; }
.cov-status.fail { color: #DC2626; }

/* ── 合规/需检查 徽章 ── */
.badge-ok   { font-size: 10px; color: #10B981; margin-left: 4px; }
.badge-warn { font-size: 10px; color: #DC2626; margin-left: 4px; }

/* 其余图片（新卡片式） */
.extra-imgs-new { display: flex; flex-direction: column; gap: 5px; }
.ei-card {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--surface-2);
  border-radius: var(--radius-xs); border: 1px solid var(--border);
}
.ei-num { font-size: 10px; font-weight: 700; color: var(--blue); flex-shrink: 0; letter-spacing: -.01em; }
.ei-text { font-size: 11px; color: var(--text-2); white-space: pre-line; line-height: 1.4; flex: 1; letter-spacing: -.01em; }
.ei-copy {
  width: 24px; height: 24px; border: none; border-radius: 6px;
  background: var(--surface); cursor: pointer;
  color: var(--text-3); font-size: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.ei-copy:hover { background: var(--blue-bg); color: var(--blue); }

/* 标题展示（大一点） */
.title-val-lg { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.5; letter-spacing: -.3px; }

/* 旧的保留（兼容） */
.cover-display { display: flex; gap: 10px; align-items: flex-start; }
.cover-mockup {
  width: 80px; height: 100px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
  text-align: center; white-space: pre-line; padding: 6px; flex-shrink: 0;
  line-height: 1.4; letter-spacing: -.2px;
}
.cover-text-content { flex: 1; }
/* 其余图片旧样式 */
.extra-imgs { display: flex; flex-direction: column; gap: 4px; }
.extra-img-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--surface-2);
  border-radius: var(--radius-xs); border: 1px solid var(--border);
}
.title-display { display: flex; align-items: center; gap: 8px; }
.title-val { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; line-height: 1.5; letter-spacing: -.2px; }
.title-len {
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  border-radius: var(--radius-pill); flex-shrink: 0; letter-spacing: -.01em;
}
.title-len.ok   { background: var(--green-bg); color: #1A7A3A; }
.title-len.fail { background: var(--red-bg);   color: #C0392B; }

/* 正文展示 */
.body-display {
  font-size: 12px; color: var(--text); line-height: 1.8;
  white-space: pre-wrap; letter-spacing: -.01em;
}
.body-count {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--radius-pill); letter-spacing: -.01em;
}
.body-count.ok   { background: var(--green-bg); color: #1A7A3A; }
.body-count.warn { background: var(--orange-bg); color: #8A5A00; }
.body-count.fail { background: var(--red-bg);   color: #C0392B; }

/* 标签展示 */
.tags-display { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tag-item-sm {
  font-size: 11px; font-weight: 500; padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--blue-bg); color: var(--blue);
  cursor: pointer; transition: all .15s; letter-spacing: -.01em;
}
.tag-item-sm:hover { background: var(--blue); color: white; }
.tag-count-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--radius-pill); margin-left: auto; flex-shrink: 0; letter-spacing: -.01em;
}
.tag-count-badge.ok   { background: var(--green-bg); color: #1A7A3A; }
.tag-count-badge.fail { background: var(--red-bg);   color: #C0392B; }

/* ================================================================
   中栏 Output 内容区样式
   ================================================================ */
.prompt-box {
  font-size: 12px; line-height: 1.8; color: var(--text-2);
  white-space: pre-wrap; word-break: break-word;
  background: var(--surface-2); border-radius: var(--radius-xs); padding: 13px;
  border: 1px solid var(--border); letter-spacing: -.01em;
}

.titles-list { display: flex; flex-direction: column; gap: 6px; }
.title-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; background: var(--surface); border-radius: var(--radius-xs);
  border: 1px solid var(--border); cursor: pointer; transition: all .18s;
}
.title-item:hover { border-color: var(--blue); background: var(--blue-bg); box-shadow: var(--shadow-sm); }
.title-num {
  font-size: 10px; font-weight: 700; color: white;
  background: var(--text); width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  letter-spacing: 0;
}
.title-text { font-size: 13px; color: var(--text); line-height: 1.5; letter-spacing: -.2px; }

.cover-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.cover-item {
  background: var(--surface); border-radius: var(--radius-xs);
  border: 1px solid var(--border); padding: 11px; cursor: pointer; transition: all .18s;
}
.cover-item:hover { border-color: var(--blue); background: var(--blue-bg); box-shadow: var(--shadow-sm); }
.cover-label {
  font-size: 10px; font-weight: 600; color: var(--text-4); margin-bottom: 5px;
  letter-spacing: .2px;
}

.body-preview {
  font-size: 12px; line-height: 1.9; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  background: var(--surface-2); border-radius: var(--radius-xs); padding: 13px;
  border: 1px solid var(--border); letter-spacing: -.01em;
}

.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item {
  font-size: 12px; font-weight: 500; padding: 5px 13px;
  border-radius: var(--radius-pill); background: var(--blue-bg); color: var(--blue);
  cursor: pointer; transition: all .15s; letter-spacing: -.01em;
  border: none;
}
.tag-item:hover { background: var(--blue); color: white; }

/* ================================================================
   账号偏好面板
   ================================================================ */
.pref-scroll { padding: 12px; display: flex; flex-direction: column; gap: 0; }
.pref-hint {
  font-size: 11px; color: var(--text-3); line-height: 1.6;
  margin-bottom: 10px; letter-spacing: -.01em;
}
.account-prefs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.account-pref-item {
  background: var(--surface-2); border-radius: var(--radius-xs);
  border: 1px solid var(--border); padding: 10px;
}
.api-header { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.api-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.api-name { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.api-row { display: flex; flex-direction: column; gap: 5px; }
.api-label {
  font-size: 10px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .4px;
}
.api-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.api-chip {
  font-size: 11px; font-weight: 500; padding: 3px 9px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-3);
  cursor: pointer; transition: all .15s; letter-spacing: -.01em;
}
.api-chip:hover { border-color: var(--border-2); color: var(--text); }
.api-chip.active { background: var(--text); border-color: transparent; color: white; font-weight: 600; }

/* 平台规则 */
.rule-list { display: flex; flex-direction: column; gap: 5px; }
.rule-item {
  font-size: 11px; padding: 5px 10px;
  border-radius: var(--radius-xs); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px; letter-spacing: -.01em;
}
.rule-item.ok { background: var(--green-bg); color: #1A7A3A; border-color: transparent; }
.rule-item.ok i { color: var(--green); }

/* ================================================================
   版本数量配置 / 其他表单组件
   ================================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  letter-spacing: .1px;
}
.input {
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 9px 12px; font-size: 14px; color: var(--text);
  background: var(--surface); outline: none; font-family: inherit;
  transition: all .2s; -webkit-appearance: none; letter-spacing: -.01em;
}
.input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.15);
}
.input::placeholder { color: var(--text-4); }
textarea.input { resize: vertical; line-height: 1.6; }

.range-input { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--border); outline: none; }
.range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); cursor: pointer; box-shadow: 0 1px 4px rgba(0,102,204,.3); }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; font-weight: 500; padding: 5px 13px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-3);
  cursor: pointer; transition: all .15s; letter-spacing: -.01em;
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.active { background: var(--text); border-color: transparent; color: white; font-weight: 600; }

.hint-text { font-size: 11px; color: var(--text-4); line-height: 1.5; margin-top: 8px; letter-spacing: -.01em; }

/* ================================================================
   二栏布局（原创创作 / 其他页面）
   ================================================================ */
.two-col {
  gap: 12px;
  height: calc(100vh - var(--header-h) - 28px);
  align-items: flex-start;
}
.panel {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 22px; overflow-y: auto; height: 100%;
}
.panel::-webkit-scrollbar { width: 3px; }
.panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.config-panel { width: 300px; flex-shrink: 0; }
.result-panel { flex: 1; min-width: 0; overflow-y: auto; height: 100%; }
.result-panel::-webkit-scrollbar { width: 3px; }
.result-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.full-panel { width: 100%; }

.panel-title {
  font-size: 17px; font-weight: 600; color: var(--text);
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
  letter-spacing: -.4px;
}
.panel-title i { color: var(--text-4); font-size: 14px; }
.panel-title-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;
}
.panel-title-row .panel-title { margin-bottom: 0; }
.panel-sub {
  font-size: 13px; color: var(--text-3); margin-bottom: 18px;
  margin-top: -10px; line-height: 1.5; letter-spacing: -.01em;
}

/* 结果块 */
.result-block {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 14px; margin-bottom: 12px;
}
.highlight-block {
  background: var(--blue-bg);
  border-color: rgba(0,102,204,.2);
}
.block-header { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.block-icon { font-size: 14px; }
.block-title { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; letter-spacing: -.2px; }

/* 发布建议 */
.publish-tips { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.tip-card {
  text-align: center; padding: 11px 6px;
  background: var(--surface); border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}
.tip-icon { font-size: 18px; margin-bottom: 4px; }
.tip-label { font-size: 9px; font-weight: 600; color: var(--text-3); text-transform: uppercase; margin-bottom: 3px; letter-spacing: .5px; }
.tip-value { font-size: 11px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }

.cover-suggestion { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }

/* 空状态 */
.empty-state { text-align: center; padding: 44px 24px; }
.empty-icon { font-size: 46px; margin-bottom: 12px; opacity: .45; }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; letter-spacing: -.4px; }
.empty-sub { font-size: 13px; color: var(--text-3); margin-bottom: 20px; line-height: 1.6; letter-spacing: -.01em; }
.empty-features { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.feat-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: var(--text-3);
  background: var(--surface-2); padding: 5px 13px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  letter-spacing: -.01em;
}

/* 结果操作 */
.result-actions { display: flex; gap: 6px; align-items: center; }

/* ================================================================
   历史记录 & 模板库
   ================================================================ */
.history-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 10px; }
.history-empty { text-align: center; padding: 56px; color: var(--text-4); font-size: 14px; letter-spacing: -.01em; }
.history-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 14px; transition: all .2s;
}
.history-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.history-card-type {
  font-size: 10px; font-weight: 600; color: var(--text-3);
  background: var(--surface-2); padding: 2px 9px;
  border-radius: var(--radius-pill); display: inline-block; margin-bottom: 7px;
  border: 1px solid var(--border); letter-spacing: .2px;
}
.history-card-rewrite-badge {
  font-size: 10px; font-weight: 600; color: var(--blue);
  background: var(--blue-bg); padding: 2px 9px;
  border-radius: var(--radius-pill); display: inline-block; margin-left: 4px;
  letter-spacing: .1px;
}
.history-card-topic {
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.2px;
}
.history-card-meta { font-size: 11px; color: var(--text-3); display: flex; justify-content: space-between; letter-spacing: -.01em; }
.history-card-actions { margin-top: 10px; display: flex; gap: 6px; }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 10px; }
.template-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 18px;
  cursor: pointer; transition: all .22s; position: relative; overflow: hidden;
}
.template-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--blue); opacity: 0; transition: opacity .18s;
  pointer-events: none;
}
.template-card:hover {
  border-color: var(--blue); transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.template-icon { font-size: 26px; margin-bottom: 9px; }
.template-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 5px; letter-spacing: -.2px; }
.template-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-bottom: 10px; letter-spacing: -.01em; }
.template-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.template-tag {
  font-size: 10px; color: var(--blue);
  background: var(--blue-bg); padding: 2px 8px;
  border-radius: var(--radius-pill); letter-spacing: -.01em;
}

/* ================================================================
   Toast — Apple 系统提示风格
   ================================================================ */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: rgba(29,29,31,.93);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: white; font-size: 13px; font-weight: 500;
  letter-spacing: -.01em; line-height: 1.4;
  padding: 10px 22px; border-radius: var(--radius-pill);
  box-shadow: 0 8px 32px rgba(0,0,0,.22); z-index: 9999;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none; max-width: 340px; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ================================================================
   Modal — Apple 弹窗风格
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.30); z-index: 9800;
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px; max-width: 520px; width: 100%; max-height: 86vh; overflow-y: auto;
  position: relative; box-shadow: var(--shadow-lg);
  animation: modalIn .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn { from{transform:scale(.94);opacity:0} to{transform:scale(1);opacity:1} }
.modal-box-wide { max-width: 760px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.modal-close:hover { background: var(--accent-light); color: var(--text); border-color: var(--border-2); }

/* ================================================================
   旧版笔记卡片（兼容）
   ================================================================ */
.note-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 10px; margin-bottom: 4px;
  transition: all .18s; cursor: pointer;
}
.note-card:hover { border-color: var(--border-2); background: var(--surface-2); }
.note-card.selected { border-color: var(--blue); background: var(--blue-bg); }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1480px) {
  .col-search { width: 360px; }
}
@media (max-width: 1280px) {
  .col-search { width: 320px; }
  .col-rewrite { flex: 1; }
  .col-output  { flex: 1.2; }
}
@media (max-width: 1060px) {
  .four-col { flex-wrap: wrap; height: auto; overflow: visible; }
  .col { height: auto; min-height: 400px; }
  .col-search { width: 100%; }
  .col-rewrite, .col-output { flex: none; width: 100%; }
}
@media (max-width: 640px) {
  .header-tip { display: none; }
  .main-wrap { padding: calc(var(--header-h) + 8px) 8px 16px; }
  .re-modes { flex-direction: column; align-items: center; }
  .logo-badge { display: none; }
}

/* ================================================================
   原文填写卡（第二步：粘贴原文）
   ================================================================ */
.paste-content-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; height: 100%; overflow-y: auto;
}

/* 步骤进度条 */
.pcc-step-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px; background: var(--surface-2);
  border-radius: var(--radius-xs); border: 1px solid var(--border);
  margin-bottom: 4px;
}
.pcc-step {
  font-size: 11px; font-weight: 600; color: var(--text-4);
  letter-spacing: -.01em; white-space: nowrap;
}
.pcc-step.done  { color: var(--green); }
.pcc-step.active { color: var(--blue); }
.pcc-step-arrow { font-size: 10px; color: var(--text-4); flex-shrink: 0; }

.pcc-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: -.3px;
}
.pcc-desc {
  font-size: 12px; color: var(--text-3); line-height: 1.7;
  letter-spacing: -.01em;
}
.pcc-desc strong { color: var(--text); }

.pcc-ai-tip {
  background: var(--blue-light); border: 1px solid rgba(0,102,204,.2);
  border-radius: var(--radius-xs); padding: 8px 12px;
  font-size: 11px; font-weight: 500; color: var(--blue);
  letter-spacing: -.01em; line-height: 1.5;
}
.pcc-ai-tip--warn {
  background: #FFF8EE; border-color: rgba(255,150,0,.25);
  color: #B45309;
}

.pcc-field { display: flex; flex-direction: column; gap: 5px; }
.pcc-label {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  letter-spacing: -.01em; display: flex; align-items: center; gap: 6px;
}
.pcc-required {
  font-size: 10px; font-weight: 700; color: var(--red);
  background: rgba(255,45,85,.08); padding: 1px 6px;
  border-radius: var(--radius-pill);
}
.pcc-optional {
  font-size: 10px; font-weight: 500; color: var(--text-4);
}
.pcc-input {
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface);
  font-size: 13px; color: var(--text); font-family: inherit;
  outline: none; transition: border .2s, box-shadow .2s;
}
.pcc-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.1);
}
.pcc-textarea {
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface);
  font-size: 13px; color: var(--text); font-family: inherit;
  outline: none; resize: vertical; min-height: 110px;
  line-height: 1.65; transition: border .2s, box-shadow .2s;
}
.pcc-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.1);
}
.pcc-hint {
  min-height: 18px; font-size: 12px; font-weight: 500;
  letter-spacing: -.01em;
}
.pcc-confirm {
  padding: 11px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-xs); cursor: pointer;
  font-size: 14px; font-weight: 700; font-family: inherit;
  letter-spacing: -.01em; transition: background .2s, opacity .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pcc-confirm:hover:not(:disabled) { background: var(--blue-hover); }
.pcc-confirm:disabled { opacity: .45; cursor: not-allowed; }
.pcc-back {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--text-3); font-family: inherit;
  text-align: center; padding: 4px; letter-spacing: -.01em;
  transition: color .2s;
}
.pcc-back:hover { color: var(--blue); }

/* ================================================================
   封面图上传区（pcc-cover-zone）
   ================================================================ */
.pcc-cover-zone {
  min-height: 88px; border: 2px dashed var(--border-2);
  border-radius: var(--radius-xs); cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex; flex-direction: column; align-items: stretch;
  overflow: hidden; position: relative;
}
.pcc-cover-zone:hover,
.pcc-cover-zone.drag-over {
  border-color: var(--blue);
  background: var(--blue-light);
}
.pccz-idle {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; padding: 18px 12px; color: var(--text-3);
  pointer-events: none;
}
.pccz-idle i { font-size: 22px; opacity: .5; }
.pccz-idle span { font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.pccz-idle small { font-size: 11px; color: var(--text-4); }

.pccz-thumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px; min-height: 80px;
}
.pccz-thumb {
  position: relative; width: 72px; height: 72px;
  border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--border); flex-shrink: 0;
  cursor: default;
}
.pccz-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pccz-del {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  border: none; cursor: pointer; font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.pccz-del:hover { background: var(--red); }
.pccz-num {
  position: absolute; bottom: 2px; left: 3px;
  font-size: 9px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.pccz-add {
  width: 72px; height: 72px; border-radius: 8px;
  border: 2px dashed var(--border-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-4); font-size: 18px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.pccz-add:hover { border-color: var(--blue); color: var(--blue); }

/* ================================================================
   原文预览区 — 封面缩略条（sp-cover-strip）
   ================================================================ */
.sp-cover-strip {
  flex-direction: column; gap: 6px;
  margin-top: 8px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.sp-cover-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: -.01em; display: flex; align-items: center; gap: 5px;
}
.sp-cover-label i { color: var(--blue); }
.sp-cover-thumbs {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.sp-cover-thumb {
  position: relative; width: 60px; height: 60px;
  border-radius: 7px; overflow: hidden;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.sp-cover-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.sp-cover-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.sp-cover-idx {
  position: absolute; bottom: 2px; right: 3px;
  font-size: 9px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* ================================================================
   封面 Tab — 全新 3:4 大卡设计
   ================================================================ */

/* 区块标题行 */
.cov-section-hd {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--text-2);
  letter-spacing: -.01em; margin-bottom: 10px;
}
.cov-section-hd i { color: var(--blue); font-size: 13px; }
.cov-section-count {
  background: var(--blue-light); color: var(--blue);
  padding: 1px 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
}
.cov-section-tip {
  margin-left: auto; font-size: 10px; font-weight: 400; color: var(--text-4);
}
.cov-section-divider { border-top: 1px solid var(--border); margin: 16px 0; }

/* ── 原文封面参考网格 ── */
.cov-src-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.cov-src-card {
  display: flex; flex-direction: column; gap: 0;
  border-radius: 10px; overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow .2s, transform .15s;
}
.cov-src-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
/* 3:4 比例容器 */
.cov-src-img-wrap {
  position: relative; width: 100%;
  padding-top: 133.33%;   /* 3:4 = height/width = 4/3 = 133% */
  overflow: hidden; cursor: pointer; background: var(--surface-3);
}
.cov-src-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .25s;
}
.cov-src-card:hover .cov-src-img { transform: scale(1.04); }
.cov-src-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0); transition: background .2s;
  color: #fff; font-size: 20px; opacity: 0;
}
.cov-src-card:hover .cov-src-overlay {
  background: rgba(0,0,0,.35); opacity: 1;
}
/* 底部标签 + 下载行 */
.cov-src-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cov-src-num {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: -.01em;
}
.cov-src-dl {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  color: var(--blue); text-decoration: none;
  padding: 3px 8px; border-radius: var(--radius-pill);
  background: var(--blue-light); transition: background .15s;
}
.cov-src-dl:hover { background: #d0e5ff; }

/* ── AI 合成封面网格 ── */
.cov-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cov-ai-card {
  display: flex; flex-direction: column;
  border-radius: 10px; overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  transition: box-shadow .2s, transform .15s;
}
.cov-ai-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  transform: translateY(-2px);
}
/* Canvas 是 750×1000，用 CSS 缩放到容器宽度，保持 3:4 */
.cov-ai-canvas {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: block;
  cursor: pointer;
}
.cov-ai-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border-top: 1.5px solid var(--border);
  background: var(--surface);
}
.cov-ai-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  letter-spacing: -.01em;
}
.cov-ai-dl {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--blue); color: #fff;
  border: none; cursor: pointer; font-size: 11px;
  font-weight: 600; font-family: inherit;
  transition: background .15s, transform .1s;
}
.cov-ai-dl:hover { background: var(--blue-hover); transform: scale(1.03); }
.cov-ai-dl i { font-size: 10px; }

/* ================================================================
   封面灯箱（放大查看）
   ================================================================ */
.cover-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
}
.clb-inner {
  position: relative; display: flex;
  align-items: center; justify-content: center;
  max-width: 90vw; max-height: 90vh;
}
.clb-img {
  max-width: 80vw; max-height: 85vh;
  object-fit: contain; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  display: block;
}
.clb-close {
  position: fixed; top: 20px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  border: none; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.clb-close:hover { background: rgba(255,255,255,.28); }
.clb-prev, .clb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  border: none; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.clb-prev { left: 20px; }
.clb-next { right: 20px; }
.clb-prev:hover, .clb-next:hover { background: rgba(255,255,255,.28); }
.clb-counter {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: 13px; font-weight: 500;
  background: rgba(0,0,0,.35); padding: 4px 14px; border-radius: 20px;
}

/* ================================================================
   Header AI 配置按钮
   ================================================================ */
.api-settings-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--blue); color: #fff;
  border: none; cursor: pointer; font-size: 12px; font-weight: 600;
  font-family: inherit; letter-spacing: -.01em;
  transition: background .2s, transform .15s;
}
.api-settings-btn:hover { background: var(--blue-hover); transform: scale(1.03); }
.api-settings-btn i { font-size: 11px; }

/* ================================================================
   API Key 设置弹窗
   ================================================================ */
.api-modal-overlay {
  position: fixed; inset: 0; z-index: 9900;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.api-modal-box {
  background: var(--surface); border-radius: 20px;
  padding: 32px 28px 24px;
  width: 560px; max-width: 100%;
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
  animation: fadeInUp .25s ease;
}
.api-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.api-modal-title {
  font-size: 18px; font-weight: 700; color: var(--text);
  letter-spacing: -.3px;
}
.api-modal-title i { color: var(--blue); margin-right: 6px; }
.api-modal-close {
  background: none; border: none; cursor: pointer; color: var(--text-3);
  font-size: 16px; padding: 4px; border-radius: 50%;
  transition: color .2s, background .2s;
}
.api-modal-close:hover { color: var(--red); background: rgba(255,45,85,.08); }
.api-modal-desc {
  font-size: 13px; color: var(--text-3); line-height: 1.7;
  margin-bottom: 20px; letter-spacing: -.01em;
}
.api-provider-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.api-provider-row:last-of-type { border-bottom: none; }
.api-provider-info {
  display: flex; align-items: center; gap: 8px;
}
.api-provider-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.api-provider-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  letter-spacing: -.01em;
}
.api-provider-badge {
  font-size: 10px; font-weight: 600; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: var(--radius-pill);
  letter-spacing: .1px;
}
.api-key-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface-2); font-size: 13px;
  color: var(--text); font-family: 'SF Mono', Consolas, monospace;
  outline: none; transition: border .2s, box-shadow .2s;
  letter-spacing: .03em;
}
.api-key-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
  background: var(--surface);
}
.api-get-link {
  font-size: 12px; color: var(--blue); text-decoration: none;
  font-weight: 500; letter-spacing: -.01em; align-self: flex-start;
  transition: opacity .2s;
}
.api-get-link:hover { opacity: .7; text-decoration: underline; }
.api-modal-status {
  min-height: 22px; font-size: 13px; font-weight: 500;
  margin: 12px 0 0; letter-spacing: -.01em; text-align: center;
}
/* ── 代理状态横幅 ── */
.api-proxy-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(52,199,89,.12) 0%, rgba(0,102,204,.08) 100%);
  border: 1.5px solid rgba(52,199,89,.35);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; gap: 12px;
}
.api-proxy-banner-left { display: flex; align-items: center; gap: 12px; }
.api-proxy-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52,199,89,.25);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 3px rgba(52,199,89,.25); }
  50%      { box-shadow: 0 0 0 6px rgba(52,199,89,.08); }
}
.api-proxy-title { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -.01em; margin-bottom: 2px; }
.api-proxy-sub   { font-size: 11px; color: var(--text-3); letter-spacing: -.01em; }
.api-proxy-tag {
  font-size: 10px; font-weight: 700; color: var(--green);
  background: rgba(52,199,89,.12); border: 1px solid rgba(52,199,89,.3);
  padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap;
  letter-spacing: .05em;
}
/* ── 高级选项折叠 ── */
.api-advanced-toggle {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--text-3);
  border: 1px dashed var(--border);
  transition: background .2s, border-color .2s, color .2s;
  margin-bottom: 0; user-select: none;
}
.api-advanced-toggle:hover { background: var(--surface-2); color: var(--text-2); border-color: var(--border-2); }
.api-advanced-panel { border-top: 1px solid var(--border); margin-top: 4px; }
/* ── 模态框底部 ── */
.api-modal-footer {
  display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end;
}
.api-modal-save {
  padding: 9px 24px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-pill); cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  letter-spacing: -.01em; transition: background .2s, transform .15s;
}
.api-modal-save:hover { background: var(--blue-hover); transform: scale(1.02); }
.api-modal-cancel {
  padding: 9px 18px; background: var(--surface-2); color: var(--text-3);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  cursor: pointer; font-size: 13px; font-weight: 500; font-family: inherit;
  transition: all .2s;
}
.api-modal-cancel:hover { background: var(--surface-3); color: var(--text); }

/* ================================================================
   工作台 — 原文预览区新增按钮 & 手动输入
   ================================================================ */
.sp-edit-btn {
  margin-left: auto; padding: 4px 10px;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-pill); cursor: pointer;
  font-size: 11px; font-weight: 500; color: var(--text-3);
  font-family: inherit; transition: all .2s; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.sp-edit-btn:hover {
  border-color: var(--blue); color: var(--blue);
  background: var(--blue-light);
}
.sp-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.manual-input-area {
  background: var(--surface-2); border: 1px dashed var(--border-2);
  border-radius: var(--radius-xs); padding: 12px;
  margin-top: 10px; display: flex; flex-direction: column; gap: 8px;
  animation: fadeInUp .2s ease;
}
.mia-label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  letter-spacing: -.01em; margin-bottom: 2px;
}
.mia-input {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); font-size: 13px; color: var(--text);
  font-family: inherit; resize: vertical; outline: none;
  transition: border .2s, box-shadow .2s; line-height: 1.6;
}
.mia-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.1);
}
.mia-confirm {
  align-self: flex-end; padding: 7px 18px;
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--radius-pill); cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: inherit;
  transition: background .2s;
}
.mia-confirm:hover { background: var(--blue-hover); }

/* ================================================================
   改写生成按钮区 — 显示当前使用的AI
   ================================================================ */
.rewrite-footer-info {
  font-size: 11px; color: var(--text-4); text-align: center;
  margin-top: 6px; letter-spacing: -.01em;
}
.ai-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--blue-light); color: var(--blue);
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 600; letter-spacing: .1px;
}

/* ================================================================
   改写输出区 — 流式文字显示 & typing cursor
   ================================================================ */
.streaming-text {
  white-space: pre-wrap; line-height: 1.8;
  font-size: 14px; color: var(--text); letter-spacing: -.01em;
}
.streaming-text::after {
  content: '▌'; animation: blink 0.7s step-end infinite;
  color: var(--blue); font-size: 13px;
}
.streaming-done::after { display: none; }
@keyframes blink { 50% { opacity: 0; } }

/* 生成中的蓝色进度条 */
.ai-progress-bar {
  height: 3px; background: var(--border);
  border-radius: 2px; overflow: hidden; margin: 8px 0;
}
.ai-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--blue), #5B9FFF);
  border-radius: 2px; width: 0%;
  transition: width .3s ease;
  animation: progressPulse 1.5s ease-in-out infinite;
}
@keyframes progressPulse {
  0%,100% { opacity: 1; } 50% { opacity: .6; }
}
