:root {
  /* 暖纸色编辑风，去 AI-SaaS 味 */
  --bg: #f3f1ec;
  --panel: #ffffff;
  --border: #e6e1d7;
  --border-strong: #d8d2c4;
  --text: #23211c;
  --muted: #857f72;
  --accent: #2e7d57;
  --accent-strong: #1f5c3f;
  --accent-soft: #e8f1ec;
  --err: #b4492f;
  --warn: #9a7617;
  --ok: #2e7d57;
  --radius: 8px;
  --radius-sm: 6px;
  /* 别名：资料弹窗/头像等组件使用 */
  --line: #d8d2c4;
  --green: #2e7d57;
  --panel-2: #faf8f3;
  --shadow-soft: 0 1px 2px rgba(35,33,28,.06), 0 6px 22px rgba(35,33,28,.06);
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Heiti SC", sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, "PingFang SC", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding: 11px 22px; background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 13px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 11px;
  background: transparent;
  flex: none; overflow: hidden;
}
.logo svg { width: 25px; height: 25px; }
.logo-img { display: block; width: 46px; height: 46px; border-radius: 11px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
/* 登录卡品牌头：头像 + 拾空 + slogan，薄荷渐变块，负边距贴合卡片圆角 */
.login-brand { text-align: center; margin: -24px -24px 14px; padding: 22px 24px 18px; background: linear-gradient(135deg,#eef6f0 0%,#e2efe9 100%); border-bottom: 1px solid var(--border); }
.login-brand .login-mark { display: block; width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 16px; object-fit: cover; box-shadow: 0 10px 26px rgba(46,125,87,.22); background: #fff; }
.login-brand .login-name { font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: 4px; color: var(--accent-strong); line-height: 1.1; }
.login-brand .login-slogan { font-size: 12.5px; color: var(--muted); margin-top: 7px; letter-spacing: .5px; }
.brand-text h1 {
  font-family: var(--serif);
  font-size: 19px; font-weight: 700; margin: 0;
  letter-spacing: .5px; color: var(--text);
}
.brand-text .sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .2px; }

/* ---------- 按钮 ---------- */
.primary-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px;
  cursor: pointer; font-weight: 600; font-family: var(--sans);
  transition: background .15s ease, border-color .15s ease;
}
.primary-btn:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); }
.primary-btn:disabled { background: #cfc9bb; border-color: #cfc9bb; cursor: not-allowed; color: #fbfaf6; }
.primary-btn.gen-blue { background: linear-gradient(120deg, #4facfe, #2f80ed); border-color: #2f80ed; }
.primary-btn.gen-blue:hover:not(:disabled) { background: linear-gradient(120deg, #3a9bf0, #276fd0); border-color: #276fd0; }
.primary-btn.gen-blue:disabled { background: #b9d4f0; border-color: #b9d4f0; color: #fff; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px;
  cursor: pointer; font-family: var(--sans);
  transition: background .15s ease, border-color .15s ease;
}
.ghost-btn:hover { background: #faf8f3; border-color: var(--muted); }
.ghost-btn.sm, .primary-btn.sm { padding: 5px 10px; font-size: 12.5px; line-height: 1.5; min-height: 30px; flex: 0 0 auto; }
.ghost-btn:active:not(:disabled) { transform: scale(0.96); }
.ghost-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 图标：继承文字颜色，随字号缩放 */
.ic { display: inline-flex; align-items: center; justify-content: center; }
.ic svg { width: 1.1em; height: 1.1em; display: block; }

/* ---------- 设置面板 ---------- */
.settings { padding: 16px 22px 18px; background: var(--panel); border-bottom: 1px solid var(--border-strong); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span2 { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.field input, .field select {
  padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 13px; width: 100%; font-family: var(--sans); background: #fff; color: var(--text);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
/* 图床 Key 框：独立成行、加大、右侧常驻状态徽标 */
.key-row { display: flex; gap: 8px; align-items: center; }
.key-input {
  flex: 1; font-size: 14px; padding: 10px 12px; letter-spacing: .2px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: var(--sans); background: #fff; color: var(--text); width: 100%;
}
.key-input:focus { outline: none; border-color: var(--accent); }
.key-status {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 5px 11px;
  border-radius: 999px; white-space: nowrap; transition: background .2s, color .2s;
}
.key-status.empty { color: #8a8378; background: rgba(120, 110, 95, .12); }
.key-status.filled { color: #2e7d57; background: rgba(46, 125, 87, .14); }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.config-status { margin-top: 10px; font-size: 12.5px; min-height: 16px; }
.config-status.ok { color: var(--ok); }
.config-status.warn { color: var(--warn); }
.config-status.err { color: var(--err); }

/* ---------- 主题条 ---------- */
.theme-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 9px 16px; background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.theme-bar-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.theme-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); background: #fff; border-radius: 999px;
  padding: 5px 13px; font-size: 12.5px; cursor: pointer; user-select: none;
  color: var(--text); transition: border-color .15s, background .15s, color .15s;
}
.chip .dot { width: 13px; height: 13px; border-radius: 4px; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.12); }
.chip:hover { border-color: var(--muted); }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 600;
  box-shadow: 0 2px 9px rgba(47,128,237,.16); }
.auto-toggle { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; }
.auto-toggle input { accent-color: var(--accent); }

/* 主题栏可收起：收起后只留「主题 + 当前主题名 + 箭头」，隐藏胶囊与自动排版开关 */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; padding: 3px 5px; border: none; background: none;
  cursor: pointer; font-family: var(--sans);
  color: var(--muted); font-weight: 600; letter-spacing: .3px;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle .theme-bar-label { font-size: 12px; }
.theme-current { display: none; color: var(--accent-strong); font-weight: 600; }
.theme-bar.collapsed .theme-current { display: inline; }
.theme-bar.collapsed .theme-chips,
.theme-bar.collapsed .auto-toggle { display: none; }
.chev {
  display: inline-block; font-size: 10px; line-height: 1;
  transition: transform .2s ease; transform: rotate(180deg); /* 展开时常驻向上箭头，提示可收起 */
}
.theme-bar.collapsed .chev { transform: rotate(0deg); }
.theme-hint {
  font-size: 11px; font-weight: 400; letter-spacing: 0;
  color: var(--muted); opacity: .85; margin-left: 2px;
  border-left: 1px solid var(--border); padding-left: 8px;
}

/* ---------- 工作区 ---------- */
.workspace { flex: 1; display: grid; grid-template-columns: minmax(260px, 0.78fr) minmax(340px, 1.22fr); gap: 1px; background: var(--border); min-height: 0; }
.pane { background: var(--panel); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pane-head {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding: 9px 16px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.pane-title { font-weight: 600; letter-spacing: .3px; color: var(--text); }
.wc-count { font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wc-count b { color: var(--text); font-weight: 700; }
.tools { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
/* 左栏（文章内容）：工具按钮换到标题下方第二行，避免窄屏挤压变形 */
.pane-head.wrap-tools { flex-wrap: wrap; }
.pane-head.wrap-tools .tools { flex: 0 0 100%; margin-left: 0; padding-top: 4px; }
#editor {
  flex: 1; border: none; outline: none; resize: none; padding: 18px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
  color: var(--text); width: 100%; background: #fff;
}

/* 编辑区底部操作条：把主操作「生成排版」收拢到写作区底部，形成「写→生成→看预览」连贯动线 */
.editor-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: var(--panel); flex: 0 0 auto;
}
.gen-launch {
  flex: 1; justify-content: center; padding: 12px 18px; font-size: 15px;
  border-radius: 10px; box-shadow: 0 6px 16px rgba(47,128,237,.22);
}
.editor-foot-hint { font-size: 12px; color: var(--muted); line-height: 1.45; flex: 0 1 auto; min-width: 0; }
/* 工具栏分隔线：把「还原」这类复位操作与导出操作分组，层级更清晰 */
.tool-sep { width: 1px; align-self: stretch; background: var(--border); margin: 3px 1px; }

/* Markdown 编辑工具栏：在 textarea 上方提供常用语法快捷插入 */
.md-toolbar { display: none; flex-wrap: wrap; gap: 4px; padding: 7px 12px; background: var(--panel-2); border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.md-toolbar.show { display: flex; }
.md-btn { min-width: 34px; height: 30px; padding: 0 9px; font-size: 12.5px; line-height: 1; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; transition: background .15s, border-color .15s; }
.md-btn:hover { background: #faf8f3; border-color: var(--muted); }
.md-btn:active { transform: scale(.95); }
.md-btn.md-b { font-weight: 800; font-family: var(--mono); }
.md-btn.md-i { font-style: italic; font-family: Georgia, "Times New Roman", serif; }
.md-sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 3px; }

/* 移动端「写 / 预览」分页切换条：桌面端隐藏，仅在 ≤768px 媒体查询中显示 */
.ws-tabs { display: none; }

/* ---------- 预览 ---------- */
.preview-scroll { flex: 1; overflow: auto; padding: 22px; background: #ece9e1; position: relative; }
.preview-frame {
  max-width: 420px; margin: 0 auto; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-soft); padding: 24px 22px; min-height: 220px;
}
.preview-content {
  font-size: 15px; line-height: 1.78; color: #1a1a1a;
  word-break: break-word; overflow-wrap: anywhere;
  max-width: 100%;
}
/* 防止公众号排版内容（宽图/代码块/表格/连续文本/flex子项）撑破预览卡，导致整个面板变宽、把头部按钮挤到屏幕外 */
.preview-content *,
.preview-content *::before,
.preview-content *::after { box-sizing: border-box; }
.preview-content img,
.preview-content video,
.preview-content iframe,
.preview-content svg { max-width: 100%; height: auto; }
.preview-content pre { max-width: 100%; overflow-x: auto; }
.preview-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; }
/* 强制 flex/grid 子项可收缩，避免被 min-width:auto 撑破 */
.preview-content [style*="display:flex"] > *,
.preview-content [style*="display: flex"] > *,
.preview-content [style*="display:inline-flex"] > *,
.preview-content [style*="display: inline-flex"] > *,
.preview-content [style*="display:grid"] > *,
.preview-content [style*="display: grid"] > * { min-width: 0; }
.placeholder { color: #a8a294; text-align: center; margin-top: 48px; font-size: 13px; }

/* ---------- 生成中加载层 ---------- */
.preview-frame { position: relative; }
.gen-loading {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(1.5px);
  animation: genFade .2s ease-out;
  transition: background .3s ease, backdrop-filter .3s ease;
}
/* 首字到达后：浮层变淡，让预览隐约透出，进度条继续走 */
.gen-loading.streaming {
  background: rgba(255,255,255,.45);
  backdrop-filter: blur(0.5px);
  pointer-events: none;
}
.gen-loading.streaming .gen-spinner { display: none; }
.gen-loading.streaming .gen-loading-inner {
  position: absolute; top: 16px; left: 0; right: 0;
}
.gen-loading-inner { text-align: center; padding: 0 24px; width: 320px; max-width: 90vw; box-sizing: border-box; }
.gen-spinner {
  width: 34px; height: 34px; margin: 0 auto 15px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: genSpin .8s linear infinite;
}
.gen-loading-title {
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  color: var(--text); letter-spacing: 2px;
}
.gen-loading-step {
  margin-top: 6px; min-height: 16px;
  font-size: 12px; color: var(--muted); letter-spacing: .3px;
  transition: opacity .3s ease;
}
.gen-progress {
  margin: 14px auto 4px;
  width: 240px;
  height: 6px;
  background: var(--accent-soft);
  border-radius: 99px;
  overflow: hidden;
}
.gen-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .25s ease-out;
}
.gen-progress-pct {
  margin-top: 4px;
  font-size: 11px; color: var(--muted);
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.gen-comfort {
  margin-top: 10px;
  font-size: 12px; color: var(--muted);
  letter-spacing: .3px;
  min-height: 16px;
  transition: opacity .25s ease;
}
@keyframes genSpin { to { transform: rotate(360deg); } }
@keyframes genFade { from { opacity: 0; } to { opacity: 1; } }

/* 尊重系统的「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  .gen-spinner { animation: none; }
  .gen-loading { animation: none; }
  .gen-progress-bar { transition: none; }
  .img-gen-overlay .loader { animation: none; }
  .loader-orbit .loader:nth-child(1) { transform: translate(calc(-50% + 0px),    calc(-50% - 22px))   scale(.55); opacity:.40; }
  .loader-orbit .loader:nth-child(2) { transform: translate(calc(-50% + 78px),   calc(-50% + 0px))    scale(.82); opacity:.75; }
  .loader-orbit .loader:nth-child(3) { transform: translate(calc(-50% + 0px),    calc(-50% + 22px))   scale(1.1); opacity:1; }
  .loader-orbit .loader:nth-child(4) { transform: translate(calc(-50% + -78px),  calc(-50% + 0px))    scale(.82); opacity:.75; }
}

/* ---------- 校验面板 ---------- */
.validation { border-top: 1px solid var(--border); padding: 12px 18px; font-size: 12.5px; background: #fbfaf6; max-height: 220px; overflow: auto; }
.val-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.val-head strong { font-weight: 600; letter-spacing: .3px; }
.val-summary { font-size: 12px; }
.val-summary.ok { color: var(--ok); }
.val-summary.err { color: var(--err); }
.val-summary.warn { color: var(--warn); }
.val-list { margin: 4px 0 0; padding-left: 0; list-style: none; }
.val-list li { position: relative; padding: 3px 0 3px 56px; line-height: 1.5; }
.val-list li::before {
  content: "提示"; position: absolute; left: 0; top: 3px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
  padding: 1px 6px; border-radius: 3px;
  background: #fff5e1; color: #9a6b00; border: 1px solid #f0d9a;
}
.val-list li.err::before { content: "错误"; background: #fdecec; color: #c0392b; border-color: #f3c4c0; }
.val-list li.warn::before { content: "警告"; background: #fff5e1; color: #9a6b00; border-color: #f0d9a; }
.val-list li.err { color: var(--err); }
.val-list li.warn { color: var(--warn); }

/* 点击「重新校验」时的高亮反馈，避免「点了没反应」的错觉 */
.validation.flash { animation: valFlash .55s ease-out; }
@keyframes valFlash {
  0%   { background: #fff3cf; }
  100% { background: #fbfaf6; }
}

.status-bar { padding: 9px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); min-height: 18px; }
.status-bar.err { color: var(--err); }
.status-bar.ok { color: var(--ok); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #2b2823; color: #fff; padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 13px; box-shadow: var(--shadow-soft); z-index: 1000; transition: opacity .2s;
}

.hidden { display: none !important; }

/* 无权限按钮：内容模糊+半透明，右上角金色皇冠角标，点击触发升级弹窗 */
.perm-locked {
  opacity: 0.55;
  cursor: pointer;
  position: relative;
  filter: blur(0.8px);
  transition: filter .2s ease, opacity .2s ease;
}
.perm-locked:hover {
  opacity: 0.72;
  filter: blur(0.4px);
}
.perm-locked::after {
  content: "";
  position: absolute;
  top: -7px; right: -5px;
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none'><path d='M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z' stroke='%23d4af37' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/><path d='M13 29V19L19 22L24 15L29 22L35 19V29H13Z' fill='%23d4af37' stroke='%23d4af37' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  filter: blur(0); /* 冲抵父级模糊（部分浏览器生效） */
  pointer-events: none;
  z-index: 2;
}

/* 图床配置项引导高亮（点「图片」且未配置时） */
.field.flash-glow { animation: glow 1.6s ease; border-radius: 4px; }
@keyframes glow {
  0%, 100% { box-shadow: none; }
  25% { box-shadow: 0 0 0 3px rgba(46, 125, 87, .35); }
}

/* ---------- 顶栏用户态 ---------- */
.user-bar { display: inline-flex; align-items: center; gap: 12px; }
.ub-id { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ub-actions { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.user-name { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }

/* ---------- 登录门禁 ---------- */
.login-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef6f0, #f3f1ec);
  animation: genFade .18s ease-out;
  overflow-y: auto; padding: 24px 16px;
}
.login-card {
  position: relative;
  width: 360px; max-width: calc(100vw - 40px);
  margin: auto;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 24px 24px 18px;
  box-shadow: 0 12px 40px rgba(35,33,28,.16);
  overflow: hidden;
}
.login-x {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0 4px;
  transition: color .15s ease;
}
.login-x:hover { color: var(--text); }
.login-card .field { margin-bottom: 10px; }
.login-card .field input {
  padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 10px;
  font-size: 14px; background: var(--panel-2); color: var(--text); font-family: var(--sans);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.login-card .field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); background: #fff;
}
.field-opt { font-weight: 400; color: var(--muted); font-size: 11px; letter-spacing: 0; }
.login-err { color: var(--err); font-size: 12.5px; min-height: 16px; }
.login-hint { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin: 14px 0 0; }
.pwd-hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; min-height: 15px; }
.pwd-hint.ok { color: var(--ok, #16a34a); }

/* 登录 / 注册 双标签 */
.auth-tabs { display: flex; gap: 4px; margin: 2px 0 14px; background: var(--bg, #f3f1ec); border-radius: 12px; padding: 4px; }
.auth-tab { flex: 1; border: none; background: transparent; padding: 9px 0; font-size: 14px; font-weight: 600; color: var(--muted, #8a8a82); cursor: pointer; border-radius: 9px; transition: all .18s ease; font-family: var(--sans); }
.auth-tab.active { background: var(--panel, #fff); color: var(--accent-strong, #1f5c3f); box-shadow: 0 2px 6px rgba(35,33,28,.12); }
/* 图形验证码 */
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-img { width: 120px; height: 40px; border-radius: 8px; border: 1px solid var(--border, #e3e0d8); cursor: pointer; background: #f3f1ec; flex: 0 0 auto; }
.captcha-row .ghost-btn.sm { flex: 0 0 auto; }
/* 邮箱验证码行（注册） */
.code-row { display: flex; align-items: center; gap: 8px; }
.code-row .ghost-btn.sm { flex: 0 0 auto; white-space: nowrap; }
.ghost-btn.sm:disabled { opacity: .55; cursor: not-allowed; }
/* 登录/找回密码 底部链接 */
.auth-foot { margin-top: 12px; text-align: right; }
.auth-link { color: var(--brand, #2e7d57); font-size: 13px; text-decoration: none; cursor: pointer; }
.auth-link:hover { text-decoration: underline; opacity: .85; }
/* 登录页「记住我（7 天免登录）」勾选行 */
.remember-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.remember-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand, #2e7d57); cursor: pointer; flex: 0 0 auto; }

/* ---------- 预览内联编辑态 ---------- */
.preview-content.editing {
  outline: 2px dashed var(--accent);
  outline-offset: 6px;
  cursor: text;
}
.preview-content.editing:focus { outline-color: var(--accent-strong); }
/* 拖拽图片到预览区——蓝色光晕引导 */
.preview-content.drag-over {
  outline: 2px dashed #3B82F6;
  outline-offset: 6px;
  background: rgba(59,130,246,.06);
  transition: outline .15s, background .15s;
}
.preview-content img { max-width: 100%; height: auto; }
/* 设置里「自定义图床」字段竖向排布 */
#imgCustomWrap { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
/* 「图片」按钮里手写的 SVG 图标，与 IconPark 风格对齐 */
.i-img { width: 1em; height: 1em; vertical-align: -0.15em; }
/* 编辑态的「编辑/还原」按钮高亮 */
.ghost-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* ---------- 头像 + 编辑资料弹窗 ---------- */
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--panel-2); flex: 0 0 auto; }
.avatar-wrap { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.modal-overlay { position: fixed; inset: 0; background: rgba(40,38,33,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: min(420px, 94vw); max-height: 90vh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 16px; }
.modal-x { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.modal-x:hover { color: var(--text); }

/* 通用弹窗按钮组与提示文字（未保存确认等复用） */
#unsavedOverlay { z-index: 75; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal-msg { font-size: 14px; line-height: 1.65; color: var(--text); margin: 6px 0 0; }
.modal-actions .primary-btn, .modal-actions .ghost-btn { flex: 0 0 auto; }

/* 长图预览弹层：标题/提示/按钮固定，图片区独立滚动；手机端接近全屏 */
.long-img-card { width: min(440px, 94vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.long-img-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; background: #f5f3ee; border-radius: 10px; padding: 10px; margin: 4px 0 12px; }
.long-img-wrap img { display: block; width: 100%; height: auto; border-radius: 6px; }
.long-img-tip { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 0 14px; }

/* 扫码预览弹窗 */
.qr-card { width: min(360px, 94vw); text-align: center; }
.qr-tip { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 0 16px; }
.qr-tip strong { color: var(--accent); }
.qr-box {
  width: 220px; height: 220px; margin: 0 auto 12px; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.qr-box img, .qr-box canvas { display: block; width: 200px !important; height: 200px !important; }
.qr-url {
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
  word-break: break-all; background: var(--panel-2); border-radius: 8px; padding: 8px 10px;
}
#qrMsg { margin-top: 10px; text-align: center; }

/* 扫码预览：悬浮在公众号预览区右下角 */
.preview-pane { position: relative; }
.qr-fab {
  position: absolute; right: 16px; bottom: 52px; z-index: 6;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border: none; border-radius: 999px;
  background: var(--accent, #07c160); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.20);
  transition: filter .15s ease, transform .15s ease;
}
.qr-fab svg { width: 18px; height: 18px; }
.qr-fab:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.qr-fab:active:not(:disabled) { transform: translateY(0); }
.qr-fab:disabled { background: #c8c8c8; box-shadow: none; cursor: not-allowed; opacity: .85; }

.avatar-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--panel-2); }
.avatar-edit-actions { display: flex; flex-direction: column; gap: 8px; }

.modal-card .field { margin-bottom: 14px; }
.modal-card .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.modal-card .field input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--panel-2); color: var(--text); }
.modal-card .field input:focus { outline: none; border-color: var(--green); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.profile-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .4px; }
.profile-divider::before, .profile-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.profile-divider span { white-space: nowrap; }
.pwd-actions { display: flex; justify-content: flex-start; margin: 4px 0 2px; }
.logout-btn { width: 100%; justify-content: center; margin-top: 2px; color: #b04a3a; border-color: #e7cfc9; }
.logout-btn:hover { background: #fbf1ef; border-color: #d9a89e; }
/* 我的 → 邮箱区：已绑定只读展示 + 未绑定时的绑定表单 */
.email-display { padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--text); word-break: break-all; }
.bind-email-box { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.be-row { display: flex; gap: 8px; align-items: center; }
.be-row input { flex: 1 1 auto; min-width: 0; }
.solid-btn { background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 9px 16px; font-size: 14px; cursor: pointer; }
.solid-btn:hover { filter: brightness(1.05); }
.solid-btn.sm { padding: 7px 12px; font-size: 13px; }

/* ============================================================
   响应式适配（仅调整 UI，功能与交互不变）
   断点：≤768px 平板/手机（整体改为可滚动的上下堆叠）；≤420px 超窄屏微调
   ============================================================ */
@media (max-width: 768px) {
  /* 移动端应用外壳：整页不滚动，顶栏固定、工作区填充满屏、内部各自滚动（用 dvh 避免 iOS 地址栏 100vh 裁切底部） */
  body { height: 100vh; height: 100dvh; overflow: hidden; }

  /* 顶栏：移动端第一行 = 品牌(含 slogan) + 右侧仅「分享领VIP」；登录/免费开始在首屏 Hero 已有，顶栏不再重复 */
  .topbar { flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px 12px; }
  .brand { gap: 9px; flex: 0 0 auto; min-width: 0; }
  .brand-text h1 { font-size: 16px; }
  .brand-text .sub { display: block; font-size: 11px; }   /* 手机端恢复 slogan */
  .user-bar { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  /* 移动端：头像固定在 Logo 行右侧（userAvatarWrap 已是顶栏子元素、margin-left:auto）；昵称/会员徽标不在顶栏显示；
     操作按钮整行铺满、靠右对齐，干净利落 */
  .ub-id { display: none; }
  /* 移动端操作按钮：单行靠右，放不下整体横向滑动，避免「我的」被挤到第二行折行 */
  .ub-actions { width: 100%; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; scrollbar-width: none; }
  .ub-actions::-webkit-scrollbar { display: none; }
  .ub-actions > .ghost-btn.sm,
  .ub-actions > .activity-btn,
  .ub-actions > .primary-btn.sm,
  .ub-actions > a.ghost-btn.sm { flex: 0 0 auto; justify-content: center; padding: 5px 9px; font-size: 12.5px; gap: 4px; }
  .ub-actions .ic svg { width: 16px; height: 16px; }
  /* 访客态：移动端只保留「分享领VIP」，登录 / 免费开始隐藏（首屏 Hero 已有同功能按钮） */
  .guest-bar { flex: 0 0 auto; margin-left: auto; gap: 8px; }
  .guest-bar #navLoginBtn,
  .guest-bar #navStartBtn { display: none; }

  /* 移动端：管理员后台入口隐藏（后台在桌面端使用即可，手机顶栏不放） */
  .ub-actions #adminLink { display: none; }

  /* 移动端会员：克制的金色描边 + 缓慢呼吸金晕，昵称静态金属金渐变（无扫光，简约尊贵，非会员不生效） */
  .avatar-wrap.vip .avatar {
    border-color: #c9a227;
    box-shadow: 0 0 0 1.5px rgba(201,162,39,.45), 0 0 8px rgba(201,162,39,.22);
    animation: vipHalo 3.6s ease-in-out infinite;
  }
  .avatar-wrap.vip .user-name {
    background: linear-gradient(180deg, #e9cf7a 0%, #c9a227 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 600;
    letter-spacing: .4px;
  }
  @keyframes vipHalo {
    0%, 100% { box-shadow: 0 0 0 1.5px rgba(201,162,39,.40), 0 0 6px rgba(201,162,39,.16); }
    50%      { box-shadow: 0 0 0 1.5px rgba(201,162,39,.55), 0 0 11px rgba(201,162,39,.30); }
  }

  /* 主题条：标签 + 主题胶囊 + 自动排版开关，窄屏自然换行，开关独占一行 */
  .theme-bar { padding: 9px 14px; gap: 10px; }
  .auto-toggle { margin-left: 0; width: 100%; order: 3; }

  /* 工作区：移动端改为「写 / 预览」分页，单页全高、内部滚动，避免大段上下滚动 */
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0; }
  .editor-pane, .preview-pane { min-height: 0; overflow-x: hidden; }
  /* 分页切换条 */
  .ws-tabs { display: flex; flex: 0 0 auto; border-bottom: 1px solid var(--border-strong); background: var(--panel); }
  .ws-tabs button {
    flex: 1; padding: 12px 0; border: none; background: none; cursor: pointer;
    font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--muted);
    position: relative; -webkit-tap-highlight-color: transparent;
  }
  .ws-tabs button.active { color: var(--accent-strong); }
  .ws-tabs button.active::after {
    content: ""; position: absolute; left: 50%; transform: translateX(-50%);
    bottom: 0; width: 36px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
  }
  /* 靠 tab 类显示对应面板（桌面端不显示切换条、也不加 tab 类，两栏照常并排） */
  .workspace.tab-edit .preview-pane,
  .workspace.tab-preview .editor-pane { display: none !important; }

  /* 面板头 + 工具按钮：允许换行，避免被挤出屏幕 */
  .pane-head { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .tools { flex-wrap: wrap; gap: 6px; }
  /* 放大小按钮触击区，手机点按更舒适 */
  .ghost-btn.sm, .primary-btn.sm { padding: 6px 10px; font-size: 12px; min-height: 36px; }

  /* 预览区边距收紧、卡片占满宽度；横向不滚（内容已被限宽），底部留安全区防 Home 指示条遮挡 */
  .preview-scroll { padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); overflow-x: hidden; }
  .preview-pane { overflow-x: hidden; }
  .preview-frame { max-width: 100%; width: 100%; padding: 18px 14px; border-radius: 10px; }
  /* 手机端最严厉限宽：预览内容里任何元素都不得撑破视口 */
  .preview-content, .preview-content * { max-width: 100%; min-width: 0; }
  #editor { padding: 14px; font-size: 14px; line-height: 1.7; }

  /* 文章标题栏 + 校验面板 + 状态栏间距微调 */
  .article-bar { padding: 8px 12px; }
  .validation { padding: 10px 14px; }
  .status-bar { padding: 8px 14px; }

  /* 手机登录：输入框 ≥16px，避免 iOS 聚焦时自动放大页面 */
  .login-card .field input,
  .modal-card .field input,
  .key-input { font-size: 16px; }

  /* 手机登录：用 margin:auto 居中，同时键盘顶起视口时仍可滚动到全部内容（避免 align-items:center 在溢出时裁掉顶部） */
  .login-overlay { align-items: stretch; justify-content: flex-start; padding: 0; overflow: auto; }
  .login-card { margin: auto; }

  /* 生成按钮在窄屏独占整行：避免与右侧提示文字同排被挤压，导致按钮内「生成排版」文字换行 */
  .editor-foot { flex-wrap: wrap; }
  .gen-launch { flex: 1 1 100%; min-width: 0; white-space: nowrap; }
  .gen-launch .lbl { white-space: nowrap; }

  /* 长图预览卡片在手机端接近全屏，图片区占满剩余高度可滚动 */
  .long-img-card { width: 96vw; max-height: 94vh; }

  /* 手机端隐藏「扫码预览」悬浮按钮（手机本就在手机上，无需再扫码） */
  .qr-fab { display: none; }
}

@media (max-width: 420px) {
  /* 超窄屏进一步收紧；昵称随头像显示在顶栏右侧，不再隐藏 */
  .topbar { padding: 9px 12px; }
  .theme-bar { padding: 8px 12px; }
  .preview-scroll { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  .preview-frame { padding: 16px 12px; border-radius: 10px; }
  .login-card { padding: 20px 18px 14px; }
  .login-brand { margin: -20px -18px 16px; padding: 24px 18px 18px; }
  .login-brand .login-name { font-size: 21px; }
  .login-card .brand-text h1 { font-size: 17px; }
  .pane-head { padding: 8px 10px; }
  .article-bar { padding: 8px 10px; }
  .ghost-btn.sm, .primary-btn.sm { padding: 5px 8px; }
  .ub-actions { gap: 5px; }
  .ub-actions > .ghost-btn.sm,
  .ub-actions > .activity-btn { padding: 5px 7px; font-size: 12px; }
  .editor-foot { padding: 10px 12px; }
  .editor-foot-hint { display: none; }
  .gen-launch { font-size: 14px; padding: 12px 14px; }
}

/* ---------- 我的作品（标题栏 + 侧滑面板） ---------- */
.article-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.article-bar-label {
  font-size: 13.5px; font-weight: 600; color: var(--text-strong);
  white-space: nowrap; font-family: var(--sans);
}
#articleTitle {
  flex: 1; font-size: 13.5px; padding: 7px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--sans); background: #fff; color: var(--text);
}
#articleTitle:focus { outline: none; border-color: var(--accent); }
#articleTitle::placeholder { color: var(--muted); }
.save-status {
  font-size: 12px; white-space: nowrap; color: var(--muted);
  min-width: 70px; text-align: right;
}
.save-status.pending { color: var(--muted); }
.save-status.saving { color: var(--warn); }
.save-status.saved { color: var(--ok); }
.save-status.err { color: var(--err); }
.save-status.hint { color: var(--muted); }

.myworks-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: stretch; justify-content: flex-end;
  background: rgba(35, 33, 28, .32);
  animation: genFade .18s ease-out;
}
.myworks-panel {
  width: 380px; max-width: 92vw; height: 100%;
  background: var(--bg); border-left: 1px solid var(--border-strong);
  display: flex; flex-direction: column; box-shadow: -6px 0 24px rgba(35, 33, 28, .10);
}
.mw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border-strong); background: var(--panel);
}
.mw-head strong { font-family: var(--serif); font-size: 16px; letter-spacing: .5px; }
.mw-actions { display: flex; gap: 8px; }
.mw-progress { padding: 6px 14px 10px; display: flex; align-items: center; gap: 10px; }
.mw-progress-bar { flex: 1; height: 6px; background: rgba(0,0,0,.05); border-radius: 10px; overflow: hidden; }
.mw-progress-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, #f0c14b, #d4a017); transition: width .3s ease; }
.mw-progress-fill.warn  { background: linear-gradient(90deg, #f59e0b, #d97706); }
.mw-progress-fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }
.mw-progress-text { font-size: 11px; color: var(--muted); white-space: nowrap; }
.mw-progress-upgrade { color: var(--accent-strong, #2563eb); font-weight: 600; cursor: pointer; text-decoration: none; margin-left: 4px; }
.mw-progress-upgrade:hover { text-decoration: underline; }
.mw-list { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.mw-empty { padding: 30px 22px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7; }
.mw-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.mw-item:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); }
.mw-item-title { font-size: 14px; font-weight: 600; color: var(--text); word-break: break-word; line-height: 1.4; }
.mw-item-meta { margin-top: 6px; font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.mw-item-theme { color: var(--accent-strong); }
.mw-item-del {
  margin-left: auto; border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 4px; font-family: var(--sans);
}
.mw-item-del:hover { color: var(--err); background: rgba(180, 73, 47, .10); }

/* ---------- 我的会员 ---------- */
.vip-panel { width: min(940px, 96vw); }
.vip-panel .modal-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 20px; }
.vip-panel .modal-head strong { font-size: 18px; letter-spacing: .5px; display: inline-flex; align-items: center; gap: 8px; }
.vip-panel .modal-head .vip-head-ic { width: 22px; height: 22px; }
.vip-current { border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; display: flex; align-items: center; gap: 16px; }
.vip-current.none { background: var(--panel-2, #f6f3ee); border: 1px dashed var(--border, #e3ded3); }
.vip-current.active {
  background: linear-gradient(135deg, rgba(46,125,87,.10), rgba(123,191,159,.16));
  border: 1px solid rgba(46,125,87,.30);
}
.vip-cur-crest { width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0c14b, #d4a017); box-shadow: 0 4px 12px rgba(212,160,23,.40), inset 0 1px 1px rgba(255,255,255,.4); }
.vip-cur-crest svg { width: 26px; height: 26px; }
.vip-cur-info { flex: 1; min-width: 0; }
.vip-cur-badge { display: inline-block; background: var(--green, #2e7d57); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 20px; margin-bottom: 7px; letter-spacing: .5px; }
.vip-cur-name { font-size: 20px; font-weight: 800; color: var(--text, #1a1a1a); letter-spacing: .3px; }
.vip-cur-meta { font-size: 13px; color: var(--muted, #8a8378); margin-top: 6px; }
.vip-cur-meta b { color: var(--green-d, #245f43); font-weight: 700; }
.vip-cur-count { font-size: 13px; color: var(--muted, #8a8378); margin-top: 4px; font-variant-numeric: tabular-nums; }
.vip-redeem { display: flex; gap: 10px; margin: 20px 0 18px; }
.vip-redeem input { flex: 1; padding: 11px 14px; border: 1px solid var(--border, #e3ded3); border-radius: 10px; font-size: 14px; background: var(--panel-2, #f6f3ee); color: var(--text, #1a1a1a); letter-spacing: 2px; transition: border-color .15s, box-shadow .15s; }
.vip-redeem input:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 0 3px rgba(212,175,55,.18); }
.vip-redeem .solid-btn { border-radius: 10px; padding: 0 20px; }
.vip-cards-title { font-size: 13px; color: var(--muted, #8a8378); margin: 22px 0 14px; text-align: center; letter-spacing: 3px; }
.vip-cards-title::after { content: ""; display: block; width: 44px; height: 2px; margin: 9px auto 0; background: linear-gradient(90deg, transparent, #d4af37, transparent); }
.vip-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vip-card {
  position: relative; border-radius: 18px; padding: 22px 16px 16px; overflow: hidden;
  display: flex; flex-direction: column; min-height: 300px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 8px 24px rgba(40,38,33,.10), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .25s ease, box-shadow .25s ease;
}
.vip-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 96px; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -12%, rgba(255,255,255,.6), rgba(255,255,255,0) 72%);
}
.vip-card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(40,38,33,.18), inset 0 1px 0 rgba(255,255,255,.55); }
.vip-card.color-purple { background: linear-gradient(155deg, #ece9ff 0%, #cdbcfb 58%, #bcd2f7 100%); }
.vip-card.color-orange { background: linear-gradient(155deg, #fff2e3 0%, #ffd9ac 58%, #ffc788 100%); }
.vip-card.color-gold   { background: linear-gradient(155deg, #fff5d8 0%, #ffe08a 55%, #ffd25e 100%); }
.vip-card.color-aurora { background: linear-gradient(155deg, #dffaf3 0%, #a8ecf0 55%, #9fe0d8 100%); }
.vip-card.is-current { box-shadow: 0 0 0 3px rgba(212,160,23,.55), 0 10px 26px rgba(40,38,33,.16); }
.vip-card-badge {
  position: absolute; top: 13px; right: 13px; z-index: 2;
  background: linear-gradient(135deg, #f0c14b, #d4a017); color: #3a2a05;
  font-size: 11px; font-weight: 800; padding: 3px 11px; border-radius: 20px; letter-spacing: .5px;
  box-shadow: 0 2px 7px rgba(212,160,23,.40);
}
.vip-card-crest {
  width: 54px; height: 54px; border-radius: 50%; align-self: center; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; letter-spacing: 0;
  box-shadow: 0 6px 14px rgba(0,0,0,.18), inset 0 1px 1px rgba(255,255,255,.3);
}
.color-purple .vip-card-crest { background: linear-gradient(150deg, #6a5acd, #4a3d9e); }
.color-orange .vip-card-crest { background: linear-gradient(150deg, #ff9f5a, #e8782f); }
.color-gold   .vip-card-crest { background: linear-gradient(150deg, #f0b429, #cf8e1a); }
.color-aurora .vip-card-crest { background: linear-gradient(150deg, #3bb6a8, #1f8a9e); }
.vip-card-name { text-align: center; font-size: 16px; font-weight: 800; color: #1f1f2a; letter-spacing: .5px; }
.vip-card-price { text-align: center; font-size: 31px; font-weight: 800; color: #1f1f2a; margin: 10px 0 4px; font-family: Georgia, "Times New Roman", serif; letter-spacing: -.5px; }
.vip-card-price span { font-size: 13px; font-weight: 600; margin-left: 3px; color: #6a6a7a; font-family: var(--sans); }
.vip-card-quota { text-align: center; font-size: 13px; color: #4a4a5a; font-weight: 700; }
.vip-card-valid { text-align: center; font-size: 12px; color: #7a7a8a; margin-top: 3px; }
.vip-card-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 13px 0 14px; flex: 1 1 auto; align-content: flex-start; }
.vip-tag { font-size: 11px; color: #3a3a4a; background: rgba(255,255,255,.65); border: 1px solid rgba(0,0,0,.05); border-radius: 20px; padding: 3px 10px; backdrop-filter: blur(2px); }
.vip-tag.off { color: #8a8a96; background: rgba(255,255,255,.3); border-color: rgba(0,0,0,.04); text-decoration: line-through; text-decoration-color: rgba(138,138,150,.5); }
.vip-card-btn {
  margin-top: auto; padding: 10px 12px; border: 1px solid rgba(0,0,0,.12); border-radius: 10px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; letter-spacing: .3px; color: #2a2a3a;
  background: rgba(255,255,255,.7); backdrop-filter: blur(2px); transition: all .15s ease;
}
.vip-card-btn:hover { background: rgba(255,255,255,.95); transform: translateY(-1px); }
.vip-card.is-current .vip-card-btn { background: linear-gradient(135deg, #f0c14b, #d4a017); color: #3a2a05; border: 1px solid rgba(255,255,255,.45); box-shadow: 0 6px 16px rgba(212,160,23,.40); }
@keyframes vipCardShine { 0% { left: -60%; } 100% { left: 130%; } }
.vip-card.is-current::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 50%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0) 35%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 65%, transparent 100%);
  animation: vipCardShine 2.6s ease-in-out infinite; animation-delay: .4s;
}
@media (max-width: 760px) {
  .vip-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 430px) {
  .vip-cards { grid-template-columns: 1fr; }
  .vip-panel { width: 96vw; }
}

/* 顶栏会员等级标签 + 流动光影 */
.vip-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  letter-spacing: .3px;
  color: #e9c87a;            /* VIP 字体金色 */
  line-height: 1.6;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.vip-badge-xingmang { background: #322a4d; }  /* 一隅 深紫 */
.vip-badge-chenxi   { background: #3a2f12; }  /* 留白 深琥珀 */
.vip-badge-yaori    { background: #3a1717; }  /* 无界 深红 */
.vip-badge-jiguang  { background: #10303a; }  /* 拾空 深青 */

/* 会员标签后：剩余次数 */
.user-vip-remain {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .2px;
  white-space: nowrap;
  vertical-align: middle;
}

/* 光影滑动：白亮条从左到右掠过，间隔 3s */
@keyframes badgeShine {
  0%   { left: -60%; }
  100% { left: 120%; }
}
.vip-badge:not(.hidden)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,.32) 50%,
    rgba(255,255,255,0) 70%,
    transparent 100%);
  animation: badgeShine 1.6s ease-in-out infinite;
  animation-delay: .6s;
}

/* 额度用尽提示弹窗 */
.vip-limit-card { max-width: 420px; }
.vip-limit-card .modal-head strong { font-size: 17px; }
.vip-limit-body {
  padding: 6px 4px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.vip-limit-body b { color: var(--accent); }
.vip-limit-card .modal-actions { margin-top: 6px; display: flex; gap: 10px; justify-content: flex-end; }
.vip-limit-card .modal-actions .solid-btn,
.vip-limit-card .modal-actions .ghost-btn { flex: 0 0 auto; }

/* ============ 落地页（首页介绍） ============ */
.landing { flex: 1; overflow-y: auto; background: var(--bg); }
.guest-bar { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#userAvatarWrap { margin-left: auto; }

/* HERO */
.hero { position: relative; overflow: hidden; padding: 72px 24px 64px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; animation: heroFloat 11s ease-in-out infinite; }
.o1 { width: 320px; height: 320px; left: -60px; top: -40px; background: radial-gradient(circle, #cfe9d8, transparent 70%); }
.o2 { width: 280px; height: 280px; right: -40px; top: 60px; background: radial-gradient(circle, #e9e2cf, transparent 70%); animation-delay: -3s; }
.o3 { width: 240px; height: 240px; left: 40%; bottom: -80px; background: radial-gradient(circle, #d6e8ef, transparent 70%); animation-delay: -6s; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-26px); } }
.hero-inner { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { font-size: 13px; letter-spacing: 2px; color: var(--accent, #2e7d57); font-weight: 600; margin-bottom: 14px; }
.hero-title { font-family: var(--serif); font-size: 52px; line-height: 1.12; margin: 0 0 18px; color: var(--text); letter-spacing: 1px; }
.hero-title .breath { color: var(--accent, #2e7d57); display: inline-block; animation: breath 3.4s ease-in-out infinite; }
@keyframes breath { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.hero-sub { font-size: 17px; line-height: 1.7; color: var(--muted); margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .lg, .cta-final .lg { padding: 12px 26px; font-size: 15px; border-radius: 999px; }
.hero-meta { margin-top: 18px; font-size: 13px; color: var(--muted); letter-spacing: .3px; }
.hero-visual { display: flex; justify-content: center; }
.mock { width: 300px; background: #fff; border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-soft); overflow: hidden; animation: mockFloat 6s ease-in-out infinite; }
@keyframes mockFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock-body { padding: 20px 18px 24px; }
.mock-h { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.mock-ln { height: 9px; border-radius: 5px; background: #ece7db; margin-bottom: 10px; }
.mock-ln.w90 { width: 90%; } .mock-ln.w86 { width: 86%; } .mock-ln.w80 { width: 80%; } .mock-ln.w78 { width: 78%; } .mock-ln.w72 { width: 72%; } .mock-ln.w64 { width: 64%; }
.mock-quote { margin: 14px 0; padding: 12px 14px; border-left: 3px solid var(--accent, #2e7d57); background: var(--accent-soft, #e8f1ec); border-radius: 0 8px 8px 0; font-family: var(--serif); font-size: 14px; line-height: 1.6; color: var(--accent-strong, #1f5c3f); }

/* 通用区块 */
.sec { max-width: 980px; margin: 0 auto; padding: 56px 24px; }
.sec-alt { max-width: none; background: var(--panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-alt > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.sec-head { text-align: center; margin-bottom: 30px; }
.sec-tag { display: inline-block; font-size: 12px; letter-spacing: 3px; color: var(--accent, #2e7d57); font-weight: 700; margin-bottom: 10px; }
.sec-head h2 { font-family: var(--serif); font-size: 30px; margin: 0 0 8px; color: var(--text); letter-spacing: .5px; }
.sec-lead { font-size: 16px; color: var(--muted); margin: 0; }
.prose { font-size: 16.5px; line-height: 1.85; color: var(--text); }
.prose p { margin: 0 0 14px; }
.prose strong { color: var(--accent-strong, #1f5c3f); }

/* 名字区块 */
.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.name-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 26px 24px; }
.name-char { font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--accent, #2e7d57); margin-bottom: 12px; letter-spacing: 4px; }
.name-card p { font-size: 15.5px; line-height: 1.8; color: var(--text); margin: 0; }
.name-card b { color: var(--accent-strong, #1f5c3f); }
.name-equation { text-align: center; font-family: var(--serif); font-size: 22px; color: var(--text); margin: 0 0 10px; letter-spacing: 1px; }
.name-tie { text-align: center; font-size: 15px; color: var(--muted); line-height: 1.8; margin: 0; }
.name-tie b { color: var(--accent-strong, #1f5c3f); }

/* 能力 */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 24px 20px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.feat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); border-color: var(--border-strong); }
.feat-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft, #e8f1ec); color: var(--accent, #2e7d57); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.feat-card h3 { font-size: 17px; margin: 0 0 8px; color: var(--text); }
.feat-card p { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0; }

/* 人群 */
.aud-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.aud-card { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 26px 22px; text-align: center; }
.aud-card h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 8px; color: var(--text); }
.aud-card p { font-size: 14.5px; line-height: 1.7; color: var(--muted); margin: 0; }

/* 会员方案 */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.price-card { background: var(--panel); border: 1px solid var(--border); border-top: 4px solid var(--border-strong); border-radius: 14px; padding: 24px 20px; display: flex; flex-direction: column; }
.price-card.tier-xingmang { border-top-color: #8b5cf6; }
.price-card.tier-chenxi { border-top-color: #f59e0b; }
.price-card.tier-yaori { border-top-color: #ef4444; }
.price-card.tier-jiguang { border-top-color: #06b6d4; }
.pc-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.pc-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.pc-num { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--accent-strong, #1f5c3f); }
.pc-unit { font-size: 13px; color: var(--muted); }
.pc-per { display: inline-block; font-size: 13px; font-weight: 600; color: #b8860b; background: #fff7e6; border: 1px solid #f0d9a0; border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.pc-list { list-style: none; padding: 0; margin: 0; font-size: 13.5px; line-height: 1.5; }
.pc-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border); color: var(--muted); }
.pc-list li:first-child { border-top: none; }
.pc-list b { color: var(--text); font-weight: 600; text-align: right; }
.price-note { text-align: center; font-size: 13px; color: var(--muted); margin: 22px 0 0; }

/* 口碑 */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote-card { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 24px 22px; }
.quote-text { font-family: var(--serif); font-size: 16px; line-height: 1.8; color: var(--text); margin: 0 0 14px; }
.quote-by { font-size: 13px; color: var(--muted); margin: 0; text-align: right; }

/* CTA */
.cta-sec { text-align: center; }
.steps { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px; width: 220px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent, #2e7d57); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.step p { font-size: 14.5px; color: var(--text); margin: 0; line-height: 1.6; }
.cta-final { margin-bottom: 14px; }

/* footer */
.land-foot { text-align: center; padding: 40px 24px 50px; border-top: 1px solid var(--border); background: var(--panel); }
.foot-brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: 2px; }
.foot-sub { font-size: 13px; color: var(--muted); margin-top: 6px; letter-spacing: .5px; }

/* 滚动渐入 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .09s; }
.reveal.d2 { transition-delay: .18s; }
.reveal.d3 { transition-delay: .27s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .orb, .mock, .hero-title .breath { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* 响应式 */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-title { font-size: 40px; }
  .feat-grid, .price-grid, .quote-grid, .aud-grid, .name-grid { grid-template-columns: 1fr; }
  .sec { padding: 44px 18px; }
}


/* ============ 晒图领VIP活动 ============ */
.activity-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border: none; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .5px;
  background: linear-gradient(120deg, #ff6b3d, #ff2e63, #b621fe);
  background-size: 200% 200%;
  box-shadow: 0 3px 12px rgba(255, 46, 99, .35);
  animation: actShine 3s ease infinite;
  transition: transform .15s ease, box-shadow .15s ease;
}
.activity-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(255, 46, 99, .5); }
@keyframes actShine { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.act-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9); animation: actPulse 1.2s ease infinite; }
@keyframes actPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* 会员按钮右上角红点提醒 */
#vipBtn { position: relative; }
.nav-reddot {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff2e63; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(255, 46, 99, .35);
  animation: actPulse 1.2s ease infinite;
  pointer-events: none;
}
/* 会员页顶部的「分享领 VIP」入口 */
.vip-act-btn {
  width: 100%; justify-content: center;
  margin: 2px 0 20px; padding: 11px 16px; font-size: 14px;
}
.vip-act-txt { white-space: pre-line; line-height: 1.35; }

.act-panel { width: min(480px, 94vw); max-height: 88vh; overflow-y: auto; }
/* 从会员页内打开活动弹窗时，确保它叠在会员弹窗之上 */
#actOverlay { z-index: 65; }
.act-hero {
  margin: 4px 0 16px; padding: 22px 20px; border-radius: 14px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #ff6b3d 0%, #ff2e63 55%, #b621fe 100%);
  box-shadow: 0 8px 24px -6px rgba(255, 46, 99, .45);
}
.act-hero-badge {
  display: inline-block; padding: 3px 12px; margin-bottom: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; border-radius: 999px;
  background: rgba(255,255,255,.22); backdrop-filter: blur(4px);
}
.act-hero-title { font-size: 21px; font-weight: 800; line-height: 1.45; letter-spacing: .5px; }
.act-hero-sub { margin-top: 8px; font-size: 12.5px; opacity: .92; letter-spacing: 1px; }
.act-steps { margin: 0 0 16px; display: flex; flex-direction: column; gap: 9px; }
.act-step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text); line-height: 1.6; }
.act-step b {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; background: linear-gradient(135deg, #ff6b3d, #ff2e63);
}
.act-label { display: block; margin: 13px 0 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.act-platform { display: flex; gap: 10px; }
.act-radio {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 0; border: 1.5px solid var(--border-strong); border-radius: 9px;
  font-size: 13.5px; cursor: pointer; user-select: none; transition: all .15s ease;
}
.act-radio:has(input:checked) { border-color: #ff2e63; color: #ff2e63; background: rgba(255, 46, 99, .06); font-weight: 700; }
.act-radio input { accent-color: #ff2e63; margin: 0; }
.act-form input[type="text"], .act-form input[type="url"] {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1.5px solid var(--border-strong); border-radius: 9px; font-size: 14px;
}
.act-form input[type="text"]:focus, .act-form input[type="url"]:focus { outline: none; border-color: #ff2e63; }
.act-drop {
  position: relative; min-height: 110px; border: 2px dashed var(--border-strong);
  border-radius: 11px; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease;
}
.act-drop:hover, .act-drop.dragging { border-color: #ff2e63; background: rgba(255, 46, 99, .04); }
.act-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 18px; color: var(--muted); font-size: 13px; }
.act-preview { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #f7f7f9; }
.act-tip { margin: 9px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.act-tip strong { color: #ff2e63; }
.act-submit { width: 100%; margin-top: 14px; padding: 11px 0; font-size: 15px; border-radius: 10px;
  background: linear-gradient(120deg, #ff6b3d, #ff2e63); border: none; }
.act-submit:hover { filter: brightness(1.06); }
.act-status { margin: 0 0 14px; padding: 13px 15px; border-radius: 10px; font-size: 13.5px; line-height: 1.7; }
.act-status b { display: block; margin-bottom: 3px; font-size: 14.5px; }
.act-status.st-pending { background: #fff7e8; color: #9a6b00; border: 1px solid #f0dcae; }
.act-status.st-ok { background: #edf9f0; color: #1d7a3e; border: 1px solid #bfe5cb; }
.act-status.st-reject { background: #fdeeee; color: #b03030; border: 1px solid #f0c4c4; }

/* 活动弹窗：AI 分享文案生成 */
.act-ai { margin: 0 0 16px; padding: 13px 14px; border: 1px solid #f0dcc8; border-radius: 12px;
  background: linear-gradient(135deg, #fffaf3, #fff5f6); }
.act-ai-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.act-ai-title { font-size: 14px; font-weight: 700; color: var(--ink, #222); }
.act-ai-remain { font-size: 12px; color: #ff2e63; background: rgba(255, 46, 99, .08); padding: 2px 9px; border-radius: 20px; }
.act-ai-text { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; padding: 10px 12px;
  min-height: 132px; resize: vertical; border: 1px solid #e8ddcf; border-radius: 10px;
  background: #fff; font-size: 13.5px; line-height: 1.8; color: #333; font-family: inherit; }
.act-ai-text:focus { outline: none; border-color: #ff6b3d; }
.act-ai-btns { display: flex; gap: 10px; margin-top: 10px; }
.act-ai-gen { flex: 1; padding: 9px 0; font-size: 14px; border-radius: 9px;
  background: linear-gradient(120deg, #ff6b3d, #ff2e63); border: none; }
.act-ai-gen:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.act-ai-copy { flex: 1; padding: 9px 0; font-size: 14px; border-radius: 9px;
  justify-content: center; text-align: center; border-color: #ff6b3d; color: #e5392f; }
.act-ai-copy:hover { background: #fff5f0; border-color: #ff2e63; }
.act-ai-copy:disabled { opacity: .7; cursor: default; }

/* ---------- 60s 资讯弹窗（新闻简报风格：深色报头 + 中性灰，去绿） ---------- */
.news-card { width: min(480px, 94vw); padding: 0; max-height: 88vh; display: flex; flex-direction: column; }
.news-card .modal-head {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #1f2530, #2c3445);
  color: #fff;
  padding: 16px 22px;
  margin-bottom: 0;
}
.news-card .modal-head strong { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.news-card .modal-x { color: rgba(255,255,255,.75); font-size: 22px; }
.news-card .modal-x:hover { color: #fff; }
.news-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; font-size: 14px; line-height: 1.75; color: var(--text); padding: 16px 22px 22px; }
.news-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.news-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.news-meta .nm-date { font-weight: 700; color: var(--text); }
.news-meta .nm-upd { color: var(--muted); }
.news-list { list-style: none; margin: 0 0 14px; padding: 0; }
.news-list li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.news-list li:last-child { border-bottom: none; }
.ni-num {
  flex: 0 0 24px; height: 24px; line-height: 24px; text-align: center;
  border-radius: 50%; background: #eef0f3; color: #9aa0a8;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ni-text { flex: 1; color: var(--text); font-weight: 500; }
/* 前三条：醒目暖色序号，突出头条 */
.news-list li:nth-child(1) .ni-num,
.news-list li:nth-child(2) .ni-num,
.news-list li:nth-child(3) .ni-num {
  background: linear-gradient(135deg, #ff8a4c, #e0533d);
  color: #fff;
  box-shadow: 0 2px 6px rgba(224,83,61,.32);
}

/* ---------- 首页公告走马灯（中性深色拉条，不与品牌绿冲突） ---------- */
.announce-bar {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  height: 38px;
  padding: 0 16px;
  background: linear-gradient(90deg, rgba(219,238,255,.55) 0%, rgba(205,229,255,.42) 50%, rgba(223,236,255,.52) 100%);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid rgba(120,170,220,.35);
  color: #2f5a7a;
  font-size: 13px; letter-spacing: .3px;
  overflow: hidden;
  box-shadow: 0 1px 10px rgba(80,140,200,.12);
}
.announce-bar[hidden] { display: none; }
.announce-label {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: #fff;
  padding: 3px 11px;
  border-radius: 999px;
  background: linear-gradient(120deg, #4facfe, #2f80ed, #5b6bff);
  background-size: 200% 200%;
  box-shadow: 0 2px 8px rgba(47,128,237,.32);
  animation: annShine 4s ease infinite;
}
.announce-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9);
  animation: ann-dot 1.6s ease-in-out infinite;
}
@keyframes annShine { 0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%} }
@keyframes ann-dot { 0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.7)} }
.announce-viewport {
  flex: 1 1 auto; overflow: hidden; position: relative; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.announce-track {
  display: inline-flex; align-items: center; white-space: nowrap;
  height: 100%;
  will-change: transform;
  animation: ann-marquee 28s linear infinite;
}
.announce-viewport:hover .announce-track { animation-play-state: paused; }
.announce-text { padding-right: 60px; line-height: 38px; }
@keyframes ann-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .announce-track { animation: none; }
}
/* 移动端：更紧凑 */
@media (max-width: 768px) {
  .announce-bar { height: 32px; padding: 0 10px; font-size: 12px; gap: 8px; }
  .announce-label { padding: 2px 9px; font-size: 11px; }
  .announce-text { padding-right: 44px; line-height: 32px; }
}

/* ============ 联系客服 / 用户反馈 ============ */
.vip-feedback {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.vip-feedback-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fb-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.fb-list:empty { display: none; }
.fb-item {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #f7f8f7;
  font-size: 13px;
}
.fb-item .fb-msg {
  color: #333;
  line-height: 1.5;
  word-break: break-all;
}
.fb-item .fb-reply {
  background: #e8f2ec;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 6px;
  color: #1f6344;
  line-height: 1.5;
  word-break: break-all;
}
.fb-item .fb-meta {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}
.fb-text {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  background: #fafafa;
  transition: border-color .15s, background .15s;
}
.fb-text:focus {
  outline: none;
  border-color: var(--accent, #2e7d57);
  background: #fff;
}
.fb-submit-btn {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

/* ============ 会员页标题栏 · 在线反馈按钮 ============ */
/* 让 strong 占满左侧，客服按钮 + 关闭按钮自然靠右 */
.vip-panel .modal-head { gap: 10px; }
.vip-panel .modal-head > strong { margin-right: auto; }

.vip-fb-toggle {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px 5px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47,128,237,.10), rgba(91,107,255,.14));
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .2s, transform .2s;
}
.vip-fb-toggle:hover { background: linear-gradient(135deg, rgba(47,128,237,.18), rgba(91,107,255,.24)); transform: translateY(-1px); }
.vip-fb-toggle:active { transform: translateY(0); }

/* 图标外层：固定尺寸 + 蓝色呼吸光圈 */
.vip-fb-ic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(47,128,237,.16), 0 2px 6px rgba(47,128,237,.18);
}
.vip-fb-ic svg { width: 20px; height: 20px; display: block; }

/* 呼吸光圈：图标背后的扩散环，营造"客服在线"感 */
.vip-fb-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 2px solid rgba(47,128,237,.45);
  pointer-events: none;
  animation: vipFbBreath 2.4s ease-out infinite;
}
@keyframes vipFbBreath {
  0%   { transform: scale(.85); opacity: .55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .vip-fb-ring { animation: none; opacity: .3; }
}

.vip-fb-txt {
  font-size: 10.5px;
  line-height: 1;
  color: #2f80ed;
  font-weight: 600;
  letter-spacing: .3px;
}

/* 展开后的反馈面板：顶部加一个标题条，与按钮呼应 */
.vip-feedback[hidden] { display: none; }
.vip-feedback {
  margin-top: 20px;
  padding: 16px 16px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(47,128,237,.05), rgba(91,107,255,.08));
  border: 1px solid rgba(47,128,237,.16);
}

/* ============ 联系客服 · 微信风格对话弹窗 ============ */
.chat-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
@media (min-width: 769px) {
  .chat-overlay { align-items: center; }
}
.chat-panel {
  width: 100%; max-width: 440px;
  height: 100vh; max-height: 600px;
  background: #ededed;
  display: flex; flex-direction: column;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  animation: chatSlideUp .25s ease-out;
}
@media (min-width: 769px) {
  .chat-panel { border-radius: 16px; height: 600px; }
}
@keyframes chatSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* 顶栏：微信风格深色标题 */
.chat-head {
  flex: 0 0 auto;
  background: #ededed;
  border-bottom: 1px solid #dcdcdc;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.chat-back, .chat-close {
  background: none; border: none; cursor: pointer;
  color: #576b95; padding: 4px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-back svg { width: 22px; height: 22px; display: block; }
.chat-close { font-size: 24px; }
.chat-title {
  flex: 1; display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 8px;
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; box-shadow: 0 1px 3px rgba(47,128,237,.18);
}
.chat-avatar svg { width: 26px; height: 26px; }
.chat-name { font-size: 16px; font-weight: 600; color: #191919; }
.chat-status {
  font-size: 11px; padding: 2px 7px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 4px;
}
.chat-status::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; vertical-align: middle;
}
/* 在线 */
.chat-status.cs-online { color: #07c160; background: rgba(7,193,96,.12); }
.chat-status.cs-online::before { background: #07c160; animation: chatOnlinePulse 2s ease-in-out infinite; }
/* 忙碌 */
.chat-status.cs-busy { color: #f5a623; background: rgba(245,166,35,.12); }
.chat-status.cs-busy::before { background: #f5a623; animation: chatBusyPulse 1.2s ease-in-out infinite; }
/* 离线 */
.chat-status.cs-offline { color: #999; background: rgba(0,0,0,.06); }
.chat-status.cs-offline::before { background: #bbb; }
@keyframes chatOnlinePulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes chatBusyPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* 消息区 */
.chat-body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 12px 8px;
}
/* 欢迎卡 */
.chat-welcome {
  text-align: center; padding: 20px 16px 24px;
  color: #888; font-size: 13px; line-height: 1.7;
}
.chat-welcome-ic {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 10px; box-shadow: 0 2px 8px rgba(47,128,237,.16);
}
.chat-welcome-ic svg { width: 36px; height: 36px; }
.chat-welcome p { margin: 4px 0; }

/* 消息气泡（微信风格） */
.chat-msg { display: flex; margin-bottom: 14px; animation: bubbleIn .2s ease-out; }
@keyframes bubbleIn { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.chat-msg-them { justify-content: flex-start; }
.chat-msg-me { justify-content: flex-end; }
.bubble {
  max-width: 75%; padding: 9px 13px;
  font-size: 14.5px; line-height: 1.55; word-break: break-word;
  position: relative;
}
.chat-msg-them .bubble {
  background: #fff; color: #191919;
  border-radius: 4px 12px 12px 12px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.chat-msg-me .bubble {
  background: #95ec69; color: #191919;
  border-radius: 12px 4px 12px 12px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.chat-time {
  font-size: 11px; color: #b0b0b0; margin-top: 4px;
}
.chat-msg-me .chat-time { text-align: right; }

/* 快捷问题区 */
.chat-quick {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 12px; border-top: 1px solid #dcdcdc;
  background: #f7f7f7;
}
.chat-quick:empty { display: none; }
.chat-quick-btn {
  background: #fff; border: 1px solid #dcdcdc;
  border-radius: 16px; padding: 6px 12px;
  font-size: 13px; color: #576b95; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chat-quick-btn:hover { background: #f0f4ff; border-color: #b0c4ff; }

/* 输入栏 */
.chat-input-row {
  flex: 0 0 auto; display: flex; gap: 8px;
  padding: 10px 12px; border-top: 1px solid #dcdcdc;
  background: #f7f7f7; align-items: flex-end;
}
.chat-input {
  flex: 1; resize: none; border: 1px solid #dcdcdc;
  border-radius: 8px; padding: 8px 12px;
  font-size: 14.5px; line-height: 1.5; max-height: 96px;
  font-family: inherit; background: #fff;
  transition: border-color .15s;
}
.chat-input:focus { outline: none; border-color: #07c160; }
.chat-send {
  flex: 0 0 auto; border: none; border-radius: 8px;
  background: #07c160; color: #fff;
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .15s;
}
.chat-send:hover { background: #06ad56; }
.chat-send:disabled { background: #a0d8b8; cursor: not-allowed; }

/* ============ AI 图片生成弹窗（全屏，站点暖米色配色） ============ */
/* ============================================================
   拾梦 AI 生图 · 天蓝色主题 (style.v94)
   ============================================================ */
/* ============================================================
   拾梦 AI 生图 · 简约高级（极简白 + 克制天蓝）
   ============================================================ */
.img-gen-overlay {
  /* —— 高级克制色板 —— */
  --ig-bg: #ffffff;
  --ig-surface: #f8f9fa;
  --ig-surface-2: #f4f5f7;
  --ig-border: #eef0f3;
  --ig-border-2: #e5e7eb;
  --ig-ink: #111827;
  --ig-ink-2: #374151;
  --ig-muted: #6b7280;
  --ig-muted-2: #9ca3af;
  --ig-accent: #2563eb;
  --ig-accent-2: #1d4ed8;
  --ig-accent-soft: #eff6ff;
  --ig-ok: #10b981;
  --ig-danger: #ef4444;

  position: fixed; inset: 0; z-index: 85;
  background: rgba(15, 23, 42, .48);
  display: flex; flex-direction: column;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  align-items: center; justify-content: center; padding: 16px;
}
.img-gen-panel {
  display: flex; flex-direction: column;
  width: 100%; max-width: 720px; height: 100%; max-height: 92vh;
  background: var(--ig-bg); border-radius: 22px; overflow: hidden; position: relative;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .20);
}
.img-gen-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; flex-wrap: wrap;
  background: var(--ig-bg);
  border-bottom: 1px solid var(--ig-border);
}
.img-gen-back {
  background: var(--ig-surface); border: 1px solid var(--ig-border); cursor: pointer; color: var(--ig-ink-2);
  display: flex; align-items: center; padding: 7px; border-radius: 10px;
  transition: .16s;
}
.img-gen-back svg { width: 20px; height: 20px; display: block; }
.img-gen-back:hover { background: var(--ig-surface-2); color: var(--ig-accent); border-color: var(--ig-border-2); transform: translateX(-1px); }
.img-gen-title {
  font-size: 16px; font-weight: 700; color: var(--ig-ink); letter-spacing: .2px;
  display: flex; align-items: center; gap: 8px;
}
.img-gen-title::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ig-accent); opacity: .85;
}
.img-gen-quota { font-size: 12px; color: var(--ig-muted); font-weight: 600; }

/* 分段标签（极简胶囊） */
.img-gen-tabs {
  display: flex; gap: 2px; margin-left: auto;
  background: var(--ig-surface-2); padding: 3px; border-radius: 10px;
}
.img-gen-tab {
  padding: 7px 15px; border: none; background: transparent;
  color: var(--ig-muted); font-size: 13px; cursor: pointer; transition: .18s; font-weight: 600;
  border-radius: 8px;
}
.img-gen-tab:hover { color: var(--ig-ink-2); }
.img-gen-tab.active {
  background: var(--ig-bg); color: var(--ig-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.img-gen-body {
  flex: 1; overflow-y: auto; padding: 26px 30px;
  display: flex; flex-direction: column;
}
.img-gen-mode { width: 100%; }

/* 品牌标题（轻量，不分割） */
.img-gen-hero {
  display: flex; align-items: center; gap: 12px;
  padding: 2px 0 14px; margin-bottom: 8px;
  flex: 0 0 auto; position: relative; overflow: hidden;
}
.img-gen-hero-logo {
  width: 38px; height: 38px; border-radius: 11px; object-fit: cover; flex: 0 0 auto;
  border: 1px solid var(--ig-border); background: var(--ig-bg); box-shadow: 0 1px 4px rgba(0,0,0,.04);
  position: relative; z-index: 1;
}
.img-gen-hero-name { font-size: 16px; font-weight: 700; color: var(--ig-ink); line-height: 1.2; position: relative; z-index: 1; letter-spacing: .2px; }
.img-gen-hero-slogan { font-size: 12px; color: var(--ig-muted-2); display: block; margin-top: 1px; position: relative; z-index: 1; }

/* 字段标签 */
.img-gen-label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ig-muted);
  margin: 22px 0 8px; letter-spacing: .3px;
}
.img-gen-label:first-of-type { margin-top: 0; }

.img-gen-body textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--ig-border-2); border-radius: 14px;
  font-family: inherit; font-size: 14px; resize: vertical; line-height: 1.65; min-height: 96px;
  background: var(--ig-bg); color: var(--ig-ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.img-gen-body textarea::placeholder { color: var(--ig-muted-2); }
.img-gen-body textarea:focus {
  outline: none; border-color: var(--ig-accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,.10);
}

/* 画面比例选择器 */
.img-gen-ratio-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.img-gen-ratio-label { font-size: 13px; color: var(--ig-muted); white-space: nowrap; font-weight: 600; }
.img-gen-ratio-drop {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 1.5px solid var(--ig-border-2); border-radius: 999px;
  background: var(--ig-bg); cursor: pointer; user-select: none;
  font-size: 13px; color: var(--ig-ink-2); font-weight: 500; transition: border-color .15s, box-shadow .15s, background .15s;
}
.img-gen-ratio-drop:hover, .img-gen-ratio-drop.open {
  border-color: var(--ig-accent); background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,.08);
}
.img-gen-ratio-arr { width: 14px; height: 14px; color: var(--ig-muted); transition: transform .2s; }
.img-gen-ratio-drop.open .img-gen-ratio-arr { transform: rotate(180deg); }
.img-gen-ratio-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--ig-bg); border: 1px solid var(--ig-border); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.1); z-index: 30; min-width: 200px;
  overflow: hidden; padding: 6px;
}
.img-gen-ratio-drop.open .img-gen-ratio-menu { display: block; }
.ratio-grid-view { }
.ratio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.img-gen-ratio-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; cursor: pointer; transition: background .12s, border-color .12s;
  font: inherit; color: var(--ig-ink-2); background: var(--ig-surface);
  border: 1px solid var(--ig-border-2); border-radius: 10px; text-align: center; width: 100%;
}
.img-gen-ratio-opt:hover { background: var(--ig-surface-2); border-color: var(--ig-accent); }
.img-gen-ratio-opt.sel { background: var(--ig-accent-soft); border-color: var(--ig-accent); color: var(--ig-accent); font-weight: 700; }
.ratio-thumb {
  display: block; background: var(--ig-muted-2); border: 1px solid var(--ig-border-2);
  border-radius: 3px; flex-shrink: 0;
}
.img-gen-ratio-opt.sel .ratio-thumb { background: var(--ig-accent); border-color: var(--ig-accent); }
.ratio-name { font-size: 12px; line-height: 1.2; }
.img-gen-ratio-custom-opt {
  margin-top: 8px; padding: 10px; text-align: center; cursor: pointer;
  border-top: 1px dashed var(--ig-border); color: var(--ig-accent); font-weight: 600;
  border-radius: 8px; transition: background .12s;
}
.img-gen-ratio-custom-opt:hover { background: var(--ig-accent-soft); }
.img-gen-ratio-custom-opt.sel { background: var(--ig-accent-soft); }
.ratio-custom-view { padding: 2px; }
.ratio-custom-back {
  font-size: 12px; color: var(--ig-accent); cursor: pointer; padding: 4px 2px 8px;
  font-weight: 600; transition: opacity .12s;
}
.ratio-custom-back:hover { opacity: .7; }
.img-gen-ratio-custom {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 12px;
  border-top: 1px solid var(--ig-border); background: var(--ig-surface); border-radius: 0 0 12px 12px;
}
.img-gen-ratio-custom .rc-w, .img-gen-ratio-custom .rc-h {
  width: 60px; padding: 6px 7px; border: 1px solid var(--ig-border-2); border-radius: 8px;
  font-size: 13px; text-align: center; color: var(--ig-ink); background: var(--ig-bg); -moz-appearance: textfield;
}
.img-gen-ratio-custom .rc-w:focus, .img-gen-ratio-custom .rc-h:focus { outline: none; border-color: var(--ig-accent); }
.img-gen-ratio-custom .rc-w::-webkit-outer-spin-button, .img-gen-ratio-custom .rc-h::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.img-gen-ratio-custom .rc-w.rc-err, .img-gen-ratio-custom .rc-h.rc-err { border-color: #ef4444; background: #fef2f2; }
.img-gen-ratio-custom .rc-ratio.rc-err { border-color: #ef4444; background: #fef2f2; }
.img-gen-ratio-custom .rc-x { color: var(--ig-muted); font-size: 13px; }
.img-gen-ratio-custom .rc-ratio {
  width: 110px; padding: 6px 8px; border: 1px solid var(--ig-border-2); border-radius: 8px;
  font-size: 13px; color: var(--ig-ink); background: var(--ig-bg);
}
.img-gen-ratio-custom .rc-ratio:focus { outline: none; border-color: var(--ig-accent); }
.img-gen-ratio-custom .rc-eq { color: var(--ig-muted); font-size: 13px; font-weight: 600; }
.img-gen-ratio-custom .rc-preview { flex-basis: 100%; font-size: 12px; color: var(--ig-accent); font-weight: 600; margin-top: 2px; }
.img-gen-ratio-custom .rc-ok {
  margin-left: 4px; padding: 6px 14px; border: none; border-radius: 8px;
  background: var(--ig-accent); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: filter .12s;
}
.img-gen-ratio-custom .rc-ok:hover { background: var(--ig-accent-2); }
.img-gen-ratio-custom .rc-tip { flex-basis: 100%; font-size: 12px; line-height: 1.45; color: var(--ig-muted); margin-top: 4px; }

.img-gen-rules {
  margin: 14px 0 0; font-size: 11.5px; color: var(--ig-muted-2);
  line-height: 1.6; text-align: center;
}

/* 上传区 */
.img-gen-upload {
  border: 2px dashed #dbe1ea; border-radius: 18px;
  min-height: 158px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
  margin-bottom: 12px; background: #fbfcfe; padding: 18px;
}
.img-gen-upload:hover, .img-gen-upload.dragover {
  border-color: var(--ig-accent); background: var(--ig-accent-soft);
  box-shadow: inset 0 0 0 4px rgba(59,130,246,.06);
}
.img-gen-hint { text-align: center; color: var(--ig-muted); }
.img-gen-hint svg { width: 44px; height: 44px; display: block; margin: 0 auto 10px; stroke: var(--ig-accent); color: var(--ig-accent); opacity: .85; }
.img-gen-hint p { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--ig-muted); }
.img-gen-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.img-gen-preview img { max-width: 100%; max-height: 200px; border-radius: 10px; display: block; }
.img-gen-thumb {
  position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--ig-border); background: var(--ig-surface-2); box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.img-gen-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-gen-thumb-del {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: none; border-radius: 50%;
  background: rgba(17,24,39,.55); color: #fff; font-size: 15px; line-height: 20px; text-align: center; cursor: pointer; padding: 0;
  backdrop-filter: blur(2px); transition: background .15s;
}
.img-gen-thumb-del:hover { background: rgba(185,28,28,.9); }

.img-gen-result { width: 100%; margin-top: 16px; }
.img-gen-result img { width: 100%; border-radius: 18px; display: block; box-shadow: 0 10px 30px rgba(15,23,42,.12); }
.img-gen-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

/* 生成按钮（覆盖全局绿主题） */
.img-gen-overlay .primary-btn {
  background: linear-gradient(135deg, #4f8cff 0%, #2563eb 100%); color: #fff; border: none;
  border-radius: 14px; padding: 14px 22px; font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(37,99,235,.28); letter-spacing: .3px;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.img-gen-overlay .primary-btn:hover:not(:disabled) {
  filter: brightness(1.04); box-shadow: 0 12px 30px rgba(37,99,235,.36); transform: translateY(-1px);
}
.img-gen-overlay .primary-btn:disabled { background: #93c5fd; border-color: #93c5fd; box-shadow: none; }
.img-gen-overlay .solid-btn {
  background: var(--ig-ink); color: #fff; border: none; border-radius: 10px; padding: 9px 18px; font-size: 14px; cursor: pointer; transition: .15s;
}
.img-gen-overlay .solid-btn:hover { background: var(--ig-ink-2); }
.img-gen-overlay .ghost-btn {
  background: var(--ig-bg); color: var(--ig-ink-2); border: 1px solid var(--ig-border-2); border-radius: 10px; padding: 9px 18px; font-size: 14px; cursor: pointer; transition: .15s;
}
.img-gen-overlay .ghost-btn:hover { background: var(--ig-surface); border-color: var(--ig-accent); color: var(--ig-accent); }

/* 生成中 · 遮罩（纯白，不泛蓝） */
.img-gen-mask {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; cursor: default;
}
.img-gen-load-box {
  text-align: center; max-width: 300px; width: 84%;
  background: #fff; padding: 30px 26px; border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15,23,42,.16); border: 1px solid var(--ig-border);
}
.img-gen-load-msg {
  font-size: 15px; color: var(--ig-ink); margin: 0 0 14px; font-weight: 700;
}
.img-gen-poke {
  margin-top: 16px; padding: 9px 22px;
  border: 1px solid var(--ig-border-2); border-radius: 22px;
  background: var(--ig-surface); color: var(--ig-ink-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.img-gen-poke:hover { background: var(--ig-surface-2); border-color: var(--ig-accent); color: var(--ig-accent); }
.img-gen-poke:disabled { opacity: .4; cursor: not-allowed; }
.img-gen-progress-row { display: flex; align-items: center; gap: 10px; }
.img-gen-progress {
  flex: 1; height: 6px; background: var(--ig-border-2); border-radius: 3px; overflow: hidden;
}
.img-gen-progress-bar {
  height: 100%; width: 0%;
  background: var(--ig-accent);
  border-radius: 3px; transition: width .4s ease-out;
}
.img-gen-prog-pct {
  font-size: 13px; color: var(--ig-accent); font-weight: 700;
  flex: 0 0 auto; min-width: 38px; text-align: left;
}

/* === 生图加载动画（uiverse pegtop · 改高级蓝） === */
.img-gen-overlay .img-gen-loader {
  height: 120px; overflow: visible;
  display: flex; align-items: center; justify-content: center;
  margin: 2px 0 6px;
}
/* 生图加载：四角星横向（侧视）绕中心"我"转圈，无虚线、居中、不裁切 */
.img-gen-loader {
  position: relative;
  width: 240px; height: 92px;
  margin: 6px auto;
  overflow: visible;
}
/* 中心"我" */
.img-gen-loader .loader-core {
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 0 14px rgba(37,99,235,.8), inset 0 0 4px rgba(255,255,255,.7);
  z-index: 2;
}
/* 轨道锚点（中心），星沿横向椭圆绕行 */
.img-gen-loader .loader-orbit {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0;
}
/* 星本体：沿横向椭圆轨道公转，自身保持正立；scale/opacity 表现前后景深 */
.img-gen-overlay .loader {
  --fill-color: #2563eb;
  --shine-color: #2563eb33;
  color: #2563eb;
  width: 42px; height: 42px;
  position: absolute; top: 0; left: 0;
  filter: drop-shadow(0 0 8px var(--shine-color));
  animation: orbitEllipse 2.8s linear infinite;
  z-index: 3;
}
.img-gen-overlay .loader svg { width: 42px; height: 42px; display: block; }
/* 横向椭圆轨道（完整 360°）：Rx≈78 横向半径，Ry≈22 纵向半径（侧视压扁）；前(下)大且亮、后(上)小且暗 */
@keyframes orbitEllipse {
  0%    { transform: translate(calc(-50% + 0px),    calc(-50% - 22px))    scale(.55); opacity:.40; }
  12.5% { transform: translate(calc(-50% + 55px),   calc(-50% - 15.6px))  scale(.66); opacity:.55; }
  25%   { transform: translate(calc(-50% + 78px),   calc(-50% + 0px))     scale(.82); opacity:.75; }
  37.5% { transform: translate(calc(-50% + 55px),   calc(-50% + 15.6px))  scale(1.0); opacity:1; }
  50%   { transform: translate(calc(-50% + 0px),    calc(-50% + 22px))    scale(1.1); opacity:1; }
  62.5% { transform: translate(calc(-50% + -55px),  calc(-50% + 15.6px))  scale(1.0); opacity:1; }
  75%   { transform: translate(calc(-50% + -78px),  calc(-50% + 0px))     scale(.82); opacity:.75; }
  87.5% { transform: translate(calc(-50% + -55px),  calc(-50% - 15.6px))  scale(.66); opacity:.55; }
  100%  { transform: translate(calc(-50% + 0px),    calc(-50% - 22px))    scale(.55); opacity:.40; }
}

.img-gen-overlay .gen-spinner {
  border: 3px solid var(--ig-surface-2); border-top-color: var(--ig-accent);
}

/* 我的图片 */
.img-history-warn {
  font-size: 12px; color: #854d0e; background: #fef9c3;
  padding: 10px 13px; border-radius: 10px; margin: 0 0 16px;
  display: flex; align-items: center; gap: 6px; border: 1px solid #fde68a;
}
.img-history-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px;
}
.img-history-item {
  background: var(--ig-bg); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--ig-border); transition: box-shadow .18s, transform .18s;
}
.img-history-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.img-history-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: pointer;
}
.img-history-item .img-hi-meta {
  padding: 7px 10px; font-size: 11px; color: var(--ig-muted);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--ig-surface); border-top: 1px solid var(--ig-border);
}
.img-history-item .img-hi-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-history-item .img-hi-del {
  cursor: pointer; color: var(--ig-muted-2); font-size: 15px; line-height: 1;
  flex: 0 0 auto; padding: 0 2px; transition: color .15s;
}
.img-history-item .img-hi-del:hover { color: #dc2626; }
/* 缩略图：点击放大，长按保存（屏蔽 iOS 默认长按菜单） */
.img-history-item .img-hi-thumb {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: zoom-in;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
/* ============ 我的图片翻页 ============ */
.img-history-pager { margin: 18px 0 6px; display: flex; justify-content: center; }
.img-history-pager .ih-pager-inner {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.img-history-pager .ih-page, .img-history-pager .ih-ellipsis {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; user-select: none;
}
.img-history-pager .ih-page {
  border: 1px solid var(--border, #e3e8ef); background: #fff; color: #334155; cursor: pointer;
  transition: all .15s ease;
}
.img-history-pager .ih-page:hover:not(.ih-dis):not(.ih-cur) { border-color: #93b4ff; color: #2563eb; background: #f5f8ff; }
.img-history-pager .ih-page.ih-cur {
  background: linear-gradient(135deg, #4f8cff, #2563eb); color: #fff; border-color: transparent;
  font-weight: 600; cursor: default; box-shadow: 0 2px 8px rgba(37,99,235,.28);
}
.img-history-pager .ih-page.ih-dis { color: #c2c8d0; background: #f6f7f9; border-color: #eef0f3; cursor: not-allowed; }
.img-history-pager .ih-ellipsis { color: #9aa3af; border: none; background: transparent; }
/* ============ 图片放大灯箱 ============ */
.img-lightbox {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
}
.img-lightbox.hidden { display: none; }
.img-lb-backdrop { position: absolute; inset: 0; background: rgba(8,12,20,.82); backdrop-filter: blur(2px); }
.img-lb-box {
  position: relative; z-index: 1; max-width: min(92vw, 900px); max-height: 90vh;
  display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px;
  min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.img-lb-img {
  max-width: 100%; max-height: 78vh; border-radius: 14px; box-shadow: 0 18px 60px rgba(0,0,0,.5);
  background: #fff; object-fit: contain;
}
.img-lb-bar {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%;
}
.img-lb-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.img-lb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.img-lb-size {
  background: rgba(255,255,255,.14); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.img-lb-time { color: rgba(255,255,255,.6); font-size: 12px; }
.img-lb-prompt {
  color: rgba(255,255,255,.9); font-size: 13px; line-height: 1.6;
  background: rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px;
  max-height: 26vh; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
.img-lb-actions { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.img-lb-copy {
  border: 0; background: rgba(255,255,255,.16); color: #fff; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.img-lb-copy:hover { background: rgba(255,255,255,.28); }
.img-lb-copy:active { transform: scale(.96); }
.img-lb-submit {
  border: 0; background: linear-gradient(135deg,#2faa6e,#1f8f5a); color: #fff; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.img-lb-submit:hover { filter: brightness(1.06); }
.img-lb-submit:active { transform: scale(.96); }
.img-lb-submit:disabled { opacity: .6; cursor: not-allowed; }
.img-lb-save {
  border: 0; background: linear-gradient(135deg,#f7d774,#e9b949); color: #5a3d05; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.img-lb-save:active { transform: scale(.96); }
.img-lb-close {
  border: 0; background: rgba(255,255,255,.16); color: #fff; width: 34px; height: 34px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.img-lb-close:hover { background: rgba(255,255,255,.28); }
@media (max-width: 680px) {
  .img-lb-img { max-height: 72vh; }
  .img-lb-prompt { max-height: 22vh; }
}

/* ============ 顶栏星芒余额栏（logo 模块横线下方，矩形背景） ============ */
.star-bar {
  display: flex; align-items: center; gap: 8px;
  max-width: 760px; margin: 10px auto 0; width: calc(100% - 28px);
  padding: 9px 16px;
  background: linear-gradient(135deg, #fff7e0 0%, #fff2cc 100%);
  border: 1px solid #f0d99a; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(214, 174, 64, .12);
}
.star-bar-ico { display: inline-flex; align-items: center; flex: 0 0 auto; }
.star-bar-ico img { width: 22px; height: 22px; display: block; }
.star-bar-text { font-size: 13.5px; font-weight: 600; color: #7a5a12; line-height: 1.3; }
.star-bar-text .star-num { color: #b8860b; font-weight: 800; }
.star-bar-text .star-cost { font-weight: 600; opacity: .85; }
.star-bar-text .star-warn { color: #d9482e; font-weight: 700; }

/* ============ 生图页成本提示（生成按钮上方） ============ */
.img-gen-cost-hint {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 9px 14px;
  background: linear-gradient(135deg, #f7d774, #e9b949); border: 1px solid #d9a72e; border-radius: 10px;
  font-size: 13px; color: #5a3d05; font-weight: 700;
}
.img-gen-cost-hint .ch-ico { width: 16px; height: 16px; flex: 0 0 auto; }
.img-gen-cost-hint .ch-cost { color: #7a4f06; }
.img-gen-cost-hint .ch-warn { color: #b42318; margin-left: auto; font-size: 12px; }

/* ============ 星芒明细独立页 ============ */
.star-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 18px; }
.star-stat {
  background: var(--ig-surface); border: 1px solid var(--ig-border); border-radius: 14px;
  padding: 16px 14px; text-align: center;
}
.star-stat-val {
  font-size: 26px; font-weight: 800; color: #b8860b; line-height: 1.1;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.star-stat-label { font-size: 13.5px; font-weight: 700; color: var(--ig-ink); margin-top: 6px; }
.star-stat-sub { font-size: 11.5px; color: var(--ig-muted); margin-top: 3px; }
.star-log-block {
  background: var(--ig-surface); border: 1px solid var(--ig-border); border-radius: 14px; padding: 14px 16px;
}
.star-log-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
  font-size: 14px; color: var(--ig-ink);
}
.star-log-balance { font-size: 12.5px; color: var(--ig-muted); font-weight: 600; }
.star-log-balance b { color: #b8860b; }
.star-log-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.star-log-empty { text-align: center; color: var(--ig-muted); font-size: 13px; padding: 18px 0; }
.star-log-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--ig-border);
}
.star-log-row:last-child { border-bottom: none; }
.star-log-row .sl-main { min-width: 0; }
.star-log-row .sl-title { color: var(--ig-ink); font-weight: 600; }
.star-log-row .sl-sub { color: var(--ig-muted); font-size: 11.5px; margin-top: 2px; }
.star-log-row .sl-amt { font-weight: 700; white-space: nowrap; }
.star-log-more {
  border: 1px solid var(--ig-border); background: #fff; color: var(--ig-accent);
  font-size: 12.5px; padding: 7px 22px; border-radius: 9px; cursor: pointer; font-weight: 600;
}
.star-log-more:hover { background: var(--ig-accent-soft); }

/* 手机端：星芒栏与明细页适配 */
@media (max-width: 768px) {
  .star-bar { margin-top: 8px; padding: 8px 12px; border-radius: 10px; }
  .star-bar-text { font-size: 12.5px; }
  .star-summary { gap: 10px; }
  .star-stat { padding: 13px 10px; }
  .star-stat-val { font-size: 22px; }
}

/* 手机端：生图弹窗全屏，像进入独立页面 */
@media (max-width: 680px) {
  .img-gen-overlay {
    padding: 0;
    background: var(--ig-bg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    align-items: stretch; justify-content: flex-start;
  }
  .img-gen-panel {
    max-width: none; width: 100%; height: 100%; max-height: none;
    border-radius: 0; box-shadow: none;
  }
  .img-gen-head {
    padding: 12px 14px calc(12px + env(safe-area-inset-top));
    gap: 10px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  .img-gen-tabs { margin-left: 0; width: 100%; order: 3; margin-top: 2px; }
  .img-gen-body {
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  }
  .img-gen-mask { border-radius: 0; }
  .img-gen-load-box { width: 90%; }
  .img-gen-result img { max-height: 60vh; }
}
/* ---------- 灵感墙（用户图库）---------- */
.gallery-head { margin: 4px 2px 14px; }
.gallery-head h3 { margin: 0 0 4px; font-size: 18px; color: var(--text,#1f2937); }
.gallery-sub { margin: 0; font-size: 12px; color: var(--muted,#8a94a6); line-height: 1.6; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.gallery-card {
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(31,41,55,.06);
  display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease;
}
.gallery-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(31,41,55,.12); }
.gallery-thumb { display: block; cursor: pointer; background: #f1f3f6; aspect-ratio: 1 / 1; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.04); }
.gallery-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 8px; }
.gallery-prompt {
  margin: 0; font-size: 13px; line-height: 1.5; color: #2c3340;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gallery-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: #9aa3af; }
.gallery-author { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #2f9e6e; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #e0e5ea; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #888; overflow: hidden; }
.gallery-time { flex-shrink: 0; }
/* 灵感墙点赞按钮 */
.gallery-like { display: inline-flex; align-items: center; gap: 4px; border: none; background: transparent; cursor: pointer; padding: 2px 4px; border-radius: 10px; font-size: 12px; color: #9aa3af; line-height: 1; transition: background .15s, color .15s; }
.gallery-like:hover { background: rgba(232,68,59,.08); }
.gallery-like .like-heart { font-size: 15px; font-weight: 700; color: #b8c0cc; transition: transform .15s, color .15s; }
.gallery-like:hover .like-heart { color: #e8443b; }
.gallery-like.liked .like-heart { color: #e8443b; }
.gallery-like .like-count { font-variant-numeric: tabular-nums; min-width: 10px; text-align: left; }
.gallery-like.liked .like-count { color: #e8443b; }
.gallery-like.pop .like-heart { animation: likePop .32s cubic-bezier(.2,.8,.3,1.4); }
@keyframes likePop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@media (max-width: 640px) {
  .gallery-like { font-size: 12px; }
}

/* 自定义确认弹窗（替代原生 confirm） */
.app-confirm { position: fixed; inset: 0; z-index: 98; display: flex; align-items: center; justify-content: center; }
.app-confirm.hidden { display: none; }
.app-confirm-backdrop { position: absolute; inset: 0; background: rgba(8,12,20,.6); backdrop-filter: blur(2px); }
.app-confirm-card {
  position: relative; z-index: 1; width: min(90vw, 380px); background: #fff; border-radius: 18px;
  padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 14px;
  animation: appConfirmIn .16s ease-out;
}
@keyframes appConfirmIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.app-confirm-title { font-size: 16px; font-weight: 700; color: #1f2937; }
.app-confirm-msg { font-size: 14px; line-height: 1.6; color: #4b5563; white-space: pre-wrap; word-break: break-word; }
.app-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.app-confirm-cancel {
  border: 1px solid #e5e7eb; background: #fff; color: #374151; padding: 9px 18px; border-radius: 999px;
  font-size: 14px; cursor: pointer; font-weight: 600;
}
.app-confirm-cancel:hover { background: #f9fafb; }
.app-confirm-ok {
  border: 0; background: linear-gradient(135deg,#2faa6e,#1f8f5a); color: #fff; padding: 9px 20px; border-radius: 999px;
  font-size: 14px; cursor: pointer; font-weight: 700;
}
.app-confirm-ok:hover { filter: brightness(1.06); }
.app-confirm-ok:active { transform: scale(.97); }
.app-confirm.danger .app-confirm-ok { background: linear-gradient(135deg,#ef4444,#dc2626); }

/* 灵感墙卡片：日期入图内 + 置顶角标 */
.gallery-thumb { position: relative; }
.gallery-date {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(8,12,20,.62); color: #fff; font-size: 11px; line-height: 1;
  padding: 4px 8px; border-radius: 8px; pointer-events: none; white-space: nowrap;
}
.gallery-pin {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  background: linear-gradient(135deg,#ff8a3d,#f5651f); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.gallery-card.is-pinned { box-shadow: 0 2px 10px rgba(245,101,31,.18); border: 1px solid rgba(245,101,31,.45); }
