/* AI 生图工作台 · 增长增强层样式
 * 全部选择器加 growth- 前缀防冲突；CSS 变量适配明暗两套主题 */

:root {
  --growth-card: #fbf9f5;
  --growth-bg: #f0ebe3;
  --growth-text: #1c1917;
  --growth-muted: #6f655b;
  --growth-accent: #ea580c;
  --growth-accent-dark: #c2410c;
  --growth-soft: #fde8d8;
  --growth-border: #ded4c6;
  --growth-shadow: 0 8px 30px rgba(28, 25, 23, 0.14);
  --growth-overlay: rgba(28, 25, 23, 0.45);
}
html.dark {
  --growth-card: #292524;
  --growth-bg: #1c1917;
  --growth-text: #f5efe6;
  --growth-muted: #a8a29e;
  --growth-accent: #ea580c;
  --growth-accent-dark: #fb923c;
  --growth-soft: #431407;
  --growth-border: #44403c;
  --growth-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  --growth-overlay: rgba(0, 0, 0, 0.6);
}

.growth-hide { display: none !important; }

/* ---------- 极简 Toast（顶部居中，2.5s 消失） ---------- */
.growth-toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10010;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.growth-toast {
  background: var(--growth-text);
  color: var(--growth-bg);
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--growth-shadow);
  animation: growth-toast-in 0.25s ease;
  max-width: min(88vw, 480px);
  text-align: center;
}
.growth-toast-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
@keyframes growth-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 左下浮动操作组 ---------- */
.growth-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.growth-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--growth-border);
  border-radius: 999px;
  background: var(--growth-card);
  color: var(--growth-text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--growth-shadow);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.growth-fab-btn:hover {
  border-color: var(--growth-accent);
  color: var(--growth-accent);
}
.growth-fab-btn.growth-done {
  background: var(--growth-bg);
  color: var(--growth-muted);
  border-color: var(--growth-border);
  cursor: default;
}
.growth-fab-btn.growth-done .growth-fab-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
}
.growth-fab-ico { font-size: 15px; line-height: 1; }

/* ---------- /image/ 「💡 示例库」幽灵按钮 ---------- */
.growth-prompt-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  margin-right: 8px;
  border: 1px solid var(--growth-border);
  border-radius: 999px;
  background: transparent;
  color: var(--growth-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.growth-prompt-btn:hover {
  color: var(--growth-accent);
  border-color: var(--growth-accent);
  background: var(--growth-soft);
}
/* 兜底：绝对定位悬浮在输入条上方右侧 */
.growth-prompt-btn-float {
  position: absolute;
  top: -38px;
  right: 8px;
  z-index: 50;
  background: var(--growth-card);
  box-shadow: var(--growth-shadow);
}

/* ---------- 提示词示例库模态 ---------- */
.growth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--growth-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.growth-modal-overlay.growth-open {
  opacity: 1;
  pointer-events: auto;
}
.growth-modal {
  width: min(880px, 96vw);
  height: min(620px, 88vh);
  background: var(--growth-card);
  color: var(--growth-text);
  border: 1px solid var(--growth-border);
  border-radius: 18px;
  box-shadow: var(--growth-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}
.growth-modal-overlay.growth-open .growth-modal { transform: translateY(0); }
.growth-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--growth-border);
  flex-shrink: 0;
}
.growth-modal-title { font-size: 16px; font-weight: 700; }
.growth-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--growth-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.growth-modal-close:hover { background: var(--growth-bg); color: var(--growth-text); }
.growth-modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.growth-tabs {
  width: 148px;
  flex-shrink: 0;
  border-right: 1px solid var(--growth-border);
  padding: 12px 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.growth-tab {
  border: none;
  background: transparent;
  color: var(--growth-muted);
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.growth-tab:hover { background: var(--growth-bg); color: var(--growth-text); }
.growth-tab.growth-active {
  background: var(--growth-soft);
  color: var(--growth-accent-dark);
  font-weight: 700;
}
.growth-panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 16px 20px;
}
.growth-panel-empty {
  color: var(--growth-muted);
  text-align: center;
  padding: 48px 0;
  font-size: 14px;
}
.growth-card {
  border: 1px solid var(--growth-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--growth-bg);
  position: relative;
}
html.dark .growth-card { background: rgba(255, 255, 255, 0.03); }
.growth-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.growth-card-prompt {
  font-size: 13px;
  color: var(--growth-muted);
  line-height: 1.7;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.growth-card:hover .growth-card-prompt {
  -webkit-line-clamp: unset;
  overflow: visible;
}
.growth-card-use {
  border: none;
  border-radius: 999px;
  background: var(--growth-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 18px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.growth-card-use:hover { background: var(--growth-accent-dark); }

/* ---------- 按用途选尺寸表 ---------- */
.growth-size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.growth-size-table th,
.growth-size-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--growth-border);
}
.growth-size-table th {
  color: var(--growth-muted);
  font-weight: 600;
  font-size: 12.5px;
}
.growth-size-table td:nth-child(2) { font-weight: 700; color: var(--growth-accent-dark); }
.growth-size-how { color: var(--growth-muted); font-size: 12.5px; }

/* ---------- 模态底部写作技巧 ---------- */
.growth-modal-foot {
  border-top: 1px solid var(--growth-border);
  padding: 10px 20px;
  flex-shrink: 0;
}
.growth-tips summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--growth-muted);
  list-style: none;
  padding: 4px 0;
}
.growth-tips summary::-webkit-details-marker { display: none; }
.growth-tips summary:hover { color: var(--growth-accent); }
.growth-tips[open] summary { color: var(--growth-accent-dark); }
.growth-tips-list {
  margin: 8px 0 6px;
  padding-left: 20px;
  color: var(--growth-muted);
  font-size: 13px;
  line-height: 1.9;
}

/* ---------- 模型价格标签 ---------- */
.growth-price-tag {
  font-size: 0.85em;
  color: var(--growth-muted);
  font-weight: 400;
  white-space: nowrap;
}
.growth-model-price {
  display: block;
  width: 100%;
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 12px;
  color: var(--growth-muted);
  line-height: 1.5;
}

/* ---------- 设置面板「按用途选择」尺寸预设 ---------- */
.growth-size-presets {
  margin: 2px 0 12px;
}
.growth-size-presets-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--growth-muted);
  margin-bottom: 8px;
}
.growth-size-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
/* 默认折叠保留 3 行；展开后限高可滚动浏览全部 */
.growth-size-presets-grid.growth-size-collapsed {
  max-height: 182px;
  overflow: hidden;
}
.growth-size-presets-grid:not(.growth-size-collapsed) {
  max-height: 268px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}
.growth-size-toggle {
  width: 100%;
  margin-top: 8px;
  padding: 7px 0;
  border: 1px dashed var(--growth-border);
  border-radius: 10px;
  background: transparent;
  color: var(--growth-muted);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.growth-size-toggle:hover,
.growth-size-toggle.growth-on {
  color: var(--growth-accent);
  border-color: var(--growth-accent);
}
.growth-size-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--growth-card);
  border: 1px solid var(--growth-border);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.growth-size-card:hover {
  border-color: var(--growth-accent);
  background: var(--growth-soft);
}
.growth-size-card.growth-size-card-on {
  border-color: var(--growth-accent);
  background: var(--growth-soft);
}
.growth-size-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--growth-text);
  line-height: 1.35;
  text-align: center;
}
.growth-size-card-dims {
  font-size: 11px;
  color: var(--growth-muted);
}

/* ---------- 结果卡「加入编辑」放大 + 注释 ---------- */
.growth-edit-btn {
  font-size: 14px !important;
  padding: 10px 20px !important;
  min-height: 42px !important;
  background: var(--growth-accent) !important;
  color: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 12px rgba(234, 88, 12, 0.35);
}
.growth-edit-btn:hover { background: var(--growth-accent-dark) !important; }
.growth-edit-btn svg { width: 15px !important; height: 15px !important; }
.growth-edit-hint {
  font-size: 12px;
  color: var(--growth-muted);
  line-height: 1.6;
  margin: 6px 0 2px;
}

/* ---------- 左上方「图文教程」常驻入口（页头品牌区旁） ---------- */
.growth-tutorial-tab {
  flex-shrink: 0;
  margin-left: 10px;
  padding: 6px 13px;
  border: 1px solid var(--growth-border);
  border-radius: 99px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: var(--growth-accent-dark);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  align-self: center;
}
.growth-tutorial-tab:hover { background: var(--growth-soft); transform: translateY(-1px); }
/* 页头未就绪时的兜底悬浮位：左上 */
.growth-tutorial-tab-fixed {
  position: fixed;
  left: 100px;
  top: 80px;
  z-index: 9980;
}

/* ---------- 图文教程模态 ---------- */
.growth-tutorial-modal {
  width: min(640px, 94vw);
  height: auto;
  max-height: 88vh;
}
.growth-tutorial-body {
  padding: 18px 22px;
  overflow-y: auto;
}
.growth-steps {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--growth-text);
}
.growth-steps li { margin-bottom: 14px; }
.growth-steps img {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 8px 0 2px;
  border: 1px solid var(--growth-border);
  border-radius: 12px;
}
.growth-tutorial-warn {
  background: var(--growth-soft);
  border: 1px solid var(--growth-border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.8;
  margin: 4px 0 14px;
}
.growth-tutorial-warn p { margin: 2px 0; }
.growth-tutorial-good { color: #15803d; }
.growth-tutorial-bad { color: #b91c1c; }
html.dark .growth-tutorial-good { color: #4ade80; }
html.dark .growth-tutorial-bad { color: #f87171; }
.growth-tutorial-ok {
  display: block;
  margin: 0 auto;
  border: none;
  border-radius: 999px;
  background: var(--growth-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  padding: 12px 40px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.growth-tutorial-ok:hover { background: var(--growth-accent-dark); }

/* ---------- /gallery/ 奖励横幅 ---------- */
.growth-banner {
  max-width: 720px;
  margin: 12px auto 20px;
  padding: 12px 20px;
  background: var(--growth-soft);
  border: 1px solid var(--growth-border);
  border-radius: 14px;
  color: var(--growth-text);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}
.growth-banner b { color: var(--growth-accent-dark); }

/* ---------- 登录/注册页「返回首页」 ---------- */
.growth-backhome {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--growth-card);
  border: 1px solid var(--growth-border);
  color: var(--growth-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--growth-shadow);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.growth-backhome:hover {
  color: var(--growth-accent);
  border-color: var(--growth-accent);
}

/* ---------- AI 助手「星仔」悬浮窗 ---------- */
/* 无外框纯卡通形象，放大显示 */
.xj-fab {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9991;
  width: 86px;
  height: 152px;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  padding: 0;
}
.xj-fab .xj-figure {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 10px 18px rgba(202, 138, 4, 0.35));
  transition: transform 0.2s ease;
  transform-origin: 50% 100%;
}
.xj-fab:hover .xj-figure { transform: scale(1.08); }
.xj-fab.xj-pop { animation: xj-pop 0.6s ease; }
/* 设置弹层打开时收起星仔与聊天窗，防止遮挡 */
.xj-settings-open .xj-fab {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.xj-settings-open .xj-panel { display: none; }
@keyframes xj-pop {
  0% { transform: translateY(-50%) scale(0.6); }
  55% { transform: translateY(-50%) scale(1.15); }
  100% { transform: translateY(-50%) scale(1); }
}

/* 气泡话框「有问题请问我哦！」 */
.xj-bubble-tip {
  position: absolute;
  bottom: calc(100% - 14px);
  right: 6px;
  white-space: nowrap;
  background: var(--growth-card);
  color: var(--growth-text);
  border: 1px solid var(--growth-soft);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.12);
  animation: xj-bubble-float 2.6s ease-in-out infinite;
  pointer-events: none;
}
.xj-bubble-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 26px;
  border: 6px solid transparent;
  border-top-color: var(--growth-card);
}
@keyframes xj-bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.xj-bubble-tip.xj-bubble-hide { display: none; }

/* 动态模式的表情浮动标记 */
.xj-mood {
  position: absolute;
  top: -8px;
  right: 0;
  font-size: 24px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.xj-mood.xj-mood-on { opacity: 1; transform: scale(1); }

/* 10 种小动作（作用在 svg 整体上，与位移定位分离） */
.xj-st-sleep .xj-figure { animation: xj-sleep 1.8s ease-in-out infinite; }
@keyframes xj-sleep {
  0%, 100% { transform: rotate(-9deg) translateY(5px); }
  50% { transform: rotate(-12deg) translateY(8px); }
}
.xj-st-cry .xj-figure { animation: xj-cry 0.32s ease-in-out infinite; }
@keyframes xj-cry {
  0%, 100% { transform: translateX(-2px) rotate(-2deg); }
  50% { transform: translateX(2px) rotate(2deg); }
}
.xj-st-stretch .xj-figure { animation: xj-stretch 2.2s ease-in-out both; }
@keyframes xj-stretch {
  0% { transform: scale(1, 1); }
  35% { transform: scale(0.9, 1.18) translateY(-6px); }
  70% { transform: scale(0.94, 1.1) translateY(-3px); }
  100% { transform: scale(1, 1); }
}
.xj-st-laugh .xj-figure { animation: xj-laugh 0.55s ease-in-out infinite; }
@keyframes xj-laugh {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-6px); }
}
.xj-st-cheer .xj-figure { animation: xj-cheer 0.6s ease-in-out infinite; }
@keyframes xj-cheer {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-16px) rotate(-8deg); }
  60% { transform: translateY(-10px) rotate(8deg); }
}
.xj-st-sad .xj-figure { animation: xj-sad 2.8s ease-in-out both; }
@keyframes xj-sad {
  0% { transform: translateY(0) rotate(0); filter: saturate(1); }
  100% { transform: translateY(9px) rotate(4deg); filter: saturate(0.7); }
}
.xj-st-lie .xj-figure { animation: xj-lie 0.8s ease-out both; }
@keyframes xj-lie {
  from { transform: rotate(0) translateX(0); }
  to { transform: rotate(72deg) translateX(8px) translateY(4px); }
}
.xj-st-doubt .xj-figure { animation: xj-doubt 0.8s ease-out both; }
@keyframes xj-doubt {
  from { transform: rotate(0); }
  to { transform: rotate(-14deg) translateY(-2px); }
}
.xj-st-sit .xj-figure { animation: xj-sit 0.7s ease-out both; }
@keyframes xj-sit {
  from { transform: scale(1, 1); }
  to { transform: scale(1.07, 0.8) translateY(14px); }
}
.xj-st-dance .xj-figure { animation: xj-dance 0.65s ease-in-out infinite; }
@keyframes xj-dance {
  0%, 100% { transform: rotate(-9deg) translateY(-2px); }
  50% { transform: rotate(9deg) translateY(-8px); }
}

.xj-panel {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(calc(-50% + 14px)) scale(0.98);
  z-index: 9992;
  width: 370px;
  max-width: calc(100vw - 110px);
  height: min(580px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  background: var(--growth-card);
  border: 1px solid var(--growth-border);
  border-radius: 16px;
  box-shadow: var(--growth-shadow);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.xj-panel.xj-open { opacity: 1; transform: translateY(-50%); }

.xj-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #fff;
}
.xj-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  object-fit: contain;
  padding: 2px;
}
.xj-head-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xj-head-t b { font-size: 14.5px; }
.xj-online { font-size: 11.5px; opacity: 0.92; display: inline-flex; align-items: center; gap: 5px; }
.xj-online i {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
}
.xj-head-btn {
  border: none; background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 13px; border-radius: 8px; padding: 4px 9px; cursor: pointer; line-height: 1;
}
.xj-head-btn:hover { background: rgba(255, 255, 255, 0.32); }

.xj-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--growth-bg);
}
.xj-msg { display: flex; gap: 8px; align-items: flex-end; }
.xj-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: contain;
  background: #fff; border: 1px solid var(--growth-border); padding: 1px; flex-shrink: 0;
}
.xj-bubble {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
}
.xj-ai .xj-bubble {
  background: var(--growth-card);
  border: 1px solid var(--growth-border);
  border-bottom-left-radius: 4px;
  color: var(--growth-text);
}
.xj-user { justify-content: flex-end; }
.xj-user .xj-bubble {
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.xj-line { min-height: 1em; }

.xj-prompt-card {
  margin: 6px 0 2px;
  background: var(--growth-bg);
  border: 1px dashed var(--growth-accent);
  border-radius: 10px;
  padding: 8px 10px;
}
html.dark .xj-prompt-card { background: rgba(251, 146, 60, 0.08); }
.xj-prompt-text { font-size: 12.5px; color: var(--growth-text); white-space: pre-wrap; }
.xj-prompt-use {
  margin-top: 8px;
  border: none;
  background: var(--growth-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.xj-prompt-use:hover { background: var(--growth-accent-dark); }

.xj-thinking { display: inline-flex; gap: 5px; padding: 12px 14px; }
.xj-thinking span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--growth-muted);
  animation: xj-dot 1.2s ease-in-out infinite;
}
.xj-thinking span:nth-child(2) { animation-delay: 0.15s; }
.xj-thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes xj-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.xj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 4px;
  background: var(--growth-bg);
}
.xj-chip {
  border: 1px solid var(--growth-border);
  background: var(--growth-card);
  color: var(--growth-muted);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.xj-chip:hover { border-color: var(--growth-accent); color: var(--growth-accent); }

.xj-foot {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--growth-border);
  background: var(--growth-card);
}
.xj-input {
  flex: 1;
  border: 1px solid var(--growth-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--growth-bg);
  color: var(--growth-text);
  outline: none;
}
.xj-input:focus { border-color: var(--growth-accent); }
.xj-send {
  border: none;
  background: var(--growth-accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}
.xj-send:hover { background: var(--growth-accent-dark); }
.xj-quota {
  font-size: 11px;
  color: var(--growth-muted);
  text-align: center;
  padding: 5px 0 7px;
  background: var(--growth-card);
}

@media (max-width: 640px) {
  .xj-fab { right: 6px; width: 62px; height: 110px; }
  .xj-bubble-tip { font-size: 12px; padding: 5px 9px; }
  .xj-panel {
    right: 8px; left: 76px;
    width: auto; max-width: none;
    height: min(64vh, calc(100vh - 40px));
  }
  /* 移动端工具栏恢复为悬浮紧凑条，避免占屏宽 */
  .growth-tools-rail {
    top: 50%; bottom: auto; left: 6px;
    transform: translateY(-50%);
    width: auto; padding: 6px 3px;
    background: transparent; border-right: none;
    gap: 8px; overflow: visible;
  }
  .growth-tools-rail-title { display: none; }
  .growth-tool-item { width: 58px; padding: 8px 3px 7px; }
  .growth-tool-item .gt-ico { font-size: 20px; }
  .growth-tool-item .gt-name { font-size: 11px; }
}

/* ---------- 图像设置面板 · 三步引导条 ---------- */
.growth-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 6px 0 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fff7f0 0%, #fde8d8 100%);
  border: 1px solid var(--growth-soft);
  border-radius: 12px;
  animation: growth-steps-in 0.4s ease both;
}
html.dark .growth-steps-bar {
  background: linear-gradient(135deg, rgba(67, 20, 7, 0.5), rgba(67, 20, 7, 0.3));
}
@keyframes growth-steps-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.growth-step-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #c2410c;
  white-space: nowrap;
}
html.dark .growth-step-item { color: #fb923c; }
.growth-step-num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
  animation: growth-step-pulse 2.4s ease-in-out infinite;
}
.growth-step-item:nth-child(3) .growth-step-num { animation-delay: 0.4s; }
.growth-step-item:nth-child(5) .growth-step-num { animation-delay: 0.8s; }
@keyframes growth-step-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.growth-step-sep {
  color: #f0a35e;
  font-size: 12px;
  margin: 0 2px;
  user-select: none;
}
@media (max-width: 480px) {
  .growth-step-item { font-size: 11px; gap: 4px; }
  .growth-step-num { width: 18px; height: 18px; font-size: 10px; }
}

/* ---------- 修复主应用「图像设置」弹层 ----------
 * 面板类名写了 max-h-[62dvh] + overflow-y-auto，但构建后的 CSS 里缺失这两条，
 * 导致面板 1100px+ 超出屏幕、顶部看不到。这里补齐：限高 + 内部滚动，从头显示。 */
div.fixed.max-h-\[62dvh\] {
  max-height: 62dvh !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
}
@media (min-width: 640px) {
  /* 桌面端原本 sm:max-h-none 取消限高，但内容超一屏，恢复限高；
     高度再收小，避免占满整个屏幕 */
  div.fixed.max-h-\[62dvh\] {
    max-height: min(74dvh, 700px) !important;
    overflow-y: auto !important;
  }
}

/* ---------- 左侧功能工作栏（去水印/证件照/后续扩展） ---------- */
/* 全高竖向工作栏，顶部为「工具箱」标题，新功能往下追加 */
.growth-tools-rail {
  position: fixed;
  left: 0;
  top: 68px;
  bottom: 0;
  width: 108px;
  z-index: 8985;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 8px 78px;
  background: var(--growth-card);
  border-right: 1px solid var(--growth-border);
  overflow-y: auto;
  scrollbar-width: thin;
}
.growth-tools-rail-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--growth-muted);
  letter-spacing: 2px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--growth-border);
  width: 100%;
  text-align: center;
}
/* 工作栏显示时，签到按钮收进栏内底部 */
body.has-tools-rail .growth-fab { left: 9px; bottom: 12px; }
body.has-tools-rail .growth-fab-btn { padding: 8px 10px; font-size: 12px; }
.growth-tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 88px;
  padding: 13px 4px 11px;
  background: var(--growth-card);
  border: 1px solid var(--growth-border);
  border-radius: 14px;
  box-shadow: var(--growth-shadow);
  text-decoration: none;
  color: var(--growth-text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.growth-tool-item:hover {
  border-color: var(--growth-accent);
  transform: translateX(2px);
}
.growth-tool-item .gt-ico { font-size: 30px; line-height: 1; }
.growth-tool-item .gt-name {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.growth-tool-item .gt-sub {
  font-size: 11px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
}
.growth-tool-item .gt-sub.gt-free { background: linear-gradient(135deg, #4ade80, #22c55e); }

/* ---------- 移动端适配 ---------- */
.growth-tools-toggle { display: none; }
@media (max-width: 640px) {
  /* Place these after the desktop rail rules: the old order restored a
     full-height overlay on phones and intercepted result-card taps. */
  .growth-tools-rail {
    top: auto; bottom: 12px; left: 92px;
    width: auto; padding: 0; transform: none;
    background: transparent; border: 0; overflow: visible;
    gap: 6px; pointer-events: none;
  }
  .growth-tools-rail-title { display: none; }
  .growth-tools-toggle {
    display: block; pointer-events: auto; order: 10;
    min-height: 40px; padding: 8px 12px; border-radius: 20px;
    border: 1px solid var(--growth-border);
    background: var(--growth-card); color: var(--growth-text);
    box-shadow: var(--growth-shadow); font: inherit; font-size: 12px;
  }
  .growth-tools-rail .growth-tool-item { display: none; }
  .growth-tools-rail.growth-tools-expanded .growth-tool-item {
    display: flex; pointer-events: auto; width: 88px;
  }
  .growth-modal { height: 92vh; border-radius: 14px; }
  .growth-modal-body { flex-direction: column; }
  .growth-tabs {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--growth-border);
    padding: 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .growth-tab { flex-shrink: 0; }
  .growth-fab { left: 12px; bottom: 12px; }
  .growth-fab-btn { padding: 8px 13px; font-size: 12.5px; }
  .growth-tutorial-tab { padding: 5px 10px; font-size: 12px; margin-left: 6px; }
  .growth-banner { margin: 10px 12px 16px; }
}

/* ================= 设置面板小标题：橘色加粗，快速识别 ================= */
.growth-settings-panel div.mb-2.text-sm.font-medium {
  color: #ea580c !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  border-left: 3px solid #fb923c;
  padding-left: 7px;
}
.growth-settings-panel span.font-medium.text-stone-700 {
  color: #ea580c !important;
  font-weight: 700 !important;
}

/* ================= 品牌区：站名 + 模型说明 ================= */
.growth-brand { display: inline-flex; flex-direction: column; line-height: 1.2; }
.growth-brand-main { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.growth-brand-sub {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em;
  background: linear-gradient(90deg, #ea580c, #f59e0b);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  white-space: nowrap;
}

/* Reserve actual layout space for the desktop rail instead of covering history. */
@media (min-width: 641px) {
  body.has-tools-rail > main { padding-left: 120px; }
}
@media (max-width: 640px) {
  .cg2-brand-row > button { flex-shrink: 0; }
  .cg2-brand-link { flex: 1; }
  .cg2-brand-link .growth-brand { display: flex; min-width: 0; }
  .cg2-brand-main { white-space: nowrap; font-size: 13px; }
  .cg2-brand-sub, .cg2-top-nav .growth-brand-sub { display: none; }
  .cg2-top-nav .growth-tutorial-tab {
    flex-shrink: 0; margin-left: 0; padding: 5px 7px; font-size: 11px;
  }
  .cg2-top-nav .cg2-brand-row { gap: 5px; }
  .cg2-top-nav .cg2-brand-row > div { flex-shrink: 0; }
}



/* ================= 星仔待机呼吸（真实表情图 + 动态轮廓） ================= */
/* 动态模式下待机时身体轻轻起伏摇摆；播放小动作时由状态动画接管 */
.xj-dyn .xj-figure { animation: xj-idle-breathe 3.4s ease-in-out infinite; }
@keyframes xj-idle-breathe {
  0%, 100% { transform: rotate(-1.8deg) scale(1); }
  50% { transform: rotate(1.8deg) scale(1.03); }
}
/* 表情图切换时淡入，避免生硬跳变 */
.xj-fab .xj-figure { transition: opacity 0.18s ease, transform 0.2s ease; }

/* ---------- 新版本提示条（网页/桌面版通用，点击就地快捷更新） ---------- */
.growth-update-bar {
  position: fixed; right: 18px; bottom: 18px; z-index: 99999;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #fde8d8; border-radius: 14px;
  box-shadow: 0 10px 32px rgba(28,25,23,.18); padding: 12px 14px;
  max-width: 380px; animation: growth-update-in .35s ease;
}
@keyframes growth-update-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.growth-update-txt { display: flex; flex-direction: column; gap: 2px; }
.growth-update-txt b { font-size: 13.5px; color: #1c1917; }
.growth-update-txt span { font-size: 12px; color: #78716c; }
.growth-update-btn {
  border: none; cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff;
  font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 10px;
  box-shadow: 0 3px 10px rgba(234,88,12,.3);
}
.growth-update-btn:hover:not(:disabled) { filter: brightness(1.05); }
.growth-update-btn:disabled { opacity: .6; cursor: default; }
.growth-update-later {
  border: none; background: transparent; color: #a8a29e; font-size: 12.5px;
  cursor: pointer; padding: 6px 4px; white-space: nowrap;
}
.growth-update-later:hover { color: #57534e; }
@media (max-width: 640px) {
  .growth-update-bar { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
