/* ===== 图爆网 CSS（严格按绘蛙 ihuiwa.com 登录态结构还原）=====
 * 工作台布局（绘蛙真实测量值）：
 *   顶栏56px → 主体三栏：160px侧边栏 | 90px最近任务条 | 内容区(374px操作列+413px结果面板)
 *   操作列：头部64px + 滚动表单 + 底部81px(小字+210x48生成按钮)
 *   上传卡：266px高 浅蓝紫底 灰边 4px圆角
 *   参考图/模特横条卡：120px高 = 90px图 + 标题/描述
 * 配色：Logo 紫系 #540083 → #9000ca → #c05fe8 → #d88cf5
 */

:root {
  --primary: #9000ca;
  --primary-dark: #70009e;
  --primary-light: #c05fe8;
  --accent: #d88cf5;
  --highlight: #f6e6fc;
  --danger: #ef4444;
  --success: #22c55e;
  --warn: #f59e0b;
  --gold: #f59e0b;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --bg: #f5f5f7;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-light: #e3e3e3;
  --radius: 12px;
  --radius-sm: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  /* 绘蛙上传卡底色 rgba(101,126,185,0.05) 的紫系对应 */
  --upload-bg: rgba(144, 0, 202, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--primary); cursor: pointer; text-decoration: none; }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 18px; font-size: 14px; font-weight: 500;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; transition: all .2s;
}
.btn:hover { opacity: .9; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.btn.outline { background: #fff; color: var(--primary); border: 1px solid var(--primary-light); }
.btn.outline:hover { background: var(--highlight); }
.btn.white { background: #fff; color: var(--primary); }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.big { padding: 12px 28px; font-size: 15px; }

/* ===== 顶部导航（首页+工作台共用） ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  height: 56px; padding: 0 24px;
  background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.topbar .brand { flex: 0 0 auto; }
.logo-img { height: 45px; width: auto; }
.logo-img-sm { height: 28px; width: auto; }

.top-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.top-nav a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; cursor: pointer;
  transition: all .2s;
}
.top-nav a:hover { color: var(--primary); background: var(--highlight); }

.topbar .right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.top-promo { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-light); }
.top-promo b { color: var(--primary); font-size: 14px; }
.top-user { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.top-user-name { font-size: 14px; font-weight: 600; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-user:hover .top-user-name { color: var(--primary); }

/* 工作台顶栏：算力点 + 充值（绘蛙式） */
.ws-topbar { position: relative; }
.ws-points { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pts-btn {
  padding: 4px 10px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.pts-num { font-size: 14px; font-weight: 600; color: var(--primary); }
.pts-recharge {
  padding: 2px 10px; border-radius: 4px;
  border: 1px solid var(--primary-light); color: var(--primary);
  font-size: 12px; cursor: pointer;
}
/* 工作台顶栏「升级会员」胶囊（与首页 nav-vip 同款红橙渐变） */
.ws-vip {
  color: #fff; background: linear-gradient(135deg, #ff7e4d, #ff3d6e);
  border-radius: 14px; padding: 4px 12px; font-weight: 600;
  font-size: 12px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.ws-vip:hover { background: linear-gradient(135deg, #ff6a3d, #f72e5e); color: #fff; }

/* ===== 首页：行业分类标签 ===== */
.cat-tabs {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 24px; background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.cat-tabs span {
  flex: 0 0 auto;
  padding: 6px 16px; border-radius: 20px;
  font-size: 13px; color: var(--text-light);
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; transition: all .2s;
}
.cat-tabs span:hover { border-color: var(--primary-light); color: var(--primary); }
.cat-tabs span.on { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; border-color: transparent; }

/* ===== 首页：功能卡片区 ===== */
.section { padding: 32px 24px; max-width: 1200px; margin: 0 auto; }
.sec-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; color: var(--text); }

.func-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.func-card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  cursor: pointer; transition: all .25s;
}
.func-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.func-card-img { width: 100%; height: 160px; object-fit: cover; background: linear-gradient(135deg, #f6e6fc, #f3e4fb); }
.func-card-info { padding: 14px; }
.func-card-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.func-card-info p { font-size: 12px; color: var(--text-light); }

/* ===== 首页：AI修图区 ===== */
.retouch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.retouch-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px; background: var(--card);
  border-radius: var(--radius); border: 1px solid var(--border);
  cursor: pointer; transition: all .2s;
}
.retouch-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.retouch-ic { font-size: 28px; }
.retouch-item span { font-size: 13px; color: var(--text); }

/* ===== 首页：企业版推广 ===== */
.promo-banner {
  background: linear-gradient(135deg, #f6e6fc 0%, #f3e4fb 50%, #faf5fe 100%);
  border-radius: var(--radius); padding: 32px; text-align: center;
  border: 1px solid #e4c9f5;
}
.promo-banner h3 { font-size: 20px; font-weight: 600; margin-bottom: 20px; color: var(--primary-dark); }
.promo-items { display: flex; justify-content: center; gap: 48px; margin-bottom: 24px; }
.promo-items div { text-align: left; max-width: 240px; }
.promo-items b { font-size: 15px; display: block; margin-bottom: 4px; }
.promo-items p { font-size: 13px; color: var(--text-light); }

/* ===== 首页：优秀案例 ===== */
.case-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.case-tabs span { padding: 6px 16px; border-radius: 6px; font-size: 13px; color: var(--text-light); cursor: pointer; }
.case-tabs span.on { background: var(--highlight); color: var(--primary); font-weight: 500; }

.case-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case-card {
  position: relative; background: var(--card);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; transition: all .2s;
}
.case-card:hover { box-shadow: var(--shadow-md); }
.case-img { width: 100%; height: 200px; object-fit: cover; background: linear-gradient(135deg, #f6e6fc, #f3e4fb); }
.case-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 12px; border-radius: 14px;
  background: rgba(124,58,237,.9); color: #fff;
  font-size: 12px; border: none;
}
.case-meta { display: flex; gap: 8px; padding: 10px 12px; font-size: 12px; color: var(--text-light); }
.case-meta span { background: var(--bg); padding: 2px 8px; border-radius: 4px; }

/* ===== 页脚 ===== */
.footer { background: #fff; border-top: 1px solid var(--border); padding: 32px 24px; margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-logo { height: 40px; margin: 0 auto 12px; }
.footer-inner p { font-size: 13px; color: var(--text-light); }
.footer-inner .beian { margin-top: 6px; }
.footer-inner .beian-badge { display: inline-block; height: 14px; width: auto; vertical-align: -3px; margin-right: 4px; }
.footer-inner .beian a { font-size: 12px; color: var(--text-light); text-decoration: none; }
.footer-inner .beian a:hover { color: var(--text); }

/* ============================================================
   工作台（绘蛙真实结构：三栏布局）
   ============================================================ */
.ws-page { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); }

.ws-body {
  flex: 1; display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* —— 左：160px 分组侧边栏（绘蛙 framework-sub-nav 实测样式） —— */
.sidebar {
  width: 160px; flex: 0 0 160px;
  background: #fff; border-right: 1px solid #f5f5f5;
  overflow-y: auto;
}
.side-nav { padding: 8px 0; }
.side-group {
  height: 16px; line-height: 16px;
  padding: 0 0 0 12px;
  margin-top: 16px;
  font-size: 12px; color: #999; font-weight: 400;
}
.side-group:first-child { margin-top: 4px; }
.side-nav a {
  display: flex; align-items: center; justify-content: space-between;
  width: 144px; height: 36px; margin: 0 auto;
  padding: 8px 5.2px 8px 10.8px;
  border-radius: 4px;
  font-size: 14px; font-weight: 400;
  color: var(--primary);
  cursor: pointer; transition: background .15s;
}
.side-nav a:hover { background: var(--highlight); }
.side-nav a.on { background: var(--highlight); }
.side-item-inner {
  display: flex; align-items: center; gap: 6px;
  min-width: 0;
}
.side-icon {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: currentColor;
}
.side-item-title { line-height: 22px; white-space: nowrap; }

/* —— 中：90px 最近任务条（绘蛙 collapsed-task-list） —— */
.recent-bar {
  width: 90px; flex: 0 0 90px;
  background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.recent-head {
  padding: 14px 8px 8px; text-align: center;
  border-bottom: 1px solid #f5f5f5;
}
.recent-title { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.recent-continue { font-size: 12px; color: var(--primary); display: block; }
.recent-list {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.recent-thumb {
  width: 74px; height: 74px; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; flex: 0 0 auto;
}
.recent-thumb:hover { border-color: var(--primary-light); }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-empty { font-size: 11px; color: var(--text-muted); text-align: center; padding: 16px 4px; }
.recent-foot {
  padding: 12px 8px; text-align: center;
  border-top: 1px solid #f5f5f5;
}
.recent-all {
  font-size: 12px; color: var(--text-light);
  display: inline-block; padding: 4px 10px;
  background: var(--bg); border-radius: 4px;
}
.recent-all:hover { color: var(--primary); }

/* —— 右：主内容区 —— */
.ws-main { flex: 1; min-width: 0; overflow-y: auto; }

/* 工作台：操作列 + 结果面板 双栏（374px + 剩余） */
.ws-workspace {
  display: flex; align-items: stretch;
  min-height: 100%;
}

/* ===== 操作列（374px，绘蛙 task-panel） ===== */
.op-col {
  width: 374px; flex: 0 0 374px;
  background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}

/* 头部 64px：标题+教程 */
.tp-header {
  height: 64px; flex: 0 0 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid #f5f5f5;
}
.tp-title { font-size: 14px; color: #333; font-weight: 500; }
.tp-tutorial { font-size: 13px; color: var(--primary); }

/* 滚动表单区 */
.tp-scroll { flex: 1; overflow-y: auto; padding: 16px 24px; }

/* 表单项（326px 宽） */
.fi { width: 326px; margin: 0 auto 16px; }

/* tabs 行 */
.op-tabs {
  display: flex; align-items: center; gap: 20px;
  border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.op-tabs span {
  padding: 8px 0; font-size: 14px; color: var(--text-light);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.op-tabs span.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.rule-link { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.rule-link:hover { color: var(--primary); }

/* 上传卡（266px 高，绘蛙 image-cut-inner-container） */
.upload-fi { padding-top: 4px; }
.upload-card2 {
  width: 326px; height: 266px;
  background: var(--upload-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; overflow: hidden; position: relative;
  margin-bottom: 16px;
}
.upload-card2:hover { border-color: var(--primary-light); background: var(--highlight); }
.upload-plus2 { font-size: 40px; color: var(--primary-light); margin-bottom: 8px; line-height: 1; }
.upload-name { font-size: 15px; font-weight: 500; margin-bottom: 12px; }
.upload-btns { display: flex; gap: 10px; margin-bottom: 12px; }
.ubtn {
  padding: 4px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--primary-light); color: var(--primary);
  font-size: 13px;
}
.upload-rule { font-size: 12px; color: var(--text-muted); }
.upload-preview { max-width: 100%; max-height: 220px; object-fit: contain; }
.upload-repick {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px; text-align: center;
  background: rgba(0,0,0,.5); color: #fff; font-size: 12px;
}

/* 参考图/模特 横条卡（120px 高 = 90px图 + 文案，绘蛙 lms-item） */
.step-fi {
  display: flex; align-items: center; gap: 12px;
  padding: 0; cursor: pointer;
}
.step-fi:hover .step-img-wrap { border-color: var(--primary-light); }
.step-img-wrap {
  width: 90px; height: 120px; flex: 0 0 90px;
  background: var(--upload-bg); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.step-plus { font-size: 28px; color: var(--primary-light); }

/* 参考图库/模特库展开网格 */
.step-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.lib-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  margin: 8px 0 12px;
}
.lib-item {
  cursor: pointer; text-align: center; border-radius: var(--radius-sm);
  border: 2px solid transparent; overflow: hidden; background: #fff;
  transition: all .15s;
}
.lib-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.lib-item.on { border-color: var(--primary); }
.lib-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.lib-item span { display: block; font-size: 11px; color: var(--text-2, #666); padding: 4px 2px; }
.lib-item.lib-upload { border: 1.5px dashed var(--border-light); background: var(--bg-light, #fafafa); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lib-item.lib-upload:hover { border-color: var(--primary); box-shadow: none; }
.lib-upload-icon { font-size: 26px; line-height: 1; color: var(--primary); padding: 30px 0 12px; }
.step-text { flex: 1; min-width: 0; }
.step-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.step-desc { font-size: 12px; color: var(--text-light); }

/* 配置项（模型版本/文本控制/分辨率/比例/张数） */
.cfg-fi { padding-top: 4px; border-top: 1px solid #f5f5f5; }
.cfg-fi.not-first { margin-top: 8px; }
.cfg-title { font-size: 13px; color: var(--text); font-weight: 500; margin-bottom: 10px; }
.cfg-sub { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* 模型版本选择卡（试穿1.5） */
.ver-select {
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer; position: relative;
  transition: all .2s;
}
.ver-select:hover { border-color: var(--primary-light); }
.ver-select.on { border-color: var(--primary); background: var(--highlight); }
.ver-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.ver-tag {
  font-size: 11px; color: var(--primary);
  background: var(--highlight); padding: 1px 6px; border-radius: 3px;
}
.ver-desc { font-size: 12px; color: var(--text-light); }
.ver-cost {
  position: absolute; right: 12px; top: 10px;
  font-size: 12px; color: var(--primary); font-weight: 600;
}

/* 文本控制 */
.txt-ctrl {
  width: 100%; min-height: 60px; resize: vertical;
  padding: 8px 12px; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); font-size: 13px; outline: none; background: #fff;
}
.txt-ctrl:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px var(--highlight); }

/* 分段选择（分辨率/比例，绘蛙 1K/2K、3:4/1:1/9:16） */
.seg-row { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-row span {
  padding: 5px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-light); font-size: 13px; color: var(--text-light);
  cursor: pointer; transition: all .15s; background: #fff;
}
.seg-row span:hover { border-color: var(--primary-light); color: var(--primary); }
.seg-row span.on {
  border-color: var(--primary); color: var(--primary);
  background: var(--highlight); font-weight: 500;
}

/* 生成张数步进器 */
.cnt-row { display: flex; align-items: center; gap: 12px; }
.cnt-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-light); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text); cursor: pointer;
}
.cnt-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.cnt-num { font-size: 14px; font-weight: 500; min-width: 40px; text-align: center; }

/* 底部 81px：小字提示 + 生成按钮（绘蛙 task-panel-footer） */
.tp-footer {
  flex: 0 0 81px; min-height: 81px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  border-top: 1px solid #f5f5f5;
  background: #fff;
}
.tp-guide { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.gen-btn {
  width: 210px; height: 56px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all .2s;
}
.gen-btn .gen-main { font-size: 16px; font-weight: 500; line-height: 1.2; }
.gen-btn .gen-sub { font-size: 11px; opacity: .9; line-height: 1.3; margin-top: 2px; }
.gen-btn:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.gen-btn:active { transform: scale(.98); }

/* ===== 结果面板（413px，绘蛙 task-manage-result-panel） ===== */
.result-panel {
  flex: 1; min-width: 0;
  background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}
.rp-tabs {
  display: flex; gap: 24px; padding: 16px 24px 0;
  border-bottom: 1px solid var(--border);
}
.rp-tabs span {
  padding: 8px 0; font-size: 14px; color: var(--text-light);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.rp-tabs span.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.rp-head {
  padding: 14px 24px 12px; font-size: 15px; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.rp-scroll { flex: 1; overflow-y: auto; padding: 16px 24px; }

/* 结果面板：轮播示例 */
.rp-carousel { margin-bottom: 20px; }
.rp-demo { text-align: center; }
.rp-demo-imgs {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 12px;
}
.rp-demo-imgs img {
  width: 100px; height: 130px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: linear-gradient(135deg, #f6e6fc, #f3e4fb);
}
.rp-arrow { color: var(--text-muted); font-size: 16px; }
.rp-same {
  padding: 8px 24px; border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-size: 14px;
}
.rp-same:hover { background: var(--primary-dark); }
.rp-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.rp-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); cursor: pointer;
}
.rp-dots span.on { background: var(--primary); }

/* 结果面板：案例网格 */
.rp-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.rp-case {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer;
}
.rp-case img { width: 100%; height: 150px; object-fit: cover; background: linear-gradient(135deg, #f6e6fc, #f3e4fb); }

/* 结果面板：任务结果列表 */
.rp-task {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 12px;
}
.rp-task-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rp-task-fee { font-size: 12px; color: var(--primary); font-weight: 600; }
.rp-task-time { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.rp-task-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-task-imgs img {
  width: 100px; height: 130px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.rp-task-ops { margin-top: 10px; }

/* ===== 我的商品列表（工作台下方） ===== */
.sku-list { padding: 20px 24px 40px; border-top: 1px solid var(--border); background: var(--bg); }

/* 我的商品独立整页视图：去掉顶部分隔线，加内边距 */
.view-works .sku-list { border-top: none; padding-top: 24px; }

/* ===== 通用卡片 ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.card h3 { font-size: 15px; margin-bottom: 14px; }

/* ===== 新建商品卡 ===== */
.new-sku-card { border-style: dashed; }
.new-sku-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.new-sku-ic {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

/* ===== SKU 卡片 ===== */
.sku-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sku-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all .2s;
}
.sku-card:hover { box-shadow: var(--shadow-md); }
.sku-card .thumb {
  height: 230px; background: #fafafa;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.sku-card .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sku-card .thumb .empty { text-align: center; color: var(--text-muted); cursor: pointer; padding: 20px; }
.empty-plus { font-size: 36px; color: var(--primary-light); margin-bottom: 8px; }
.model-badge {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(124,58,237,.9); color: #fff;
  border-radius: 6px; padding: 2px 10px; font-size: 11px;
}
.sku-id {
  position: absolute; left: 8px; top: 8px;
  background: rgba(0,0,0,.5); color: #fff;
  border-radius: 4px; padding: 1px 8px; font-size: 11px;
}
.sku-card .info { padding: 14px; }
.sku-card .name { font-weight: 600; margin-bottom: 4px; }
.sku-card .cat { color: var(--text-light); font-size: 12px; margin-bottom: 10px; }
.prog { display: flex; gap: 8px; margin-bottom: 12px; }
.prog-dot {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--bg); color: var(--text-muted); border: 1px solid var(--border);
}
.prog-dot.ok { background: var(--highlight); color: var(--primary); border-color: var(--primary-light); }
.sku-card .ops { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== 任务列表 ===== */
.task-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.task-item .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.task-item .id { color: var(--text-light); font-size: 13px; }
.task-item .time { color: var(--text-light); font-size: 12px; margin-left: auto; }
.task-item .imgs { display: flex; gap: 10px; flex-wrap: wrap; }
.task-img { border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.task-img img { width: 128px; height: 170px; object-fit: cover; display: block; }

/* ===== 表格 ===== */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl th { font-weight: 600; background: var(--bg); }
.tbl tr:hover { background: var(--bg); }

/* ===== 表单 ===== */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field .lbl { font-size: 13px; color: var(--text-light); }
input, select, textarea {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px var(--highlight); }
textarea { min-height: 80px; resize: vertical; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }

/* ===== 状态标签 ===== */
.status-chip { font-size: 12px; padding: 2px 10px; border-radius: 10px; background: var(--bg); }
.status-chip.succeeded { background: #dcfce7; color: #166534; }
.status-chip.pending { background: #fef3c7; color: #92400e; }
.status-chip.running { background: #f3e4fb; color: #70009e; }
.status-chip.failed { background: #fee2e2; color: #991b1b; }

/* ===== 生成中加载态 ===== */
.rp-task-loading {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 0; color: var(--text-muted); font-size: 13px;
}
.spin {
  width: 16px; height: 16px; flex: 0 0 auto;
  border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 视频任务 ===== */
.rp-task-type { font-size: 12px; color: var(--primary); font-weight: 600; }

/* ===== 模式化生图：参考图上传/选择 ===== */
/* i2v 正反双图槽：正面(首帧)+背面(尾帧) */
.i2v-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.i2v-slot-t { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.i2v-slot-t b { font-size: 13px; color: #4a3b63; font-weight: 600; }
.i2v-slot-t em { font-style: normal; font-size: 10px; color: #9a86b8; }
.i2v-box {
  position: relative; height: 120px; border-radius: 10px; overflow: hidden;
  border: 1px solid #e9dff3; background: #fbf8fe;
}
.i2v-box.filled { border-color: #c9a9e8; }
.i2v-box img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.i2v-empty {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; border: 1px dashed #d9bcec; border-radius: 10px;
  color: var(--primary); text-align: center; padding: 6px;
}
.i2v-empty span { font-size: 24px; line-height: 1; }
.i2v-empty em { font-style: normal; font-size: 11px; color: #9a86b8; }
.i2v-repick {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; text-align: center;
  background: rgba(0,0,0,.45); color: #fff; font-size: 10px; cursor: pointer; user-select: none;
}
.ws-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-ref {
  position: relative; width: 86px; height: 86px; border-radius: 8px; overflow: hidden;
  border: 1px solid #e9dff3; background: #fbf8fe;
}
.ws-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-ref-x {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 16px;
  text-align: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; cursor: pointer; user-select: none;
}
.ws-ref.add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; border: 1px dashed #d9bcec; color: var(--primary);
  padding: 6px; text-align: center;
}
.ws-ref.add span { font-size: 22px; line-height: 1; }
.ws-ref.add em { font-style: normal; font-size: 11px; color: #9a86b8; }
.ws-pick-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.ws-pick-row img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; flex: 0 0 auto; opacity: .92;
}
.ws-pick-row img:hover { opacity: 1; }
.ws-pick-row img.on { border-color: var(--primary); opacity: 1; }

.rp-task-video { margin-top: 10px; }
/* 视频结果缩略卡片：点击弹窗大屏播放 */
.video-thumb {
  position: relative; width: 200px; max-width: 100%;
  border-radius: 8px; overflow: hidden; background: #000;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.video-thumb video,
.video-thumb img { width: 100%; display: block; }
.video-thumb .vt-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff; background: rgba(0,0,0,.22);
  text-shadow: 0 2px 10px rgba(0,0,0,.7); transition: background .15s;
}
.video-thumb:hover .vt-play { background: rgba(0,0,0,.42); }

/* ===== 视频全屏播放器界面 ===== */
.vp-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: #000;
  display: flex; flex-direction: column;
}
.vp-bar {
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; font-weight: 600; font-size: 15px;
  padding: 10px 20px; flex-shrink: 0; background: rgba(0,0,0,.55);
}
.vp-actions { display: flex; gap: 8px; }
.vp-btn {
  color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 6px;
  background: rgba(255,255,255,.08); padding: 5px 14px; font-size: 13px;
  cursor: pointer; text-decoration: none; transition: background .15s;
}
.vp-btn:hover { background: rgba(255,255,255,.2); }
.vp-media {
  display: block; flex: 1; min-height: 0;
  width: 100%; object-fit: contain; background: #000;
}

/* ===== 图生视频弹窗 ===== */
.video-src-row {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  background: var(--bg); border-radius: 8px; margin-bottom: 12px;
}
.video-src-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.video-src-row .video-src-desc { font-size: 13px; color: var(--text-muted); }

.member-chip { font-size: 12px; padding: 2px 10px; border-radius: 10px; background: var(--bg); }
.member-chip.normal { background: #f3f4f6; color: #374151; }
.member-chip.vip { background: #f3e4fb; color: #70009e; }
.member-chip.gold { background: #fef3c7; color: #92400e; }

/* ===== 金额 ===== */
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--danger); font-weight: 600; }
.fee { color: var(--primary); font-weight: 600; }

/* ===== 空状态 ===== */
.empty-tip { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-tip .big { font-size: 48px; margin-bottom: 12px; }
.empty-tip.small { padding: 32px 16px; }
.empty-tip.small .big { font-size: 32px; }

/* ===== 导出网格 ===== */
.export-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.export-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--card); border-radius: var(--radius);
  max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 24px; box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* 登录弹窗 */
.auth-modal { max-width: 400px; }
.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.auth-tabs { display: flex; gap: 4px; }
.auth-tabs button {
  padding: 8px 20px; border: none; background: none;
  font-size: 15px; color: var(--text-light); cursor: pointer;
  border-bottom: 2px solid transparent;
}
.auth-tabs button.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.auth-close { font-size: 22px; color: var(--text-muted); cursor: pointer; }
.auth-close:hover { color: var(--text); }
.auth-tip { margin-top: 12px; font-size: 12px; color: var(--text-light); text-align: center; }
.auth-tip.row { display: flex; justify-content: center; }
.auth-tip a { color: var(--primary); cursor: pointer; }
.auth-tip b { color: var(--primary); }
/* 登录方式切换（密码 / 验证码） */
.auth-way { display: flex; gap: 6px; margin-bottom: 14px; background: var(--bg-soft, #f4f4f6); border-radius: 8px; padding: 3px; }
.auth-way button {
  flex: 1; padding: 7px 0; border: none; background: transparent; border-radius: 6px;
  font-size: 13px; color: var(--text-light); cursor: pointer; transition: all .15s;
}
.auth-way button.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
/* 验证码输入行：输入框 + 获取按钮 */
.code-row { display: flex; gap: 8px; align-items: center; }
.code-btn { min-width: 108px; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 300; background: var(--text); color: #fff;
  padding: 10px 20px; border-radius: 8px;
  font-size: 13px; box-shadow: var(--shadow-lg);
  display: inline-flex; align-items: center; gap: 8px;
  max-width: min(92vw, 560px);
}
.toast.err {
  background: #fff; color: var(--primary-dark);
  border: 1px solid var(--primary-light);
  box-shadow: 0 8px 24px rgba(144, 0, 202, 0.16);
}
.toast.err::before { content: "⚠️"; font-size: 14px; }

/* ===== 头像 ===== */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}

.side-logout {
  padding: 4px 10px; font-size: 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-light);
}
.side-logout:hover { color: var(--danger); border-color: var(--danger); }

/* ===== 通用工具 ===== */
.muted { color: var(--text-light); }
.err { color: var(--danger); font-size: 13px; margin-top: 6px; }

/* ===== 响应式 ===== */
@media (max-width: 1280px) {
  .ws-workspace { flex-direction: column; }
  .op-col { width: 100%; flex: none; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .result-panel { height: auto; min-height: 400px; border-right: none; }
  .tp-scroll { max-height: 60vh; }
  .rp-scroll { max-height: 60vh; }
}

@media (max-width: 1024px) {
  .func-grid { grid-template-columns: repeat(3, 1fr); }
  .case-grid { grid-template-columns: repeat(3, 1fr); }
  .retouch-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .top-nav { display: none; }
  .top-promo { display: none; }
  .func-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .retouch-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-items { flex-direction: column; gap: 16px; align-items: center; }
  .promo-items div { text-align: center; }

  /* 工作台：侧边栏转顶部横条 */
  .ws-body { flex-direction: column; height: auto; overflow: visible; }
  .sidebar { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .side-nav { display: flex; flex-wrap: nowrap; gap: 4px; padding: 8px 12px; }
  .side-group { display: none; }
  .side-nav a { width: auto; margin: 0; padding: 6px 12px; font-size: 13px; height: auto; white-space: nowrap; }
  .recent-bar { display: none; }
  .ws-main { overflow: visible; }
  .ws-workspace { flex-direction: column; }
  .op-col { width: 100%; flex: none; height: auto; }
  .tp-scroll, .rp-scroll { max-height: none; }
  .tp-footer { flex-direction: column; gap: 10px; padding: 12px 24px; }
  .gen-btn { width: 100%; }
  .rp-gallery { grid-template-columns: repeat(2, 1fr); }
  .sku-list { padding: 16px; }
}

/* ===== 管理后台 ===== */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; margin-bottom: 14px; }
.admin-tabs span { padding: 7px 16px; font-size: 14px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-light); }
.admin-tabs span:hover { background: var(--highlight); color: var(--primary); }
.admin-tabs span.on { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; font-weight: 600; }
.admin-tabs .admin-tab-right { margin-left: auto; font-size: 13px; padding: 4px 8px; }
.admin-tabs.small span { padding: 6px 12px; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.stat-num { font-size: 26px; font-weight: 700; color: #1f2937; line-height: 1.2; }
.stat-num.fee { color: var(--primary); }
.stat-num.pos { color: var(--success); }
.stat-num.neg { color: var(--danger); }
.stat-lbl { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.admin-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.admin-toolbar .spacer { flex: 1; }
.admin-pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.admin-thumbs { display: inline-flex; gap: 4px; align-items: center; }
.admin-thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); cursor: zoom-in; }
.admin-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.admin-page .tbl tr.row-off td { opacity: .55; background: repeating-linear-gradient(-45deg, #fafafa, #fafafa 6px, #f5f5f5 6px, #f5f5f5 12px); }
.btn-danger { background: #fee2e2 !important; color: #991b1b !important; border: 1px solid #fecaca !important; }
.btn-ok { background: #dcfce7 !important; color: #166534 !important; border: 1px solid #bbf7d0 !important; }
.admin-page .modal.admin-drawer { width: min(920px, 96vw); max-height: 86vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.drawer-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--border); position: relative; }
.drawer-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.drawer-balance { margin-left: auto; font-size: 13px; color: var(--text-light); }
.drawer-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 24px; color: var(--text-light); cursor: pointer; line-height: 1; }
.drawer-close:hover { color: var(--danger); }
.admin-page .modal .admin-tabs { margin: 12px 22px 0; }
.drawer-body { overflow-y: auto; padding: 14px 22px 22px; }
.drawer-body .tbl td, .drawer-body .tbl th { padding: 8px 10px; }
.pos { color: var(--success); font-weight: 600; }
.neg { color: var(--danger); font-weight: 600; }


/* ===== 个人中心弹窗 ===== */
.profile-modal { max-width: 460px; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 6px; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600;
}
.profile-info { min-width: 0; }
.profile-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 16px; font-weight: 600; }
.profile-meta { margin-top: 6px; font-size: 12px; color: var(--text-light); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.set-block { display: flex; flex-direction: column; gap: 4px; }
.set-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.set-row { display: flex; gap: 10px; align-items: flex-end; }
.set-row2 { display: flex; gap: 10px; }

/* ===== 升级会员 顶部菜单 ===== */
.top-nav a.nav-vip {
  color: #fff; background: linear-gradient(135deg, #ff7e4d, #ff3d6e);
  border-radius: 16px; padding: 4px 12px; font-weight: 600; margin-left: 2px;
}
.top-nav a.nav-vip:hover { background: linear-gradient(135deg, #ff6a3d, #f72e5e); color: #fff; }

/* ===== 会员中心弹窗 ===== */
.vip-modal { max-width: 780px; }
.vip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.vip-card {
  position: relative; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 16px 16px; display: flex; flex-direction: column; background: var(--card);
}
.vip-card.vip { border-color: #e3c3f5; }
.vip-card.gold { border-color: #e5b94b; background: linear-gradient(180deg, #fffdf4, var(--card)); }
.vip-card.mine { outline: 2px solid var(--primary); outline-offset: 1px; }
.vip-flag {
  position: absolute; top: -10px; right: 10px;
  background: linear-gradient(135deg, #ffb03a, #ff7a2f); color: #fff;
  font-size: 11px; padding: 2px 9px; border-radius: 8px;
}
.vip-lv { font-size: 15px; font-weight: 700; }
.vip-price { margin-top: 2px; }
.vip-price b { font-size: 30px; line-height: 1.1; }
.vip-price span { color: var(--text-muted); font-size: 12px; }
.vip-card.vip .vip-price b { color: #9333ea; }
.vip-card.gold .vip-price b { color: #d97706; }
.vip-benefits { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vip-benefits li { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.vip-benefits .ib { color: var(--text-muted); }
.vip-benefits b { color: var(--text); font-weight: 600; text-align: right; }
.vip-buy {
  width: 100%; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border: none; padding: 9px; border-radius: 10px; font-weight: 600; cursor: pointer;
}
.vip-buy:hover { filter: brightness(1.06); }
.vip-mine { width: 100%; border: 1px solid var(--primary); color: var(--primary); background: #fff; padding: 8px; border-radius: 10px; font-weight: 600; cursor: default; }
.vip-owned { width: 100%; background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); padding: 8px; border-radius: 10px; cursor: default; }
.vip-note {
  margin-top: 16px; font-size: 12px; line-height: 1.8;
  background: var(--highlight); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px;
}
@media (max-width: 720px) {
  .vip-grid { grid-template-columns: 1fr; }
  .vip-card.mine { order: -1; }
}

/* ===== 免费用户档（free）===== */
.member-chip.free { background: #eef2ff; color: #4f46e5; }
.free-quota { color: #e67e22 !important; font-weight: 600; }

/* 会员中心 · 免费用户横幅 */
.vip-free {
  border: 1px dashed var(--primary); background: var(--highlight);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
}
.vf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vf-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vf-title b { font-size: 16px; }
.vf-price-tag {
  font-size: 12px; color: var(--primary); background: rgba(79, 70, 229, 0.08);
  padding: 2px 8px; border-radius: 8px;
}
.vf-btn { width: auto; padding: 7px 16px; flex: 0 0 auto; }
.vf-benefits {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; font-size: 12.5px;
}
.vf-benefits li { display: flex; justify-content: space-between; gap: 10px; }
.vf-benefits .ib { color: var(--text-muted); }
.vf-benefits b { color: var(--text); font-weight: 600; text-align: right; }
@media (max-width: 640px) {
  .vf-benefits { grid-template-columns: 1fr; }
}

/* ===== 邀新签到弹窗 ===== */
.invite-modal { max-width: 560px; }
.inv-sub { margin: -8px 0 16px; font-size: 12px; }
.inv-section {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 14px; background: #fff;
}
.inv-sec-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.ck-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ck-cell {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 2px; text-align: center; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .2s;
}
.ck-day { font-size: 11px; color: var(--text-light); }
.ck-ic {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 1px dashed var(--border);
  color: var(--text-light); font-size: 13px; line-height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.ck-amt { font-size: 11px; color: var(--text-light); }
.ck-cell.on { border-color: var(--primary); background: linear-gradient(135deg, #f6e6fc, #f3e4fb); }
.ck-cell.on .ck-ic { background: var(--primary); border: none; color: #fff; }
.ck-cell.on .ck-day, .ck-cell.on .ck-amt { color: var(--primary-dark); font-weight: 600; }
.ck-cell.today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(144, 0, 202, .12); }
.ck-cell.today .ck-ic { border-color: var(--primary); color: var(--primary); }
.ck-act { margin-top: 14px; }
.inv-tip { margin-top: 10px; font-size: 12px; line-height: 1.7; }
.inv-code-box {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #f6e6fc, #f3e4fb);
  border: 1px solid var(--primary-light); border-radius: 12px;
  padding: 14px 18px; cursor: pointer; transition: all .2s;
}
.inv-code-box:hover { box-shadow: 0 4px 14px rgba(144,0,202,.14); }
.inv-code-lbl { font-size: 12px; color: var(--text-muted); }
.inv-code-val { font-size: 22px; font-weight: 700; color: var(--primary-dark); letter-spacing: 1px; margin-top: 2px; }
.inv-code-cp {
  flex: 0 0 auto; background: var(--primary); color: #fff;
  border-radius: 8px; padding: 8px 14px; font-size: 13px;
}
@media (max-width: 480px) {
  .ck-cells { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 款式级「一键生成」studio 工作台 ===== */
.st-wrap { padding: 18px 20px 40px; max-width: 1280px; margin: 0 auto; }
.st-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.st-head h2 { font-size: 20px; color: var(--text); }
.st-sub { font-size: 12px; }
.st-quota {
  flex: 0 0 auto; font-size: 13px; color: var(--primary-dark);
  background: linear-gradient(135deg, #f6e6fc, #f3e4fb);
  border: 1px solid var(--primary-light); border-radius: 20px;
  padding: 8px 16px; font-weight: 600;
}
.st-body { display: flex; gap: 16px; align-items: flex-start; }
.st-left { flex: 0 0 470px; max-width: 470px; display: flex; flex-direction: column; gap: 12px; }
.st-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.st-card { padding: 14px 16px; }
.st-card-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; }
.st-card-title em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--text-muted); }
/* 折叠卡片头（附加功能·视频模板）：默认收起，点击箭头展开上传入口 */
.st-card-title.st-vhead { cursor: pointer; align-items: center; margin-bottom: 0; user-select: none; }
.st-vhead-t { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.st-vhead-arr { font-style: normal; color: var(--primary); font-size: 16px; font-weight: 700; line-height: 1; flex: 0 0 auto; transition: transform .15s ease; }
.st-vhead-hint { font-style: normal; font-weight: 400; font-size: 12px; color: var(--text-muted); }
.st-vhead.on .st-vhead-arr { transform: rotate(90deg); }
.st-vsec { margin-top: 10px; }
/* 颜色组 */
.st-color { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #fcfcfd; }
.st-color-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.st-radio {
  flex: 0 0 auto; font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-muted); user-select: none;
}
.st-radio.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.st-name {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; font-size: 13px; outline: none;
}
.st-name:focus { border-color: var(--primary-light); }
.st-x { flex: 0 0 auto; cursor: pointer; color: var(--text-muted); padding: 2px 6px; border-radius: 6px; font-size: 14px; }
.st-x:hover { color: var(--danger); background: #fee2e2; }
.st-slots { display: flex; gap: 10px; }
.st-slot { position: relative; width: 104px; }
.st-slot .st-upload { width: 104px; height: 104px; }
.st-slot-img { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.st-slot > em, .st-slot .st-upload em { display: block; text-align: center; font-style: normal; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.st-slot-x {
  position: absolute; top: -7px; right: -7px; z-index: 2;
  width: 20px; height: 20px; line-height: 18px; text-align: center;
  background: rgba(31, 41, 55, .75); color: #fff; border-radius: 50%;
  font-size: 12px; cursor: pointer;
}
.st-slot-x:hover { background: var(--danger); }
.st-color-actions { display: flex; align-items: center; gap: 12px; }
.st-groups { font-size: 12px; }
.st-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 104px; height: 104px; background: var(--upload-bg);
  border: 1px dashed var(--primary-light); border-radius: 8px;
  color: var(--primary); cursor: pointer; transition: all .2s;
}
.st-upload:hover { background: var(--highlight); border-color: var(--primary); }
.st-upload b { font-size: 24px; line-height: 1; font-weight: 400; }
.st-upload em { font-style: normal; font-size: 11px; color: #9a86b8; text-align: center; padding: 0 4px; }
.st-upload.wide { width: 100%; height: 84px; flex-direction: row; gap: 8px; }
.st-upload.wide b { font-size: 20px; }
/* 模特模板 */
.st-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.st-thumb-card, .st-add-card {
  position: relative; width: 84px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.st-thumb-card img { width: 84px; height: 84px; object-fit: cover; }
.st-thumb-card .st-slot-x { top: 4px; right: 4px; }
.st-thumb-card em { display: block; font-style: normal; font-size: 10px; color: var(--text-muted); text-align: center; padding: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-add-card {
  height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--upload-bg); border: 1px dashed var(--primary-light); color: var(--primary); cursor: pointer;
}
.st-add-card:hover { background: var(--highlight); }
.st-add-card b { font-size: 22px; font-weight: 400; }
.st-add-card em { font-style: normal; font-size: 10px; color: #9a86b8; text-align: center; padding: 0 4px; }
/* 详情模板 */
.st-tpl-empty { font-size: 12px; padding: 6px 0 10px; }
.st-tpl { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 8px; background: #fcfcfd; }
.st-tpl > img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.st-tpl-info { flex: 1; min-width: 0; }
.st-tpl-name { font-size: 12px; margin-bottom: 6px; word-break: break-all; }
.st-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.st-role {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-muted); user-select: none;
}
.st-role:hover { border-color: var(--primary-light); color: var(--primary); }
.st-role.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.st-role-tip { font-size: 11px; margin-top: 4px; }
/* 尺寸表 */
.st-size-row { display: flex; align-items: center; gap: 12px; }
.st-size-row img { width: 90px; height: 90px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
/* 视频 */
.st-frames { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; }
.st-frames span { flex: 0 0 auto; }
.st-frames img { width: 88px; height: 66px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.st-video-meta { font-size: 12px; margin-bottom: 6px; }
.st-analyzing { display: flex; align-items: center; justify-content: center; padding: 18px; color: var(--primary); font-size: 13px; }
/* 提交 */
.st-submit { background: linear-gradient(135deg, #fbf3fe, #f6e6fc); }
.st-submit-note { font-size: 12px; color: var(--primary-dark); margin-bottom: 10px; }
/* 右侧结果 */
.st-empty { text-align: center; padding: 30px 18px; color: var(--text-muted); font-size: 13px; line-height: 1.8; }
.st-empty p { margin-top: 10px; }
.st-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-proj-name { font-weight: 700; font-size: 15px; }
.st-progress {
  margin-top: 8px; font-size: 13px; color: var(--primary);
  background: var(--highlight); border-radius: 8px; padding: 8px 12px;
}
.status-chip.partial { background: #fff7e6; color: #b45309; }
.st-sec { margin-bottom: 12px; }
.st-sec:last-child { margin-bottom: 0; }
.st-sec-t { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.st-cell { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; display: block; }
.st-cell img { width: 100%; height: 96px; object-fit: cover; }
.st-cell em {
  display: block; font-style: normal; font-size: 10px; color: var(--text-muted);
  text-align: center; padding: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-cell:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
/* 单图「重新生成」按钮：图片正下方横条（悬停浮现） */
.st-regen {
  position: absolute; left: 0; right: 0; top: 96px; z-index: 3;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  border: none; border-radius: 0; padding: 4px 0; font-size: 11px; line-height: 1.4;
  cursor: pointer; background: rgba(17, 24, 39, .82); color: #fff; white-space: nowrap; text-align: center;
}
.st-cell:hover .st-regen, .st-cell:focus-within .st-regen { opacity: 1; pointer-events: auto; }
.st-regen:hover { background: var(--primary, #4f46e5); }
.st-regen:disabled { opacity: .5; cursor: wait; }
/* 上身图重生成时联动尺寸图的「重新生成中」角标 */
.st-busytag {
  position: absolute; left: 0; right: 0; top: 96px; z-index: 4;
  padding: 4px 0; font-size: 11px; text-align: center;
  background: rgba(79, 70, 229, .9); color: #fff; pointer-events: none;
}
.st-long { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.st-long img { width: 100%; display: block; }
.st-right video { width: 100%; max-height: 420px; background: #000; border-radius: 8px; }
.st-donebar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border: 1px solid #bbe7c8 !important; background: linear-gradient(135deg, #f0fdf4, #ecfdf3);
}
.st-done-t { font-size: 17px; font-weight: 800; color: #15803d; margin-bottom: 4px; }
@media (max-width: 980px) {
  .st-body { flex-direction: column; }
  .st-left { flex: 1; max-width: none; }
}

/* —— 顶部「作品与素材」动态提示 —— */
/* —— 顶部「作品与素材」变色跳动（生成中 / 有新作品） —— */
.top-nav a.works-live {
  font-weight: 700;
  animation: worksPulse 1.4s linear infinite, worksBounce .7s ease-in-out infinite;
}
@keyframes worksPulse {
  0%, 100% { color: var(--primary); }
  25% { color: #f59e0b; }
  50% { color: #e11d48; }
  75% { color: #7c3aed; }
}
@keyframes worksBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* —— studio 生成中：引导去「作品与素材」查看 —— */
.st-see-hint { margin-top: 6px; font-size: 13px; color: var(--primary); background: var(--highlight); border-radius: 6px; padding: 6px 10px; }

/* —— 最近任务条（新版：一键生成作品单封面 + 任务名） —— */
.recent-item { cursor: pointer; text-align: center; }
.recent-item.on .recent-thumb { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.recent-thumb { position: relative; }
.recent-thumb-ph {
  width: 68px; height: 68px; border-radius: 8px; border: 1px dashed var(--border, #ddd);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted); background: #fafafa; margin: 0 auto;
}
.recent-st {
  position: absolute; left: 2px; bottom: 2px; font-size: 10px; line-height: 1;
  padding: 3px 5px; border-radius: 4px; color: #fff; background: #94a3b8;
}
.recent-st.pending, .recent-st.running { background: #f59e0b; }
.recent-st.succeeded, .recent-st.partial { background: #10b981; }
.recent-st.failed { background: #ef4444; }
.recent-name {
  margin-top: 4px; font-size: 11px; color: var(--text-main, #333);
  max-width: 76px; margin-left: auto; margin-right: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 重新加载按钮：悬停卡片时在任务名称下浮现（占位保留，避免列表跳动） */
.recent-reload {
  display: block; width: 74px; margin: 3px auto 0; padding: 2px 0;
  font: inherit; font-size: 10px; line-height: 1.5; text-align: center;
  border-radius: 4px; border: 1px solid var(--primary-light, #d8b4fe);
  background: #fff; color: var(--primary, #8b5cf6); cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .15s ease;
  white-space: nowrap; overflow: hidden;
}
.recent-item:hover .recent-reload, .recent-reload:focus-visible { opacity: 1; visibility: visible; }
.recent-reload:hover { background: var(--primary, #8b5cf6); color: #fff; border-color: var(--primary, #8b5cf6); }
.recent-reload:disabled { opacity: 1; visibility: visible; cursor: default; background: #f3f4f6; color: var(--text-muted, #999); border-color: var(--border, #e5e7eb); }

/* —— 作品与素材：一键生成单图缩略行 —— */
.works-brief { display: flex; gap: 14px; margin-top: 10px; align-items: flex-start; }
.works-brief-thumb {
  position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden;
  cursor: pointer; border: 1px solid var(--border, #e5e7eb); flex: 0 0 auto; background: #fafafa;
}
.works-brief-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.works-brief-thumb:hover { border-color: var(--primary); }
.works-brief-more {
  position: absolute; right: 0; bottom: 0; background: rgba(0,0,0,.62); color: #fff;
  font-size: 11px; padding: 2px 7px; border-top-left-radius: 8px;
}
.works-brief-ops { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.works-brief-ops .err { color: #ef4444; font-size: 12px; }

/* —— 作品详情（任务页内展开的分区清单） —— */
.work-detail { margin-bottom: 16px; }
.work-detail .st-sec-wrap { margin-top: 14px; }
.work-detail .st-result-head { display: flex; align-items: center; gap: 10px; }
.work-close {
  margin-left: auto; cursor: pointer; color: var(--text-muted, #888);
  font-size: 16px; padding: 2px 8px; border-radius: 6px;
}
.work-close:hover { background: #f3f4f6; color: #111; }

/* —— 详情页长图折叠块（整图较长默认收起，点击展开） —— */
.st-fold summary {
  cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px;
  font-weight: 700; font-size: 15px; color: inherit; padding: 2px 0;
}
.st-fold summary::-webkit-details-marker { display: none; }
.st-fold summary::before { content: "▸ "; color: var(--primary); display: inline-block; transition: transform .15s ease; }
.st-fold[open] summary::before { transform: rotate(90deg); }
.st-fold summary em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--text-muted); }
.st-fold .st-long { margin-top: 10px; }

/* —— 作品详情（任务页内展开）：紧凑 + 限宽（原整列全宽过长/过宽） —— */
.work-detail { max-width: 980px; margin-left: auto; margin-right: auto; }
.work-detail .st-card-title { font-size: 14px; margin: 14px 0 6px; }
.work-detail .st-sec { margin-bottom: 10px; }
.work-detail .st-sec-t { margin-bottom: 4px; }
.work-detail .st-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 6px; }
.work-detail .st-cell img { height: 108px; }
.work-detail .st-regen, .work-detail .st-busytag { top: 108px; }
.work-detail .st-donebar { flex-wrap: wrap; }

/* 最近任务点进的普通任务高亮定位 */
.task-item.task-focus {
  outline: 2px solid var(--primary, #6d5bff);
  outline-offset: 2px;
  border-radius: 12px;
  animation: taskFocusGlow 2.4s ease 2;
}
@keyframes taskFocusGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(109, 91, 255, 0); }
  50% { box-shadow: 0 0 18px rgba(109, 91, 255, .35); }
}

/* ===== 图形验证码（发短信前人机校验） ===== */
.cap-img {
  flex: 0 0 auto; width: 128px; height: 44px;
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; cursor: pointer; line-height: 0;
  background: #f4f1fa; user-select: none;
}
.cap-img:hover { border-color: var(--primary-light); }
.cap-img svg { width: 100%; height: 100%; display: block; }

/* ===== 手机端工作台优化（排版/直观性） ===== */
@media (max-width: 980px) {
  /* studio 工作台：单列布局收紧 + 提交条吸底常可见 */
  .st-wrap { padding: 12px 12px 28px; }
  .st-head { flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .st-head h2 { font-size: 18px; }
  .st-quota { align-self: flex-start; padding: 6px 14px; font-size: 12px; }
  .st-body { gap: 12px; }
  .st-card { padding: 12px 14px; }
  .st-submit {
    position: sticky; bottom: 0; z-index: 20;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
    border-radius: 12px 12px 0 0;
  }
  .st-submit .btn.big { font-size: 16px; }
}

@media (max-width: 860px) {
  /* 侧边栏：横滑胶囊导航，藏滚动条更干净 */
  .side-nav { padding: 8px 10px; gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { background: var(--bg, #f7f7fa); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-size: 13px; }
  .side-nav a:hover { background: var(--highlight); }
  .side-nav a.on { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

  /* 工作台操作列与底部生成条：生成按钮吸底、去小字提示留纯按钮 */
  .op-col { padding: 14px 14px 10px; }
  .tp-footer {
    position: sticky; bottom: 0; z-index: 30;
    flex-direction: column; gap: 0; padding: 10px 14px;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .07);
  }
  .tp-guide { display: none; }
  .gen-btn { width: 100%; height: 54px; }
  .gen-btn .gen-main { font-size: 17px; font-weight: 600; }
  .gen-btn .gen-sub { font-size: 12px; }

  /* 结果面板任务卡：头部换行不挤压 */
  .rp-task-head { flex-wrap: wrap; gap: 4px 10px; }
  .rp-task-fee { order: 5; }
}

@media (max-width: 640px) {
  /* 弹窗收边，避免内容贴边/超宽 */
  .modal { max-width: 94vw; padding: 18px 14px; }
  .modal-mask { padding: 12px; }
  .code-btn { white-space: nowrap; padding: 8px 10px; }

  /* studio：缩略网格适配窄屏，「重新生成」角标跟随格高 */
  .st-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
  .st-cell img { height: 84px; }
  .st-regen, .st-busytag { top: 84px; font-size: 10px; }
  .work-detail .st-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .work-detail .st-cell img { height: 84px; }
  .work-detail .st-regen, .work-detail .st-busytag { top: 84px; }

  /* 颜色组槽位与模特缩略：紧凑但不挤 */
  .st-slots { gap: 8px; }
  .st-slot, .st-slot .st-upload, .st-slot-img { width: 96px; }
  .st-slot .st-upload, .st-slot-img { height: 96px; }
  .st-thumb-card, .st-thumb-card img, .st-add-card { width: 76px; }

  /* 长图预览与视频 */
  .st-long { max-height: 300px; }
  .st-right video { max-height: 260px; }

  /* 头部与提交条 */
  .st-head h2 { font-size: 17px; }
  .st-sec-t { font-size: 12px; }
}

@media (max-width: 480px) {
  .st-wrap { padding: 10px 10px 24px; }
  .st-slot, .st-slot .st-upload, .st-slot-img { width: calc(50% - 4px); }
  .st-slot .st-upload, .st-slot-img { height: auto; aspect-ratio: 1 / 1; }
  .gen-btn { height: 52px; }
}

/* ===== 功能图解说明面板（替代原「生成结果」栏） ===== */
.guide-panel .rp-scroll { padding: 20px 22px; }
.gd-hero {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--highlight), #faf3fd);
  border: 1px solid var(--accent); border-radius: var(--radius);
}
.gd-emoji { font-size: 34px; line-height: 1; }
.gd-hero-tx { flex: 1; min-width: 0; }
.gd-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.gd-desc { font-size: 12.5px; color: var(--text-light); line-height: 1.7; }
.gd-sec { margin-bottom: 18px; }
.gd-sec-t { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.gd-feat, .gd-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 10px; margin-bottom: 8px;
  background: var(--bg); border-radius: var(--radius-sm);
}
.gd-feat-ic { font-size: 18px; line-height: 1.3; }
.gd-step-n {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.gd-tx { flex: 1; min-width: 0; }
.gd-tx b { display: block; font-size: 13px; color: var(--text); font-weight: 600; line-height: 1.4; }
.gd-tx em { display: block; font-style: normal; font-size: 12px; color: var(--text-light); line-height: 1.6; margin-top: 2px; }
.gd-tip { font-size: 12px; color: var(--text-light); line-height: 1.7; margin-bottom: 4px; }
.gd-cost {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: #fffbea; border: 1px solid #fde68a;
  font-size: 12px; line-height: 1.6;
}
.gd-cost span { color: var(--warn); font-weight: 600; flex: 0 0 auto; }
.gd-cost b { color: var(--text); font-weight: 500; }

/* studio 右列空态图解卡片 */
.guide-card { padding-bottom: 6px; }
.guide-card-head {
  font-size: 15px; font-weight: 600; color: var(--text);
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
}

/* 图解视觉版：流程 SVG 容器 + 步骤胶囊 */
.gd-flow {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 6px; margin-bottom: 4px;
}
.gd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; font-size: 12.5px; color: var(--text);
}
.gd-chip i {
  font-style: normal; width: 18px; height: 18px; flex: 0 0 auto;
  border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

/* ===== 后台任务图库 / 用户反馈 ===== */
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.gl-card, .fb-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; background: var(--bg);
}
.fb-card { margin-bottom: 12px; }
.gl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 8px; }
.gl-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-imgs a { display: block; position: relative; }
.gl-imgs img {
  width: 92px; height: 92px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); display: block; background: #fff;
}
.gl-imgs a.gl-in img { width: 64px; height: 64px; }
.gl-imgs a.gl-in::after {
  content: "原图"; position: absolute; left: 0; bottom: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 10px;
  padding: 1px 5px; border-radius: 0 6px 0 6px;
}
.gl-imgs a.gl-video {
  width: 92px; height: 92px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; border: 1px dashed var(--border); border-radius: 6px; text-decoration: none;
}
.gl-foot {
  font-size: 12px; margin-top: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fb-content { font-size: 13.5px; line-height: 1.7; margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; }

/* ---------- 图片查看器（灯箱）：点击缩略图放大看原图 ---------- */
.imgview {
  position: fixed; inset: 0; z-index: 3000; background: rgba(12, 10, 18, .88);
  display: flex; align-items: center; justify-content: center;
  padding: 52px 68px 64px; animation: imgview-in .14s ease;
}
@keyframes imgview-in { from { opacity: 0 } to { opacity: 1 } }
.imgview-img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px;
  box-shadow: 0 10px 44px rgba(0, 0, 0, .55);
}
/* 加载中隐藏占位（大图加载完自然浮现），避免半加载状态出现深色空块 */
.imgview-img { opacity: 0; transition: opacity .18s ease; }
.imgview-img.loaded { opacity: 1; }
.imgview-close {
  position: absolute; top: 14px; right: 20px; width: 36px; height: 36px; line-height: 34px;
  text-align: center; font-size: 17px; color: #fff; background: rgba(255, 255, 255, .14);
  border-radius: 50%; cursor: pointer; user-select: none;
}
.imgview-close:hover { background: rgba(255, 255, 255, .3); }
.imgview-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 78px;
  line-height: 74px; text-align: center; font-size: 40px; color: #fff;
  background: rgba(255, 255, 255, .12); border-radius: 8px; cursor: pointer; user-select: none;
}
.imgview-nav:hover { background: rgba(255, 255, 255, .26); }
.imgview-nav.prev { left: 12px; }
.imgview-nav.next { right: 12px; }
.imgview-bar {
  position: absolute; left: 0; right: 0; bottom: 16px; display: flex; gap: 18px;
  justify-content: center; align-items: center; color: rgba(255, 255, 255, .82); font-size: 13px;
}
.imgview-bar a { color: #fff; opacity: .82; text-decoration: underline; }
.imgview-bar a:hover { opacity: 1; }
/* 缩略图统一「可放大」指针 */
.upload-preview, .ws-ref img, .step-img-wrap img, .i2v-box img,
.st-slot-img, .st-thumb-card img, .st-tpl img, .st-size-row img,
.st-frames img, .st-cell, .recent-thumb img, .export-grid img { cursor: zoom-in; }
body:has(.imgview) { overflow: hidden; }
@media (max-width: 640px) {
  .imgview { padding: 44px 6px 60px; }
  .imgview-nav { width: 32px; height: 58px; line-height: 54px; font-size: 28px; }
  .imgview-close { top: 10px; right: 12px; }
}
