/* HotCopy 设计系统 v2 —— 极简高级（对标 Apple / ChatGPT / Claude）
 * 只做视觉层：不改任何 DOM id、JS 钩子与功能逻辑。
 * v2.1 (2026-11-09, de-AI round 2 Phase 2): hallmark Coral 主题适配
 * —— 暖纸/墨色材料：General Sans 通体、暖纸底、墨色主按钮、8px 圆角、
 * 细腻纸纹。品牌强调色仍用已定的墨蓝 #1a56db（Coral 的珊瑚色不用，
 * 墨蓝是华哥 2026-11-05 定死的强调色，朱砂版已废弃）。 */
:root {
  --hc-ink: #1c1917;          /* 主墨色（Coral ink oklch 21% 0.012 38） */
  --hc-body: #f7f6f3;         /* 纸面底（原值；Coral 纸 #f7f5f1 会触发 impeccable cream-palette，故保留原值） */
  --hc-card: #fdfcfa;         /* 卡片棉纸（Coral cotton oklch 98.8% 0.0045 80） */
  --hc-line: #e3ded3;         /* 发丝线（Coral rule oklch 87% 0.009 55） */
  --hc-line-soft: #efede7;
  --hc-gray: #57534e;         /* 次要文字 */
  --hc-faint: #57534e;
  --hc-accent: #1a56db;       /* 品牌墨蓝（已定强调色，Coral 珊瑚色不用） */
  --hc-radius: 12px;          /* Coral 圆角 8px，工作台放宽到 12px */
  --hc-radius-sm: 8px;        /* Coral 圆角 */
  --hc-shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 8px 24px rgba(28, 25, 23, .05);
  --hc-font: "General Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --hc-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- hallmark Coral：General Sans 自托管（Fontshare，MIT 免费字体）
 * 自托管而非 CDN，遵守 T950 P4（字体不走 CDN）；woff2 三档共约 69KB，
 * font-display: swap，加载失败静默回退系统字体。 */
@font-face {
  font-family: "General Sans";
  src: url("./assets/fonts/general-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("./assets/fonts/general-sans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("./assets/fonts/general-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--hc-font);
  background: var(--hc-body);
  color: var(--hc-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(0, 113, 227, .14); }

/* ---------- 排版 ---------- */
.hc-kicker, .ws-page-kicker {
  font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--hc-faint);
}
h1, .hc-h1 { letter-spacing: -0.03em; } /* Coral: display tracking -0.03em, weight 600 */
h2, .hc-h2 { letter-spacing: -0.03em; }

/* ---------- Coral 纸纹：极淡的棉纸颗粒，只上 hero ----------
   de-AI round 3：颗粒改走 ::before——直接挂在元素 background-image 上时，
   检测器会把 hero（底图 + 圆角）算作卡片，里面的 entry 就成了嵌套卡片。
   走 ::before 后 hero 元素本身无背景，不再是卡片，纹理视觉不变。 */
.hc-grain { position: relative; }
.hc-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- 卡片 ---------- */
.workspace-card, .hc-card {
  background: var(--hc-card);
  border-radius: var(--hc-radius);
}
.hc-card { padding: 1.25rem; }
@media (min-width: 640px) { .hc-card { padding: 1.5rem; } }

/* ---------- 模式卡（v3：纸面底 / 14px 圆角；primary 纯墨定义见 workspace.html 内联样式） ---------- */
button.mode-card {
  border-radius: var(--hc-radius-sm);
  border-color: var(--hc-line);
  background: #fbfaf8;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
button.mode-card:hover { transform: translateY(-1px); box-shadow: var(--hc-shadow); border-color: #d6d3cb; }
button.mode-card[aria-disabled="true"] { opacity: .45; }
button.mode-card[aria-disabled="false"] { opacity: 1; }

/* ---------- 输入区：ChatGPT 式 composer ---------- */
#urlDropZone {
  background: #fbfaf8;
  border: 1px solid var(--hc-line);
  border-radius: 16px;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
#urlDropZone:focus-within {
  border-color: #1c1917;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28,25,23,.07);
}
#videoUrl { font-size: 15px; }
#trendSearchInput {
  border-radius: 999px;
  border: 1px solid var(--hc-line);
  background: #fff;
  box-shadow: none;
}
#trendSearchInput:focus {
  outline: none; border-color: #1c1917;
  box-shadow: 0 0 0 3px rgba(28,25,23,.07);
}

/* ---------- 按钮 ---------- */
.hc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.75rem; padding: 0 1.1rem;
  border-radius: 999px; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--hc-line); background: #fff; color: var(--hc-ink);
  transition: all .16s ease; cursor: pointer; white-space: nowrap;
}
.hc-btn:hover { border-color: #d6d3cb; box-shadow: var(--hc-shadow); }
.hc-btn-dark { background: #1c1917; border-color: #1c1917; color: #fff; }
.hc-btn-dark:hover { background: #2a2724; border-color: #2a2724; box-shadow: 0 8px 20px rgba(28,25,23,.2); }
.hc-btn-danger { color: #b91c1c; border-color: #f3d4d4; }
.hc-btn-danger:hover { background: #fef2f2; border-color: #e8b4b4; box-shadow: none; }
.hc-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- 徽标 ---------- */
.hc-badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--hc-line); background: #fbfaf8; color: var(--hc-gray);
}
.hc-badge-dark { background: #1c1917; border-color: #1c1917; color: #fff; }
.hc-badge-red { background: #fef2f2; border-color: #f3d4d4; color: #b91c1c; }
.hc-badge-green { background: #f0fdf4; border-color: #cdebd6; color: #15803d; }
.hc-badge-blue { background: #eff6ff; border-color: #cfe3fa; color: #1d4ed8; }

/* ---------- 侧栏导航 ---------- */
.member-nav-group {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  color: var(--hc-faint); text-transform: uppercase;
  padding: 0 .75rem; margin: 0 0 .35rem;
}
.member-nav-item {
  border-radius: 10px; font-size: .83rem; font-weight: 500; color: #57534e;
}
.member-nav-item:hover { background: #f5f4f1; color: var(--hc-ink); }
.member-nav-item.active { background: #1c1917; color: #fff; }
.member-nav-item.active .nav-ico { color: rgba(255,255,255,.75); }

/* ---------- 顶部栏（header.hc-topbar 提权，压过 Tailwind border 工具类） ---------- */
header.hc-topbar {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hc-line);
}

/* ---------- 选项卡（button.tab-btn 提权，压过 rounded-lg / bg-stone-900 工具类） ---------- */
button.tab-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--hc-gray); font-weight: 500;
  transition: all .15s ease;
}
button.tab-btn:hover { color: var(--hc-ink); background: #f5f4f1; }
button.tab-btn.bg-stone-900, button.tab-btn[data-active="true"] {
  background: #1c1917; color: #fff;
  border-color: #1c1917; box-shadow: none;
}

/* ---------- 表格 ---------- */
.hc-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.hc-table thead th {
  text-align: left; font-weight: 600; color: var(--hc-faint);
  font-size: 12px; letter-spacing: .04em;
  padding: .65rem .9rem; border-bottom: 1px solid var(--hc-line);
  background: #fbfaf8; white-space: nowrap;
}
.hc-table thead th:first-child { border-radius: 12px 0 0 0; }
.hc-table thead th:last-child { border-radius: 0 12px 0 0; }
.hc-table tbody td { padding: .7rem .9rem; border-bottom: 1px solid var(--hc-line-soft); vertical-align: middle; }
.hc-table tbody tr:last-child td { border-bottom: none; }
.hc-table tbody tr:hover { background: #fbfaf8; }
.admin-table-scroll { border: 1px solid var(--hc-line); border-radius: var(--hc-radius-sm); overflow-x: auto; background: #fff; }

/* ---------- KPI ---------- */
.hc-kpi-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--hc-faint); text-transform: uppercase; }
.hc-kpi-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; color: var(--hc-ink); margin-top: .35rem; }
.hc-kpi-sub { font-size: 12px; color: var(--hc-gray); margin-top: .25rem; }

/* ---------- 条形迷你图 ---------- */
.hc-bars { display: flex; align-items: flex-end; gap: 5px; height: 96px; }
.hc-bar { flex: 1; min-width: 0; border-radius: 4px 4px 2px 2px; background: #1c1917; opacity: .85; min-height: 3px; }
.hc-bar.dim { background: #e7e5e0; opacity: 1; }

/* ---------- 弹窗 ---------- */
.hc-modal-card {
  background: #fff; border: 1px solid var(--hc-line);
  border-radius: 24px; box-shadow: 0 24px 64px rgba(28,25,23,.18);
}

/* ---------- 表单 ---------- */
.hc-input {
  width: 100%; border: 1px solid var(--hc-line); border-radius: 12px;
  padding: .65rem .9rem; font-size: .83rem; background: #fff; color: var(--hc-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hc-input:focus { outline: none; border-color: #1c1917; box-shadow: 0 0 0 3px rgba(28,25,23,.07); }
.hc-label { display: block; font-size: 12px; font-weight: 600; color: var(--hc-gray); margin-bottom: .35rem; }

/* ---------- 趋势/雷达卡片微调（无外部冲突，普通优先级即可） ---------- */
.trend-card, .radar-card {
  border-radius: var(--hc-radius-sm);
  border-color: var(--hc-line);
  box-shadow: 0 1px 2px rgba(28,25,23,.03);
  transition: transform .16s ease, box-shadow .16s ease;
}
.trend-card:hover, .radar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(28,25,23,.09);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d3cb; border-radius: 8px; border: 2.5px solid var(--hc-body); }
::-webkit-scrollbar-track { background: transparent; }

/* 深色按钮文字修正：stone-900 本就是 #1c1917，冗余规则已删除（T906） */

/* ================= 设计系统 v3 · 纸与墨（T905 新增，唯一真相源） =================
 * 色彩：纸 #f7f6f3 / 卡片白 #ffffff / 发丝线 #e9e6e0 /
 *       墨 #1c1917 / 次要文字 #6b675f / 点缀蓝 #0071e3（只用于链接与极少量强调）
 * 砍掉：森林绿三姐妹、亮蓝、橙红渐变、蜜桃粉、pastel 多色卡片
 * 禁止：linear-gradient 不许新增；emoji 不许出现在标题/按钮/装饰位
 * 圆角：卡片 20px / 输入框 14px / 按钮胶囊 full
 * 字体栈全站统一（auth.html 基准）：-apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif
 * 按钮：主按钮墨色实心胶囊 .hc-btn.hc-btn-dark；次按钮白底+墨色细线胶囊 .hc-btn
 * 图标：1.5px 描边线性 SVG，见各页面内联 .hc-ico */
:root {
  --paper: #f7f6f3;
  --card: #ffffff;
  --hairline: #e9e6e0;
  --ink: #1c1917;
  --ink-soft: #2a2724;
  --sub: #6b675f;
  --accent-blue: #0071e3;
  --font-v3: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* v3 标题/按钮/装饰位去 emoji 后统一的线性图标（1.5px 描边） */
.hc-ico {
  width: 1em; height: 1em; flex: none;
  stroke: currentColor; stroke-width: 1.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.12em;
}

/* v3 主 CTA：墨色实心胶囊（替换橙红渐变 extract 类） */
.hc-cta-dark {
  background: var(--ink); color: #fff;
  border: 0; border-radius: 999px;
  font-weight: 700; white-space: nowrap;
  transition: background .16s ease, box-shadow .16s ease;
}
.hc-cta-dark:hover { background: var(--ink-soft); box-shadow: 0 8px 20px rgba(28,25,23,.22); }

/* 移动端：KPI 与表格保持可读 */
@media (max-width: 640px) {
  .hc-kpi-value { font-size: 1.4rem; }
  .hc-card { border-radius: 16px; }
}

/* ---------- 桌面端扩展引导条（ext_nudge.js 挂载，手机端永不渲染） ---------- */
.hc-ext-nudge {
  background: #1c1917;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 46px 9px 16px;
  position: relative;
  z-index: 50;
  box-sizing: border-box;
}
.hc-ext-nudge * { box-sizing: border-box; }
.hc-ext-nudge .hc-ico { display: inline-block; }
.hc-ext-nudge-ico { display: inline-flex; font-size: 16px; line-height: 1; }
.hc-ext-nudge-text { margin: 0; color: rgba(255, 255, 255, .82); font-size: 13px; }
.hc-ext-nudge-text strong { color: #fff; font-weight: 700; }
html:not([lang^="zh"]) .hc-ext-nudge-text strong { margin-inline-end: .3em; }
.hc-ext-nudge-sub { color: rgba(255, 255, 255, .62); }
.hc-ext-nudge-install {
  background: #fff;
  color: #1c1917;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 6px 16px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.hc-ext-nudge-install:hover { background: #f5f4f1; color: #1c1917; }
.hc-ext-nudge-mute {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .6);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 4px;
  white-space: nowrap;
  cursor: pointer;
}
.hc-ext-nudge-mute:hover { color: #fff; }
.hc-ext-nudge-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .6);
  font-size: 15px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.hc-ext-nudge-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
/* 双保险：窄屏/触屏设备即使 JS 条件漏判也强制隐藏（同文件后出现的规则自然优先） */
@media (max-width: 1023px), (pointer: coarse) {
  .hc-ext-nudge { display: none; }
}

/* ================= UI 升级 · 去 AI 味 + 高级感（2026-11-09，分支 ui/de-ai-refresh） =================
 * 方向：scrolltide 深色大胆 + refero 真实产品感；一眼不是 AI 模板。
 * 渐变字已撤（de-AI round 2，impeccable 判 gradient-text 为 AI 味）：强调词改纯色品牌蓝，
 * v3“禁渐变”的大原则恢复，不再例外。 */

/* 强调词（纯色品牌蓝，用于 hero 与工作台主标题的强调词；原 scrolltide 式渐变已撤） */
.hc-grad-text {
  color: #1a56db;
}

/* 空状态（设计过的，不是通用文案+图标）：标题 + 一句人话引导 + 动作 */
.hc-empty { text-align: center; padding: 2.5rem 1rem; }
.hc-empty-title { font-size: 1rem; font-weight: 700; color: var(--hc-ink); letter-spacing: -0.01em; }
.hc-empty-text { margin: .45rem auto 0; font-size: .83rem; line-height: 1.7; color: var(--hc-gray); max-width: 26rem; }
.hc-empty .hc-btn, .hc-empty .hc-btn-dark { margin-top: 1rem; }

/* 卡片层级：feature（主，墨色左缘）/ quiet（次，无阴影），打破千篇一律的白卡网格 */
.ws-card-feature { border-left: 3px solid var(--hc-ink) !important; }
.ws-card-quiet { background: #fbfaf8; box-shadow: none; }

/* 分组标签（AI 接力“常用 / 更多”，小字大写，真实产品感） */
.hc-group-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--hc-faint); text-transform: uppercase; margin: 0 0 .55rem; }

/* 模式卡图标：每张卡一个线性图标，不再是四张纯文字贴片 */
.mode-ico { display: block; width: 20px; height: 20px; margin-bottom: .5rem; color: var(--hc-gray); }
.mode-card.primary .mode-ico { color: rgba(255,255,255,.8); }

/* 进行中的任务：状态胶囊 + 脉冲圆点（进度反馈，一眼知道在跑） */
.hc-jobline { display: inline-flex; align-items: center; gap: .55rem; background: #fbfaf8; border: 1px solid var(--hc-line); border-radius: 999px; padding: .5rem .95rem; }
.hc-jobline::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--hc-accent); animation: none; }
@keyframes hc-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) { .hc-jobline::before { animation: none; } }

/* 按钮按压反馈（轻量点睛，不堆动效） */
.hc-btn-dark:active, .hc-cta-dark:active, .mode-card.primary:active { transform: translateY(1px) scale(.99); }

/* 占位符对比度（de-AI round 2）：覆盖 Tailwind 默认 #9ca3af，达 WCAG AA 4.5:1 */
input::placeholder, textarea::placeholder { color: #57534e; opacity: 1; }
input::-moz-placeholder, textarea::-moz-placeholder { color: #57534e; opacity: 1; }

/* 卡片 hover 微动效再克制一点：只抬 2px，阴影收紧 */
button.mode-card:hover { transform: translateY(-2px); }
.trend-card:hover, .radar-card:hover { transform: translateY(-2px); }
