/* ==========================================================================
   星宇 · 产品开发智能设计后台
   设计语言：Apple Human Interface Guidelines
   浅色极简 / 大标题层级 / 充足留白 / 圆角卡片 / 柔和阴影 / 毛玻璃 / 平滑缓动
   ========================================================================== */

:root {
  /* ---- 主色 ---- */
  --accent: #0071e3;           /* Apple Blue：主交互色 */
  --accent-hover: #0077ed;
  --accent-active: #0066cc;
  --accent-soft: #eaf4ff;
  --brand-blue: #003287;       /* 星宇深蓝：品牌标识 */
  --brand-blue-2: #1a4a9c;
  --brand-yellow: #f5b900;     /* 品牌黄：点缀 / 步骤标记 */

  /* ---- 背景层级 ---- */
  --bg: #f5f5f7;               /* Apple 经典浅灰 */
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f0f0f2;
  --glass: rgba(255, 255, 255, .72);

  /* ---- 文字 ---- */
  --text: #1d1d1f;             /* Apple 主文字 */
  --muted: #6e6e73;            /* Apple 次要文字 */
  --dim: #86868b;

  /* ---- 分隔线 ---- */
  --line: #e5e5ea;
  --line-soft: #f0f0f2;
  --line-strong: #d2d2d7;

  /* ---- 圆角 ---- */
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 980px;

  /* ---- 阴影：极淡多层 ---- */
  --shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 4px 16px rgba(0, 0, 0, .04);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, .04), 0 10px 28px rgba(0, 0, 0, .07);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .05), 0 20px 48px rgba(0, 0, 0, .10);

  /* ---- 缓动 ---- */
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* ---- 兼容旧变量别名 ---- */
  --amber: var(--brand-yellow);
  --green: #34a853;
  --red: #d93025;
  --blue: var(--accent);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.01em;
}
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
button { cursor: pointer; }

/* 细滚动条（Apple 风格） */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7c7cc; border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #a9a9ae; background-clip: padding-box; }

/* ==========================================================================
   按钮系统
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  transition: background .22s var(--ease), border-color .22s var(--ease),
    color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--surface-3); border-color: #bfbfc4; }
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 113, 227, .22);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 4px 14px rgba(0, 113, 227, .28); }

.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.link-btn { background: none; border: none; color: var(--accent); padding: 0; font-size: 12px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-view {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #eaf2ff 0%, var(--bg) 62%);
  padding: 20px;
}
.login-card {
  width: 430px; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 46px 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.login-mark, .brand-mark { display: inline-flex; align-items: center; justify-content: center; }
.login-mark { width: 132px; height: 54px; margin-bottom: 22px; }
.login-mark img, .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.login-card h1 {
  margin: 0 0 8px; font-size: 26px; font-weight: 650;
  letter-spacing: -.02em; color: var(--text);
}
.login-sub { margin: 0 0 34px; color: var(--muted); font-size: 13px; }
.login-actions { text-align: left; }
.login-card .btn-primary { width: 100%; padding: 13px; font-size: 15px; }
.login-card .btn-primary:disabled { opacity: .65; cursor: wait; }
.login-hint { text-align: center; color: var(--dim); font-size: 12px; margin: 16px 0 0; }
.login-tip { color: var(--red); font-size: 12px; min-height: 18px; margin: 12px 0 0; text-align: center; }

/* ==========================================================================
   应用框架
   ========================================================================== */
.app-view { min-height: 100vh; display: flex; flex-direction: column; }

/* 顶栏：浅色毛玻璃 */
.topbar {
  height: 60px; flex: 0 0 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 128px; height: 52px; }
.brand-divider { width: 1px; height: 30px; background: var(--line-strong); }
.brand-title { font-size: 15px; font-weight: 650; color: var(--brand-blue); letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--dim); margin-top: 1px; letter-spacing: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.api-state {
  font-size: 12px; color: var(--muted);
  padding: 5px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-pill); background: var(--surface-2);
}
.api-state.ok { color: var(--accent); border-color: #bcdcff; background: var(--accent-soft); }
.api-state.warn { color: #b26a00; border-color: #f2dca8; background: #fff8e8; }
.user-label { font-size: 13px; color: var(--muted); }

/* 通知中心 */
.notify-wrap { position: relative; }
.notify-btn {
  position: relative; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); background: transparent;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.notify-btn:hover { background: var(--surface-3); color: var(--text); }
.notify-btn.active { background: var(--accent-soft); color: var(--accent); border-color: #bcdcff; }
.notify-btn.has-unread { color: var(--accent); }
.notify-badge {
  position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px;
  padding: 0 4px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; line-height: 1; color: #fff;
  background: #ff3b30; border: 2px solid var(--surface); border-radius: var(--radius-pill);
}
.notify-badge.hidden { display: none; }
.notify-panel {
  position: absolute; top: 44px; right: 0; z-index: 70;
  width: 360px; max-width: calc(100vw - 28px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: notify-drop .24s var(--ease);
}
.notify-panel.hidden { display: none; }
@keyframes notify-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.notify-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.notify-head b { font-size: 14px; color: var(--text); }
.notify-head-actions { display: flex; gap: 12px; }
.notify-head-actions .link-btn { font-size: 12px; color: var(--accent); }
.notify-list { max-height: 360px; overflow-y: auto; }
.notify-item {
  position: relative; width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; text-align: left; background: transparent;
  border: none; border-bottom: 1px solid var(--line-soft); cursor: pointer;
  transition: background .18s var(--ease);
}
.notify-item:hover { background: var(--surface-2); }
.notify-item.unread { background: rgba(0,113,227,.04); }
.notify-item-icon {
  flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--accent); background: var(--accent-soft); border-radius: 10px;
}
.notify-item-text { min-width: 0; flex: 1; }
.notify-item-text b { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notify-item-text small { display: block; margin-top: 3px; font-size: 11px; color: var(--dim); }
.notify-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.notify-empty { padding: 34px 16px; text-align: center; color: var(--dim); }
.notify-empty span { font-size: 26px; opacity: .5; }
.notify-empty p { margin: 8px 0 2px; font-size: 13px; color: var(--muted); }
.notify-empty small { font-size: 11px; }
.notify-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.notify-foot .check-line { font-size: 12px; }
.notify-foot .opt { font-size: 11px; }

/* 出图完成：结果区脉冲高亮 */
.result-area.done-pulse { animation: done-pulse 1.6s var(--ease); }
@keyframes done-pulse {
  0%   { box-shadow: inset 0 0 0 0 rgba(52,168,83,0); }
  18%  { box-shadow: inset 0 0 0 3px rgba(52,168,83,.38); }
  100% { box-shadow: inset 0 0 0 0 rgba(52,168,83,0); }
}

/* 二级栏：面包屑 */
.subbar {
  min-height: 48px; flex: 0 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.crumb b { color: var(--text); font-weight: 600; }
.crumb-sep { color: #c7c7cc; }
.subbar-right { display: flex; align-items: center; gap: 10px; }
.subbar .btn { color: var(--muted); border-color: var(--line); }
.subbar .btn:hover { background: var(--surface-3); color: var(--text); }

/* 模块导航：四个独立卡片，分区清晰 */
.module-nav {
  flex: 0 0 auto;
  display: flex; align-items: center;
  padding: 16px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.module-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 172px;
  padding: 11px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
  transition: background .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}
.module-tab::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--line-strong);
  transition: background .22s var(--ease);
}
.module-tab:hover { color: var(--text); border-color: #c7c7cc; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.module-tab.active {
  color: var(--brand-blue); font-weight: 650;
  background: linear-gradient(135deg, #f7fbff 0%, #fff 100%);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0,113,227,.16);
}
.module-tab.active::before { background: var(--accent); }
.module-tab:active { transform: scale(.98); }
.module-tab .m-icon {
  width: 26px; height: 26px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--muted); font-size: 14px;
  transition: background .22s var(--ease), color .22s var(--ease);
}
.module-tab.active .m-icon { background: var(--brand-yellow); color: #5c4300; }
.module-tab .m-badge { font-size: 10px; padding: 2px 7px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); border: 1px solid #cfe6ff; }

/* 工作区 */
.workspace { flex: 1; display: grid; grid-template-columns: 430px 1fr; min-height: 0; }
.panel { min-width: 0; }

/* ==========================================================================
   左侧表单栏（浅色卡片）
   ========================================================================== */
.form-panel {
  background: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 18px 18px 34px;
  color: var(--text);
}
.form-panel-head { padding: 4px 4px 16px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; }
.panel-head h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.02em; color: var(--text); }
.panel-note { font-size: 11px; color: var(--dim); background: var(--surface-3); padding: 3px 9px; border-radius: var(--radius-pill); }
.form-panel .form-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.section-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-blue); color: #fff;
  font-size: 12px; font-weight: 600; flex: 0 0 24px;
}
.section-hint { margin: 0 0 14px 34px; font-size: 11px; color: var(--muted); line-height: 1.55; }
.opt { font-size: 11px; color: var(--dim); font-weight: 400; letter-spacing: 0; }

.field-label { display: block; font-size: 12px; color: var(--text); font-weight: 500; margin: 14px 0 6px; }
.field-label:first-child { margin-top: 0; }
.field {
  width: 100%; background: var(--surface);
  border: 1px solid var(--line-strong); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 12px; outline: none; font-size: 13px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field:hover { border-color: #b8b8bd; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, .14); }
.field::placeholder { color: #a9a9ae; }
textarea.field { resize: vertical; line-height: 1.55; min-height: 58px; }
select.field { appearance: auto; color-scheme: light; cursor: pointer; }
select.field option { color: #1a1a1a; background: #fff; }
select.field option:checked { color: #1a1a1a; background: #eaf4ff; }

.drop-zone {
  border: 1.5px dashed #c7c7cc;
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 26px 14px; text-align: center; cursor: pointer;
  transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent); background: var(--accent-soft);
}
.drop-zone:active { transform: scale(.99); }
.drop-icon {
  font-size: 24px; color: var(--accent); line-height: 1;
  width: 42px; height: 42px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 50%; box-shadow: var(--shadow);
}
.drop-text { margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--text); }
.drop-sub { margin-top: 5px; font-size: 11px; color: var(--dim); }
.ref-preview {
  margin-top: 12px; display: flex; gap: 12px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px;
}
.ref-preview img { width: 92px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line-soft); }
.ref-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.ref-info span { font-size: 12px; color: var(--text); word-break: break-all; }
.form-panel .link-btn { color: var(--accent); }

.logo-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.lp-item { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px; }
.lp-item img { width: 74px; height: 30px; object-fit: contain; }
.lp-item span { font-size: 10px; color: var(--muted); }
.lp-swatch { width: 12px; height: 38px; border-radius: 4px; flex: 0 0 12px; }
.lp-swatch.dark { background: #0d2350; border: 1px solid var(--line); }
.lp-swatch.light { background: #eef2fa; border: 1px solid var(--line); }
.logo-note { margin: 10px 0 0; word-break: break-all; font-size: 10px !important; margin-left: 0 !important; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin: 12px 0; }
.check-line input { accent-color: var(--accent); width: 16px; height: 16px; }
.copy-grid { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 12px; }
.copy-item { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; }
.copy-item label { font-size: 11px; color: var(--muted); text-align: right; }
.copy-item input { font-size: 12px; padding: 7px 10px; }

.action-bar { display: flex; gap: 10px; padding: 4px 4px 0; }
.form-error { color: var(--red); font-size: 12px; margin: 12px 4px 0; background: #fff1f0; border: 1px solid #ffd6d2; padding: 9px 12px; border-radius: var(--radius-sm); }

/* 通用设置卡片强调 */
.common-settings { background: linear-gradient(135deg, #f7fbff 0%, #ffffff 100%); border-color: #d9e9fb !important; }
.common-settings .field-row { margin-top: 4px; }

/* ==========================================================================
   右侧内容区
   ========================================================================== */
.stage-panel { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

/* 标签页头 */
.stage-head { display: flex; align-items: center; justify-content: space-between; padding: 0 28px; height: 52px; flex: 0 0 52px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--surface-3); border-radius: var(--radius-sm); padding: 3px;
}
.tab {
  background: transparent; border: none; color: var(--muted);
  padding: 6px 16px; font-size: 12px; font-weight: 500;
  border-radius: 7px;
  transition: background .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); font-weight: 600; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.stage-head .btn { color: var(--muted); border-color: var(--line); }

.tab-content { display: none; flex: 1; overflow-y: auto; padding: 0 28px 40px; }
.tab-content.active { display: block; }

/* 内容工具条 + 大标题
   统一 28px 基准线：标签栏 / 标题 / 按钮 / 内容卡片 / 提示词框左边缘全部对齐 */
.content-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 28px 20px; gap: 16px;
}
.content-toolbar h2 {
  margin: 0; font-size: 28px; font-weight: 650;
  letter-spacing: -.025em; line-height: 1.2; color: var(--text);
}
.content-toolbar .toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-actions .btn-primary { box-shadow: 0 2px 8px rgba(0,113,227,.2); }

/* 提示词框 */
.prompt-box { margin: 0 28px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.prompt-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface-2); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.prompt-box pre { margin: 0; padding: 16px; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 11.5px; line-height: 1.65; color: var(--text); background: var(--surface); font-family: "SF Mono", "SFMono-Regular", Consolas, monospace; }

/* 空状态 */
.result-area { min-height: 340px; }
.empty-state {
  min-height: 400px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  border: 1px dashed #d2d2d7; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--muted);
  font-size: 14px;
}
.empty-icon {
  font-size: 30px; color: var(--accent); line-height: 1;
  width: 66px; height: 66px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border-radius: 50%;
}
.empty-sub { font-size: 12px; color: var(--dim); }

/* 结果卡片 */
.result-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .22s var(--ease), transform .22s var(--ease); }
.result-card:hover { box-shadow: var(--shadow-hover); }
.result-card-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--surface-2); }
.result-card-body { background: #fff; display: flex; align-items: center; justify-content: center; min-height: 380px; padding: 18px; }
.result-card-body img { max-width: 100%; max-height: 560px; object-fit: contain; cursor: zoom-in; }
.result-card-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.result-card .btn { background: var(--surface); border-color: var(--line); color: var(--text); }
.result-card .btn:hover { border-color: var(--accent); color: var(--accent); }

.tag { display: inline-block; padding: 4px 11px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 11px; color: var(--muted); background: var(--surface-2); }
.tag.blue { color: var(--accent); border-color: #cfe6ff; background: var(--accent-soft); }
.tag.amber { color: #946200; border-color: #f3e0a8; background: #fff9e8; }
.tag.red { color: var(--red); border-color: #f7cfca; background: #fff2f0; }

/* 生图状态条 */
.bridge-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 24px; box-shadow: var(--shadow); }
.bridge-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.watch-status { display: flex; align-items: center; gap: 14px; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; border: 1px solid; }
.watch-status b { font-size: 14px; font-weight: 600; }
.watch-status p { margin: 4px 0 0; font-size: 12px; line-height: 1.6; }
.watch-status.waiting { background: var(--accent-soft); border-color: #cfe6ff; color: var(--accent); }
.watch-status.timeout { background: #fff9e8; border-color: #f3e0a8; color: #946200; }
.watch-status.stage-sent { background: #e9f7ee; border-color: #bfe6cc; color: #1a7f37; }
.watch-spinner { width: 22px; height: 22px; flex: 0 0 22px; border: 3px solid rgba(0,113,227,.18); border-top-color: var(--accent); border-radius: 50%; animation: watch-spin .9s linear infinite; }
.watch-status.timeout .watch-spinner { display: none; }
.watch-status.stage-sent .watch-spinner { border-color: rgba(26,127,55,.18); border-top-color: #1a7f37; }
@keyframes watch-spin { to { transform: rotate(360deg); } }
.auto-submit-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 10px 14px; margin-bottom: 18px; }
.auto-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; }
.auto-toggle input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.auto-bar-hint { font-size: 11px; color: var(--muted); line-height: 1.5; flex: 1 1 240px; }
.auto-submit-bar .btn { white-space: nowrap; }
.bridge-auto { background: var(--accent-soft); border: 1px solid #cfe6ff; color: var(--accent); border-radius: var(--radius-sm); padding: 11px 15px; font-size: 12px; margin-bottom: 14px; }
.bridge-shot { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.bridge-shot-title { font-size: 11px; color: var(--muted); padding: 8px 13px; border-bottom: 1px solid var(--line); }
.bridge-shot img { width: 100%; display: block; }
.bridge-steps { display: grid; gap: 16px; }
.bridge-step { display: flex; gap: 13px; }
.bs-no { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--brand-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.bridge-step b { font-size: 13px; font-weight: 600; color: var(--text); }
.bridge-step p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.65; }
.bridge-refs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.bridge-ref-item { display: flex; flex-direction: column; gap: 5px; }
.bridge-ref-item span { font-size: 11px; color: var(--muted); }
.bridge-ref { width: 160px; height: 110px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.bridge-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.bridge-prompt { margin-top: 18px; font-size: 12px; color: var(--muted); }
.bridge-prompt summary { cursor: pointer; }
.bridge-prompt pre { margin: 12px 0 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 11px; line-height: 1.65; color: var(--text); }

/* 记录 / 素材列表 */
.record-list, .library-list { display: grid; gap: 12px; }
.record-card { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px; box-shadow: var(--shadow); transition: box-shadow .22s var(--ease), transform .22s var(--ease); }
.record-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.record-card img { width: 88px; height: 62px; object-fit: contain; background: var(--surface-2); border-radius: 8px; cursor: zoom-in; border: 1px solid var(--line-soft); }
.thumb-empty { width: 88px; height: 62px; flex: 0 0 88px; border-radius: 8px; background: var(--surface-3); }
.record-meta { flex: 1; min-width: 0; }
.record-meta .r1 { font-size: 13px; font-weight: 600; color: var(--text); }
.record-meta .r2 { font-size: 11px; color: var(--muted); margin-top: 5px; word-break: break-all; }
.record-actions { display: flex; gap: 7px; align-items: center; }
.record-actions .btn-sm, .asset-card .btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-del:hover, .btn-del-asset:hover { color: var(--red) !important; border-color: #f3b5ae !important; }
.result-card-foot .show-prompt { color: var(--accent); }
.library-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.asset-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .22s var(--ease), transform .22s var(--ease); }
.asset-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.asset-card img { width: 100%; height: 128px; object-fit: contain; background: var(--surface-2); cursor: zoom-in; }
.asset-card .a-foot { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; font-size: 10px; color: var(--muted); gap: 5px; border-top: 1px solid var(--line-soft); }
.asset-card .a-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-line { padding: 36px; text-align: center; color: var(--dim); border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 13px; background: var(--surface); }

/* 列表筛选 */
.list-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 12px; color: var(--muted); }
.filter-select { width: 190px; background: var(--surface); color: var(--text); border-color: var(--line-strong); }

/* 结果多图 */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.result-grid .result-card-body { min-height: 220px; padding: 12px; }
.result-grid .result-card-body img { max-height: 300px; }

/* ==========================================================================
   弹窗 / 灯箱 / Toast
   ========================================================================== */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; animation: fade-in .2s var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: 620px; max-width: 100%; max-height: 88vh; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop-in .28s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.02em; color: var(--text); }
.modal-body { padding: 6px 24px 20px; overflow-y: auto; }
.setting-group { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.setting-group:last-child { border-bottom: none; }
.setting-group h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.setting-group .field-label { color: var(--muted); }
.setting-group .field { background: var(--surface-2); }
.setting-group .check-line { color: var(--text); }
.setting-note { font-size: 11px; color: var(--dim); line-height: 1.65; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); border-radius: 0 0 20px 20px; }

.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 48px; animation: fade-in .2s var(--ease); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close { position: absolute; top: 22px; right: 30px; background: rgba(255,255,255,.14); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 24px; line-height: 1; transition: background .2s var(--ease); }
.lightbox-close:hover { background: rgba(255,255,255,.28); }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: rgba(29, 29, 31, .92); color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-size: 13px; z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,.24);
  animation: toast-in .3s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ==========================================================================
   模块表单专有组件
   ========================================================================== */
.keyword-btn { margin-top: 12px; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(0,113,227,.2); }
.keyword-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.keyword-note { margin: 8px 0 0 !important; margin-left: 0 !important; }

/* Glove Color Lab · 四部件配色 */
.lib-status {
  font-size: 11px; color: var(--accent); background: var(--accent-soft);
  border-radius: 8px; padding: 7px 11px; margin-bottom: 14px; font-weight: 600;
}
.glove-parts { display: grid; gap: 14px; }
.glove-part { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); }
.gp-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.gp-label { font-size: 13px; color: var(--text); font-weight: 600; }
.gp-note { font-size: 10.5px; color: var(--dim); font-weight: 400; }
.ignore-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text); margin-bottom: 10px; cursor: pointer; }
.ignore-toggle input { accent-color: var(--accent); width: 14px; height: 14px; }
.gp-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gp-controls .field-label { margin-top: 0; }
.gp-controls .field { font-size: 12px; padding: 7px 10px; }
.swatch-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 7px;
  margin-top: 11px; max-height: 210px; overflow-y: auto; padding: 2px;
}
.swatch-grid.disabled { opacity: .4; pointer-events: none; }
.swatch {
  border: 1.5px solid var(--line); border-radius: 9px; background: var(--surface);
  padding: 5px 4px 6px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.swatch:hover { border-color: var(--accent); transform: translateY(-1px); }
.swatch.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.swatch-color { display: block; width: 100%; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); }
.swatch-name { font-size: 10px; color: var(--text); line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch-code { font-size: 9px; color: var(--dim); line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-selected {
  margin-top: 10px; font-size: 11px; color: var(--dim); background: var(--surface);
  border-radius: 7px; padding: 7px 9px; border: 1px dashed var(--line);
  line-height: 1.5; word-break: break-all;
}
.gp-selected.has { color: var(--accent); border-color: var(--accent); border-style: solid; font-weight: 600; }
.color-chip { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--line-strong); }

.label-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 8px; }
.label-type {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 5px;
  text-align: center; cursor: pointer; background: var(--surface-2);
  transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}
.label-type:hover { border-color: var(--accent); transform: translateY(-1px); }
.label-type.active { border-color: var(--accent); background: var(--accent-soft); }
.label-type:active { transform: scale(.97); }
.label-type .lt-icon { font-size: 19px; color: var(--accent); line-height: 1.2; }
.label-type .lt-name { font-size: 11px; color: var(--text); margin-top: 5px; }

.compliance-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.compliance-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--surface-2); transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease); }
.compliance-item:hover { transform: translateY(-1px); }
.compliance-item.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(0,113,227,.1); }
.compliance-item img { width: 100%; height: 64px; object-fit: contain; background: #fff; display: block; }
.compliance-item span { display: block; text-align: center; font-size: 10px; color: var(--muted); padding: 5px 0; }
.compliance-item.official { border-style: dashed; }
.custom-compliance { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.custom-compliance .btn { background: var(--surface-2); border-color: var(--line); color: var(--text); }

/* 手套印标：官方标志元素（多选） */
.official-list { display: grid; gap: 8px; }
.official-item {
  display: grid; grid-template-columns: 18px 1fr; column-gap: 9px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; cursor: pointer; background: var(--surface-2);
  transition: border-color .22s var(--ease), background .22s var(--ease);
}
.official-item:hover { border-color: var(--accent); }
.official-item.active { border-color: var(--accent); background: var(--accent-soft); }
.official-item input { width: 15px; height: 15px; accent-color: var(--accent); grid-row: 1 / span 2; margin: 0; }
.official-item .off-name { font-size: 12px; font-weight: 600; color: var(--text); }
.official-item .off-note { font-size: 10px; color: var(--dim); margin-top: 2px; }

/* 手套印标：参考图 + 四套方案 */
.drop-zone-sm .drop-icon { font-size: 20px; }
.drop-zone-sm { padding: 14px 12px; }
.plan-gen-bar { display: flex; gap: 8px; margin-top: 12px; }
.plan-gen-bar #genMarkPlansBtn { flex: 1; }
.plan-gen-bar #refreshMarkPlansBtn { flex: 0 0 auto; padding: 0 16px; white-space: nowrap; }
.mark-plans-area { margin-top: 14px; display: grid; gap: 10px; }
.mark-plan {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--surface-2); cursor: pointer;
  transition: border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease);
}
.mark-plan:hover { border-color: rgba(0,113,227,.4); }
.mark-plan.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(0,113,227,.1); }
.mark-plan .mp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mark-plan .mp-title { font-size: 12px; font-weight: 700; color: var(--text); }
.mark-plan .mp-check { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.mark-plan.selected .mp-check { background: var(--accent); border-color: var(--accent); }
.mark-plan .mp-body { margin-top: 8px; font-size: 11px; line-height: 1.65; color: var(--muted); }
.mark-plan .mp-copy {
  margin-top: 9px; background: transparent; border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 10px; font-size: 11px; color: var(--accent); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.mark-plan .mp-copy:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ==========================================================================
   独立页面：404 / 帮助中心
   ========================================================================== */
.standalone-page { min-height: 100vh; background: var(--bg); }
.standalone-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 24px;
}
.standalone-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 44px; }
.standalone-brand img { width: 112px; height: 46px; object-fit: contain; }
.standalone-brand span { font-size: 14px; font-weight: 650; color: var(--brand-blue); }
.error-code {
  font-size: 108px; line-height: 1; font-weight: 700; letter-spacing: -.06em;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 12px;
}
.standalone-wrap h1 { margin: 0 0 10px; font-size: 28px; font-weight: 650; letter-spacing: -.025em; }
.standalone-sub { margin: 0; color: var(--muted); font-size: 14px; max-width: 460px; line-height: 1.7; }
.error-path {
  margin: 22px 0 26px; padding: 10px 16px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--dim); font-family: "SF Mono", Consolas, monospace; font-size: 12px;
  word-break: break-all;
}
.standalone-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.error-tip { margin: 34px 0 0; font-size: 11px; color: var(--dim); }
.error-tip b { color: var(--muted); font-weight: 600; }

/* 帮助中心 */
.help-topbar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: var(--glass); border-bottom: 1px solid rgba(0,0,0,.07);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  position: sticky; top: 0; z-index: 20;
}
.help-main { max-width: 980px; margin: 0 auto; padding: 54px 24px 90px; }
.help-hero { text-align: center; padding: 10px 0 54px; border-bottom: 1px solid var(--line); }
.help-eyebrow { font-size: 12px; font-weight: 650; color: var(--accent); letter-spacing: .08em; margin-bottom: 12px; }
.help-hero h1 { margin: 0 0 14px; font-size: 42px; font-weight: 680; letter-spacing: -.03em; color: var(--text); }
.help-hero p { margin: 0 auto; max-width: 620px; font-size: 15px; color: var(--muted); line-height: 1.75; }
.help-hero-actions { display: flex; gap: 10px; justify-content: center; margin-top: 26px; }
.help-section { padding: 46px 0 10px; }
.help-section h2 { margin: 0 0 8px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.help-lead { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.help-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.help-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.hs-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-yellow); color: #5c4300;
  font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.help-step b { display: block; font-size: 14px; margin-bottom: 6px; }
.help-step p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.help-grid.two { grid-template-columns: repeat(2, 1fr); }
.help-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.help-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 650; }
.help-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.help-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.help-card.locked { border-color: #f0dfa8; background: linear-gradient(135deg, #fffdf5, #fff); }
.help-card.free { border-color: #cfe6ff; background: linear-gradient(135deg, #f7fbff, #fff); }
.help-note { margin-top: 12px !important; font-size: 12px !important; color: var(--dim) !important; }
.help-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.help-detail summary, .help-faq summary {
  list-style: none; cursor: pointer; padding: 17px 20px; font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  transition: background .2s var(--ease);
}
.help-detail summary::-webkit-details-marker, .help-faq summary::-webkit-details-marker { display: none; }
.help-detail summary::after, .help-faq summary::after { content: "＋"; margin-left: auto; color: var(--dim); font-weight: 400; }
.help-detail[open] summary::after, .help-faq[open] summary::after { content: "－"; }
.help-detail summary:hover, .help-faq summary:hover { background: var(--surface-2); }
.hd-icon {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.hd-tag { font-size: 10px; font-weight: 500; color: var(--dim); background: var(--surface-3); padding: 2px 8px; border-radius: var(--radius-pill); }
.hd-body { padding: 0 20px 20px; border-top: 1px solid var(--line-soft); }
.hd-body > p { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.help-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.help-table th, .help-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.help-table th { color: var(--muted); font-weight: 600; background: var(--surface-2); width: 150px; }
.help-table td { color: var(--text); line-height: 1.7; }
.help-table tr:last-child td, .help-table tr:last-child th { border-bottom: none; }
.help-table b { color: var(--brand-blue); }
.logo-choice { text-align: center; }
.logo-choice-swatch { height: 110px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; border: 1px solid var(--line); }
.logo-choice-swatch.dark { background: #0d2350; }
.logo-choice-swatch.light { background: #eef2fa; }
.logo-choice-swatch img { width: 150px; height: 62px; object-fit: contain; }
.help-faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 9px; }
.help-faq p { margin: 0; padding: 0 20px 18px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.help-faq code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.help-foot { display: flex; justify-content: center; gap: 10px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--line); }

/* ==========================================================================
   新手指引弹窗
   ========================================================================== */
.guide-card { width: 470px; }
.guide-body { text-align: center; padding: 32px 32px 24px; }
.guide-step-icon {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  color: var(--brand-blue); background: linear-gradient(135deg, #eaf4ff, #fff);
  border: 1px solid #cfe6ff; box-shadow: 0 6px 18px rgba(0,113,227,.12);
}
.guide-step-no { font-size: 11px; font-weight: 650; color: var(--accent); letter-spacing: .05em; }
.guide-body h4 { margin: 8px 0 10px; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.guide-body p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; min-height: 70px; }
.guide-dots { display: flex; justify-content: center; gap: 7px; margin-top: 18px; }
.guide-dot { width: 8px; height: 8px; border-radius: 980px; background: var(--line-strong); cursor: pointer; transition: width .22s var(--ease), background .22s var(--ease); }
.guide-dot.active { width: 22px; background: var(--accent); }
.guide-foot { justify-content: space-between; }

/* ==========================================================================
   统一空状态 / 加载 / 错误 / 搜索
   ========================================================================== */
.state-block {
  min-height: 260px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--surface); padding: 30px; color: var(--muted);
}
.state-icon {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px;
}
.state-title { font-size: 14px; font-weight: 600; color: var(--text); }
.state-desc { font-size: 12px; color: var(--dim); line-height: 1.7; }
.state-action { margin-top: 8px; }
.state-loading { border-style: solid; }
.state-loading .state-icon { animation: watch-spin 1s linear infinite; }
.state-error { border-color: #f3b5ae; background: #fffaf9; }
.state-error .state-icon { background: #fff2f0; color: var(--red); }
.filter-search { width: 250px; margin-left: auto; background: var(--surface); color: var(--text); }
.global-error {
  position: fixed; top: 74px; right: 28px; z-index: 90; max-width: 420px;
  display: flex; align-items: center; gap: 16px;
  background: #fff6f4; border: 1px solid #f3b5ae; color: #a33124;
  border-radius: var(--radius); padding: 12px 16px; font-size: 12px;
  box-shadow: var(--shadow-lg); animation: toast-in .3s var(--ease);
}
.global-error .link-btn { color: #a33124; }

/* ==========================================================================
   欢迎页：每次进入 / 刷新都先显示
   ========================================================================== */
.welcome-view {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 28px; overflow: auto;
  background: linear-gradient(160deg, #eef4ff 0%, #f5f5f7 42%, #f7f3ea 100%);
  opacity: 0; transition: opacity .45s var(--ease);
}
.welcome-view.hidden { display: none; }
.welcome-view.show { opacity: 1; }
.welcome-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.w-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.w-orb-1 { width: 420px; height: 420px; top: -120px; left: -80px; background: radial-gradient(circle, rgba(0,113,227,.22), transparent 70%); }
.w-orb-2 { width: 480px; height: 480px; bottom: -160px; right: -120px; background: radial-gradient(circle, rgba(245,185,0,.20), transparent 70%); }
.w-orb-3 { width: 300px; height: 300px; top: 40%; left: 55%; background: radial-gradient(circle, rgba(26,74,156,.12), transparent 70%); }

.welcome-card {
  position: relative; z-index: 1;
  width: min(880px, 100%);
  padding: 40px 48px 30px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05), 0 40px 90px rgba(0,50,135,.10);
  transform: translateY(18px) scale(.985);
  transition: transform .55s var(--ease);
  animation: welcome-rise .6s var(--ease) forwards;
}
@keyframes welcome-rise { to { transform: translateY(0) scale(1); } }
/* 淡出：欢迎卡片轻微上浮 + 缩小的同时随整层 opacity 消退 */
.welcome-view.leaving .welcome-card { animation: welcome-leave .48s var(--ease) forwards; }
@keyframes welcome-leave { to { transform: translateY(-12px) scale(1.02); opacity: 0; } }

/* 首页在欢迎页淡出期间渐入 */
.app-view.app-enter { animation: app-enter .6s var(--ease) both; }
@keyframes app-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.welcome-top { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.welcome-logo { width: 116px; height: auto; display: block; }
.welcome-brand { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .01em; }

.welcome-hero { padding: 34px 0 26px; }
.welcome-greeting { display: inline-block; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .04em; margin-bottom: 10px; }
.welcome-title {
  margin: 0; font-size: clamp(30px, 4.6vw, 44px); font-weight: 680;
  letter-spacing: -.03em; line-height: 1.12; color: var(--brand-blue);
}
.welcome-sub { margin: 14px 0 0; color: var(--muted); font-size: 16px; letter-spacing: -.01em; }
.welcome-meta { margin: 18px 0 0; color: var(--dim); font-size: 13px; }

.welcome-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.welcome-mod {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.welcome-mod:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(0,113,227,.35); }
.welcome-mod:active { transform: translateY(-1px) scale(.99); }
.welcome-mod-icon {
  flex: 0 0 auto; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--brand-blue);
  background: linear-gradient(145deg, var(--accent-soft), #fff);
  border: 1px solid rgba(0,113,227,.14); border-radius: 12px;
}
.welcome-mod:nth-child(2) .welcome-mod-icon { color: #a97600; background: linear-gradient(145deg, #fff6db, #fff); border-color: rgba(245,185,0,.28); }
.welcome-mod:nth-child(3) .welcome-mod-icon { color: var(--accent); }
.welcome-mod:nth-child(4) .welcome-mod-icon { color: var(--brand-blue-2); }
.welcome-mod-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.welcome-mod-name { display: block; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.welcome-mod-desc { display: block; margin-top: 5px; color: var(--dim); font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.welcome-mod-arrow { margin-left: auto; color: var(--dim); font-size: 16px; transition: transform .22s var(--ease), color .22s var(--ease); }
.welcome-mod:hover .welcome-mod-arrow { transform: translateX(3px); color: var(--accent); }

.welcome-actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.welcome-enter { flex: 1; height: 46px; font-size: 15px; font-weight: 600; border-radius: var(--radius-pill); letter-spacing: .01em; }
.welcome-guide { height: 46px; padding: 0 22px; border-radius: var(--radius-pill); }
.welcome-foot { margin: 20px 0 0; text-align: center; color: var(--dim); font-size: 12px; }

@media (max-width: 640px) {
  .welcome-view { padding: 14px; }
  .welcome-card { padding: 26px 20px 22px; border-radius: 20px; }
  .welcome-top { flex-wrap: wrap; gap: 10px; }
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-brand { font-size: 12px; }
  .welcome-actions { flex-direction: column; }
  .welcome-enter, .welcome-guide { width: 100%; }
}

@media (max-width: 860px) {
  .help-steps, .help-grid, .help-grid.two { grid-template-columns: 1fr; }
  .help-hero h1 { font-size: 30px; }
  .list-filter { flex-wrap: wrap; }
  .filter-search { width: 100%; margin-left: 0; }
  .help-topbar { padding: 0 16px; }
  .help-main { padding: 34px 16px 60px; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .workspace { grid-template-columns: 380px 1fr; }
  .content-toolbar h2 { font-size: 24px; }
}
@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .form-panel { border-right: none; border-bottom: 1px solid var(--line); }
  .topbar-right .api-state { display: none; }
  .brand-mark { width: 108px; height: 44px; }
  .module-nav { overflow-x: auto; }
  .module-tab { padding: 8px 12px; white-space: nowrap; }
  .content-toolbar { flex-direction: column; align-items: flex-start; padding: 22px 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
