@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Montserrat:wght@300;400;500;600&display=swap');

/* ============================================================
   银诺 AI — 全局样式表
   基于 Vercel / Geist 设计体系完全重建
   ============================================================ */

/* ── 设计令牌 ── */
:root {
  /* 色彩 */
  --bg: #F7F6F4;
  --panel: #ffffff;
  --text: #171717;
  --secondary-text: #4d4d4d;
  --muted: #666666;
  --line: #ebebeb;
  --primary: #171717;
  --secondary: #fafafa;
  --link: #0072f5;
  --focus: hsla(212, 100%, 48%, 1);

  /* 阴影-即-边框 */
  --shadow-border: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  --shadow-card: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px,
    rgba(0, 0, 0, 0.04) 0px 2px 2px,
    rgba(0, 0, 0, 0.04) 0px 8px 8px -8px,
    #fafafa 0px 0px 0px 1px inset;
  --shadow-ring: rgb(235, 235, 235) 0px 0px 0px 1px;
  --shadow: var(--shadow-card);

  /* 圆角 */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  /* 工作流强调色（仅限对应语境） */
  --accent-blue: #0a72ef;
  --accent-pink: #de1d8d;
  --accent-red: #ff5b4f;

  /* 徽章 */
  --badge-bg: #ebf5ff;
  --badge-text: #0068d6;
}

/* ── 全局重置 ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Geist", "PingFang SC", "Microsoft YaHei", Arial,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  font-feature-settings: "liga";
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #1A1A1A;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

/* ── 统一 focus 可访问性 ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ============================================================
   顶部导航栏
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 56px;
  padding: 0 clamp(24px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  box-shadow: 0 1px 0 0 rgba(26, 26, 26, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

/* 品牌 Logo 作为首页链接 */
a.brand-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.25s ease;
}
a.brand-link:hover { opacity: 0.7; }
a.brand-link:focus-visible {
  outline: 1px solid #1A1A1A;
  outline-offset: 4px;
}

.brand-logo-svg {
  width: 30px;
  height: 30px;
  color: #000;
  flex-shrink: 0;
}
.brand-logo-svg svg {
  width: 100%;
  height: 100%;
}


.brand-name {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 4px;
  color: #171717;
  text-transform: uppercase;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
}


.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  flex: 1;
  justify-content: center;
}

.top-link {
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #666;
  font-family: 'Montserrat', sans-serif;
  border-radius: 0;
  border-bottom: 1px solid transparent;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-link:hover {
  color: #1A1A1A;
  border-bottom-color: #1A1A1A;
  background: transparent;
}

.top-link.is-active {
  color: #171717;
  font-weight: 500;
  border-bottom-color: #1A1A1A;
  background: transparent;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-mini-link {
  font-size: 13px;
  color: var(--muted);
}

/* ── 顶栏按钮 ── */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 0;
  border: 1px solid #EDEBE8;
  background: transparent;
  color: #555;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1px;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
}

.ghost-btn:hover {
  border-color: #1A1A1A;
  color: #1A1A1A;
  background: transparent;
}



.company-pill {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-pill,
.credit-pill {
  display: none;
}

/* ── 顶栏用户信息（奢侈品风格） ── */
.topbar-recharge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  text-decoration: none;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
  padding: 4px 12px;
  border: 1px solid rgba(26, 26, 26, 0.35);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.topbar-recharge:hover {
  background: #000000;
  color: #fff;
  border-color: #000000;
}

.topbar-divider-v {
  width: 1px;
  height: 12px;
  background: rgba(0, 0, 0, 0.1);
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px;
}

.topbar-credits {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: #999;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
}
.topbar-credits em {
  font-style: normal;
  font-size: 10px;
  color: #aaa;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-left: 2px;
}

.avatar-btn-lux {
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #1A1A1A;
  cursor: pointer;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
  transition: color 0.3s ease;
}
.avatar-btn-lux:hover { color: #1A1A1A; }

/* ── 奢侈品风格登录按钮 ── */
.luxury-login-btn {
  padding: 8px 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #171717;
  border: 1px solid #171717;
  background: transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}
.luxury-login-btn:hover {
  background: #171717;
  color: #fff;
}

/* ── 用户下拉 ── */
.user-dropdown {
  position: relative;
}

.avatar-btn {
  border: 1px solid #EDEBE8;
  padding: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.3s ease;
}

.avatar-btn:hover {
  border-color: #1A1A1A;
  background: transparent;
}





.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  padding-top: 8px;
  min-width: 180px;
  display: none;
  z-index: 30;
}

.dropdown-menu-inner {
  padding: 8px 0;
  background: #fff;
  border-radius: 0;
  border: 1px solid rgba(26, 26, 26, 0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.dropdown-menu a {
  display: block;
  padding: 12px 24px;
  border-radius: 0;
  color: #555;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}


.dropdown-menu a:hover {
  color: #1A1A1A;
  background: transparent;
  padding-left: 28px;
}

.user-dropdown:hover .dropdown-menu {
  display: block;
}

/* ============================================================
   布局：Shell / 侧边栏 / 主内容区
   ============================================================ */
.shell {
  display: flex;
  min-height: calc(100vh - 56px);
  background: var(--bg);
}

.shell.shell-admin {
  min-height: calc(100vh - 52px);
}

.shell.no-sidebar .main-content {
  max-width: 100%;
}

.sidebar {
  width: 220px;
  padding: 20px 0;
  background: #fff;
  overflow-y: auto;
  min-height: 0;
}

/* 加宽侧边栏（工具页面专用） */
.sidebar.sidebar-wide {
  width: 240px;
  padding: 20px 0;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-wide .sidebar-stack {
  gap: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #555;
  border-radius: 0;
  border-left: 2px solid transparent;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.sidebar-wide .sidebar-item {
  gap: 12px;
  padding: 12px 20px;
  font-size: 13px;
}

.sidebar-item:hover {
  color: #000;
  background: transparent;
  border-left-color: #EDEBE8;
}

.sidebar-item.is-active {
  color: #000;
  background: transparent;
  font-weight: 400;
  border-left-color: #1A1A1A;
  box-shadow: none;
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  color: #aaa;
}

.sidebar-item.is-active .sidebar-icon {
  color: #1A1A1A;
}

.sidebar-wide .sidebar-icon {
  width: 24px;
  height: 24px;
  font-size: 16px;
  border-radius: 0;
}

.sidebar-text {
  line-height: 1.3;
  text-align: left;
  font-weight: 400;
  font-size: 14px;
}

.sidebar-wide .sidebar-text {
  font-size: 14px;
  font-weight: 400;
}

.sidebar-desc {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #999;
  margin-top: 2px;
  line-height: 1.4;
  letter-spacing: 0;
}

.sidebar-item.is-active .sidebar-desc {
  color: #666;
}

.sidebar-divider {
  height: 1px;
  background: #EDEBE8;
  margin: 12px 20px;
}

.admin-sidebar .sidebar-item {
  align-items: flex-start;
  padding: 12px 14px;
  font-size: 14px;
}

.main-content {
  flex: 1;
  padding: 0;
  min-height: 0;
}
.shell.no-sidebar .main-content,
.shell.shell-admin .main-content {
  padding: 16px 24px 32px;
}

/* ============================================================
   管理后台 — 顶栏
   ============================================================ */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: var(--bg);
  box-shadow: var(--shadow-border);
}

.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-topbar-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.admin-topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.admin-topbar-user {
  color: var(--muted);
}

.admin-topbar-link {
  color: var(--link);
  font-weight: 600;
}

.admin-topbar-link:hover {
  text-decoration: underline;
}

.admin-topbar-link.is-danger {
  color: #C45C5C;
}

/* ============================================================
   模特照片子页面 (mp-)
   ============================================================ */
.mp-page {
  position: relative;
}

.mp-page-split {
  display: flex;
  gap: 0;
  height: calc(100vh - 56px);
  overflow: hidden;
  background: #F7F6F4;
}

.mp-page-full {
  min-height: calc(100vh - 64px);
}

.mp-left {
  width: 520px;
  min-width: 480px;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mp-right {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

/* 画布展示区模式 */
.mp-right.mp-right-canvas {
  background: #F7F6F4;
  padding: 16px;
  overflow-y: auto;
}

/* ── 三栏布局 ── */
.mp-page-3col {
  display: flex;
  gap: 0;
  height: calc(100vh - 56px);
  overflow: hidden;
  background: #F7F6F4;
}
.mp-page-3col .mp-center-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #F7F6F4;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-page-3col .mp-right-panel {
  width: 340px;
  min-width: 340px;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mp-center-empty {
  text-align: center;
  color: #aaa;
  padding: 60px 24px;
}
.mp-center-empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.35;
  color: #1A1A1A;
}
.mp-center-empty h4 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #333;
  margin: 0 0 8px;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}
.mp-center-empty p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: #999;
}

.mp-center {
  width: 100%;
}

.mp-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #EDEBE8;
}

.mp-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.mp-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #999;
}

/* 操作面板文字颜色强制统一 */
.mp-upload-box > div { color: #333 !important; font-size: 14px !important; }
.mp-upload-box small { color: #888 !important; font-size: 12px !important; }
.mp-left label { color: #333; }

/* ── 左面板底部（生成按钮 + 积分） ── */
.mp-left-footer {
  margin-top: 16px;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #EDEBE8;
  flex-shrink: 0;
}

.mp-left-footer .mp-est-cost {
  font-size: 12px;
  color: #888;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  flex: 1;
  min-width: 0;
}

.mp-left-footer .mp-gen-btn {
  padding: 12px 28px;
  font-size: 11px;
}

.mp-left-footer .mp-batch-gen-btn {
  font-size: 11px;
}

.mp-left-footer .mp-disclaimer {
  font-size: 11px;
  color: #aaa;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}

/* ── 右侧画廊展示区 ── */
.mp-gallery {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.mp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* V3 §4.4 — 品牌空态 → 结果态丝滑淡出（opacity + scale + visibility 延迟） */
.mp-gallery-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #aaa;
  text-align: center;
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  transition:
    opacity 0.6s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s;
}
.mp-gallery-grid:not(:empty) + .mp-gallery-empty {
  opacity: 0;
  transform: scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.6s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.6s;
}


.mp-gallery-empty h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 60px;
  font-weight: 300;
  letter-spacing: 24px;
  text-transform: uppercase;
  color: #2D2D2D;
  margin-bottom: 8px;
  text-indent: 24px; /* 补偿 letter-spacing 引起的右偏视觉 */
  animation: brandBreath 4s ease-in-out infinite;
}

/* 品牌字下方 40px 极细装饰线 */
.mp-gallery-empty h4::after {
  content: '';
  display: block;
  width: 40px;
  height: 0;
  border-top: 1px solid #EDEBE8;
  margin: 16px auto 0;
}

@keyframes brandBreath {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.mp-gallery-empty p {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 6px;
  color: #BFBFBF;
  margin-top: 4px;
  line-height: 1.6;
  max-width: 300px;
  text-transform: uppercase;
  text-indent: 6px;
}








.mp-field {
  margin-bottom: 18px;
}

.mp-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #171717;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}

.mp-field input[type="text"],
.mp-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e8e6e2;
  border-radius: 0;
  font-size: 14px;
  font-weight: 400;
  color: #1A1A1A;
  background: #fff;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-field input[type="text"]:focus,
.mp-input:focus {
  border-color: #1A1A1A;
  outline: none;
  box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.08);
}

.mp-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e8e6e2;
  border-radius: 0;
  font-size: 14px;
  color: #1A1A1A;
  font-weight: 400;
  background: #fff;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-select:focus {
  border-color: #1A1A1A;
  outline: none;
  box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.08);
}

/* 标签页 / 切换 / 芯片 */
.mp-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mp-tabs span {
  padding: 8px 16px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: #555;
  border: 1px solid #e8e6e2;
  margin-right: -1px;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-tabs span:hover {
  color: #171717;
  border-color: #1A1A1A;
  z-index: 1;
}

.mp-tabs span.is-active {
  background: #171717;
  color: #fff;
  border-color: #171717;
  z-index: 2;
}

.mp-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 14px;
}

.mp-toggle {
  padding: 9px 20px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  background: transparent;
  color: #1A1A1A;
  border: 1px solid #e8e6e2;
  margin-right: -1px;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-toggle:hover {
  background: transparent;
  color: #171717;
  border-color: #1A1A1A;
  z-index: 1;
}

.mp-toggle.is-active {
  background: #171717;
  color: #fff;
  font-weight: 400;
  border-color: #171717;
  z-index: 2;
}

.mp-chip-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* 文字拨片（无边框）：未选中 #BFBFBF / 选中 #1A1A1A + 淡背景块 */
.mp-chip {
  padding: 4px 10px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  cursor: pointer;
  background: transparent;
  color: #BFBFBF;
  border: none;
  font-family: 'Montserrat', 'Noto Serif SC', sans-serif;
  transition: color 0.3s ease, background 0.3s ease, font-weight 0.3s ease;
}

.mp-chip:hover {
  color: #1A1A1A;
  background: transparent;
}

.mp-chip.is-active {
  background: #1A1A1A;
  color: #fff;
  font-weight: 500;
  padding: 4px 10px;
  border: none;
}

/* 上传区域 */
.mp-upload-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.mp-upload-grid:has(.mp-upload-box:nth-child(2)) .mp-upload-box {
  flex: 1 1 calc(50% - 8px);
  max-width: calc(50% - 8px);
}

.mp-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  height: 240px;
  border: 1px dashed #DEDCDA;
  border-radius: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #999;
  padding: 24px 16px;
  text-align: center;
  background: #FFFFFF;
  font-family: 'Montserrat', 'Noto Serif SC', sans-serif;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow: hidden;
}
.mp-upload-box[data-uploaded] {
  padding: 0;
}
.mp-upload-box img {
  object-fit: contain !important;
  width: 100%;
  height: 100%;
  display: block;
}

.mp-upload-box span {
  font-size: 24px;
  color: #1A1A1A;
}

.mp-upload-box div {
  font-size: 14px !important;
}

.mp-upload-box:hover {
  border-color: #1A1A1A;
  background: #fafaf8;
}

/* 上传框×删除按钮 */
.mp-upload-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s;
  z-index: 2;
}
.mp-upload-clear:hover {
  background: rgba(0,0,0,0.8);
}

/* 提示文字 */
.mp-tip {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: #888;
  line-height: 1.6;
  margin: 8px 0;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}

.mp-tip-orange {
  color: #666666;
  font-size: 12px;
}

.mp-link-orange {
  color: #1A1A1A;
  font-size: 12px;
  margin-left: 8px;
  cursor: pointer;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mp-link-orange:hover {
  color: #171717;
}

.mp-required {
  color: #C45C5C;
  font-size: 12px;
  margin-left: 6px;
}






/* 单选 / 模型选择 */
.mp-radio-row {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 14px;
}

.mp-radio-row label {
  cursor: pointer;
  color: #888;
  font-weight: 400;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-radio-row label.is-active {
  color: #171717;
  font-weight: 600;
}

.mp-model-pick {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.mp-model-card {
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  color: #888;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mp-model-card:hover {
  color: #333;
}

.mp-model-img {
  width: 64px;
  height: 64px;
  border-radius: 0;
  background: #f5f4f0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #aaa;
  margin-bottom: 6px;
  border: 1px solid #e8e6e2;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-model-card.active .mp-model-img {
  border-color: #1A1A1A;
  box-shadow: 0 0 0 1px #1A1A1A;
}

.mp-model-img.empty {
  border: 1px dashed #EDEBE8;
  background: #fff;
  box-shadow: none;
}


.mp-mode-card {
  flex: 1;
  padding: 16px;
  border-radius: 0;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #e8e6e2;
  background: #fff;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-mode-card:hover {
  border-color: #1A1A1A;
}

.mp-mode-card.is-active {
  border-color: #1A1A1A;
  box-shadow: 0 0 0 1px #1A1A1A;
}

.mp-mode-card strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: #171717;
}

.mp-mode-card p {
  margin: 0;
  color: #888;
  font-size: 14px;
  line-height: 1.6;
}

.mp-check {
  display: block;
  font-size: 14px;
  color: #444;
  margin-bottom: 6px;
  cursor: pointer;
}

/* 右侧提示 */
.mp-right-hint {
  text-align: center;
  padding: 80px 32px;
  color: #aaa;
}

.mp-right-hint h3 {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  line-height: 1.4;
  color: #171717;
  margin-bottom: 16px;
  font-family: 'Playfair Display', Georgia, serif;
}

.mp-right-hint p {
  font-size: 14px;
  line-height: 1.6;
  color: #888;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}

.mp-preview-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}


.mp-preview-card {
  width: 140px;
  height: 120px;
  border-radius: 0;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 400;
  color: #aaa;
  border: 1px solid #e8e6e2;
}

/* 底部操作栏（仅保留给视频等未改版页面） */
.mp-bottom-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: #fff;
  border-top: 1px solid #e8e6e2;
  font-size: 14px;
  font-weight: 400;
  color: #888;
  z-index: 5;
}

.mp-gen-btn {
  padding: 12px 28px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.mp-bottom-bar .mp-gen-btn {
  margin-left: auto;
}



.mp-step.done {
  background: var(--secondary);
}





/* 空状态 / 筛选 / 分页 */
.mp-empty {
  text-align: center;
  padding: 60px 20px;
  color: #aaa;
  font-size: 14px;
}



.mp-pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
  font-size: 12px;
  color: #888;
  padding: 14px 0;
}

.mp-pagination span {
  color: #aaa;
}



.mp-assets-page {
  width: 100%;
}

.mp-banner {
  padding: 12px 16px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 14px;
  border: 1px solid #e8e6e2;
  line-height: 1.6;
}

.mp-banner-blue {
  background: #FAFAFA;
  color: #666666;
  border-color: rgba(26, 26, 26, 0.1);
}

@media (max-width: 1080px) {
  .mp-page-split {
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .mp-left {
    width: 100%;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
    border-bottom: 1px solid #EDEBE8;
  }
  .mp-right {
    width: 100%;
  }
  .mp-right.mp-right-canvas {
    max-height: none;
    min-height: 300px;
  }
  .mp-page-3col {
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .mp-page-3col .mp-center-col {
    max-height: none;
    min-height: 200px;
  }
  .mp-page-3col .mp-right-panel {
    width: 100%;
    min-width: 0;
    max-height: 360px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

/* ============================================================
   改图页面 (rd-)
   ============================================================ */
/* 改款页 */
.rd-home {
  text-align: left;
}
.rd-home .mp-center-col {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 0 0;
}
.rd-home .mp-upload-grid .mp-upload-box {
  max-width: none;
}
.rd-home textarea.mp-input {
  width: 100%;
  resize: vertical;
  font-size: 14px;
  line-height: 1.7;
}
.rd-chip-section .rd-chip-group {
  margin-bottom: 12px;
}
.rd-chip-section .rd-chip-group:last-child {
  margin-bottom: 0;
}
.rd-chip-subgroup {
  margin: 4px 0 12px 16px;
  padding-left: 12px;
  border-left: 3px solid var(--primary, #1A1A1A);
}
.rd-sub-chip {
  font-size: 12px;
}
.rd-param-chip {
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.rd-param-chip.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
/* 版型出款卡片网格 */
.pd-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.pd-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e8e6e2;
  background: #fafaf8;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color .2s, background .2s, box-shadow .25s, transform .25s;
}
.pd-card:hover {
  border-color: #1A1A1A;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
  transform: translateY(-2px);
}
.pd-card-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #edecea;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-card-cover-placeholder {
  font-size: 22px;
  font-weight: 700;
  color: #ccc;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.3;
  padding: 12px;
}
.pd-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px 14px;
}
.pd-card-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.pd-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
}
.pd-card-name-en {
  font-size: 11px;
  color: #999;
}
.pd-card-cat {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.5px;
}
.pd-card-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pd-cat-tabs .mp-chip { border: 1px solid #e0ded9; }
.pd-cat-tabs .mp-chip.is-active { background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
.pd-selected-pattern {
  padding: 16px;
  background: #fafaf8;
  border: 1px solid #e8e6e2;
}
@media (max-width: 900px) {
  .pd-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .pd-card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* 服装识别弹窗 */
.rd-analyze-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rd-analyze-modal-inner {
  background: #fff;
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
}
.rd-analyze-modal-head {
  margin-bottom: 16px;
}
.rd-analyze-modal-head strong {
  font-size: 16px;
  color: #1A1A1A;
}
.rd-analyze-modal-tip {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.rd-analyze-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.rd-analyze-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  background: #f5f3f0;
  border: 1px solid #e0ded9;
  border-radius: 4px;
}
.rd-analyze-tag-label {
  color: #999;
  font-size: 10px;
}
.rd-analyze-tag-val {
  color: #1A1A1A;
  font-weight: 500;
}
.rd-analyze-tag-val[contenteditable] {
  outline: none;
  border-bottom: 1px dashed #ccc;
  min-width: 20px;
}
.rd-analyze-tag-val[contenteditable]:focus {
  border-bottom-color: var(--primary);
}
.rd-analyze-modal-foot {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rd-analyze-skip {
  background: none;
  border: none;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
}
.rd-analyze-skip:hover { color: #1A1A1A; }

/* 面料卡片网格 */
.fabric-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.fabric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e8e6e2;
  background: #fafaf8;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.fabric-card:hover {
  border-color: #1A1A1A;
  background: #fff;
}
.fabric-card.is-active {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 1px var(--primary);
}
.fabric-card-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.fabric-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
}
.fabric-card-name-en {
  font-size: 11px;
  color: #999;
  letter-spacing: 0.3px;
}
.fabric-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fabric-tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1.4;
  color: #666;
  background: #f0eeeb;
  letter-spacing: 0.2px;
}
.fabric-tag-season {
  color: #1A1A1A;
  background: #F0EEEB;
}
.fabric-tag-weight {
  color: #2D2D2D;
  background: #F0EEEB;
}
@media (max-width: 640px) {
  .fabric-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .fabric-card {
    padding: 10px;
  }
}

/* 实时调色系统 */
.cp-section { margin-top: 16px; }

/* 调色面板 */
.cp-mixer { margin-top: 4px; }

/* 色谱条 */
.cp-spectrum-row {
  position: relative;
  height: 24px;
  margin-bottom: 14px;
  cursor: pointer;
}
.cp-spectrum {
  width: 100%;
  height: 24px;
  display: block;
  border: 1px solid #e0ded9;
  border-radius: 4px;
}
.cp-spectrum-thumb {
  position: absolute;
  top: -2px;
  width: 6px;
  height: 28px;
  background: #fff;
  border: 2px solid #1A1A1A;
  border-radius: 3px;
  pointer-events: none;
  transform: translateX(-50%);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* SV 面板 + 色相环并排 */
.cp-sv-row {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.cp-sv-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  cursor: crosshair;
}
.cp-sv-panel {
  width: 100%;
  height: 120px;
  display: block;
  border: 1px solid #e0ded9;
  border-radius: 4px;
}
.cp-sv-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), inset 0 0 0 1px rgba(0,0,0,.15);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* 色相环列 */
.cp-hue-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: 110px;
}
.cp-hue-ring-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  cursor: pointer;
}
.cp-hue-ring {
  display: block;
  width: 110px;
  height: 110px;
}
.cp-hue-ring-thumb {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cp-result-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cp-preview {
  width: 36px;
  height: 36px;
  border: 1px solid #e0ded9;
  border-radius: 4px;
  background: #fff;
  transition: background .1s;
}
.cp-native-picker {
  width: 36px;
  height: 36px;
  padding: 1px;
  border: 1px solid #e0ded9;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

/* HEX 输入 */
.cp-input-row { margin-bottom: 12px; }
.cp-hex-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e0ded9;
  border-radius: 4px;
  font-size: 13px;
  font-family: "SF Mono", "Fira Code", monospace;
  color: #1A1A1A;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s;
}
.cp-hex-input:focus { outline: none; border-color: var(--primary); }

/* 服装色系分组 */
.cp-preset-groups { margin-top: 14px; }
.cp-group-title {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 0 6px;
  border-bottom: 1px solid #f0eee9;
  margin-bottom: 6px;
}
.cp-preset-groups .cp-group-title:first-child { padding-top: 0; }
.cp-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 4px;
  padding-bottom: 6px;
}
.cp-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 3px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color .15s, background .15s;
}
.cp-swatch:hover { border-color: #ccc; background: #fafaf8; }
.cp-swatch.is-active { border-color: var(--primary); background: #f8f6f3; }
.cp-swatch-block { width: 26px; height: 26px; flex-shrink: 0; border-radius: 3px; }
.cp-swatch-label { font-size: 9px; color: #888; text-align: center; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cp-swatch:hover .cp-swatch-label { color: #1A1A1A; }
.cp-swatch.is-active .cp-swatch-label { color: #1A1A1A; font-weight: 600; }

@media (max-width: 640px) {
  .cp-sv-row { flex-direction: column; }
  .cp-hue-col { width: 100%; flex-direction: row; gap: 12px; }
  .cp-hue-ring-wrap { width: 80px; height: 80px; }
  .cp-hue-ring { width: 80px; height: 80px; }
  .cp-palette { grid-template-columns: repeat(4, 1fr); }
}

/* AI 设计顾问面板 */
.rd-advisor-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .15s, box-shadow .15s;
}
.rd-advisor-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.rd-advisor-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  z-index: 950;
  background: var(--bg, #fff);
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.rd-advisor-panel.is-open {
  transform: translateX(0);
}
.rd-advisor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, #e5e5e5);
  flex-shrink: 0;
}
.rd-advisor-header strong {
  font-size: 16px;
}
.rd-advisor-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.rd-advisor-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line, #e5e5e5);
  flex-shrink: 0;
}
.rd-advisor-quick {
  background: var(--secondary, #f4f4f4);
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 16px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rd-advisor-quick:hover {
  border-color: var(--primary);
  background: rgba(126,140,255,.08);
}
.rd-advisor-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rd-advisor-msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}
.rd-advisor-msg.is-user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.rd-advisor-msg.is-ai {
  align-self: flex-start;
  background: var(--secondary, #f4f4f4);
  color: var(--fg, #1a1a1a);
  border-bottom-left-radius: 4px;
}
.rd-advisor-msg.is-loading {
  color: var(--muted);
  font-style: italic;
}
.rd-advisor-msg.is-streaming {
  min-height: 24px;
}
.rd-advisor-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--primary, #1A1A1A);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: rd-blink .6s step-end infinite;
}
@keyframes rd-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.rd-advisor-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--line, #e5e5e5);
  flex-shrink: 0;
  align-items: flex-end;
}
.rd-advisor-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg, #fff);
  color: var(--fg, #1a1a1a);
}
.rd-advisor-send {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 14px;
}
/* 改款对比结果卡片 */
/* 改款版本链条 */
.rd-version-chain {
  margin-bottom: 16px;
  padding: 12px 0;
}
.rd-version-chain-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.rd-version-chain-track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.rd-ver-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px 8px;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: border-color .15s, background .15s;
}
.rd-ver-node:hover { background: #f5f3f0; }
.rd-ver-node.is-active { border-color: var(--primary, #1A1A1A); background: #f8f6f3; }
.rd-ver-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid #e0ded9;
  border-radius: 4px;
  background: #eee;
}
.rd-ver-label {
  font-size: 10px;
  color: #888;
  white-space: nowrap;
}
.rd-ver-node.is-active .rd-ver-label { color: #1A1A1A; font-weight: 600; }
.rd-ver-arrow {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: #ccc;
  font-size: 14px;
  line-height: 56px;
}
@media (max-width: 640px) {
  .rd-ver-thumb { width: 44px; height: 44px; }
  .rd-ver-node { padding: 4px 6px; }
}

.rd-compare-card {
  background: var(--bg, #fff);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-card, 0 2px 8px rgba(0,0,0,.08));
  overflow: hidden;
  margin-bottom: 16px;
}
.rd-compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--line, #e5e5e5);
}
.rd-compare-side {
  position: relative;
  background: var(--bg, #fff);
}
.rd-compare-side img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 480px;
}
.rd-compare-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 4px;
  z-index: 1;
}
.rd-compare-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  justify-content: flex-end;
}
.rd-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 6px;
  background: var(--bg, #fff);
  font-size: 13px;
  cursor: pointer;
  color: var(--fg, #1a1a1a);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.rd-action-btn:hover {
  border-color: var(--primary);
  background: rgba(126,140,255,.06);
}
.rd-action-btn:disabled {
  opacity: .6;
  cursor: default;
}
.rd-gen-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

/* ============================================================
   改款页左右分栏 & 右侧改款历程面板 (V25)
   ============================================================ */
.rd-home .redesign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 8px;
}
.rd-home .redesign-left {
  min-width: 0;
}
/* 左列内部沿用原有 mp-center-col 排版；重置最大宽度与自动居中，让它填满 redesign-left */
.rd-home .redesign-layout .mp-center-col {
  max-width: none;
  margin: 0;
}
.redesign-right {
  /* 背景色留空：继承页面底色，与左侧一体感 */
  border-left: 1px solid #eeebe6;
  padding: 8px 0 24px 24px;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d7d3cc transparent;
}
.redesign-right::-webkit-scrollbar { width: 6px; }
.redesign-right::-webkit-scrollbar-thumb { background: #d7d3cc; border-radius: 3px; }
.redesign-right::-webkit-scrollbar-track { background: transparent; }

.redesign-history-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  padding-right: 4px;
}
.redesign-history-title {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  letter-spacing: 0.2px;
}
.redesign-history-count {
  font-size: 12px;
  color: #999;
}
.redesign-history-list {
  display: flex;
  flex-direction: column;
}
.redesign-history-empty {
  text-align: center;
  font-size: 12px;
  color: #b2ada4;
  line-height: 1.7;
  padding: 36px 12px;
  border: 1px dashed #e2ded6;
  border-radius: 10px;
}

/* 改款任务卡片 */
.redesign-chain-card {
  padding: 0 4px;
}
.redesign-chain-card + .redesign-chain-card {
  border-top: 1px solid #eeebe6;
  padding-top: 16px;
  margin-top: 16px;
}

/* 头部 */
.chain-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.chain-name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  cursor: pointer;
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chain-name:hover {
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.chain-edit-icon {
  font-size: 12px;
  color: #999;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  user-select: none;
}
.chain-name-row:hover .chain-edit-icon { opacity: 1; }
.chain-version-badge {
  margin-left: auto;
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}
.chain-name-input {
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #1A1A1A;
  border-radius: 4px;
  padding: 2px 6px;
  outline: none;
  min-width: 80px;
  max-width: 200px;
  background: #fff;
  color: #1A1A1A;
  font-family: inherit;
}

/* 版本链缩略图流 */
.chain-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.chain-flow::-webkit-scrollbar { display: none; }
.chain-node {
  flex-shrink: 0;
  width: 56px;
  text-align: center;
  cursor: pointer;
}
.chain-node .chain-thumb {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e8e4dc;
  background: #f3efe8;
  transition: border-color 0.15s, transform 0.15s;
}
.chain-node:hover .chain-thumb { border-color: #999; }
.chain-node.active .chain-thumb { border: 2px solid #1A1A1A; }
.chain-thumb-empty {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px dashed #d7d3cc;
  background: #f8f6f0;
}
.chain-ver-label {
  display: block;
  font-size: 10px;
  color: #999;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chain-node.active .chain-ver-label {
  color: #1A1A1A;
  font-weight: 600;
}
.chain-arrow {
  color: #d0ccc4;
  font-size: 12px;
  flex-shrink: 0;
  user-select: none;
}

/* 对比预览 + 悬浮操作条 */
.chain-preview {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f8f6f0;
}
.chain-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #eeebe6;
}
.chain-compare-half {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: zoom-in;
  background: #fff;
}
.chain-compare-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.chain-compare-half:hover img { transform: scale(1.02); }
.chain-compare-label {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.3px;
}
.chain-compare-half:last-child .chain-compare-label {
  background: #1A1A1A;
}

.chain-icon-bar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.2s ease;
  pointer-events: none;
}
.chain-preview:hover .chain-icon-bar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.chain-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #eeebe6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chain-icon-btn:hover {
  background: #fff;
  color: #1A1A1A;
  border-color: #1A1A1A;
}
.chain-icon-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.chain-icon-btn svg { display: block; }

/* 继续改款按钮 */
.chain-continue-btn {
  width: 100%;
  padding: 9px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  color: #1A1A1A;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.chain-continue-btn:hover {
  border-color: #1A1A1A;
  background: #fafaf8;
}
.chain-continue-btn svg { flex-shrink: 0; }

/* 图片全屏预览 lightbox */
.image-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: imgPreviewFade 0.2s ease;
}
@keyframes imgPreviewFade { from { opacity: 0; } to { opacity: 1; } }
.image-preview-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}
.image-preview-img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.image-preview-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  user-select: none;
  transition: transform 0.15s;
}
.image-preview-close:hover { transform: scale(1.08); }

/* 响应式：窄屏单列堆叠，右侧面板移到底部 */
@media (max-width: 1080px) {
  .rd-home .redesign-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .redesign-right {
    border-left: 0;
    border-top: 1px solid #eeebe6;
    padding: 16px 0 24px;
    position: static;
    max-height: none;
  }
}

/* ============================================================
   专属模特页 (em-)
   ============================================================ */
.em-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.96px;
  margin-bottom: 24px;
  color: var(--text);
}

.em-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.em-left-illustration {
  flex: 0 0 340px;
  text-align: center;
}

.em-demo {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.em-demo-faces {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.em-face {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--secondary);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
  box-shadow: var(--shadow-border);
}

.em-face-hair {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  text-align: center;
}

.em-demo-arrow {
  font-size: 24px;
  color: var(--primary);
}

.em-demo-result {
  width: 160px;
  height: 200px;
  border-radius: var(--radius-lg);
  background: var(--secondary);
  box-shadow: var(--shadow-card);
}

.em-right-form {
  flex: 1;
  max-width: 420px;
}

.em-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.em-history-head h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.64px;
  margin: 0;
}

/* ============================================================
   智能编辑画布页 (se-)
   ============================================================ */











/* ============================================================
   个人中心 / 团队页 (pf-)
   ============================================================ */
.pf-page {
  padding: 10px 0;
}

.pf-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.pf-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.pf-avatar {
  font-size: 28px;
}

.pf-invoice-btn {
  margin-left: auto;
  font-size: 12px;
}

.pf-tabs {
  margin-bottom: 14px;
}

.pf-filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.pf-filter-row span {
  color: var(--muted);
}

.pf-table-wrap {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 10px;
}

.pf-table-wrap .rc-table {
  color: var(--text);
}

.pf-table-wrap .rc-table thead {
  background: var(--secondary);
}

.pf-table-wrap .rc-table th {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.pf-table-wrap .rc-table td {
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

/* ============================================================
   管理员登录页
   ============================================================ */
.adm-login-page {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.adm-login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--primary);
}

.adm-login-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(10, 114, 239, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(10, 114, 239, 0.08) 0%,
      transparent 50%
    );
}

.adm-login-card {
  position: relative;
  z-index: 1;
  width: 400px;
  max-width: 90vw;
  padding: 40px 36px 30px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card),
    rgba(0, 0, 0, 0.12) 0px 20px 60px;
}

.adm-login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.adm-login-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow-card);
}

.adm-login-brand {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.88px;
}

.adm-login-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.adm-login-alert {
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  font-size: 13px;
  text-align: center;
  background: #fef2f2;
  color: #C45C5C;
  box-shadow: var(--shadow-border);
}

.adm-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-login-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  box-shadow: var(--shadow-ring);
  border-radius: var(--radius);
  transition: box-shadow 0.2s ease;
}

.adm-login-field:focus-within {
  box-shadow: 0 0 0 2px var(--focus);
}

.adm-login-icon {
  font-size: 18px;
  flex-shrink: 0;
  color: var(--muted);
}

.adm-login-field input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
  background: transparent;
}

.adm-login-field input::placeholder {
  color: var(--muted);
}

.adm-login-field input:-webkit-autofill,
.adm-login-field input:-webkit-autofill:hover,
.adm-login-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--bg) inset;
}

.adm-login-btn {
  margin-top: 6px;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.32px;
  background: var(--primary);
  transition: background 0.15s ease;
}

.adm-login-btn:hover {
  background: #333333;
}

.adm-login-btn:active {
  background: #000000;
}

.adm-login-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  z-index: 1;
}

/* ============================================================
   结果展示
   ============================================================ */
.result-display {
  text-align: center;
  padding: 24px;
  background: #fff;
  border-radius: 0;
  border: 1px solid #e8e6e2;
}


.result-media {
  margin-bottom: 14px;
}

.result-media img,
.result-media video {
  border: 1px solid #e8e6e2;
  border-radius: 0;
}


.result-actions {
  margin-top: 12px;
}

.result-save-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 0;
  background: transparent;
  color: #555;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid #e8e6e2;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-save-btn:hover {
  border-color: #1A1A1A;
  color: #1A1A1A;
}








/* ============================================================
   充值模态框 (rc-)
   ============================================================ */
.rc-overlay {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  background: transparent;
}

.rc-modal {
  width: 100%;
  max-width: 920px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card),
    rgba(0, 0, 0, 0.08) 0px 16px 48px;
}

.rc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  box-shadow: inset 0 -1px 0 0 var(--line);
}

.rc-brand {
  font-size: 16px;
  font-weight: 600;
}

.rc-account {
  font-size: 14px;
  color: var(--muted);
}

.rc-close {
  margin-left: auto;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.rc-body {
  padding: 24px;
}

.rc-plans {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.rc-plan {
  flex: 1;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.rc-plan.is-selected {
  box-shadow: 0 0 0 2px var(--primary);
}

.rc-plan-head {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 6px 14px;
  border-radius: var(--radius);
  display: inline-block;
}

.rc-plan-pro .rc-plan-head {
  background: var(--primary);
  color: #fff;
}

.rc-plan-basic .rc-plan-head {
  background: var(--secondary);
  color: var(--text);
  box-shadow: var(--shadow-border);
}

.rc-plan-contact .rc-plan-head {
  background: var(--badge-bg);
  color: var(--badge-text);
}

.rc-plan-points {
  font-size: 13px;
  color: var(--badge-text);
  margin-bottom: 4px;
}

.rc-plan-price {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -1.44px;
  margin-bottom: 12px;
  color: var(--text);
}

.rc-plan-price small {
  font-size: 16px;
  font-weight: 400;
}

.rc-plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--secondary-text);
}

.rc-plan-list li {
  padding: 3px 0;
}

.rc-qr-placeholder {
  text-align: center;
  padding: 20px 0;
}

.rc-qr-box {
  width: 140px;
  height: 140px;
  background: var(--bg);
  border-radius: var(--radius);
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-ring);
}

.rc-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rc-pay-section {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-border);
}

.rc-pay-qr {
  display: flex;
  gap: 12px;
}

.rc-pay-qr-box {
  width: 90px;
  height: 90px;
  background: var(--bg);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-ring);
}

.rc-pay-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 6px;
}

.rc-pay-service-row {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.rc-pay-info {
  flex: 1;
}

.rc-pay-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.rc-pay-amount {
  font-size: 18px;
  font-weight: 600;
}

.rc-pay-amount strong {
  font-size: 28px;
  color: var(--text);
  letter-spacing: -1.12px;
}

.rc-pay-tip {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0;
}

.rc-pay-tip-blue {
  color: var(--link);
}

/* 对比表格 */
.rc-compare {
  margin-top: 10px;
}

.rc-compare h3 {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.32px;
}

.rc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rc-table thead {
  background: var(--secondary);
}

.rc-table th {
  padding: 12px 14px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.rc-table th:first-child {
  text-align: left;
}

.rc-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--secondary-text);
}

.rc-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: var(--secondary);
}

.rc-table tbody tr:nth-child(even) {
  background: var(--secondary);
}

/* ============================================================
   页面标题 & 工具栏
   ============================================================ */


.page-heading p,
.section-header p,
.tool-title p {
  margin: 8px 0 0;
  color: var(--secondary-text);
}

/* ============================================================
   卡片网格
   ============================================================ */
.hero-grid,
.plan-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-card,
.plan-card,
.stat-card,
.admin-card,
.table-card,
.left-card,
.profile-card,
.prompt-box,
.floating-auth {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}



.hero-card-preview,
.result-preview {
  height: 108px;
  border-radius: 0;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.preview-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 12px;
  font-weight: 500;
}

.hero-card-title,
.result-name,
.plan-name,
.left-card-title,
.tool-title h2,
.section-header h2,
.admin-card h3 {
  font-weight: 600;
}

.hero-card-desc,
.task-meta,
.summary-row span {
  color: var(--muted);
  font-size: 12px;
}

/* ============================================================
   提示框 / 首页工具栏
   ============================================================ */





.box-title-row,
.left-card-title-row,
.canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.left-card-title-row {
  margin-bottom: 12px;
}

.left-card-meta {
  font-size: 12px;
  color: var(--muted);
}

.upload-dropzone {
  border: 1px dashed #EDEBE8;
  border-radius: 0;
  min-height: 130px;
  display: grid;
  place-items: center;
  color: #aaa;
  font-size: 14px;
  background: #FFFFFF;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-dropzone:hover {
  border-color: #1A1A1A;
}




.tag-row,
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-tag,
.option-chip {
  border: 1px solid #e8e6e2;
  border-radius: 0;
  background: #fff;
  color: #444;
  font-size: 13px;
  padding: 8px 14px;
}

/* ============================================================
   按钮系统
   ============================================================ */
.primary-btn {
  border: none;
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  padding: 13px 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: #1A1A1A;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.primary-btn:hover {
  background: #000000;
  box-shadow: 0 4px 16px rgba(26, 26, 26, 0.15);
  color: #fff;
}

.primary-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.secondary-btn,
.danger-btn {
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-ring);
  transition: background 0.15s ease;
}

.secondary-btn:hover {
  background: var(--secondary);
}

.danger-btn {
  color: #C45C5C;
  background: #fef2f2;
  box-shadow: rgba(198, 79, 79, 0.15) 0px 0px 0px 1px;
}

.danger-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.large-btn,
.full-btn {
  width: 100%;
  margin-top: 16px;
}

/* ============================================================
   认证 / 登录
   ============================================================ */
.floating-auth {
  width: 360px;
  margin: 0 auto;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.front-auth-modal {
  width: min(480px, calc(100vw - 48px));
  margin: 0;
  z-index: 5;
  padding: 40px 48px 44px;
  border-radius: 0;
  background: #fff;
  color: #171717;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(26, 26, 26, 0.08);
}

/* ── 登录页左右分屏布局 ── */
.guest-overlay-split {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}
.guest-overlay-split .guest-backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.login-split-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  border-radius: 0;
  overflow: hidden;
}
/* 左侧：黑色品牌大图区域 (55%) */
.login-split-left {
  width: 55%;
  background: #1A1A1A;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-split-left-inner {
  text-align: center;
  z-index: 2;
  padding: 40px;
}
.login-split-slogan {
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  font-size: 42px;
  font-weight: 300;
  color: #FFFFFF;
  letter-spacing: 6px;
  margin: 0 0 20px;
  line-height: 1.4;
}
.login-split-sub {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin: 0;
}
/* 装饰性几何线条 */
.login-split-deco {
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 40px;
}
.login-split-lines {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.login-split-lines span {
  display: block;
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.login-split-lines span:nth-child(2) {
  width: 80px;
  background: rgba(255, 255, 255, 0.25);
}
/* 渐变装饰效果 */
.login-split-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
}
.login-split-left::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
  pointer-events: none;
}

/* 右侧：白色登录表单区域 (45%) */
.login-split-right {
  width: 45%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  overflow-y: auto;
  position: relative;
}
.login-split-right-inner {
  width: 100%;
  max-width: 380px;
  position: relative;
}

/* 顶部导航栏 */
.login-top-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 20px 40px;
  z-index: 3;
}
.login-top-nav a {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}
.login-top-nav a:hover {
  color: #1A1A1A;
}

/* 右侧表单微调 */
.login-split-right .auth-logo {
  font-size: 46px;
  letter-spacing: 10px;
  font-weight: 400;
  margin-bottom: 40px;
  color: #1A1A1A;
  text-align: center;
  /* letter-spacing 会让整块视觉偏右，用 padding-left 等于一个字间距量补回居中 */
  padding-left: 10px;
  line-height: 1.15;
}
.auth-logo-line {
  display: block;
  width: 56px;
  height: 2px;
  background: #1A1A1A;
  margin: 14px auto 0;
}
/* 关闭按钮 */
.login-close-btn {
  position: absolute;
  right: 24px;
  top: 18px;
  color: #bbb;
  font-size: 26px;
  line-height: 1;
  z-index: 10;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
}
.login-close-btn:hover {
  color: #1A1A1A;
}
.login-split-right .auth-form-single {
  max-width: 100%;
}
/* tab 字号放大 */
.login-split-right .dual-tabs a {
  font-size: 16px;
  letter-spacing: 3px;
  padding-bottom: 10px;
}
.login-split-right .dual-tabs {
  margin-bottom: 32px;
  gap: 32px;
}
/* 输入框放大 —— 必须排除 checkbox/radio，否则通配选择器会把协议勾选框撑成 52px 的大方块 */
.login-split-right .auth-form input:not([type="checkbox"]):not([type="radio"]),
.login-split-right .auth-row input[type="text"],
.login-split-right .auth-row input[type="email"],
.login-split-right .auth-row input[type="password"],
.login-split-right .register-field input:not([type="checkbox"]):not([type="radio"]) {
  font-size: 16px;
  height: 52px;
  padding: 14px 18px;
  box-sizing: border-box;
}
/* 输入框间距加大 */
.login-split-right .auth-row {
  margin-bottom: 18px;
}
.login-split-right .register-row {
  margin-bottom: 18px;
}
/* 登录/注册按钮放大 */
.login-split-right .auth-submit-btn {
  border-radius: 4px;
  font-size: 16px;
  height: 52px;
  padding: 0 20px;
  letter-spacing: 4px;
  margin-top: 20px;
}
/* 忘记密码/创建账户 字号 */
.login-split-right .auth-divider {
  margin: 24px 0 20px;
  font-size: 14px;
}
.login-split-right .auth-divider::before,
.login-split-right .auth-divider::after {
  width: calc(50% - 80px);
}
.login-split-right .auth-ghost-btn {
  border-radius: 4px;
  font-size: 14px;
  padding: 14px 20px;
  letter-spacing: 2px;
}
.login-split-right .auth-switch-bottom {
  margin-top: 24px;
  font-size: 14px;
}
.login-split-right .auth-bottom-actions {
  gap: 16px;
}
/* 验证码按钮高度匹配 —— 加 box-sizing 确保 52px 精确对齐输入框，而非被 border/padding 撑高 */
.login-split-right .auth-code-btn,
.login-split-right .register-code-btn {
  height: 52px;
  font-size: 14px;
  padding: 0 14px;
  box-sizing: border-box;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* 验证码输入行：确保输入框 + 按钮垂直居中对齐、零底边距避免外层 margin 干扰 */
.login-split-right .code-login-row,
.login-split-right .code-combo {
  align-items: center;
}
.login-split-right .code-login-row > input,
.login-split-right .code-combo > input {
  margin: 0;
}

/* 服务条款勾选（横排居中紧凑） */
.auth-terms-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  margin-top: 20px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}
.auth-terms-check {
  /* 强制约束尺寸：防止被 .login-split-right .auth-form input 通配规则撑大 */
  margin: 0;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  padding: 0;
  box-sizing: border-box;
  vertical-align: middle;
  accent-color: #1A1A1A;
  cursor: pointer;
  flex-shrink: 0;
}
.auth-terms-link {
  color: #1A1A1A;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-terms-link:hover {
  color: #000;
}
/* 禁用态按钮 */
.auth-submit-btn:disabled,
.auth-needs-terms:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: auto;
}

/* 响应式：移动端左侧隐藏，右侧全屏 */
@media (max-width: 767px) {
  .login-split-left {
    display: none;
  }
  .login-split-right {
    width: 100%;
    padding: 32px 24px;
  }
  .login-top-nav {
    gap: 20px;
    padding: 14px 20px;
  }
}

.front-auth-modal .auth-form h3 {
  color: #171717;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 28px;
}

.front-auth-modal .auth-agreement,
.front-auth-modal .auth-divider,
.front-auth-modal .auth-switch-bottom {
  color: #aaa;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.front-auth-modal .auth-switch-bottom a {
  color: #1A1A1A;
}

.front-auth-modal .auth-divider::before,
.front-auth-modal .auth-divider::after {
  background: rgba(26, 26, 26, 0.1);
}

.guest-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.guest-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dual-tabs {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.dual-tabs a {
  padding-bottom: 8px;
  color: #888;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  border-bottom: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.front-auth-modal .dual-tabs a {
  color: #bbb;
}

.dual-tabs .is-active {
  border-bottom: 1px solid #1A1A1A;
  color: #171717;
}

.front-auth-modal .dual-tabs .is-active {
  color: #171717;
}

.auth-cover {
  height: 0;
  margin: 0;
  background: transparent;
  display: none;
}

.auth-logo {
  text-align: center;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 8px;
  margin: 0 0 8px;
  color: #171717;
  position: relative;
  font-family: 'Playfair Display', Georgia, serif;
  z-index: 2;
}

.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 22px;
}

.auth-tabs span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.auth-tabs .is-active {
  color: var(--text);
  font-weight: 600;
}

.auth-form input,
.json-editor,
input[type="text"],
input[type="password"],
input[type="file"],
textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 0;
  border: 1px solid #e8e6e2;
  box-shadow: none;
  background: #fff;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #1A1A1A;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-form input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #1A1A1A;
  box-shadow: none;
  outline: none;
}


.admin-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  background: #fef2f2;
  color: #C45C5C;
  box-shadow: var(--shadow-border);
}

.admin-alert.is-success {
  background: #F0EEEB;
  color: #1A1A1A;
}

.auth-alert {
  margin: 0 16px 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  text-align: center;
  display: none;
}

.auth-alert.is-err {
  background: #fef2f2;
  color: #C45C5C;
  box-shadow: var(--shadow-border);
}

.auth-alert.is-ok {
  background: #F0EEEB;
  color: #1A1A1A;
  box-shadow: var(--shadow-border);
}


.auth-form h3 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.96px;
  text-align: center;
}



.auth-form-single {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.forgot-form {
  max-width: 440px;
}

.auth-row {
  width: 100%;
  margin-bottom: 12px;
}

.auth-row-email input[type="email"],
.register-field .auth-email-input {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  background: var(--bg);
  box-shadow: var(--shadow-ring);
}

.required-star {
  width: 14px;
  text-align: center;
  color: var(--accent-red);
  font-weight: 600;
  line-height: 44px;
}

.required-star-ghost {
  color: transparent;
}

.register-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.register-row-company {
  grid-template-columns: 18px 1fr 170px;
  align-items: start;
}

.register-field {
  width: 100%;
}

.field-tip {
  width: 170px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  padding-top: 12px;
}

.phone-box {
  width: 100%;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-ring);
}

.phone-prefix,
.phone-count {
  padding: 0 14px;
  color: var(--muted);
  white-space: nowrap;
}

.phone-box input {
  border: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 0;
  flex: 1;
}

.code-login-row {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
  align-items: center;
}

.code-login-row > input {
  margin-bottom: 0;
}

.code-combo {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
  align-items: center;
}

.code-combo input {
  margin-bottom: 0;
}

.register-code-btn,
.auth-code-btn {
  white-space: nowrap;
  height: 46px;
  padding: 0 12px;
}

.password-row {
  position: relative;
}

.password-row input {
  width: 100%;
  padding-right: 42px;
  margin-bottom: 0;
}

.password-eye {
  position: absolute;
  right: 14px;
  top: 12px;
  color: var(--muted);
  cursor: pointer;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 16px;
  border-radius: 0;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: #171717;
  color: #fff;
  border: 1px solid #171717;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-submit-btn:hover {
  background: #000000;
  border-color: #000000;
}

.auth-agreement {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.auth-divider {
  position: relative;
  margin: 18px 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 70px);
  height: 1px;
  background: var(--line);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-bottom-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.auth-bottom-actions.single-action {
  justify-content: center;
}

.auth-ghost-btn {
  min-width: 146px;
  justify-content: center;
  border-radius: 0;
  padding: 12px 18px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.front-auth-modal .auth-ghost-btn {
  background: transparent;
  color: #171717;
  font-weight: 500;
  border: 1px solid #e8e6e2;
  box-shadow: none;
}

.front-auth-modal .auth-ghost-btn:hover {
  border-color: #1A1A1A;
  color: #1A1A1A;
  background: transparent;
}

.wide-btn {
  min-width: 280px;
}

.auth-switch-bottom {
  margin-top: 20px;
  text-align: center;
  color: #888;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.auth-switch-bottom a {
  color: #1A1A1A;
  font-weight: 400;
  letter-spacing: 1px;
}

.auth-close {
  position: absolute;
  right: 20px;
  top: 16px;
  color: #ccc;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
  cursor: pointer;
  transition: color 0.3s ease;
}
.auth-close:hover {
  color: #171717;
}

.auth-row .phone-box,
.auth-row input[type="text"],
.auth-row input[type="email"],
.auth-row input[type="password"] {
  width: 100%;
}

@media (max-width: 860px) {
  .front-auth-modal {
    width: min(94vw, 760px);
    padding: 18px 16px 22px;
  }
  .auth-logo {
    font-size: 40px;
    margin-top: -30px;
  }
  .register-row-company {
    grid-template-columns: 18px 1fr;
  }
  .field-tip {
    width: auto;
    padding-top: 0;
    padding-left: 28px;
    grid-column: 2;
  }
}

/* ============================================================
   管理后台 — 表单 & 工具
   ============================================================ */
.admin-inline-form {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr auto;
  gap: 12px;
  align-items: start;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-form {
  margin: 0;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.status-enabled {
  color: #1A1A1A;
  background: #F0EEEB;
}

.status-disabled {
  color: #999999;
  background: #F0EEEB;
}

/* 工具页布局 */
.tool-page,
.workflow-grid,
.admin-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.panel-left,

.tool-title,
.left-card,
.admin-card,
.stat-card {
  padding: 14px;
}

.tabs-card {
  padding: 12px;
}

.mini-tabs {
  display: flex;
  gap: 8px;
}

.mini-tab {
  border: 1px solid #e8e6e2;
  background: #fff;
  color: #555;
  border-radius: 0;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mini-tab.is-active {
  background: #171717;
  color: #fff;
  border-color: #171717;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.upload-box {
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 0;
  border: 1px dashed #EDEBE8;
  background: #FFFFFF;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-box:hover {
  border-color: #1A1A1A;
}

.source-card {
  padding-bottom: 12px;
}

.source-preview {
  height: 132px;
  border-radius: 0;
  margin-bottom: 10px;
}

.source-meta {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #888;
}

/* 画布面板 */
.canvas-panel {
  min-height: 700px;
  padding: 20px;
  background: #F7F6F4;
  border-radius: 0;
  border: 1px solid #e8e6e2;
}

.canvas-hint {
  color: #aaa;
  font-size: 13px;
}

.canvas-toolbar,
.canvas-footer {
  display: flex;
  gap: 16px;
  color: #888;
  font-size: 12px;
}

.canvas-center {
  min-height: 560px;
  display: grid;
  place-items: center;
}

.canvas-stage {
  width: 100%;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.result-strip {
  max-width: 420px;
  margin: 0 auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-radius: 0;
  background: #fff;
  border: 1px solid #e8e6e2;
}

.result-card {
  text-align: center;
}

.result-preview {
  height: 132px;
  margin-bottom: 8px;
}

.canvas-footer {
  margin-top: 18px;
  justify-content: flex-end;
}

/* 已登录摘要 */
.logged-summary { display: none; } /* 旧样式隐藏 */

/* 奢侈品风格底部用户信息 */
.logged-summary-lux {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}
.lux-user-email {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #888;
}
.lux-user-credits {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #171717;
}
.lux-user-company {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #888;
}
.lux-divider-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #1A1A1A;
  display: inline-block;
}

/* 锁定状态 */
.home-wrap.is-locked .prompt-box,
.home-wrap.is-locked .hero-grid,
.home-obsidian.is-locked .home-obs-bento,
.home-obsidian.is-locked .home-obs-upload-wrap,
.home-obsidian.is-locked .home-obs-controls,
.home-obsidian.is-locked .home-obs-cta-wrap,
.tool-page.is-locked .panel-left,
.tool-page.is-locked .canvas-panel {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

/* ============================================================
   Vercel 风格首页
   ============================================================ */
body.page-front-dark,
body.page-home-vercel {
  background: var(--bg);
  color: var(--text);
}

body.page-front-dark .topbar,
body.page-home-vercel .topbar {
  background: var(--bg);
  box-shadow: var(--shadow-border);
}

body.page-home-vercel .brand-name,
body.page-home-vercel .top-link {
  color: var(--text);
}

body.page-home-vercel .top-link.is-active {
  color: var(--text);
  font-weight: 600;
}

body.page-home-vercel .credit-pill,
body.page-home-vercel .coin-pill {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-ring);
}

/* ── 首页 Obsidian 区域 ── */
/* ══════════════════════════════════════
   首页 — 全屏奢侈品设计
   ══════════════════════════════════════ */
.home-obsidian {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

@keyframes heroLineDown {
  from { opacity: 0; height: 0; }
  to   { opacity: 0.4; height: 48px; }
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}











/* ── 对话框区域 ── */
.home-chat-section {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px) clamp(100px, 12vw, 160px);
  position: relative;
}
.home-chat-section::before {
  content: '';
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, transparent, #1A1A1A);
  margin: 0 auto 48px;
  opacity: 0.4;
}
.home-chat-wrap {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}
.home-chat-box {
  border: 1px solid #e8e6e2;
  background: #fff;
  transition: border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.home-chat-box:focus-within {
  border-color: #1A1A1A;
  box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.04);
}
.home-chat-input {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 28px 32px 16px;
  font-size: 15px;
  font-weight: 400;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
  letter-spacing: 0.5px;
  line-height: 1.8;
  color: #171717;
  background: transparent;
}
.home-chat-input::placeholder {
  color: #aaa;
  font-weight: 400;
  font-style: italic;
}
.home-chat-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px 18px;
  border-top: 1px solid #f0eeea;
}
.home-chat-tool-btn {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #666;
  padding: 7px 16px;
  border: 1px solid #e8e6e2;
  cursor: pointer;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.home-chat-tool-btn:hover {
  border-color: #1A1A1A;
  color: #1A1A1A;
}
.home-chat-select {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: #1A1A1A;
  padding: 7px 14px;
  border: 1px solid #e8e6e2;
  background: transparent;
  outline: none;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
  cursor: pointer;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.home-chat-select:focus {
  border-color: #1A1A1A;
}
.home-chat-send {
  margin-left: auto;
  padding: 9px 32px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #fff;
  background: #171717;
  border: 1px solid #171717;
  cursor: pointer;
  font-family: 'Noto Serif SC', '宋体', 'SimSun', Georgia, serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.home-chat-send:hover {
  background: #000000;
  border-color: #000000;
  color: #fff;
}
.home-chat-send:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* 首页对话框 — 图片预览 */
.home-chat-preview {
  display: none;
  gap: 8px;
  padding: 12px 20px 0;
  flex-wrap: wrap;
}
.hc-prev-item {
  position: relative;
  width: 64px;
  height: 64px;
}
.hc-prev-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}
.hc-prev-del {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: #171717;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* 首页对话框 — 消息区域 */
.home-chat-messages {
  display: none;
  max-height: 560px;
  overflow-y: auto;
  padding: 32px 0;
  margin-bottom: 16px;
}
.hc-msg {
  margin-bottom: 24px;
  max-width: 80%;
  animation: hcFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes hcFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hc-msg-text {
  display: inline-block;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  letter-spacing: 0.5px;
  line-height: 1.7;
  color: #171717;
}
.hc-msg-user .hc-msg-text {
  background: #171717;
  color: #f5f5f0;
}
.hc-msg-ai .hc-msg-text {
  background: #faf9f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.hc-msg-error {
  color: #C45C5C !important;
  background: #fdf5f5 !important;
  border-color: rgba(139, 64, 64, 0.12) !important;
}
.hc-msg-images {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  justify-content: inherit;
}
.hc-msg-user .hc-msg-images {
  justify-content: flex-end;
}
.hc-msg-images img {
  max-width: 300px;
  max-height: 400px;
  object-fit: cover;
  border: none;
  cursor: pointer;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hc-msg-images img:hover {
  opacity: 0.85;
}

/* loading 金色横线呼吸 */
.hc-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 20px 24px !important;
  background: transparent !important;
  border: none !important;
}
.hc-loading-dots span {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: #1A1A1A;
  animation: hcLinePulse 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.hc-loading-dots span:nth-child(2) { animation-delay: 0.4s; }
.hc-loading-dots span:nth-child(3) { animation-delay: 0.8s; }
@keyframes hcLinePulse {
  0%, 100% { opacity: 0.15; transform: scaleX(0.4); }
  50% { opacity: 0.8; transform: scaleX(1); }
}





















.home-obs-user {
  border-top: 1px solid rgba(26, 26, 26, 0.08);
  max-width: 680px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}


/* ============================================================
   批量上传
   ============================================================ */
.mp-batch-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mp-batch-picker {
  margin-top: 8px;
}

.mp-batch-add-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 0;
  border: 1px dashed #EDEBE8;
  background: #fafaf8;
  color: #555;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-batch-add-btn:hover {
  border-color: #1A1A1A;
  color: #1A1A1A;
}

.mp-batch-preview-list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}


.mp-batch-item {
  border: 1px solid #e8e6e2;
  border-radius: 0;
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.mp-batch-item-img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 0;
  background: #f5f4f0;
}

.mp-batch-item-name {
  font-size: 12px;
  line-height: 1.3;
  color: #333;
  word-break: break-all;
}

.mp-batch-remove {
  border: 1px solid #e8c5c5;
  background: #fdf5f5;
  color: #C45C5C;
  border-radius: 0;
  height: 28px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mp-batch-remove:hover {
  background: #fbeaea;
}

/* ============================================================
   步骤条（通用）
   ============================================================ */

.step {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--secondary);
  box-shadow: var(--shadow-border);
}

.step span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  color: #fff;
  border-radius: 50%;
  background: var(--muted);
}

.step.is-active {
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.step.is-active span,
.step.is-done span {
  background: var(--primary);
}

/* ============================================================
   任务卡片
   ============================================================ */
.task-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 0;
  background: #fff;
  border: 1px solid #e8e6e2;
}

.task-head,
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-bar {
  height: 2px;
  margin: 10px 0;
  border-radius: 0;
  background: #e8e6e2;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

/* ============================================================
   表格 / 管理后台页面
   ============================================================ */
.table-page,
.admin-wrap,

.admin-form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 18px;
  align-items: start;
}

.admin-form-stack label,
.admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.admin-form-stack input[type="text"],
.admin-form-stack input[type="password"],
.admin-form-stack input[type="number"],
.admin-form-grid input[type="text"],
.admin-form-grid input[type="password"],
.admin-form-grid input[type="number"] {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-ring);
  font-size: 14px;
}

.admin-label-full {
  grid-column: 1 / -1;
}

.admin-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 6px;
}

.admin-repeater {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-repeater-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-repeater-row input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-ring);
}

.admin-repeater-3 input {
  min-width: 100px;
}

.admin-inline-check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 500 !important;
}

.admin-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-ring);
  font-family: inherit;
  font-size: 13px;
}

.admin-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-card-block {
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  background: var(--bg);
}

.admin-feature-preview {
  width: 100%;
  max-width: 200px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--secondary);
  margin-bottom: 10px;
}

.admin-feature-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-feature-preview.muted {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
}

.admin-feature-fields {
  flex-direction: column;
  align-items: stretch;
}

.admin-feature-fields input {
  width: 100%;
}

.admin-tool-details {
  border-radius: var(--radius);
  padding: 0 14px 14px;
  margin-bottom: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-card);
}

.admin-tool-sum {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
}

.admin-plan-block {
  margin-bottom: 18px;
  padding-bottom: 18px;
  box-shadow: inset 0 -1px 0 0 var(--line);
}

.admin-plan-row {
  margin-bottom: 10px;
}

.admin-matrix-wrap {
  overflow-x: auto;
}

.admin-matrix-table input {
  width: 100%;
  min-width: 72px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-ring);
}

/* 提示词分组容器 */
.prompt-group-section {
  background: #fff;
  border: 1px solid #EDEBE8;
  margin-bottom: 12px;
  overflow: hidden;
}
.prompt-group-section:not(.is-collapsed) .prompt-group-header {
  border-bottom-color: #EDEBE8;
}

/* 提示词分组标题栏 */
.prompt-group-header {
  background: #FAFAF8;
  color: #2D2D2D;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 14px 18px;
  margin: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
}
.prompt-group-header:hover {
  background: #F2F1EF;
  color: #2D2D2D;
}
.pg-arrow {
  font-size: 13px;
  color: #999;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.25s ease, color 0.2s ease;
}
.prompt-group-header:hover .pg-arrow {
  color: #666;
}
.pg-body {
  padding: 16px 18px;
  background: #fff;
}

/* 后台折叠标题（系统设置页） */
.admin-collapse-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #2D2D2D;
  background: transparent;
  padding-bottom: 12px;
  border-bottom: 1px solid #EDEBE8;
}
.admin-collapse-toggle:hover { color: #2D2D2D; }
.admin-collapse-arrow { font-size: 13px; color: #999; }
.admin-collapse-toggle:hover .admin-collapse-arrow { color: #666; }

/* 后台锚点导航（系统设置页） */
.asn-item {
  padding: 6px 14px;
  font-size: 12px;
  color: #888;
  text-decoration: none;
  border: 1px solid #EDEBE8;
  transition: all 0.2s;
  white-space: nowrap;
}
.asn-item:hover { color: #2D2D2D; border-color: #BFBFBF; }
.asn-item.is-active { color: #2D2D2D; border-color: #2D2D2D; font-weight: 600; background: transparent; }

/* 后台导航（提示词页） */
.pg-nav-btn {
  color: #888;
  background: #FAFAF8;
  border: 1px solid #EDEBE8;
  transition: all 0.2s ease;
}
.pg-nav-btn:hover { color: #2D2D2D; border-color: #BFBFBF; background: #F2F1EF; }
.pg-nav-btn.pg-nav-active { color: #fff; border-color: #1A1A1A; font-weight: 600; background: #1A1A1A; }

.admin-provider-block {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  background: var(--bg);
}

.admin-provider-new {
  background: var(--secondary);
}

/* 供应商熔断状态标签 */
.cb-status {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
}
.cb-status.cb-normal { background: #F0EEEB; color: #1A1A1A; }
.cb-status.cb-open { background: #fde8e8; color: #C45C5C; }
.cb-status.cb-halfopen { background: #F0EEEB; color: #999999; }

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.admin-stat-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-card);
}

.admin-stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.96px;
  color: var(--text);
}

.admin-stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-user-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px 16px;
  align-items: end;
}

.admin-user-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.admin-user-form-grid input,
.admin-user-form-grid select {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-ring);
  font-size: 13px;
}

.admin-readonly {
  display: inline-block;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
}

.admin-user-actions {
  grid-column: 1 / -1;
}

.admin-user-meta-cell {
  font-size: 12px;
  color: var(--muted);
  padding-top: 0 !important;
  padding-bottom: 16px !important;
  box-shadow: inset 0 -1px 0 0 var(--line);
}

.admin-users-table tr.admin-user-row td {
  border-bottom: none;
  padding-bottom: 8px;
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: var(--text);
  font-weight: 600;
  background: var(--secondary);
}

/* 任务状态徽章 */
.task-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  border: none;
  background: #f5f5f3;
  color: #999;
  white-space: nowrap;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* 状态颜色 */
.task-status-completed, .task-status-done {
  background: #ecf7ed; color: #1a7a2e;
}
.task-status-failed, .task-status-error {
  background: #fdf0f0; color: #b91c1c;
}
.task-status-processing, .task-status-queued {
  background: #fef9ee; color: #b45309;
}
.task-status-processing .status-dot,
.task-status-queued .status-dot {
  animation: statusBreathe 1.8s ease-in-out infinite;
}
@keyframes statusBreathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* 结果缩略图 */
.task-result-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e8e6e2;
  background: #fafaf8;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
.task-result-thumb:hover {
  opacity: 0.85;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.task-result-thumb.is-compact {
  width: 64px;
  height: 64px;
}

/* 无结果占位符 */
.task-no-result-box {
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f5f5f3;
  border-radius: 4px;
  border: 1px dashed #e0ded9;
  color: #c5c3bf;
}
.task-no-result-box svg {
  width: 20px;
  height: 20px;
  opacity: 0.45;
}
.task-no-result-box span {
  font-size: 10px;
  letter-spacing: 0.03em;
  color: #bbb;
}

/* 历史记录页 */
.history-page .section-header { padding-bottom: 16px; }
.history-page .history-filter-row { margin-top: 12px; gap: 6px; }
.history-page .data-table th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #666;
  text-transform: none;
  padding: 10px 16px;
  background: #fafaf8;
  border-bottom: 2px solid #e8e6e2;
}
.history-page .data-table td {
  vertical-align: middle;
  padding: 12px 16px;
  font-size: 13px;
  color: #444;
}
.history-page .data-table tbody tr {
  transition: background 0.12s ease;
}
.history-page .data-table tbody tr:hover {
  background: #fafaf8;
}

.table-link {
  color: var(--link);
  text-decoration: underline;
  font-size: 12px;
}

.empty-cell,
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 36px 16px;
}

/* ============================================================
   套餐卡片 / 支付
   ============================================================ */



.plan-price {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -1.44px;
  margin: 12px 0;
}


/* ============================================================
   个人主页
   ============================================================ */






.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.stat-card strong {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1.28px;
}

.admin-stack {
  display: grid;
  gap: 20px;
}

/* ============================================================
   代码 & JSON
   ============================================================ */
.json-editor {
  min-height: 260px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, "Roboto Mono", Menlo,
    Monaco, "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
  font-feature-settings: "liga";
  font-size: 13px;
  line-height: 1.65;
}


/* ============================================================
   渐变卡片背景（功能卡片图片占位）
   ============================================================ */



.gradient-dark {
  background: linear-gradient(135deg, #6f778f, #23283d);
}




/* ============================================================
   徽章变体（前台白底风格）
   ============================================================ */
.pf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--badge-bg);
  color: var(--badge-text);
}

.pf-tool-badge.is-fashion { color: #2D2D2D; background: #F0EEEB; }
.pf-tool-badge.is-edit    { color: #2D2D2D; background: #F0EEEB; }
.pf-tool-badge.is-model   { color: #2D2D2D; background: #F0EEEB; }
.pf-tool-badge.is-video   { color: #2D2D2D; background: #F0EEEB; }
.pf-tool-badge.is-redesign { color: #2D2D2D; background: #F0EEEB; }
.pf-tool-badge.is-default { color: var(--muted); background: var(--secondary); }

.pf-status-badge.is-success  { color: #1A1A1A; background: #F0EEEB; }
.pf-status-badge.is-fail     { color: #C45C5C; background: #fef2f2; }
.pf-status-badge.is-progress { color: #1A1A1A; background: #F0EEEB; }
.pf-status-badge.is-default  { color: var(--muted); background: var(--secondary); }

.pf-credit-badge          { color: #2D2D2D; background: #F0EEEB; }
.pf-amount-badge           { color: #2D2D2D; background: #F0EEEB; }
.pf-recharge-credit-badge  { color: #1A1A1A; background: #F0EEEB; }
.pf-order-badge            { color: var(--muted); background: var(--secondary); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1200px) {
  .hero-grid,
  .plan-grid,
  .stats-grid,
  .result-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-page,
  .workflow-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .sidebar:not(.admin-sidebar),
  .sidebar.sidebar-wide {
    width: 100%;
    box-shadow: var(--shadow-border);
  }
  .sidebar-wide .sidebar-item {
    padding: 10px 12px;
    font-size: 14px;
  }
  .sidebar-wide .sidebar-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
}

@media (max-width: 960px) {
}

@media (max-width: 860px) {
  .shell {
    flex-direction: column;
  }
  .sidebar {
    width: auto;
    box-shadow: var(--shadow-border);
  }
  .sidebar-stack {
    flex-direction: row;
    overflow: auto;
  }
  .topbar {
    flex-wrap: wrap;
  }
  .hero-grid,
  .plan-grid,
  .stats-grid,
  .result-strip,
}

@media (max-width: 768px) {
  .home-obsidian {
    padding: 48px 16px 64px;
  }
  .main-content {
    padding: 24px 16px 36px;
  }
}

@media (max-width: 520px) {
}

/* ── 异步队列：进度指示器 ── */
.gen-progress {
  text-align: center;
  padding: 60px 20px;
}
.gen-progress-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid #e8e6e2;
  border-top-color: #1A1A1A;
  border-radius: 50%;
  animation: gen-spin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes gen-spin {
  to { transform: rotate(360deg); }
}
.gen-progress-text {
  font-size: 13px;
  font-weight: 400;
  color: #555;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}
.gen-progress-bar {
  width: 100%;
  max-width: 200px;
  height: 1px;
  background: #e8e6e2;
  border-radius: 0;
  margin: 0 auto;
  overflow: hidden;
}
.gen-progress-fill {
  height: 100%;
  background: #1A1A1A;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ── 并发提示 ── */
.mp-concurrent-hint {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  color: #aaa;
  margin-top: 12px;
  letter-spacing: 1px;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}
/* ── 按钮内积分 ── */
.mp-gen-cost-btn .btn-cost {
  font-weight: 700;
}

/* ── 生成按钮底部附加信息 ── */
.mp-gen-sub {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #888888;
  letter-spacing: 0.3px;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}

/* ── 页面提示自动消失动画（JS setTimeout 的 CSS 兜底） ── */
@keyframes pageAlertFade {
  0%   { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* ── 批量模式圆润Toggle开关 ── */
.mp-batch-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.mp-batch-toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: #1A1A1A;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
}
.mp-batch-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #DEDCDA;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}
.mp-batch-toggle.is-on {
  background: #1A1A1A;
}
.mp-batch-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}
.mp-batch-toggle.is-on::after {
  transform: translateX(18px);
}

/* ── 任务队列面板 ── */
.task-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}
.task-panel-queue {
  flex: 0 0 auto;
  border-bottom: 1px solid #e8e6e2;
}
.task-panel-history {
  flex: 1 1 0;
  overflow-y: auto;
}
.task-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e8e6e2;
}
.task-panel-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
}
.task-panel-badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  background: #1A1A1A;
  color: #fff;
  border-radius: 0;
  padding: 2px 8px;
  letter-spacing: 0.5px;
  min-width: 20px;
  text-align: center;
}
.task-panel-badge:empty,
.task-panel-badge[data-count="0"] {
  display: none;
}

/* ============================================================
   V3 §4.1 — 任务队列：模糊占位 + 呼吸蒙版 + 1px 进度条 + 飞入动画
   ============================================================ */
.task-queue-list {
  padding: 10px 14px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
}
.task-queue-empty {
  text-align: center;
  padding: 20px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #BFBFBF;
  text-transform: uppercase;
}

.task-queue-item {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #EDEBE8;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.task-queue-item:hover { border-color: #D6D3CE; }
.task-queue-item:last-child { margin-bottom: 0; }

/* 入场：从右飞入 */
.task-queue-item.task-card-enter {
  animation: slideInRight 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* 模糊缩略图占位（未生成时无真图，用渐变占位） */
.task-queue-thumb {
  position: relative;
  width: 48px;
  height: 64px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #E8E6E2 0%, #F0EEEB 100%);
  filter: blur(0.5px);
  overflow: hidden;
}
.task-queue-thumb-breathe {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(26,26,26,0.06),
    rgba(26,26,26,0.02));
  animation: breathe 2.5s ease-in-out infinite;
}
.task-queue-item.is-queued .task-queue-thumb-breathe {
  animation-duration: 3.6s;
  opacity: 0.5;
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.8; }
}

.task-queue-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.task-queue-tool {
  font-family: 'Montserrat', 'Noto Serif SC', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #1A1A1A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}
.task-queue-status {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  color: #999;
  text-transform: none;
}
.task-queue-item.is-processing .task-queue-status {
  color: #1A1A1A;
  animation: breathe 2.5s ease-in-out infinite;
}

/* 1px 极细匀速进度条 — 不制造焦虑感 */
.task-queue-progress {
  margin-top: 6px;
  height: 1px;
  background: #F0EEEB;
  overflow: hidden;
}
.task-queue-progress-bar {
  height: 100%;
  width: 0;
  background: #1A1A1A;
  animation: progressSweep 30s linear infinite;
}
@keyframes progressSweep {
  0%   { width: 0; }
  100% { width: 100%; }
}

/* ============================================================
   V3 §4.2 — 历史画廊：窄边距 + 溯源标签 + hover 浮现操作 + 多模态预留
   ============================================================ */
.task-history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  padding: 14px;
  background: #F7F6F4;
}
.task-history-card {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.task-history-card:hover { transform: translateY(-2px); }

.task-history-img-wrap {
  position: relative;
  overflow: hidden;
  background: #F0EEEB;
}
.task-history-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.task-history-card:hover img { transform: scale(1.03); }

/* Hover 浮现的操作浮层（非 hover 绝对干净） */
.task-history-actions-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.task-history-card:hover .task-history-actions-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 已过期占位 */
.th-expired {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 80px;
  background: #F5F5F5; color: #999; font-size: 12px;
  border-radius: 8px;
}

/* 半透明白底 icon 按钮 */
.th-icon-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  color: #1A1A1A;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.th-icon-btn:hover {
  background: #1A1A1A;
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* 多模态预留：推送至视频（灰色 disabled） */
.th-icon-btn.th-to-video,
.th-icon-btn.th-to-video:hover {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.6);
  color: #999;
  transform: none;
  pointer-events: none;
}

/* 收藏按钮：默认跟其他 th-icon-btn 一致；已收藏时金色填充（V25 统一反馈） */
.th-icon-btn.th-favorite.is-favorited {
  background: #fff7e6;
  color: #F5A623;
  border-color: #F5A623;
  box-shadow: 0 1px 6px rgba(245, 166, 35, 0.25);
}
.th-icon-btn.th-favorite.is-favorited:hover {
  background: #ffefd0;
  color: #F5A623;
  border-color: #F5A623;
}
.th-icon-btn.th-favorite.is-favorited svg {
  fill: #F5A623;
  stroke: #F5A623;
}

/* ──────────────────────────────────────────────────────────
   通用收藏态反馈（V25）：.favorited 给任意收藏按钮使用，
   配合 JS 在收藏成功/已在图库时添加。金色 + pop 动画 + SVG 填充。
   ────────────────────────────────────────────────────────── */
@keyframes favorited-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}
.favorited {
  color: #F5A623 !important;
  animation: favorited-pop 0.32s ease;
}
.favorited svg {
  fill: #F5A623;
  stroke: #F5A623;
}
/* 改款右侧链卡片的悬浮收藏图标（星形图标，使用 stroke 渲染） */
.chain-icon-btn.favorited {
  color: #F5A623;
  border-color: #F5A623;
  background: #fff;
  box-shadow: 0 1px 6px rgba(245, 166, 35, 0.25);
}
.chain-icon-btn.favorited:hover {
  color: #F5A623;
  border-color: #F5A623;
  background: #fff;
}
/* 改款底部对比卡片的文字型收藏按钮：保留边框，仅文字+图标描点变金色 */
.rd-action-btn.favorited {
  color: #F5A623;
  border-color: #F5A623;
  background: #fff7e6;
}
.rd-action-btn.favorited:hover {
  color: #F5A623;
  border-color: #F5A623;
  background: #ffefd0;
}
.th-icon-btn.th-favorite.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* 溯源标签（极小字） */
.task-history-meta {
  margin-top: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 300;
  color: #BFBFBF;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 溯源标签/元信息 */
.task-history-meta {
  margin-top: 8px;
  font-size: 10px;
  font-family: 'Montserrat', sans-serif;
  color: #BFBFBF;
  letter-spacing: 0.5px;
}

/* ── 大图预览 Modal ── */
.img-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: overlayFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes overlayFadeIn { from { opacity: 0 } to { opacity: 1 } }
.img-preview-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}
.img-preview-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-preview-close:hover {
  border-color: #fff;
  color: #fff;
}
.hc-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hc-preview-wrap img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}
.hc-preview-dl {
  display: inline-block;
  padding: 10px 32px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hc-preview-dl:hover {
  background: #fff;
  color: #171717;
  border-color: #fff;
}

.hc-preview-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hc-preview-video {
  display: inline-block;
  padding: 10px 32px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hc-preview-video:hover {
  background: #fff;
  color: #171717;
  border-color: #fff;
}

/* ============================================================
   汉堡菜单 + 手机端抽屉（桌面端隐藏）
   ============================================================ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: var(--bg);
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transition: right 0.25s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mobile-nav-drawer.is-open {
  right: 0;
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
}
.mobile-nav-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  gap: 2px;
}
.mobile-nav-links .top-link {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-nav-actions {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.mobile-nav-actions .ghost-btn,
.mobile-nav-actions .primary-btn,
.mobile-nav-actions .credit-pill,
.mobile-nav-actions .coin-pill {
  min-height: 44px;
  width: 100%;
  justify-content: center;
  text-align: center;
}
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* 手机端浮动任务按钮（桌面端隐藏） */
.mobile-task-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 65;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}
.mobile-task-fab:active {
  transform: scale(0.95);
}

/* 手机端面板遮罩（桌面端隐藏） */
.mobile-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-panel-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   手机端响应式（768px 以下）
   ============================================================ */
@media (max-width: 768px) {
  /* ── 顶栏 ── */
  .topbar {
    height: 56px;
    padding: 0 16px;
    gap: 8px;
  }
  .brand-name {
    font-size: 16px;
    letter-spacing: 2px;
  }
  .brand-logo-svg {
    width: 26px;
    height: 26px;
  }
  .top-nav {
    display: none;
  }
  .top-actions {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }

  /* ── shell 布局 ── */
  .shell {
    flex-direction: column;
  }
  .sidebar,
  .sidebar.sidebar-wide {
    display: none;
  }

  /* ── 三栏 → 单栏 ── */
  .mp-page-split,
  .mp-page-3col {
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: auto;
  }
  .mp-left {
    width: 100%;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
    padding: 16px;
    box-shadow: none;
    border-bottom: 1px solid var(--border);
  }
  .mp-page-3col .mp-center-col {
    max-height: none;
    min-height: 160px;
    padding: 16px;
  }
  .mp-page-3col .mp-right-panel {
    /* 手机端隐藏右侧面板，用浮动按钮代替 */
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-height: 70vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    z-index: 60;
  }
  .mp-page-3col .mp-right-panel.mobile-panel-open {
    display: block;
  }
  .mobile-task-fab {
    display: block;
  }

  .mp-right {
    width: 100%;
    min-width: 0;
  }
  .mp-right.mp-right-canvas {
    max-height: none;
    min-height: 200px;
    padding: 16px;
  }

  /* ── 上传区域适配 ── */
  .mp-upload-grid {
    flex-direction: column;
    align-items: center;
  }
  .mp-upload-grid:has(.mp-upload-box:nth-child(2)) .mp-upload-box {
    flex: none;
    max-width: 100%;
  }
  .mp-upload-box {
    width: 100%;
    max-width: 320px;
    height: 160px;
  }

  /* ── 按钮触摸适配 ── */
  .primary-btn,
  .ghost-btn,
  .mp-gen-btn,
  .mp-batch-gen-btn {
    min-height: 44px;
    font-size: 15px;
  }
  .mp-left-footer {
    padding: 12px 0 4px;
  }

  /* ── 芯片/标签触摸适配 ── */
  .mp-chip,
  .mp-toggle {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
  }

  /* ── 文字可读性 ── */
  .mp-section-title {
    font-size: 15px;
  }
  .mp-tip {
    font-size: 13px;
  }
  .mp-concurrent-hint {
    font-size: 12px;
  }

  /* ── 首页 ── */
  .main-content {
    padding: 16px 12px 24px;
  }

  /* ── 任务面板手机端内部调整 ── */
  .task-history-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
  }
  .task-history-card img {
    height: 150px;
  }

  /* ── 进度指示器 ── */
  .gen-progress {
    padding: 40px 16px;
  }

  /* ── 大图预览 ── */
  .img-preview-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }

  /* ── iPhone 安全区适配 ── */
  .mobile-task-fab {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .mp-page-3col .mp-right-panel {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-nav-drawer {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }


  /* ── select 下拉触摸适配 ── */
  .mp-select {
    min-height: 44px;
    font-size: 15px;
  }


  /* ── 隐藏桌面端面板遮罩 ── */
  .mobile-panel-overlay.is-open {
    display: block;
  }
}

/* ================================================================
 *  商品详情图（product-detail）
 * ================================================================ */

/* 多选 toggle：允许间距，选中态用金色线框而非黑底（区别于单选） */
.mp-toggle-multi {
  gap: 8px;
}

.mp-toggle-multi .mp-toggle {
  margin-right: 0;
  border: 1px solid #e8e6e2;
}

.mp-toggle-multi .mp-toggle.is-active {
  background: #1A1A1A;
  color: #fff;
  font-weight: 500;
  border-color: #1A1A1A;
  box-shadow: inset 0 0 0 1px #1A1A1A;
}

.mp-toggle-multi .mp-toggle.is-active:hover {
  background: #000000;
}

/* 提示文字行内标签 */
.mp-tip-inline {
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  font-size: 12px;
  font-weight: 400;
  color: #aaa;
  letter-spacing: 0.5px;
}

/* 买家秀换装面板 */
.buyer-show-footer {
  justify-content: center;
  text-align: center;
}
.buyer-show-footer .mp-concurrent-hint {
  width: 100%;
  text-align: center;
}

/* ================================================================
 *  中间栏「等待生成」富状态（ce = center empty）
 * ================================================================ */

.ce-rich {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 40px 24px;
  width: 100%;
  flex: 1;
  align-self: stretch;
}

/* 顶部案例占位框 */
.ce-examples {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.ce-example-box {
  width: 160px;
  height: 213px;
  border: 1px dashed #EDEBE8;
  background: #FAFAFA;
  border-radius: 0;
}
.ce-example-desc {
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  letter-spacing: 1.5px;
  margin: 0;
  text-align: center;
}

/* Before → After */
.ce-before-after {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ce-ba-box {
  width: 200px;
  height: 266px;
  border: 1px dashed #EDEBE8;
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}
.ce-ba-box span {
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: #888;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.ce-ba-after {
  border-color: #1A1A1A;
  border-style: solid;
}
.ce-ba-arrow {
  font-size: 28px;
  color: #1A1A1A;
  font-weight: 400;
}

/* Tips 使用技巧 */
.ce-tips {
  width: 100%;
  max-width: 480px;
  text-align: left;
}
.ce-tips-title {
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: #111;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #EDEBE8;
}
.ce-tips ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ce-tips li {
  font-family: 'Noto Serif SC', '宋体', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: #4d4d4d;
  line-height: 2;
  padding-left: 16px;
  position: relative;
}
.ce-tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 5px;
  height: 5px;
  background: #1A1A1A;
  border-radius: 0;
}

/* 手机端适配 */
@media (max-width: 768px) {
  .ce-examples {
    gap: 8px;
  }
  .ce-example-box {
    width: 100px;
    height: 132px;
  }
  .ce-ba-box {
    width: 130px;
    height: 172px;
  }
  .ce-tips {
    max-width: 100%;
  }
  .ce-tips-title {
    font-size: 15px;
  }
  .ce-tips li {
    font-size: 13px;
  }
}

/* ============================================================
   第 2 轮 — Header 4 大类导航 + Hero 大图 + 悬浮毛玻璃面板
   ============================================================ */

/* ── 4 大类导航组 ── */
.top-nav {
  gap: 4px;
}

.top-nav-group {
  position: relative;
}

.top-nav-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.top-nav-trigger:hover,
.top-nav-group:hover .top-nav-trigger {
  border-bottom-color: #1A1A1A;
}
.top-nav-group.is-active .top-nav-trigger {
  border-bottom-color: #1A1A1A;
}

/* 独立导航链接（首页）— 与 group trigger 视觉一致但无下拉 */
.top-nav-solo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.3s ease;
}
.top-nav-solo:hover,
.top-nav-solo.is-active {
  border-bottom-color: #1A1A1A;
}
@media (max-width: 960px) {
  .top-nav-solo { display: none; }
}
.top-nav-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 4px;
  color: #1A1A1A;
  line-height: 1;
}
.top-nav-sublabel {
  font-family: 'Montserrat', sans-serif;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 2px;
  color: #999;
  text-transform: uppercase;
  line-height: 1;
}

/* 子菜单面板 */
.top-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 180px;
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 30;
}
.top-nav-group:hover .top-nav-dropdown,
.top-nav-group:focus-within .top-nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.top-nav-dropdown-inner {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
}
.top-nav-sub {
  display: block;
  padding: 10px 24px;
  font-family: 'Montserrat', 'Noto Serif SC', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: #2D2D2D;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.3s ease;
}
.top-nav-sub:hover {
  color: #1A1A1A;
  background: #F7F6F4;
  padding-left: 28px;
}
.top-nav-sub.is-current {
  color: #1A1A1A;
  font-weight: 500;
}
/* 父项：带子项的菜单项，标签后加箭头指示 */
.top-nav-sub.has-children {
  font-weight: 500;
  color: #1A1A1A;
  letter-spacing: 2px;
}
/* 子项：缩进 + 更小字号 + 浅色 */
.top-nav-child {
  padding-left: 40px;
  font-size: 11px;
  color: #666;
  letter-spacing: 1px;
}
.top-nav-child:hover {
  color: #1A1A1A;
  background: #F7F6F4;
  padding-left: 40px;
}
.top-nav-child.is-current {
  color: #1A1A1A;
  font-weight: 500;
}
/* 下拉分隔线 */
.top-nav-divider {
  display: block;
  height: 1px;
  background: #EBEBEB;
  margin: 6px 20px;
}

/* 原 .top-link 在桌面态隐藏（仅移动端抽屉使用） */
.top-nav > .top-link { display: none; }

/* 移动端抽屉：分组标签 */
.mobile-nav-group-label {
  display: block;
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #999;
  text-transform: uppercase;
}
/* 移动端抽屉：子项缩进 */
.mobile-nav-child {
  padding-left: 36px;
  font-size: 13px;
  color: #666;
}
.mobile-nav-child.is-active {
  color: #1A1A1A;
  font-weight: 500;
}

/* garment-suite 禁用态 tab */
.gs-mode-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 960px) {
  .top-nav-group { display: none; }
}

/* ── Hero 大图 + 悬浮毛玻璃面板 ── */
.home-obsidian .hero-stage {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.hero-canvas {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(135deg, #E8E6E2 0%, #F7F6F4 100%);
}
.hero-canvas-bg {
  position: absolute;
  inset: 0;
  /* background-image 由 PHP inline style 注入，支持后台配置 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #E8E6E2; /* 图片加载前的兜底 */
}
.hero-watermark {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(90px, 14vw, 180px);
  font-weight: 300;
  letter-spacing: clamp(16px, 2vw, 32px);
  color: #1A1A1A;
  opacity: 0.05;
  pointer-events: none;
  text-indent: clamp(16px, 2vw, 32px);
  white-space: nowrap;
}

/* 悬浮毛玻璃创作面板（换装/白底图/棚拍/改款 + 开始创作） */
.creation-dock {
  position: absolute;
  left: 50%;
  bottom: calc(7% + 230px); /* 给下方的文生图毛玻璃面板让位 */
  transform: translateX(-50%);
  width: min(80%, 960px);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  z-index: 10;

  /* 毛玻璃 */
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px; /* 毛玻璃圆角例外 */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

  animation: dockFloat 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

@keyframes dockFloat {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* 兼容性兜底 */
@supports not ((backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px))) {
  .creation-dock {
    background: rgba(255, 255, 255, 0.92);
  }
}

/* 面板内工具拨片 */
.creation-dock .dock-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.creation-dock .dock-tab {
  font-family: 'Montserrat', 'Noto Serif SC', sans-serif;
  font-size: 13px;
  color: #999;
  font-weight: 400;
  cursor: pointer;
  padding: 6px 14px;
  text-decoration: none;
  letter-spacing: 1px;
  border-radius: 4px; /* 毛玻璃内小圆角例外 */
  transition: color 0.25s ease, background 0.25s ease, font-weight 0.25s ease;
}
.creation-dock .dock-tab:hover {
  color: #1A1A1A;
}
.creation-dock .dock-tab.is-active {
  color: #1A1A1A;
  font-weight: 600;
  background: rgba(26, 26, 26, 0.06);
}

/* 开始创作按钮 */
.creation-dock .dock-create {
  background: #1A1A1A;
  color: #FFFFFF;
  border: none;
  padding: 13px 34px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 6px; /* 毛玻璃内小圆角例外 */
  transition: background 0.3s ease, transform 0.1s ease;
  background-image: linear-gradient(
    135deg,
    rgba(255,255,255,0.08) 0%,
    transparent 50%,
    rgba(255,255,255,0.04) 100%
  );
}
.creation-dock .dock-create:hover {
  background-color: #000000;
}
.creation-dock .dock-create:active {
  transform: scale(0.97);
}

/* Hero 下方索引小字 */
.hero-caption {
  text-align: center;
  padding: 40px 24px 56px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-slogan {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  font-style: italic;
  color: #1A1A1A;
  letter-spacing: 2px;
  margin: 0 0 12px;
  line-height: 1.4;
}
.hero-index {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 3px;
  color: #999;
  text-transform: uppercase;
  margin: 0;
}

@media (max-width: 960px) {
  .hero-canvas { height: 52vh; min-height: 380px; }
  .creation-dock {
    width: min(92%, 720px);
    padding: 16px 20px;
    flex-direction: column;
    gap: 14px;
  }
  .creation-dock .dock-create { width: 100%; text-align: center; }
}

@media (max-width: 640px) {
  .hero-watermark { font-size: 72px; letter-spacing: 14px; text-indent: 14px; }
  .hero-caption { padding: 28px 16px 40px; }
}

/* ============================================================
   第 3 轮 — 工具页左侧控制台（渐进式披露 + 拨片 + 生成按钮）
   ============================================================ */

/* ── 隐藏 select（拨片是唯一交互面，<select> 仅作为表单值源） ── */
.mp-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ── 渐进式披露：初始折叠，上传完成后展开 ── */
.mp-params-collapse {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  pointer-events: none;
}
.mp-params-collapse.is-expanded {
  max-height: none;
  opacity: 1;
  overflow: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* 无 JS 环境（观察不到上传态）兜底：始终展开 */
.no-js .mp-params-collapse,
html:not(.js) .mp-params-collapse {
  max-height: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ── 拨片组：section 标题 + chip row 紧凑布局 ── */
.mp-params-collapse .mp-section {
  padding: 20px 0 24px;
  margin: 0;
  border-bottom: 1px solid #EDEBE8;
}
.mp-params-collapse .mp-section:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}
.mp-params-collapse .mp-section-title {
  margin-bottom: 14px;
}

/* ── 生成按钮 — 先锋黑 + 金属光泽（V3 §3.3） ── */
.mp-left-footer .mp-gen-btn,
.mp-bottom-bar .mp-gen-btn,
.mp-left-footer .primary-btn.mp-gen-btn {
  background-color: #1A1A1A;
  color: #FFFFFF;
  border: none;
  border-radius: 0;
  padding: 14px 32px;
  font-family: 'Montserrat', 'Noto Serif SC', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.12s ease, box-shadow 0.3s ease;
  background-image: linear-gradient(
    135deg,
    rgba(255,255,255,0.06) 0%,
    transparent 50%,
    rgba(255,255,255,0.03) 100%
  );
  box-shadow: none;
}
.mp-left-footer .mp-gen-btn:hover,
.mp-bottom-bar .mp-gen-btn:hover {
  background-color: #000000;
  box-shadow: 0 4px 16px rgba(26, 26, 26, 0.15);
}
.mp-left-footer .mp-gen-btn:active,
.mp-bottom-bar .mp-gen-btn:active {
  transform: scale(0.98);
  background-image: linear-gradient(
    90deg,
    rgba(255,255,255,0.15) 0%,
    transparent 60%
  );
}
.mp-left-footer .mp-gen-btn:disabled,
.mp-bottom-bar .mp-gen-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   首页文生图面板 — 悬浮毛玻璃（在 100vh Hero 底部）
   ============================================================ */

/* 覆写旧的 .home-chat-section（它原来是块级区域，现在挪进 hero-canvas 内部做悬浮） */
.hero-canvas .home-chat-section {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  width: min(80%, 960px);
  max-width: none;
  padding: 0 32px; /* 与 .creation-dock 水平 padding 对齐，使内容区同为 896px */
  margin: 0;
  text-align: left;
  z-index: 10;
  animation: dockFloat 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.35s backwards;
}

/* 干掉原 .home-chat-section::before 那条装饰竖线 */
.hero-canvas .home-chat-section::before {
  content: none;
}

/* 防御性：即使 PHP 漏删也隐藏 label/sublabel */
.hero-canvas .home-chat-label,
.hero-canvas .home-chat-sublabel {
  display: none;
}

.hero-canvas .home-chat-wrap {
  max-width: none;
  margin: 0;
  text-align: left;
}

.hero-canvas .home-chat-messages {
  margin: 0;
}
.hero-canvas .home-chat-messages:empty {
  display: none;
}

/* 核心：chat box 变毛玻璃 */
.hero-canvas .home-chat-box {
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px; /* 毛玻璃圆角例外 */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.hero-canvas .home-chat-box:focus-within {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 不支持 backdrop-filter 的浏览器兜底 */
@supports not ((backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px))) {
  .hero-canvas .home-chat-box {
    background: rgba(255, 255, 255, 0.92);
  }
}

.hero-canvas .home-chat-input {
  background: transparent;
  padding: 22px 28px 12px;
  font-size: 14px;
  color: #1A1A1A;
}
.hero-canvas .home-chat-input::placeholder {
  color: rgba(26, 26, 26, 0.45);
  font-style: italic;
}

.hero-canvas .home-chat-toolbar {
  padding: 10px 20px 14px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
  background: transparent;
  gap: 10px;
}

/* 工具栏内按钮/下拉在毛玻璃底色上更克制 */
.hero-canvas .home-chat-tool-btn,
.hero-canvas .home-chat-select {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 4px; /* 毛玻璃内小圆角例外 */
  color: #1A1A1A;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 1px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.hero-canvas .home-chat-tool-btn:hover,
.hero-canvas .home-chat-select:hover,
.hero-canvas .home-chat-select:focus {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(26, 26, 26, 0.3);
}

/* 创作按钮：毛玻璃面板内部先锋黑按钮（参考 dock-create） */
.hero-canvas .home-chat-send {
  background: #1A1A1A;
  color: #FFFFFF;
  border: none;
  border-radius: 6px; /* 毛玻璃内小圆角例外 */
  padding: 9px 28px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  background-image: linear-gradient(
    135deg,
    rgba(255,255,255,0.08) 0%,
    transparent 50%,
    rgba(255,255,255,0.04) 100%
  );
  transition: background-color 0.3s ease, transform 0.1s ease;
}
.hero-canvas .home-chat-send:hover {
  background-color: #000000;
}
.hero-canvas .home-chat-send:active {
  transform: scale(0.97);
}
.hero-canvas .home-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 960px) {
  .hero-canvas .home-chat-section {
    width: min(92%, 720px);
    bottom: 4%;
  }
  .creation-dock {
    bottom: calc(4% + 220px);
  }
}

@media (max-width: 640px) {
  .hero-canvas .home-chat-input {
    padding: 18px 20px 10px;
    font-size: 13px;
  }
  .hero-canvas .home-chat-toolbar {
    padding: 8px 14px 12px;
    flex-wrap: wrap;
  }
}

/* ── 任务面板品牌空态 ── */
.task-panel { position: relative; }
.task-panel-empty,
.center-brand-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:400px; text-align:center; transition:opacity 0.6s ease,transform 0.4s ease; }
.task-panel-empty.is-hidden,
.center-brand-empty.is-hidden { opacity:0; transform:scale(0.98); pointer-events:none; position:absolute; width:100%; }
.task-panel-empty h4,
.center-brand-empty h4 { font-family:'Cormorant Garamond',serif; font-size:42px; font-weight:200; letter-spacing:12px; color:#2D2D2D; margin:0; animation:logoBreath 4s ease-in-out infinite; }
.task-panel-empty p,
.center-brand-empty p { font-family:'Montserrat',sans-serif; font-size:11px; letter-spacing:4px; color:#999; text-transform:uppercase; margin-top:14px; }

/* ============================================================
   我的图库（/gallery） — V17 新增
   ============================================================ */
.gallery-page { gap: 18px; }

.gallery-header { gap: 14px; }
.gallery-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.gallery-header-row h2 { margin: 0; }

/* 上传按钮 */
.gallery-upload-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1px dashed #bbb;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #1A1A1A;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gallery-upload-btn:hover {
  border-color: #1A1A1A;
  background: #1A1A1A;
  color: #fff;
}

.gallery-search {
  flex: 0 0 280px;
  max-width: 320px;
}
.gallery-search input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-ring);
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #1A1A1A;
  transition: box-shadow 0.2s ease;
}
.gallery-search input:focus {
  outline: none;
  box-shadow: 0 0 0 1px #1A1A1A, var(--shadow-ring);
}
.gallery-filter-row {
  margin-bottom: 0;
  align-items: center;
}
.gallery-subtag-row {
  margin-top: 6px;
  margin-bottom: 0;
  gap: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.gallery-subtag-chip {
  font-size: 12px !important;
  padding: 4px 12px !important;
  border: 1px solid #EDEBE8 !important;
  background: #fafafa !important;
  color: #666 !important;
}
.gallery-subtag-chip.is-active {
  background: #1A1A1A !important;
  color: #fff !important;
  border-color: #1A1A1A !important;
}
.gallery-starred-chip .g-star-icon {
  display: inline-block;
  margin-right: 3px;
  font-size: 13px;
  vertical-align: -1px;
  color: #BFBFBF;
  transition: color 0.2s ease;
}
.gallery-starred-chip.is-active .g-star-icon { color: #1A1A1A; }

/* 4 列响应式网格 */
.gallery-grid-wrap {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
  min-height: 320px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 200px));
  gap: 14px;
  justify-content: start;
}
.gallery-loading,
/* 上传面板 */
.gallery-upload-panel {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.gallery-upload-dropzone {
  border: 2px dashed #d0d0d0;
  border-radius: var(--radius-sm);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-upload-dropzone.is-dragover,
.gallery-upload-dropzone:hover {
  border-color: #1A1A1A;
  background: #fafafa;
}
.gallery-upload-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
  color: #999;
}
.gallery-upload-placeholder p {
  margin: 4px 0;
  color: #666;
  font-size: 13px;
}
.gallery-upload-hint {
  font-size: 12px !important;
  color: #aaa !important;
}
.gallery-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.gallery-upload-preview-item {
  width: 80px;
  text-align: center;
}
.gallery-upload-preview-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}
.gallery-upload-preview-item span {
  display: block;
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-upload-options {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.gallery-upload-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.gallery-upload-tags {
  display: flex;
  gap: 6px;
}
.gallery-upload-tag-hint {
  font-size: 12px;
  color: #1A1A1A;
}
.gallery-upload-subtag-row {
  margin-top: 8px;
}
.gallery-upload-subtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gallery-upload-subtag {
  font-size: 12px !important;
  padding: 4px 12px !important;
  border: 1px solid #EDEBE8 !important;
  background: #fafafa !important;
  color: #666 !important;
  cursor: pointer;
}
.gallery-upload-subtag.is-active {
  background: #1A1A1A !important;
  color: #fff !important;
  border-color: #1A1A1A !important;
}
.gallery-upload-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.gallery-upload-cancel {
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: #666;
}
.gallery-upload-cancel:hover { background: #f5f5f5; }
.gallery-upload-submit {
  padding: 8px 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: #1A1A1A;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.gallery-upload-submit:hover { opacity: 0.85; }
.gallery-upload-submit:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 专属模特横向展示区 */
.gallery-model-section {
  margin-bottom: 20px;
}
.gallery-model-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.gallery-model-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1A1A1A;
}
.gallery-model-count {
  font-size: 12px;
  color: #999;
}
.gallery-model-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.gallery-model-strip::-webkit-scrollbar {
  height: 4px;
}
.gallery-model-strip::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 2px;
}
.gallery-model-card {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.gallery-model-card:hover {
  transform: translateY(-2px);
}
.gallery-model-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #f0f0f0;
  transition: border-color 0.15s;
}
.gallery-model-card:hover img {
  border-color: #1A1A1A;
}
.gallery-model-name {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 过期提醒条 */
.gallery-expiry-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: #F0EEEB;
  border: 1px solid #EDEBE8;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #2D2D2D;
}
.gallery-expiry-text {
  flex: 1;
}
.gallery-expiry-renew {
  flex-shrink: 0;
  padding: 5px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: #1A1A1A;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.gallery-expiry-renew:hover {
  background: #000000;
}
.gallery-expiry-renew:disabled {
  opacity: 0.6;
  cursor: default;
}

/* 迷你模态弹窗（改标签 / 重命名） */
.gallery-mini-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gmmoFadeIn 0.15s ease;
}
@keyframes gmmoFadeIn { from { opacity: 0; } to { opacity: 1; } }
.gallery-mini-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: 24px 28px;
  min-width: 280px;
  max-width: 360px;
  width: 90vw;
  animation: gmmoSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes gmmoSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.gallery-mini-modal-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: #1A1A1A;
}
.gallery-mini-modal-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gallery-mini-tag-chip {
  font-size: 13px !important;
  padding: 8px 20px !important;
  border: 1px solid #EDEBE8 !important;
  background: #fafafa !important;
  color: #555 !important;
  cursor: pointer;
  transition: all 0.12s ease;
}
.gallery-mini-tag-chip:hover {
  border-color: #1A1A1A !important;
  color: #1A1A1A !important;
}
.gallery-mini-tag-chip.is-active {
  background: #1A1A1A !important;
  color: #fff !important;
  border-color: #1A1A1A !important;
}
.gallery-mini-modal-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1A1A1A;
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.gallery-mini-modal-input:focus {
  border-color: #1A1A1A;
  box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.08);
  background: #fff;
}
.gallery-mini-modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.gallery-mini-modal-save {
  padding: 8px 24px;
  border: none;
  border-radius: 8px;
  background: #1A1A1A;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.gallery-mini-modal-save:hover { opacity: 0.85; }
.gallery-mini-modal-save:disabled { opacity: 0.4; cursor: default; }

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 60px 0;
}

/* 图片卡片：容器固定 200×200，内部图片 contain 不裁切 */
.gallery-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 200px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px,
    rgba(0, 0, 0, 0.08) 0px 8px 16px -4px;
}
.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}
.gallery-card-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-card-name .gc-meta {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 1px;
}
.gallery-card-star {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  color: #1A1A1A;
  font-size: 12px;
  pointer-events: none;
}
.gallery-card:not(.is-starred) .gallery-card-star { display: none; }
.gallery-card-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.5px;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

/* hover 操作浮层 */
.gallery-card-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-card:hover .gallery-card-actions { opacity: 1; }
.gallery-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #1A1A1A;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  font-family: inherit;
}
.gallery-action-btn:hover {
  background: #fff;
  transform: scale(1.05);
}
.gallery-action-btn.is-starred { color: #1A1A1A; }

/* 分页 */
.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-height: 32px;
}
.gallery-pagination:empty { display: none; }
.gallery-page-btn {
  padding: 4px 10px;
  background: transparent;
  border: none;
  color: #BFBFBF;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, background 0.2s ease;
}
.gallery-page-btn:hover { color: #1A1A1A; }
.gallery-page-btn.is-active {
  color: #1A1A1A;
  background: #F0EEEB;
  font-weight: 600;
}
.gallery-page-btn[disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* 存储进度条 */
.gallery-quota {
  padding: 14px 18px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.gallery-quota-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.gallery-quota-text { color: #1A1A1A; font-weight: 500; }
.gallery-quota-bar {
  height: 6px;
  background: #F0EEEB;
  border-radius: 3px;
  overflow: hidden;
}
.gallery-quota-fill {
  height: 100%;
  background: linear-gradient(90deg, #1A1A1A, #444);
  border-radius: inherit;
  transition: width 0.4s ease;
}
.gallery-quota-fill.is-warn {
  background: linear-gradient(90deg, #999999, #BFBFBF);
}
.gallery-quota-fill.is-danger {
  background: linear-gradient(90deg, #C45C5C, #d06060);
}

/* 响应式：窄屏降列（列宽上限 280px 全程保持） */
@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 200px)); }
}
@media (max-width: 820px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 200px)); }
  .gallery-header-row { flex-direction: column; align-items: flex-start; }
  .gallery-upload-btn { width: 100%; }
  .gallery-search { flex-basis: auto; width: 100%; max-width: none; }
  .gallery-model-card { width: 76px; }
  .gallery-model-card img { width: 76px; height: 76px; }
  .gallery-upload-options { flex-direction: column; align-items: flex-start; }
}
@keyframes logoBreath { 0%,100%{opacity:0.3} 50%{opacity:0.8} }

/* ============================================================
   工具页图库选图按钮 + 半屏模态 — V17 新增
   ============================================================ */

/* upload box 右上角"从图库选"小按钮（JS 注入） */
.mp-upload-box {
  /* 保证绝对定位子元素的参考系 */
  position: relative;
}
.mp-upload-gallery-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 4px 9px;
  font-size: 11px;
  font-family: inherit;
  line-height: 1.4;
  color: #1A1A1A;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.mp-upload-gallery-btn:hover {
  background: #1A1A1A;
  color: #fff;
  transform: translateY(-1px);
}
/* 上传态隐藏：避免与预览图的 ✕ 按钮冲突 */
.mp-upload-box[data-uploaded] .mp-upload-gallery-btn {
  display: none;
}

/* ─── 半屏模态面板 ─────────────────────────────── */
.gallery-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gallery-picker-overlay.is-open {
  display: flex;
  opacity: 1;
}

.gallery-picker-panel {
  width: 90vw;
  max-width: 960px;
  height: 60vh;
  max-height: 640px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.gallery-picker-overlay.is-open .gallery-picker-panel {
  transform: translateY(0);
}

.gallery-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #F0EEEB;
}
.gallery-picker-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1A1A1A;
  letter-spacing: 0.5px;
}
.gallery-picker-close {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
.gallery-picker-close:hover {
  background: #F0EEEB;
  color: #1A1A1A;
}

.gallery-picker-filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #F7F6F4;
}
.gallery-picker-subtags {
  display: flex;
  gap: 6px;
  padding: 6px 20px 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #F7F6F4;
}
.gallery-picker-subtag-chip {
  font-size: 12px !important;
  padding: 3px 10px !important;
  border: 1px solid #EDEBE8 !important;
  background: #fafafa !important;
  color: #666 !important;
}
.gallery-picker-subtag-chip.is-active {
  background: #1A1A1A !important;
  color: #fff !important;
  border-color: #1A1A1A !important;
}

.gallery-picker-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px 20px;
  overflow-y: auto;
  align-content: start;
}

.gallery-picker-loading,
.gallery-picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #999;
  font-size: 13px;
  padding: 60px 0;
}

.gallery-picker-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #F7F6F4;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gallery-picker-card:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px,
    rgba(0, 0, 0, 0.1) 0px 6px 12px -2px;
}
.gallery-picker-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}
.gallery-picker-card .gpk-star {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  color: #1A1A1A;
  font-size: 10px;
}
.gallery-picker-card .gpk-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 5px 7px 6px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 响应式 */
@media (max-width: 820px) {
  .gallery-picker-panel {
    width: 100vw;
    height: 80vh;
    max-height: none;
    border-radius: 12px 12px 0 0;
  }
  .gallery-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px 14px 16px;
  }
  .mp-upload-gallery-btn {
    font-size: 10px;
    padding: 3px 7px;
  }
}

/* ============================================================
   AI 智能抠图（bg-remove）
   ============================================================ */

/* 上传区固定高度 */
.bgr-upload-box {
    height: 240px;
}

/* 背景色选项 */
.bgr-color-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.bgr-bg-chip {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    color: #2D2D2D;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.bgr-bg-chip:hover {
    border-color: #BFBFBF;
}

.bgr-bg-chip.is-active {
    border-color: #1A1A1A;
    box-shadow: 0 0 0 1px #1A1A1A;
    background: #1A1A1A;
    color: #fff;
}

/* chip 图标区 + 文字区 */
.bgr-chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #F0EFED;
    border-right: 1px solid #EDEBE8;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.bgr-bg-chip.is-active .bgr-chip-icon {
    background: rgba(255, 255, 255, 0.1);
    border-right-color: rgba(255, 255, 255, 0.15);
}

.bgr-chip-label {
    padding: 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 透明棋盘格图案 */
.bgr-checker {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.bgr-bg-chip.is-active .bgr-checker {
    background-image:
        linear-gradient(45deg, #666 25%, transparent 25%),
        linear-gradient(-45deg, #666 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #666 75%),
        linear-gradient(-45deg, transparent 75%, #666 75%);
}

/* 色块小方块 */
.bgr-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
}

/* 自定义取色器 */
.bgr-custom-color {
    width: 20px;
    height: 20px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: none;
}

/* 输出格式 / 抠图精度 — 通用选项行 */
.bgr-option-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.bgr-option-row .mp-chip {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 8px 0;
    border: 1px solid #EDEBE8;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.bgr-option-row .mp-chip:hover {
    border-color: #BFBFBF;
    background: transparent;
}

.bgr-option-row .mp-chip.is-active {
    border-color: #1A1A1A;
    box-shadow: 0 0 0 1px #1A1A1A;
}

.bgr-fmt-hint,
.bgr-quality-hint {
    margin-top: 6px;
    font-size: 11px;
    color: #BFBFBF;
    line-height: 1.5;
}

/* 生成按钮 — 金属光泽渐变 */
.bgr-gen-btn {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 40%, #2D2D2D 70%, #1A1A1A 100%) !important;
    background-size: 200% 200% !important;
}

.bgr-gen-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 30%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 70%,
        transparent 100%
    );
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.bgr-gen-btn:hover::after {
    left: 120%;
}

.bgr-gen-btn:disabled::after {
    display: none;
}

/* Before/After 对比区域 — 紧凑并排 */
.bgr-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.bgr-compare-item {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bgr-compare-item:first-child {
    border-right: 1px solid #EDEBE8;
    padding-right: 12px;
}

.bgr-compare-item:last-child {
    padding-left: 12px;
}

.bgr-compare-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: #BFBFBF;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.bgr-compare-img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
}

/* 棋盘格底纹容器 — 原图和结果图都加 */
.bgr-img-wrap {
    position: relative;
    overflow: hidden;
    background-color: #FAFAF8;
    background-image:
        linear-gradient(45deg, #EEEDEB 25%, transparent 25%),
        linear-gradient(-45deg, #EEEDEB 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #EEEDEB 75%),
        linear-gradient(-45deg, transparent 75%, #EEEDEB 75%);
    background-size: 14px 14px;
    background-position: 0 0, 0 7px, 7px -7px, -7px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* 结果侧棋盘格对比度更强 */
.bgr-compare-item:last-child .bgr-img-wrap {
    background-color: #F5F5F3;
    background-image:
        linear-gradient(45deg, #E8E7E4 25%, transparent 25%),
        linear-gradient(-45deg, #E8E7E4 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #E8E7E4 75%),
        linear-gradient(-45deg, transparent 75%, #E8E7E4 75%);
}

/* 下载按钮 — hover 从底部浮现 */
.bgr-download-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 0;
    background: rgba(26, 26, 26, 0.85);
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.bgr-img-wrap:hover .bgr-download-btn {
    transform: translateY(0);
    opacity: 1;
}

.bgr-download-btn:hover {
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
}

/* 加载中 — 呼吸骨架动画 */
@keyframes bgr-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes bgr-breathe {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.bgr-loading {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.bgr-loading-pane {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bgr-loading-pane:first-child {
    border-right: 1px solid #EDEBE8;
    padding-right: 12px;
}

.bgr-loading-label {
    width: 64px;
    height: 10px;
    background: #E8E7E4;
    animation: bgr-breathe 1.8s ease-in-out infinite;
}

.bgr-loading-skel {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: linear-gradient(110deg, #F0EFED 30%, #E8E7E4 50%, #F0EFED 70%);
    background-size: 200% 100%;
    animation: bgr-shimmer 1.6s ease-in-out infinite;
}

.bgr-loading-pane:last-child .bgr-loading-skel {
    animation-delay: 0.3s;
}

/* 空态 */
.bgr-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #999;
}

.bgr-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.bgr-empty-title {
    font-size: 18px;
    color: #2D2D2D;
    font-weight: 500;
    margin-bottom: 8px;
}

.bgr-empty-desc {
    font-size: 13px;
    color: #999;
}

/* 历史记录 */
.bgr-history-item {
    position: relative;
    margin-bottom: 8px;
    overflow: hidden;
    background-color: #F5F5F3;
    background-image:
        linear-gradient(45deg, #EAE9E6 25%, transparent 25%),
        linear-gradient(-45deg, #EAE9E6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #EAE9E6 75%),
        linear-gradient(-45deg, transparent 75%, #EAE9E6 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.bgr-history-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.bgr-history-dl {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 0;
    background: rgba(26, 26, 26, 0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    text-decoration: none;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.bgr-history-item:hover .bgr-history-dl {
    transform: translateY(0);
    opacity: 1;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .bgr-compare,
    .bgr-loading {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .bgr-compare-item:first-child {
        border-right: none;
        border-bottom: 1px solid #EDEBE8;
        padding-right: 0;
        padding-bottom: 12px;
    }
    .bgr-compare-item:last-child {
        padding-left: 0;
    }
    .bgr-loading-pane:first-child {
        border-right: none;
        padding-right: 12px;
    }
    /* 触屏设备始终显示下载条 */
    .bgr-download-btn,
    .bgr-history-dl {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================
   AI 商品文案（product-copy）
   ============================================================ */

/* 上传区 */
.pcp-upload-box {
    height: 160px;
}

/* 输入框 */
.pcp-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    font-size: 13px;
    color: #2D2D2D;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pcp-input:focus {
    border-color: #1A1A1A;
}

.pcp-input::placeholder {
    color: #BFBFBF;
}

/* 平台分组 */
.pcp-platform-group {
    margin-top: 4px;
}

.pcp-group-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: #BFBFBF;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.pcp-chip-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pcp-platform-chip,
.pcp-lang-chip {
    padding: 6px 14px;
    font-size: 12px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    color: #2D2D2D;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pcp-platform-chip:hover,
.pcp-lang-chip:hover {
    border-color: #BFBFBF;
    background: transparent;
}

.pcp-platform-chip.is-active,
.pcp-lang-chip.is-active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
}

/* 生成按钮 */
.pcp-gen-btn {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 40%, #2D2D2D 70%, #1A1A1A 100%) !important;
    background-size: 200% 200% !important;
}

.pcp-gen-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 70%, transparent 100%);
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.pcp-gen-btn:hover::after {
    left: 120%;
}

.pcp-gen-btn:disabled::after {
    display: none;
}

/* 空态 */
.pcp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #999;
}

.pcp-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.pcp-empty-title {
    font-size: 18px;
    color: #2D2D2D;
    font-weight: 500;
    margin-bottom: 8px;
}

.pcp-empty-desc {
    font-size: 13px;
    color: #999;
}

/* 加载态 */
.pcp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 20px;
}

.pcp-loading-bar {
    width: 120px;
    height: 3px;
    background: #EDEBE8;
    position: relative;
    overflow: hidden;
}

.pcp-loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #1A1A1A;
    animation: pcp-slide 1.2s ease-in-out infinite;
}

@keyframes pcp-slide {
    0% { left: -40%; }
    100% { left: 100%; }
}

.pcp-loading-text {
    font-size: 13px;
    color: #999;
    letter-spacing: 1px;
}

/* 结果区 Tab 栏 */
.pcp-result {
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 24px;
}

.pcp-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #EDEBE8;
    margin-bottom: 20px;
}

.pcp-tab {
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    color: #999;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-transform: uppercase;
}

.pcp-tab:hover {
    color: #2D2D2D;
}

.pcp-tab.is-active {
    color: #1A1A1A;
    border-bottom-color: #1A1A1A;
    font-weight: 500;
}

/* 结果面板 */
.pcp-panel {
    display: none;
}

.pcp-panel.is-active {
    display: block;
    animation: pcp-fadeIn 0.25s ease;
}

@keyframes pcp-fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 标题卡片（多标题） */
.pcp-title-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 12px 16px;
    border: 1px solid #F0F0F0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    position: relative;
}
.pcp-title-card:last-child { margin-bottom: 0; }
.pcp-title-card:hover {
    border-color: #D0D0D0;
    transform: translateY(-1px);
}
.pcp-title-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}
.pcp-title-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}
.pcp-title-card .pcp-copy-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    margin-top: 0;
    padding: 4px 12px;
    font-size: 12px;
    color: #ccc;
    border: none;
    background: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pcp-title-card:hover .pcp-copy-btn { opacity: 1; }

/* 顶部操作栏 */
.pcp-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; margin-bottom: 12px; border-bottom: 1px solid #F0F0F0;
}
.pcp-toolbar-title { font-size: 15px; font-weight: 600; color: #1A1A1A; }
.pcp-toolbar-actions { display: flex; gap: 8px; }
.pcp-toolbar-btn {
    padding: 6px 16px; font-size: 13px; border-radius: 6px; cursor: pointer;
    border: 1px solid #E0E0E0; background: #fff; color: #333; transition: all 0.2s ease;
}
.pcp-toolbar-btn:hover { border-color: #1A1A1A; color: #1A1A1A; }

.pcp-result-title {
    font-size: 20px;
    font-weight: 500;
    color: #1A1A1A;
    line-height: 1.6;
    margin: 0 0 16px;
}

/* 卖点列表 */
.pcp-sp-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F5F4F2;
    font-size: 14px;
    color: #2D2D2D;
    line-height: 1.6;
}

.pcp-sp-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1A1A1A;
    color: #fff;
    font-size: 11px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* 详情文本 */
.pcp-desc-text {
    font-size: 14px;
    color: #2D2D2D;
    line-height: 1.8;
    margin: 0;
}

/* 关键词标签 */
.pcp-kw-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pcp-kw-tag {
    padding: 6px 14px;
    background: #F5F4F2;
    color: #2D2D2D;
    font-size: 13px;
    border: 1px solid #EDEBE8;
}

/* 社媒文案 */
.pcp-social-text {
    font-size: 14px;
    color: #2D2D2D;
    line-height: 1.8;
    margin: 0;
}

/* 复制按钮 */
.pcp-copy-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 20px;
    background: none;
    border: 1px solid #1A1A1A;
    color: #1A1A1A;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.pcp-copy-btn:hover {
    background: #1A1A1A;
    color: #fff;
}

/* 原始文本 fallback */
.pcp-raw-text {
    font-size: 13px;
    color: #2D2D2D;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    padding: 16px;
    background: #FAFAF8;
    border: 1px solid #EDEBE8;
}

/* 历史记录 */
.pcp-history-item {
    padding: 12px;
    border-bottom: 1px solid #F5F4F2;
    cursor: pointer;
    transition: background 0.15s ease;
}

.pcp-history-item:hover {
    background: #FAFAF8;
}

.pcp-history-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: #BFBFBF;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pcp-history-title {
    font-size: 13px;
    color: #2D2D2D;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式 */
@media (max-width: 768px) {
    .pcp-tab {
        padding: 8px 12px;
        font-size: 10px;
    }
    .pcp-result {
        padding: 12px;
    }
}

/* ============================================================
   图生视频 — 快速/高清模式选择
   ============================================================ */
.mv-mode-chips {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.mv-mode-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    color: #2D2D2D;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mv-mode-chip:hover {
    border-color: #BFBFBF;
}

.mv-mode-chip.is-active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
    box-shadow: 0 0 0 1px #1A1A1A;
}

.mv-mode-icon {
    font-size: 18px;
}

.mv-mode-sub {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.65;
    letter-spacing: 0.5px;
}

/* 视频描述文本框 */
.mv-prompt-textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    font-size: 13px;
    color: #2D2D2D;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

/* 中间区域：视频播放 + 空态 */
.mv-result-area {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf9f7;
}

.mv-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.mv-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.mv-empty-title {
    font-size: 18px;
    color: #2D2D2D;
    font-weight: 500;
    margin-bottom: 8px;
}

.mv-empty-desc {
    font-size: 13px;
    color: #999;
}

/* model-video 右侧历史记录 */
.mv-history {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}
.mv-history-card {
    background: #FAFAF8;
    border: 1px solid #EDEBE8;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.mv-history-card:hover {
    border-color: #BFBFBF;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.mv-history-video {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    max-height: 120px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mv-history-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.mv-history-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.mv-history-card:hover .mv-history-play {
    opacity: 1;
}
.mv-history-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mv-history-title {
    font-size: 12px;
    color: #2D2D2D;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mv-history-time {
    font-size: 11px;
    color: #999;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px;
}
.mv-history-loading {
    flex-direction: column;
    gap: 8px;
    color: #999;
    font-size: 12px;
}
.mv-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #EDEBE8;
    border-top-color: #1A1A1A;
    border-radius: 50%;
    animation: mv-spin 0.8s linear infinite;
}
@keyframes mv-spin {
    to { transform: rotate(360deg); }
}
.mv-history-error {
    color: #999;
    font-size: 12px;
}

/* 中间主区域视频播放器 */
.mv-fullplayer,
.mv-result-area video {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    background: #faf9f7;
    border-radius: 8px;
}
video:fullscreen,
video:-webkit-full-screen {
    object-fit: contain;
    background: transparent;
}

/* 积分显示 */
.mv-cost-display {
    font-size: 12px;
    color: #888;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.mv-prompt-textarea:focus {
    border-color: #1A1A1A;
}

.mv-prompt-textarea::placeholder {
    color: #BFBFBF;
}

/* 视频比例选择 */
.mv-ratio-chips {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.mv-ratio-chip {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    color: #2D2D2D;
    cursor: pointer;
    font-size: 12px;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mv-ratio-chip:hover {
    border-color: #BFBFBF;
}

.mv-ratio-chip.is-active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
    box-shadow: 0 0 0 1px #1A1A1A;
}

.mv-ratio-icon {
    font-size: 16px;
    line-height: 1;
}

/* 提示词增强开关 */
.mv-enhance-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 12px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    transition: border-color 0.2s ease;
}

.mv-enhance-toggle:hover {
    border-color: #BFBFBF;
}

.mv-enhance-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1A1A1A;
    cursor: pointer;
}

.mv-enhance-label {
    font-size: 13px;
    color: #2D2D2D;
    font-weight: 500;
}

.mv-enhance-hint {
    width: 100%;
    font-size: 11px;
    color: #BFBFBF;
    line-height: 1.4;
    margin-top: -2px;
}

/* 生成按钮样式 */
.mv-gen-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 40%, #2D2D2D 70%, #1A1A1A 100%) !important;
    background-size: 200% 200% !important;
}

.mv-gen-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 70%, transparent 100%);
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.mv-gen-btn:hover::after {
    left: 120%;
}

.mv-gen-btn:disabled::after {
    display: none;
}

/* ================================================================
   社媒素材生成（sm-）
   ================================================================ */

/* 上传网格：3槽横排 */
.sm-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sm-upload-box {
    height: 120px;
    font-size: 12px;
}

/* chip 组标签 */
.sm-group-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: #BFBFBF;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* chip 行 */
.sm-platform-chips,
.sm-type-chips,
.sm-style-chips,
.sm-count-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* chip 默认态：浅色边框底 */
.sm-platform-chip,
.sm-type-chip,
.sm-style-chip,
.sm-count-chip {
    padding: 6px 14px;
    font-size: 12px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    color: #2D2D2D;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sm-platform-chip:hover,
.sm-type-chip:hover,
.sm-style-chip:hover,
.sm-count-chip:hover {
    border-color: #BFBFBF;
    background: transparent;
}

/* chip 选中态：黑底白字 */
.sm-platform-chip.is-active,
.sm-type-chip.is-active,
.sm-style-chip.is-active,
.sm-count-chip.is-active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
}

/* 营销文案输入框 */
.sm-copy-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    font-size: 13px;
    color: #2D2D2D;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.sm-copy-input:focus {
    border-color: #1A1A1A;
}

.sm-copy-input::placeholder {
    color: #BFBFBF;
}

/* 社媒素材：尺寸比例由平台决定，隐藏手动选择 */
[data-tool="social-media"] .mp-aspect-block { display: none; }

/* 生成按钮 */
.sm-gen-btn {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 40%, #2D2D2D 70%, #1A1A1A 100%) !important;
    background-size: 200% 200% !important;
}

.sm-gen-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 70%, transparent 100%);
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.sm-gen-btn:hover::after {
    left: 120%;
}

.sm-gen-btn:disabled::after {
    display: none;
}

/* 加��态 */
.sm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
}

.sm-loading-bar {
    width: 200px;
    height: 3px;
    background: #F0F0EC;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.sm-loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #1A1A1A;
    border-radius: 2px;
    animation: smLoadSlide 1.2s ease-in-out infinite;
}

@keyframes smLoadSlide {
    0%   { left: -40%; }
    100% { left: 100%; }
}

.sm-loading-text {
    font-size: 13px;
    color: #999;
}

/* 结果展示 */
.sm-result {
    padding: 16px;
}

.sm-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.sm-result-card {
    border: 1px solid #EDEBE8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.sm-result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sm-result-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #F5F5F3;
}

.sm-result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sm-download-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 4px 12px;
    font-size: 11px;
    background: rgba(26,26,26,0.85);
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sm-result-card:hover .sm-download-btn {
    opacity: 1;
}

.sm-result-label {
    padding: 8px 12px;
    font-size: 12px;
    color: #666;
}

/* 失败占位卡片 */
.sm-result-failed {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #FAFAF8;
}
.sm-failed-placeholder {
    font-size: 13px;
    color: #999;
    text-align: center;
}

/* 结果文案区 */
.sm-result-copy {
    border-top: 1px solid #EDEBE8;
    padding-top: 16px;
}

.sm-result-copy-title {
    font-size: 13px;
    font-weight: 600;
    color: #2D2D2D;
    margin-bottom: 8px;
}

.sm-result-copy-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.sm-copy-btn {
    padding: 6px 16px;
    font-size: 12px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    color: #2D2D2D;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sm-copy-btn:hover {
    border-color: #1A1A1A;
    background: #1A1A1A;
    color: #fff;
}

/* 空态描述 */
.sm-empty-desc {
    font-size: 13px;
    color: #999;
    margin-top: 8px;
}

/* 历史记录 */
.sm-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0EC;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sm-history-item:hover {
    background: #FAFAF8;
}

.sm-history-thumb {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

.sm-history-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    background: #F0F0EC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.sm-history-label {
    font-size: 12px;
    color: #666;
}

/* ================================================================
   专属模特 · 创建形象（em-）— 线性步骤流 + 模式切换
   ================================================================ */

/* 模式切换 */
.em-mode-switch {
    display: flex;
    gap: 8px;
}

.em-mode-chip {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #EDEBE8;
    background: #FAFAF8;
    color: #2D2D2D;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.em-mode-chip:hover {
    border-color: #BFBFBF;
}

.em-mode-chip.is-active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
}

/* 步骤流 */
.em-step {
    margin-bottom: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid #EDEBE8;
    margin-top: 24px;
}

.em-step:last-of-type {
    border-bottom: none;
}

.em-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.em-step-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1A1A1A;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.em-step-label {
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
    letter-spacing: 0.5px;
}

/* 折叠态 */
.em-step-collapsed .em-step-body {
    display: none;
}

.em-step-collapsed .em-step-num {
    background: #EDEBE8;
    color: #999;
}

.em-step-collapsed .em-step-label {
    color: #999;
}

/* 展开动画 */
.em-step-body {
    animation: emStepReveal 0.3s ease;
}

@keyframes emStepReveal {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* chip 行 */
.em-chip-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 服装上传框 */
.em-garment-upload {
    height: 160px;
}

/* 预设模特网格 */
.em-model-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.em-model-card {
    cursor: pointer;
    border: 2px solid #EDEBE8;
    background: #FAFAF8;
    padding: 8px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.em-model-card:hover {
    border-color: #BFBFBF;
}

.em-model-card.is-active {
    border-color: #1A1A1A;
    background: #fff;
}

.em-model-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #F0EEEB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #999;
    margin-bottom: 6px;
    overflow: hidden;
}

.em-model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.em-model-card.is-active .em-model-thumb img {
    opacity: 1;
}

.em-model-card:hover .em-model-thumb img {
    opacity: 0.9;
}

.em-model-card.is-active .em-model-thumb {
    color: #1A1A1A;
}

.em-model-name {
    font-size: 11px;
    color: #666;
}

.em-model-card.is-active .em-model-name {
    color: #1A1A1A;
    font-weight: 500;
}

.em-model-custom {
    padding: 0;
}

.em-model-custom .mp-upload-box {
    font-size: 12px;
}

/* 空态描述 */
.em-empty-desc {
    font-size: 13px;
    color: #999;
    margin-top: 8px;
}

/* 生成按钮 */
.em-gen-btn {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 40%, #2D2D2D 70%, #1A1A1A 100%) !important;
    background-size: 200% 200% !important;
}

.em-gen-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 70%, transparent 100%);
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.em-gen-btn:hover::after {
    left: 120%;
}

.em-gen-btn:disabled::after {
    display: none;
}

/* 历史记录 */
.em-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0EC;
    cursor: pointer;
}

.em-history-item:hover {
    background: #FAFAF8;
}

/* AI 智能描述按钮 */
.em-ai-desc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #1A1A1A;
    background: #F7F6F4;
    border: 1px solid #EDEBE8;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.3px;
}

.em-ai-desc-btn::before {
    content: '✦';
    font-size: 11px;
    color: #999;
    transition: color 0.2s ease;
}

.em-ai-desc-btn:hover {
    background: #EDEBE8;
    border-color: #BFBFBF;
}

.em-ai-desc-btn:hover::before {
    color: #1A1A1A;
}

.em-ai-desc-btn.is-loading {
    pointer-events: none;
    color: #999;
    background: #FAFAF8;
}

.em-ai-desc-btn.is-loading::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #EDEBE8;
    border-top-color: #1A1A1A;
    animation: emAiSpin 0.6s linear infinite;
}

@keyframes emAiSpin {
    to { transform: rotate(360deg); }
}

/* 我的专属模特区域 */
.em-my-models {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #EDEBE8;
}

.em-my-models-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.em-my-model-card {
    cursor: pointer;
    border: 2px solid #EDEBE8;
    background: #FAFAF8;
    padding: 8px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    position: relative;
}

.em-my-model-card::after {
    content: '★';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 10px;
    color: #1A1A1A;
}

.em-my-model-card:hover {
    border-color: #BFBFBF;
}

.em-my-model-card.is-active {
    border-color: #1A1A1A;
    background: #fff;
}

.em-my-model-card .em-model-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    margin-bottom: 6px;
}

.em-my-model-card .em-model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 色彩变体控件 */
.em-color-variant-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.em-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #1A1A1A;
}

.em-toggle-input {
    display: none;
}

.em-toggle-switch {
    width: 36px;
    height: 20px;
    background: #EDEBE8;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.em-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    transition: transform 0.2s ease;
}

.em-toggle-input:checked + .em-toggle-switch {
    background: #1A1A1A;
}

.em-toggle-input:checked + .em-toggle-switch::after {
    transform: translateX(16px);
}

.em-color-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.em-color-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-size: 12px;
}

/* 锁定模特按钮（预览弹窗） */
.hc-preview-lock {
    display: inline-block;
    padding: 10px 32px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Noto Serif SC', '宋体', Georgia, serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hc-preview-lock:hover {
    background: #fff;
    color: #171717;
    border-color: #fff;
}

.hc-preview-lock:disabled {
    opacity: 0.6;
    cursor: default;
}

/* 批量服装上传 */
.em-batch-garment {
    margin-top: 10px;
}

.em-batch-garment-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.em-batch-thumb {
    width: 64px;
    height: 80px;
    position: relative;
    border: 1px solid #EDEBE8;
    overflow: hidden;
}

.em-batch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.em-batch-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.em-batch-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

.em-batch-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.em-batch-add-btn:hover {
    color: #1A1A1A;
}

/* 尺码对比 */
.em-size-compare-chips {
    margin-top: 8px;
}

.em-size-chip.is-active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
}

/* 改款 · 自由选区面板 */
.rd-freeform-canvas-wrap {
    position: relative;
    background: #F0EEEB;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.rd-freeform-canvas-wrap canvas {
    max-width: 100%;
    cursor: crosshair;
}

.rd-freeform-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.rd-region-mode-chip.is-active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
}

/* 居中 toast 弹窗 */
.yn-toast-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.yn-toast-card {
    background: #fff;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    max-width: 360px;
    animation: ynToastIn 0.25s ease;
}

@keyframes ynToastIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.yn-toast-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.yn-toast-ok {
    background: #F0FAF0;
    color: #4a7c59;
    border: 2px solid #cde6ca;
}

.yn-toast-err {
    background: #FFF5F5;
    color: #c14545;
    border: 2px solid #ffd6d6;
}

.yn-toast-msg {
    font-size: 14px;
    color: #2D2D2D;
    line-height: 1.6;
    word-break: break-word;
}

/* ================================================================
   服装套图 (garment-suite)
   ================================================================ */

/* 模式切换 */
.gs-mode-switch { padding-bottom: 0; }
.gs-mode-tabs {
    display: flex;
    gap: 0;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    overflow: hidden;
}
.gs-mode-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: #FAFAFA;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all .2s;
}
.gs-mode-tab.is-active {
    background: #171717;
    color: #fff;
}
.gs-mode-tab.is-disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #F5F5F5;
}

/* 产品图网格 */
.gs-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.gs-product-slot .gs-upload-box {
    width: 100%;
    min-height: 100px;
    aspect-ratio: 1;
}

/* 模特图区域 */
.gs-model-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}
.gs-model-box {
    width: 100%;
    min-height: 140px;
}
.gs-ai-gen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: rgba(255,255,255,.9);
    color: #999;
    cursor: not-allowed;
    backdrop-filter: blur(4px);
}

/* 组图要求 */
.gs-requirements {
    min-height: 100px;
    resize: vertical;
}

/* 参数行 */
.gs-params-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.gs-param-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gs-param-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}
.gs-select {
    padding: 8px 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #333;
    cursor: pointer;
}
.gs-select:focus {
    border-color: #171717;
    outline: none;
}

/* 生成按钮 */
.gs-gen-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}

/* 结果区域 */
.gs-result-area {
    min-height: 400px;
}
.gs-empty-desc {
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-top: 16px;
}
.gs-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 8px;
}
.gs-result-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #171717;
    margin: 0;
}
.gs-batch-download {
    padding: 6px 16px;
    font-size: 13px;
}

/* 瀑布流 */
.gs-waterfall {
    column-count: 2;
    column-gap: 12px;
    padding: 12px 20px 20px;
}
.gs-result-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #F7F6F4;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.gs-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.gs-result-item img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

/* 灯箱 */
.gs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(8px);
    cursor: pointer;
    animation: gsFadeIn .2s ease;
}
@keyframes gsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.gs-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    cursor: default;
}
.gs-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.gs-lightbox-close:hover {
    background: rgba(255,255,255,.3);
}

/* 错误卡片 */
.gs-error-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    margin: 20px;
    border: 2px dashed #e53e3e;
    border-radius: 12px;
    background: #fff5f5;
}
.gs-error-icon {
    font-size: 36px;
    line-height: 1;
}
.gs-error-text {
    font-size: 13px;
    color: #e53e3e;
    text-align: center;
    line-height: 1.6;
    max-width: 300px;
    word-break: break-word;
}
.gs-retry-btn {
    padding: 8px 24px;
    font-size: 13px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .gs-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .gs-params-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .gs-waterfall {
        column-count: 1;
        padding: 8px 12px;
    }
}

/* ================================================================
   多色白底图 (multi-color-whitebg)
   ================================================================ */
.mcw-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.mcw-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 2px solid #e0ded9;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    cursor: grab;
    user-select: none;
    transition: border-color .15s ease, transform .15s ease;
}
.mcw-item:hover { border-color: #1A1A1A; }
.mcw-item.is-dragging { opacity: .4; transform: scale(.98); }
.mcw-item.is-uploading { cursor: wait; }
.mcw-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.mcw-item-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #7e8cff;
    background: #fff;
}
.mcw-base-tag,
.mcw-order-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    pointer-events: none;
}
.mcw-base-tag { background: #1A1A1A; color: #fff; }
.mcw-order-tag { background: rgba(255,255,255,.92); color: #1A1A1A; border: 1px solid #e0ded9; }
.mcw-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease;
}
.mcw-item:hover .mcw-remove { opacity: 1; }
.mcw-add-box {
    aspect-ratio: 1 / 1;
    border: 2px dashed #d0cec9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    background: #fafafa;
    transition: border-color .15s ease, background .15s ease;
    text-align: center;
    padding: 8px;
}
.mcw-add-box:hover,
.mcw-add-box.is-dragover {
    border-color: #1A1A1A;
    background: #f4f3f0;
}
.mcw-add-plus {
    font-size: 36px;
    line-height: 1;
    color: #1A1A1A;
    font-weight: 300;
}
.mcw-add-label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}
.mcw-add-box small {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* 结果区 */
.mcw-result-area { padding: 24px; }
.mcw-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.mcw-result-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
}
.mcw-result-header h3 span { color: #7e8cff; font-weight: 500; font-size: 14px; }
.mcw-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.mcw-result-item {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #fafafa;
    border: 1px solid #e8e6e1;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mcw-result-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.mcw-result-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #bbb;
    font-size: 12px;
}
.mcw-spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #e8e6e1;
    border-top-color: #1A1A1A;
    animation: mcw-spin 0.9s linear infinite;
    display: inline-block;
}
@keyframes mcw-spin { to { transform: rotate(360deg); } }
.mcw-result-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,.92);
    color: #1A1A1A;
    border-radius: 4px;
    border: 1px solid #e0ded9;
}
.mcw-download {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    background: rgba(0,0,0,.6);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity .15s ease;
}
.mcw-result-item:hover .mcw-download { opacity: 1; }
.mcw-batch-download {
    font-size: 13px;
    padding: 6px 14px;
}
.mcw-empty-desc {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 12px;
}
.mcw-error-bar {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff2f0;
    color: #b00020;
    border: 1px solid #ffd4cf;
    border-radius: 4px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .mcw-upload-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
    .mcw-result-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
    .mcw-result-area { padding: 12px; }
}

/* ============================================================
   V27 基础详情图组样式（V27-STEP2-C）
   ============================================================ */

/* Tab 面板切换 */
.gs-tab-panel { display: none; }
.gs-tab-panel.gs-tab-active { display: block; }

/* 5 步进度条 */
.gsuite-stepper {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin: 0 0 20px; padding: 14px;
    background: #fff; border-radius: 12px; border: 1px solid #EEE;
}
.gsuite-stepper .step {
    display: flex; align-items: center; gap: 6px;
    color: #999; font-size: 13px;
}
.gsuite-stepper .step.active { color: #1A1A1A; font-weight: 600; }
.gsuite-stepper .step.done { color: #10B981; }
.gsuite-stepper .step-num {
    width: 22px; height: 22px; border-radius: 50%; background: #F0F0F0;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.gsuite-stepper .step.active .step-num { background: #1A1A1A; color: #fff; }
.gsuite-stepper .step.done .step-num { background: #10B981; color: #fff; }
.gsuite-stepper .step-divider { width: 40px; height: 1px; background: #E0E0E0; }

/* 响应式 */
@media (max-width: 768px) {
    .gsuite-stepper { flex-wrap: wrap; gap: 8px; }
    .gsuite-stepper .step-divider { display: none; }
}



.gsuite-stepper {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  padding: 12px 20px;

  margin: 0 0 16px 0;

  background: #fff;

  border: 1px solid #EEE;

  border-radius: 12px;

}

.btn-cost-wrap {

  font-size: 12px;

  opacity: 0.9;

}

.btn-cost {

  font-weight: 600;

}


/* 进度条步骤样式修正（修 AW 遗留）*/

.gsuite-stepper .step {

  display: flex;

  align-items: center;

  gap: 6px;

  font-size: 12px;

  color: #999;

  white-space: nowrap;

}

.gsuite-stepper .step-num {

  width: 22px;

  height: 22px;

  border-radius: 50%;

  background: #E0E0E0;

  color: #999;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  font-size: 12px;

  font-weight: 600;

  flex-shrink: 0;

}

.gsuite-stepper .step-label {

  color: inherit;

  font-size: 12px;

  line-height: 1;

}

.gsuite-stepper .step.active { color: #1A1A1A; font-weight: 600; }

.gsuite-stepper .step.active .step-num { background: #1A1A1A; color: #fff; }

.gsuite-stepper .step.done { color: #10B981; }

.gsuite-stepper .step.done .step-num { background: #10B981; color: #fff; }

.gsuite-stepper .step-divider {

  width: 40px;

  height: 1px;

  background: #E0E0E0;

  flex-shrink: 0;

}

/* AW 布局修复：基础详情图组模式下中间栏纵向排列 */
.mp-center-col.center-gsb-mode {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

/* ═══ 复合预览弹窗：对比 slider + 快捷入口 + 重编/重生 ═══ */
.compare-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  overflow: hidden;
}
.compare-close {
  position: absolute;
  top: 12px; right: 18px;
  background: none; border: none;
  color: #888;
  font-size: 30px; line-height: 1;
  cursor: pointer;
  z-index: 12;
  transition: color 0.2s;
}
.compare-close:hover { color: #fff; }

/* 顶部快捷入口 */
.compare-top-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 14px 20px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  justify-content: center;
  scrollbar-width: none;
}
.compare-top-actions::-webkit-scrollbar { display: none; }
.compare-shortcut-btn {
  flex: 0 0 auto;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #ccc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.compare-shortcut-btn:hover {
  background: #fff;
  color: #1A1A1A;
  border-color: #fff;
}

/* 中部对比区（v6：静态左右并排） */
.compare-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 90vw;
  height: 60vh;
  margin: 0 auto;
  min-height: 0;
  overflow: hidden;
}
.compare-side {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.compare-side img {
  max-width: 100%;
  max-height: calc(100% - 40px);
  object-fit: contain;
}
.compare-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 2;
}
.compare-divider {
  width: 1px;
  height: 80%;
  background: rgba(255, 255, 255, 0.3);
  align-self: center;
  flex-shrink: 0;
}

/* 底部操作按钮 */
.compare-bottom-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  padding: 12px 20px 18px;
  justify-content: center;
}
.compare-action-btn {
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  color: #ccc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.compare-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.compare-action-primary {
  background: #fff;
  color: #1A1A1A;
  border-color: #fff;
}
.compare-action-primary:hover {
  background: #e8e8e8;
  color: #1A1A1A;
}
.compare-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.compare-action-fav.is-favorited,
.compare-action-fav.favorited {
  color: #d4a017;
  border-color: #d4a017;
}
.compare-action-fav.is-loading {
  opacity: 0.5;
  pointer-events: none;
}
.compare-action-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  align-self: center;
  margin: 0 4px;
}

/* 响应式 */
@media (max-width: 960px) {
  .compare-top-actions {
    justify-content: flex-start;
    padding: 10px 12px 8px;
  }
  .compare-body { flex-direction: column; height: auto; min-height: 40vh; max-width: 96vw; }
  .compare-side { height: auto; }
  .compare-side img { max-height: 40vh; }
  .compare-divider { width: 80%; height: 1px; align-self: center; }
  .compare-bottom-actions { padding: 10px 12px 14px; flex-wrap: wrap; }
  .compare-action-btn { padding: 8px 16px; font-size: 12px; }
  .compare-action-divider { display: none; }
}


/* 自由创作激活后隐藏工具标签栏，避免布局重叠 */
body.is-home-chat-active .creation-dock { display: none; }

/* ══════════════════════════════════════════════════
   首页自由创作 — 浮窗集群
   ══════════════════════════════════════════════════ */

/* 浮窗容器 */
.hc-floats {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 12px;
  z-index: 1000;
}

/* 单个浮窗 */
.hc-float {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  color: #1A1A1A;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hc-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
}
.hc-float.is-active {
  background: #1A1A1A;
  color: #fff;
}
.hc-float.is-pending {
  animation: hcPulse 1.5s ease-in-out infinite;
}
@keyframes hcPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); }
  50% { box-shadow: 0 4px 20px rgba(26, 26, 26, 0.35); }
}

/* 浮窗预览气泡 */
.hc-float-preview {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #1A1A1A;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 160px;
  white-space: normal;
  word-break: break-all;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hc-float:hover .hc-float-preview {
  opacity: 1;
  transform: translateY(0);
}
.hc-float-preview::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 20px;
  border: 6px solid transparent;
  border-top-color: #1A1A1A;
}

/* 折叠按钮 */
.hc-float-stack {
  position: relative;
}
.hc-float-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #1A1A1A;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* 折叠列表 */
.hc-stack-list {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
  z-index: 1001;
  overflow: hidden;
}
.hc-stack-list-header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  border-bottom: 1px solid #f0f0f0;
}
.hc-stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: #1A1A1A;
  text-align: left;
  transition: background 0.15s ease;
}
.hc-stack-item:hover {
  background: #f7f6f4;
}
.hc-stack-item-delete {
  font-size: 16px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
}
.hc-stack-item-delete:hover {
  color: #e00;
}

/* ── 对话面板 ── */
.hc-panel {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 400px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  overflow: hidden;
}

.hc-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.hc-panel-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hc-panel-delete {
  background: none;
  border: none;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.hc-panel-delete:hover {
  color: #e00;
  background: rgba(255, 0, 0, 0.06);
}
.hc-panel-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.hc-panel-close:hover {
  color: #1A1A1A;
}

/* 消息区 */
.hc-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 120px;
}
.hc-panel-msg {
  margin-bottom: 16px;
}
.hc-panel-msg-user {
  text-align: right;
}
.hc-panel-msg-ai {
  text-align: left;
}
.hc-panel-msg-text {
  display: inline-block;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.hc-panel-msg-user .hc-panel-msg-text {
  background: #1A1A1A;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.hc-panel-msg-ai .hc-panel-msg-text {
  background: rgba(0, 0, 0, 0.05);
  color: #1A1A1A;
  border-bottom-left-radius: 4px;
}
.hc-panel-msg-error .hc-panel-msg-text {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}
.hc-panel-msg-images {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.hc-panel-msg-user .hc-panel-msg-images {
  justify-content: flex-end;
}
.hc-panel-msg-images img {
  max-width: 140px;
  max-height: 140px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
}

/* 加载动画 */
.hc-panel-loading .hc-dots span {
  animation: hcDotBlink 1.2s infinite;
}
.hc-dots span:nth-child(2) { animation-delay: 0.4s; }
.hc-dots span:nth-child(3) { animation-delay: 0.8s; }
@keyframes hcDotBlink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* 输入区 */
.hc-panel-input-wrap {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.hc-panel-file-preview {
  display: none;
  gap: 6px;
  padding: 8px 12px 0;
  flex-wrap: wrap;
}
.hc-panel-file-item {
  position: relative;
  width: 48px;
  height: 48px;
}
.hc-panel-file-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.hc-panel-file-del {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1A1A1A;
  color: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.hc-panel-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
}
.hc-panel-textarea {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  resize: none;
  outline: none;
  min-height: 36px;
  max-height: 80px;
  line-height: 1.4;
  background: #fff;
  transition: border-color 0.2s;
}
.hc-panel-textarea:focus {
  border-color: #1A1A1A;
}
.hc-panel-file-btn {
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.hc-panel-file-btn:hover {
  opacity: 1;
}
.hc-panel-send {
  background: #1A1A1A;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.hc-panel-send:hover {
  background: #000;
}
.hc-panel-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .hc-floats {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }
  .hc-float {
    width: 48px;
    height: 48px;
  }
  .hc-panel {
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 100vh;
    border-radius: 16px 16px 0 0;
  }
  .hc-stack-list {
    right: 12px;
    bottom: 72px;
    width: calc(100vw - 24px);
  }
}

/* ══════════════════════════════════════════════════
   大对话框消息气泡（hero-canvas 内的 home-chat-messages）
   ══════════════════════════════════════════════════ */

/* 消息容器：半透明毛玻璃底，和背景图分隔 */
.hero-canvas .home-chat-messages {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  border-radius: 16px;
  padding: 20px !important;
  max-height: 50vh;
  overflow-y: auto;
}

/* 消息行：flex 布局控制对齐 */
.hero-canvas .hc-msg {
  display: flex;
  margin-bottom: 16px;
}

/* 用户消息：右对齐 */
.hero-canvas .hc-msg-user {
  justify-content: flex-end;
}
.hero-canvas .hc-msg-user .hc-msg-text {
  background: #171717;
  color: #fff;
  padding: 10px 16px;
  border-radius: 16px 16px 4px 16px;
  max-width: 70%;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.5;
  display: inline-block;
}

/* AI 消息：左对齐 */
.hero-canvas .hc-msg-ai {
  justify-content: flex-start;
}
.hero-canvas .hc-msg-ai .hc-msg-text {
  background: rgba(255, 255, 255, 0.9);
  color: #171717;
  padding: 10px 16px;
  border-radius: 16px 16px 16px 4px;
  max-width: 70%;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.5;
  display: inline-block;
}

/* AI 图片 */
.hero-canvas .hc-msg-images img {
  max-width: 260px;
  max-height: 260px;
  border-radius: 8px;
  display: block;
  margin-top: 8px;
  object-fit: contain;
}

/* loading 动画气泡 */
.hero-canvas .hc-msg-ai .hc-loading-dots {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px 16px 16px 4px;
  display: inline-block;
}

/* 错误消息 */
.hero-canvas .hc-msg-error .hc-msg-text {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* ============================================================
   V35: 前台登录注册页输入框样式修复
   - 邮箱框背景从 var(--bg) 米灰色 → 白色,与密码框一致
   - 防御 Chrome autofill 自动填充浅黄色背景
   - scope 严格限定到 .login-split-right,不影响其他页面
   ============================================================ */
.login-split-right .auth-row-email input[type="email"],
.login-split-right .register-field .auth-email-input {
  background: #fff;
}
.login-split-right .auth-form input:-webkit-autofill,
.login-split-right .auth-form input:-webkit-autofill:hover,
.login-split-right .auth-form input:-webkit-autofill:focus,
.login-split-right .register-field input:-webkit-autofill,
.login-split-right .register-field input:-webkit-autofill:hover,
.login-split-right .register-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #333 !important;
  transition: background-color 5000s ease-in-out 0s;
}

