:root {
  /* 深色科技感 · 背景层级（由深到浅） */
  --bg: #07080f;
  --bg-2: #0b0d18;
  --panel: #10131f;
  --surface: #141828;
  --surface-2: #1a1f33;
  --surface-3: #232a44;
  /* 详情页媒体展示台背景（跟随日夜主题） */
  --media-stage: #0d0f16;
  --media-stage-border: rgba(140, 150, 220, 0.1);

  /* 玻璃拟态表面 */
  --glass: rgba(22, 26, 43, 0.66);
  --glass-strong: rgba(20, 24, 40, 0.85);
  --glass-border: rgba(140, 150, 220, 0.14);

  /* 边框 / 文字 */
  --border: rgba(140, 150, 220, 0.13);
  --border-strong: rgba(150, 160, 230, 0.26);
  --text: #eef1ff;
  --text-dim: #9aa3c7;
  --text-faint: #626c92;

  /* 紫青霓虹品牌色 */
  --brand: #8b7bff;
  --brand-2: #22d3ee;
  --brand-3: #c084fc;
  --brand-soft: rgba(124, 108, 255, 0.14);
  --brand-soft-2: rgba(34, 211, 238, 0.12);

  /* 语义色（深色下提亮） */
  --red: #ff5d73;
  --red-soft: rgba(255, 93, 115, 0.14);
  --lime: #2fe69a;
  --lime-soft: rgba(47, 230, 154, 0.13);
  --cyan: #2dd4ee;
  --cyan-soft: rgba(45, 212, 238, 0.13);
  --amber: #ffb648;
  --amber-soft: rgba(255, 182, 72, 0.14);

  /* 渐变 / 霓虹 */
  --grad: linear-gradient(120deg, #7c6cff 0%, #a05bff 50%, #22d3ee 120%);
  --grad-brand: linear-gradient(120deg, #7c6cff, #22d3ee);
  --glow: 0 0 0 1px rgba(124, 108, 255, 0.35), 0 8px 30px -6px rgba(124, 108, 255, 0.5);
  --glow-cyan: 0 0 0 1px rgba(34, 211, 238, 0.3), 0 8px 30px -6px rgba(34, 211, 238, 0.4);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --shadow-sm: 0 8px 24px -10px rgba(0, 0, 0, 0.65);
  --font: 'Inter', 'Segoe UI', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

::selection { background: rgba(124, 108, 255, 0.35); color: #fff; }

/* 深色科技滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(140, 150, 220, 0.3) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(124, 108, 255, 0.5), rgba(34, 211, 238, 0.4));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(124, 108, 255, 0.75); background-clip: content-box; }

/* 深色圆点纹理 */
.dots-bg {
  background-image: radial-gradient(rgba(139, 123, 255, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* 玻璃拟态工具类 */
.glass {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
}

/* ========== 顶部公告条 ========== */
.promo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 11px 40px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--grad);
  position: relative;
}
.promo-bar .promo-cta {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 13px;
  transition: background .2s;
}
.promo-bar .promo-cta:hover { background: rgba(255, 255, 255, 0.32); }
.promo-bar .promo-close {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: .7;
  font-size: 15px;
  background: none;
  border: none;
  color: #fff;
}

/* 深色科技极光背景 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(124, 108, 255, 0.22), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(34, 211, 238, 0.16), transparent 55%),
    radial-gradient(800px 700px at 50% 115%, rgba(160, 91, 255, 0.14), transparent 60%),
    var(--bg);
}
.aurora::before,
.aurora::after {
  content: '';
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 420px;
  min-height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: aurora-float 18s ease-in-out infinite alternate;
}
.aurora::before {
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.55), transparent 65%);
}
.aurora::after {
  bottom: -18%;
  right: -10%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.45), transparent 65%);
  animation-delay: -9s;
}
@keyframes aurora-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.12); }
  100% { transform: translate(-4%, 4%) scale(0.95); }
}
[data-theme="light"] .aurora { display: none; }

/* ========== 营销页导航（玻璃顶栏） ========== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin: 14px auto 8px;
  max-width: 1280px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 14px;
  z-index: 80;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.brand .logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}
.brand b { color: var(--brand); -webkit-text-fill-color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-dim); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 26px -8px rgba(124, 108, 255, 0.7);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn-lime { background: linear-gradient(120deg, #2fe69a, #13c38a); color: #04130d; }
.btn-lime:hover { box-shadow: 0 10px 26px -10px rgba(47, 230, 154, 0.6); }
.btn-ghost {
  background: var(--glass);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-dim);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger {
  background: linear-gradient(135deg, #ff6a6a, #ef4444);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(239, 68, 68, 0.7);
}
.btn-danger:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* 批量操作工具条 */
.batch-bar {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 18px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.batch-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.batch-all input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.batch-count { font-size: 13px; color: var(--text-dim); }
.batch-count strong { color: var(--brand); font-size: 15px; }
.batch-spacer { flex: 1; }

/* 卡片左上角复选框 */
.wk-check {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(10, 12, 24, 0.55);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  backdrop-filter: blur(6px);
}
.wk-check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.gallery.is-batch .work-card { cursor: default; }

/* ========== 通用布局 ========== */
.container { width: min(1200px, 92vw); margin: 0 auto; }
.section { padding: 80px 0; }

.hero { text-align: center; padding: 90px 0 60px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: clamp(16px, 2vw, 19px); color: var(--text-dim); max-width: 620px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.grid { display: grid; gap: 11px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: all .25s ease;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(124, 108, 255, 0.4); }
.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 15px; }

.section-head { text-align: center; margin-bottom: 50px; }
.section-head h2 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-head p { color: var(--text-dim); font-size: 16px; }

/* ========== 作品卡片 / 广场 ========== */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.work-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s ease;
  box-shadow: var(--shadow-sm);
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-card .thumb { position: relative; aspect-ratio: 1; background: var(--surface-3); overflow: hidden; }
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.work-card:hover .thumb img { transform: scale(1.05); }
.work-card video { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.work-card .meta { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.work-card .meta h4 { font-size: 14.5px; font-weight: 600; }
.tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 我的作品卡片（重构） ---------- */
.work-card { cursor: pointer; }
/* 我的作品列表：图片区域固定高度 195px */
.gallery .wk-card .thumb {
  aspect-ratio: auto;
  height: 195px;
}
.gallery .wk-card .thumb img,
.gallery .wk-card .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
}
/* 提高特异性，覆盖 .work-card .meta 的 flex 布局（标题不显示 / 操作行错位根因） */
.work-card .meta.wk-meta {
  display: block;
  padding: 12px 14px 14px;
}
.wk-title {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 5px;
}
.wk-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.wk-model { max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-dot { opacity: .6; }
.wk-time { white-space: nowrap; }
.wk-toolrow {
  display: flex;
  align-items: center;
  gap: 7px;
}
.wk-toolright {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto; /* 喜欢/删除/开关固定最右侧 */
}
.wk-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  padding: 4px;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  transition: color .15s, transform .15s;
}
.wk-like:hover { color: #e0645f; }
.wk-like.liked { color: #e0645f; }
.wk-like:active { transform: scale(1.18); }
.wk-vis-text { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.wk-del {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  padding: 0;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.wk-del:hover { color: #d9534f; border-color: #d9534f; background: rgba(217,83,79,.08); }

/* 采集按钮 / 已采集 / 圆形下载（作品卡） */
.wk-collect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.wk-collect:hover { background: var(--brand); color: #fff; }
.wk-collect.is-loading {
  background: var(--brand-soft); color: var(--brand);
  border-color: var(--brand-soft); cursor: default;
}
.wk-collect.is-done {
  border-color: var(--brand-soft);
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  gap: 4px;
  height: 30px;
  padding: 0 8px 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.wk-spin { animation: wkspin-rot .8s linear infinite; flex: none; }
@keyframes wkspin-rot { to { transform: rotate(360deg); } }

/* ===== 已采集：整体是一个可点击下载的胶囊，下载图标无独立背景、置于框内右侧 ===== */
.wk-collect.is-done,
.ws-collect.is-done,
.tk-collect.is-done,
.wd-mini.is-done,
.st-collect.is-done {
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.wk-collect.is-done > span,
.ws-collect.is-done > span,
.tk-collect.is-done > span,
.wd-mini.is-done > span,
.st-collect.is-done > span {
  flex: none;
}
.wk-collect.is-done:hover,
.ws-collect.is-done:hover,
.tk-collect.is-done:hover,
.wd-mini.is-done:hover,
.st-collect.is-done:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.wk-collect.is-done svg:last-child,
.ws-collect.is-done svg:last-child,
.tk-collect.is-done svg:last-child,
.wd-mini.is-done svg:last-child,
.st-collect.is-done svg:last-child {
  background: transparent;
  margin-left: 2px;
  flex: none;
}

/* ---------- 作品详情页（宽高自适应视窗） ---------- */
.ws-page { margin: 0; }
.ws-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.ws-back:hover { color: var(--brand); }

/* 公开详情页：作者信息 + 更多作品 */
.wd-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.wd-author .cc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  object-fit: cover;
}
.wd-more { margin-top: 28px; }
.wd-more-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
/* masonry：容器相对定位，每张卡片按自身高度绝对定位到当前最矮位置 */
.wd-more-grid {
  position: relative;
  width: 100%;
}
.wd-more-cell {
  position: absolute;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-3);
}
.wd-more-cell img,
.wd-more-cell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wd-more-sentinel {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 0 4px;
  color: var(--text-3, #8a8f99);
  font-size: 13px;
}
.wd-more-sentinel.is-loading { display: flex; }
.wd-more-sentinel::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: wd-more-spin 0.8s linear infinite;
}
@keyframes wd-more-spin { to { transform: rotate(360deg); } }

.ws-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  gap: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  height: calc(100dvh - 96px);
  box-sizing: border-box;
}
.ws-media {
  display: grid;
  place-items: center;
  background: var(--media-stage);
  border: 1px solid var(--media-stage-border);
  border-radius: 14px;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}
.ws-media img { width: 100%; height: 100%; object-fit: contain; }
.ws-media video { width: 100%; height: 100%; object-fit: contain; }
.ws-info {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ws-title { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.ws-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.ws-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
}
.ws-row-label { color: var(--text-dim); white-space: nowrap; font-size: 14.5px; }
.ws-row-value { text-align: right; font-weight: 700; font-size: 15px; }
.ws-prompt-block {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-bottom: 20px;
}
.ws-prompt-block .ws-row-label { display: block; margin-bottom: 10px; font-size: 14.5px; }
.ws-prompt-head { display: flex; align-items: center; justify-content: space-between; }
.cp-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border: none; background: transparent;
  color: var(--text-dim); font-size: 12.5px; line-height: 1;
  cursor: pointer; border-radius: 6px; transition: color .15s, background .15s;
}
.cp-btn svg { width: 15px; height: 15px; }
.cp-btn:hover { color: var(--brand); background: var(--brand-soft); }
.cp-btn.copied { color: var(--brand); }
.ws-prompt { font-size: 15.5px; line-height: 1.85; color: var(--text); white-space: pre-wrap; }
.ws-actions { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }
.wd-actions-row { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
.wd-actions-row > .ws-like,
.wd-actions-row > .ws-collect-line,
.wd-actions-row > .ws-collect-line .ws-collect { flex: 1 1 auto; justify-content: center; }

/* 采集状态行：采集图片按钮 / 已采集（整胶囊可点击下载） */
.ws-collect-line { display: flex; align-items: center; gap: 10px; }
.ws-collect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 20px;
  border: 1px solid var(--brand);
  border-radius: 12px;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ws-collect:hover { background: var(--brand); color: #fff; }
.ws-collect.is-loading {
  background: var(--brand-soft); color: var(--brand);
  border-color: var(--brand-soft); cursor: default;
}
.ws-collect.is-done {
  border-color: var(--brand-soft);
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  min-height: 40px;
  padding: 0 16px;
}
.ws-spin { animation: wsspin-rot .8s linear infinite; flex: none; }
.st-spin { animation: wsspin-rot .8s linear infinite; flex: none; }
.wd-spin { animation: wsspin-rot .8s linear infinite; flex: none; }
@keyframes wsspin-rot { to { transform: rotate(360deg); } }
.ws-like {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ws-like:hover, .ws-like.liked { color: #e0645f; border-color: #e0645f; }
.ws-same {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  text-decoration: none;
}
.ws-same:hover { color: #fff; border-color: transparent; opacity: .92; }
.ws-like-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ws-like-row .ws-like { flex: 1 1 auto; justify-content: center; }

/* 灯箱：喜欢 / 做同款 / 采集 同一行并列 */
.ws-action-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ws-action-row .ws-like { flex: 1 1 auto; justify-content: center; }
.ws-action-row .ws-collect { flex: 1 1 auto; }
.ws-public {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
}
.ws-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(217,83,79,.4);
  background: rgba(217,83,79,.07);
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 14px;
  color: #d9534f;
  cursor: pointer;
  transition: background .15s;
}
.ws-delete:hover { background: rgba(217,83,79,.15); }

/* ---------- 公开详情页：多图轮播（图片高度自适应） ---------- */
.wd-carousel { position: relative; }
.wd-carousel-track { position: absolute; inset: 0; }
.wd-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}
.wd-slide.is-active { opacity: 1; visibility: visible; }
.wd-slide img { width: 100%; height: 100%; object-fit: contain; }

.wd-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(13, 16, 28, 0.6);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .15s, color .15s;
  z-index: 2;
}
.wd-carousel-arrow.is-prev { left: 12px; }
.wd-carousel-arrow.is-next { right: 12px; }
.wd-carousel-arrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.wd-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}
.wd-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.22);
  cursor: pointer;
  transition: width .2s, background .2s;
}
.wd-dot.is-active { width: 20px; border-radius: 999px; background: var(--brand); }

/* ---------- 多图逐图采集：一行四列正方形缩略图 ---------- */
.wd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface-2);
}
.wd-thumb-cell { min-width: 0; }
.wd-thumb-box {
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-3);
  cursor: pointer;
}
.wd-thumb-box img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wd-thumb-box.is-active { outline: 2px solid var(--brand); outline-offset: 1px; }
.wd-thumb-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

/* 迷你采集按钮（图标 + 采集） */
.wd-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--brand);
  border-radius: 7px;
  background: transparent;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.wd-mini:hover { background: var(--brand); color: #fff; }
.wd-mini.is-done {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
}

@media (max-width: 860px) {
  .ws-card { grid-template-columns: 1fr; height: auto; }
  .ws-media { min-height: 260px; }
  .wd-carousel-track { position: relative; inset: auto; min-height: 260px; }
  .wd-slide { position: relative; }
}

/* ---------- 详情页改版：模型徽标 / 缩放控件 / 浅奶油底 ---------- */
.ws-media.wd-carousel {
  background: #f4f1ee;
  border-color: transparent;
}
.ws-media.wd-carousel.is-video {
  background: rgba(8, 10, 20, .35);
  border-color: var(--glass-border);
}
.wd-model-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  padding: 6px 16px;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.wd-zoombar {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
}
.wd-zoom-btn {
  width: 34px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.wd-zoom-btn:hover { background: var(--brand-soft); color: var(--brand); }
.wd-zoom-val {
  min-width: 58px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* 缩放 / 拖拽平移 */
.wd-carousel-track.js-zoom-viewport { touch-action: none; }
.wd-slide img.js-zoom-img {
  transform-origin: 0 0;
  transition: transform .2s ease;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}
.wd-slide img.js-zoom-img.is-zoomed { cursor: grab; }
.wd-slide img.js-zoom-img.is-grabbing {
  cursor: grabbing;
  transition: none;
}

/* 右侧：大标题 */
.ws-info .ws-title { font-size: 30px; margin-bottom: 14px; }

/* 作者行：蓝色圆形头像 + 名称 + 同行日期 */
.ws-info .wd-author {
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
}
.ws-info .wd-author .cc-avatar {
  width: 48px;
  height: 48px;
  flex: none;
  background: var(--brand);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}
.ws-info .wd-author .cc-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.wd-author-meta { display: flex; flex-direction: column; gap: 2px; }
.wd-author-name { font-size: 17px; font-weight: 700; color: var(--text); }
.wd-author-date { font-size: 13.5px; font-weight: 400; color: var(--text-dim); }

/* 作品ID / 使用模型 文字行 */
.wd-meta-lines { margin: 0 0 20px; font-size: 17px; line-height: 1.95; color: var(--text); }
.wd-meta-lines p { margin: 0; }
.wd-meta-k { color: var(--text); }

/* 创作提示词卡片 */
.ws-prompt-block.wd-prompt-card {
  border-top: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 22px;
}
.wd-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wd-prompt-title { font-size: 16px; font-weight: 700; color: var(--text); }
.wd-copy-text { padding: 4px 10px; font-size: 14.5px; font-weight: 500; }
.wd-prompt-card .ws-prompt { margin: 0; font-size: 15.5px; line-height: 1.8; }

/* 底部三按钮等高 */
.wd-actions-row { gap: 12px; }
.wd-actions-row > .ws-like,
.wd-actions-row > .ws-collect-line,
.wd-actions-row > .ws-collect-line .ws-collect {
  min-height: 48px;
  border-radius: 12px;
  font-weight: 600;
}
.wd-actions-row .ws-collect.is-done { background: var(--brand-soft); border-color: var(--brand-soft); }
.wd-actions-row .ws-collect.is-done:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ========== 表单 ========== */
.form-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.input, .textarea, select.input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: rgba(13, 16, 28, 0.55);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  transition: all .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
select.input { color-scheme: dark; }
select.input option {
  background: #12152a;
  color: #eef0ff;
}
[data-theme="light"] select.input { color-scheme: light; }
[data-theme="light"] select.input option { background: #fff; color: #1a1d2e; }
.input:focus, .textarea:focus, select.input:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(124, 108, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.16);
}
[data-theme="light"] .input,
[data-theme="light"] .textarea,
[data-theme="light"] select.input { background: #fff; }
[data-theme="light"] .input:focus,
[data-theme="light"] .textarea:focus,
[data-theme="light"] select.input:focus { background: #fff; }
.textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }

/* ========== 桌面应用框架 ========== */
.app-shell {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

/* 侧边导航 */
.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
[data-theme="light"] .sidebar { background: #ffffff; }

.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 14px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
  transition: all .18s;
  cursor: pointer;
}
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.25);
}
.side-link .ico { width: 21px; text-align: center; font-size: 16px; flex-shrink: 0; }
.side-link .chev { margin-left: auto; font-size: 11px; transition: transform .25s; color: var(--text-faint); }
.side-group.open > .side-link .chev { transform: rotate(90deg); }

.side-group-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 18px 14px 8px;
  font-weight: 700;
}

/* 后台侧栏专用结构类 */
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 8px 22px -8px rgba(124, 108, 255, .8);
  flex-shrink: 0;
}
.brand-name { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: .2px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; }
.side-link .side-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.side-foot { margin-top: auto; padding: 12px 8px 6px; border-top: 1px solid var(--border); }

/* 前台侧边栏分区标题（小字 + 背景色竖条） */
.side-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 8px;
}
.side-section-title .sst-bar {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--brand);
  flex-shrink: 0;
}
.side-section-title .sst-text {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-weight: 400;
}

.side-sub {
  padding: 3px 0 6px 18px;
  display: none;
  flex-direction: column;
  gap: 1px;
}
.side-group.open .side-sub { display: flex; }
.side-sub a {
  position: relative;
  padding: 8px 12px 8px 26px;
  font-size: 13.5px;
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 500;
  transition: all .15s;
}
.side-sub a::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  transform: translateY(-50%);
}
.side-sub a:hover { color: var(--brand); background: var(--surface-2); }
.side-sub a.active { color: var(--brand); font-weight: 400; background: var(--brand-soft); }
.side-sub a.active::before { background: var(--brand); }

.side-credit {
  margin: 6px 8px 4px;
  padding: 13px 15px;
  border-radius: 15px;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
}
.side-credit .row1 { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.side-credit .num { font-size: 21px; font-weight: 800; }
.side-credit a { display: block; margin-top: 8px; background: rgba(255,255,255,0.22); text-align: center; padding: 6px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.side-credit a:hover { background: rgba(255,255,255,0.34); }

.side-copyright {
  margin-top: auto;
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-copyright .sc-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.side-copyright .sc-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: all .18s;
}
.side-copyright .sc-icon:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.side-copyright .sc-line { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.side-copyright a.sc-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.side-copyright a.sc-line:hover { color: var(--brand); }
.side-copyright .sc-line a { color: var(--text-dim); text-decoration: none; }
.side-copyright .sc-line a:hover { color: var(--brand); }

.app-main { padding: 0 14px 14px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { color: var(--text-dim); font-size: 14.5px; margin-top: 2px; }

/* ========== 折叠菜单 ========== */
.accordion { display: flex; flex-direction: column; gap: 2px; }
.acc-item { border-radius: 13px; overflow: hidden; }
.acc-head {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
}
.acc-head:hover { color: var(--text); }
.acc-head .chev { margin-left: auto; transition: transform .25s; font-size: 11px; }
.acc-item.open .acc-head { color: var(--text); }
.acc-item.open .acc-head .chev { transform: rotate(90deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-item.open .acc-body { max-height: 520px; }
.acc-body a { display: block; padding: 8px 14px 8px 46px; font-size: 13.5px; border-radius: 10px; color: var(--text-dim); }
.acc-body a:hover { color: var(--brand); background: var(--surface-2); }
.acc-body a.active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }

/* ========== 表格 ========== */
.table-wrap { border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; overflow-x: auto; background: var(--glass); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  padding: 14px 18px;
  background: rgba(140, 150, 220, 0.06);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tbl td { padding: 14px 18px; border-top: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.tbl tr:hover td { background: rgba(124, 108, 255, 0.06); }
.tbl .url-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .url-cell a { color: var(--brand); font-weight: 600; }

/* ========== 状态标签 ========== */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status-pending, .status-running, .status-processing, .status-video_processing { background: var(--amber-soft); color: var(--amber); }
.status-succeeded, .status-done { background: var(--lime-soft); color: var(--lime); }
.status-failed, .status-error { background: var(--red-soft); color: var(--red); }

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .4s; }

/* ========== 统计卡 ========== */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .num { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.stat .num.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .lbl { color: var(--text-dim); font-size: 14px; }
.stat .ico-big { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: var(--brand-soft); }

/* ========== 登录注册 ========== */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 800;
  box-shadow: 0 10px 24px -8px rgba(124, 108, 255, .8);
}
.logo-text { font-size: 21px; font-weight: 800; color: var(--text); }
.auth-card { width: min(430px, 100%); background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 24px; padding: 38px; box-shadow: var(--shadow); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; font-weight: 800; }
.auth-card .sub { color: var(--text-dim); margin-bottom: 28px; font-size: 15px; }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; border: 1px solid; font-weight: 500; }
.alert-error { background: var(--red-soft); border-color: rgba(255, 93, 115, 0.35); color: var(--red); }
.alert-success { background: var(--lime-soft); border-color: rgba(47, 230, 154, 0.32); color: var(--lime); }

.empty { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty .big { font-size: 46px; margin-bottom: 14px; }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.text-sm { font-size: 13px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.result-grid img, .result-grid video { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.shot-row {
  display: grid;
  grid-template-columns: 48px 140px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--glass);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.shot-row img { width: 140px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.shot-row .seq-n { font-size: 22px; font-weight: 800; color: var(--text-faint); text-align: center; }

.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 60px; color: var(--text-faint); font-size: 14px; }
.footer-records { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.record-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.record-links a { color: var(--text-faint); text-decoration: none; transition: color .15s; }
.record-links a:hover { color: var(--text-dim); }
.police-link { display: inline-flex; align-items: center; gap: 6px; }
.police-ico {
  width: 14px; height: 14px; flex: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d72924'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.4 8 11 4.6-1.6 8-6 8-11V5l-8-3zm-1.2 13.6-2.7-2.7 1.3-1.3 1.4 1.4 3.8-3.8 1.3 1.3-5.1 5.1z'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.brand img { height: 28px; width: auto; object-fit: contain; border-radius: 6px; }

/* ========== 筛选 / 分页 ========== */
.filter-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.filter-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.filter-btn:hover { color: var(--brand); border-color: var(--brand); }
.filter-btn.active { background: var(--text); color: #fff; border-color: var(--text); }
.filter-label { font-size: 14px; color: var(--text-faint); align-self: center; margin-right: 2px; }

.pager { margin-top: 38px; display: flex; justify-content: center; }
.pager nav { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pager ul { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pager a, .pager span {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
}
.pager a:hover { color: var(--brand); border-color: var(--brand); }
.pager .active span { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .disabled span { opacity: .4; }

/* ========== 工作台（workspace） ========== */
.workspace { display: grid; grid-template-columns: 240px 1fr; height: 100vh; overflow: hidden; background: var(--bg); }
.workspace.has-promo { height: calc(100vh - 49px); }

.rail {
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 2px;
  overflow-y: auto;
}
.rail-logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-size: 18px; font-weight: 700; }
.rail-logo .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
}
.rail-item .rico { width: 20px; text-align: center; font-size: 16px; }
.rail-item:hover { background: var(--surface-2); color: var(--text); }
.rail-item.active { background: var(--brand-soft); color: var(--brand); }
.rail-item .arrow { margin-left: auto; font-size: 12px; color: var(--text-faint); }
.rail-sep { height: 1px; background: var(--border); margin: 12px 8px; }
.rail-foot { margin-top: auto; }

.stage { overflow-y: auto; }
.stage-inner { max-width: 960px; margin: 0 auto; padding: 26px 36px 80px; }

.stage-topbar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-bottom: 26px; }
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
}
.lang-pill .caret { font-size: 10px; color: var(--text-faint); }
.btn-join { padding: 10px 24px; font-size: 14px; }

/* 顶部分类 */
.tab-row { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 30px; }
.tab-pill {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.tab-pill:hover { color: var(--brand); }
.tab-pill.active { background: var(--text); color: #fff; border-color: var(--text); }

.stage-title { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stage-title .mascot { font-size: 44px; }
.stage-hint { font-size: 16px; color: var(--text-dim); margin-bottom: 32px; max-width: 600px; }

/* 大输入框 */
.composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.composer-form { display: block; }
.composer-main { display: flex; align-items: flex-start; gap: 14px; }
.composer-add {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  border: 1.5px dashed var(--border-strong);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.composer-add:hover { border-color: var(--brand); color: var(--brand); }
.composer-input { flex: 1; border: none; background: none; font-family: inherit; font-size: 16px; color: var(--text); resize: none; min-height: 52px; line-height: 1.5; padding: 12px 2px; }
.composer-input::placeholder { color: var(--text-faint); }
.composer-input:focus { outline: none; }
.composer-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.composer-tools { display: flex; gap: 9px; flex-wrap: wrap; flex: 1 1 auto; }
.composer-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.composer-chip:hover { color: var(--brand); border-color: var(--brand); }

.home-featured { margin-top: 56px; }
.featured-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.featured-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.link-more { color: var(--text-dim); font-size: 14px; font-weight: 600; }
.link-more:hover { color: var(--brand); }
.chip-static { cursor: default; }

/* ========== 漫剧流程页 ========== */
.comic-flow { max-width: 1080px; margin: 0 auto; }

.flow-steps { display: flex; gap: 0; margin: 8px 0 34px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 18px; padding: 8px; box-shadow: var(--shadow-sm); overflow-x: auto; backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.flow-step { flex: 1; min-width: 130px; display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-radius: 13px; color: var(--text-faint); font-size: 14px; font-weight: 700; white-space: nowrap; transition: all .2s; }
.flow-step .fs-n { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); color: var(--text-dim); display: grid; place-items: center; font-size: 14px; font-weight: 800; flex-shrink: 0; transition: all .2s; }
.flow-step .fs-model { display: block; font-size: 11px; font-weight: 500; color: var(--text-faint); }
.flow-step.active { background: var(--brand-soft); color: var(--brand); }
.flow-step.active .fs-n { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -6px rgba(124,108,255,.8); }
.flow-step.done .fs-n { background: var(--lime); color: #08100d; }
.flow-step.done { color: var(--text); }

.flow-panel { display: none; animation: fadeUp .35s ease; }
.flow-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.flow-nav { display: flex; justify-content: space-between; margin-top: 28px; gap: 12px; }

.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.option-card {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
  transition: all .18s;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
}
.option-card .oc-ico { font-size: 26px; display: block; margin-bottom: 8px; }
.option-card:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.option-card.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 10px 24px -12px rgba(124,108,255,.7); }

.ratio-card { font-size: 15px; padding: 18px 10px; }

/* 分镜脚本卡片 */
.shot-edit-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.shot-edit-card .seq-badge {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.shot-preview {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.shot-preview img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.shot-preview .sp-bar { display: flex; gap: 10px; padding: 10px 12px; background: var(--surface-2); flex-wrap: wrap; }
.shot-preview audio { height: 34px; flex: 1; min-width: 160px; }

/* 流程总结 */
.summary-box { background: var(--brand-soft); border: 1px solid var(--border-strong); border-radius: 18px; padding: 22px; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; }
.summary-row b { color: var(--brand); }

/* ========== 主页 / 广场 新 UI ========== */
/* 顶部导航 */
.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.home-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 11px 20px;
  width: 380px;
  max-width: 42vw;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.home-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.home-search .hs-ico { font-size: 15px; opacity: .6; }
.home-search input {
  border: 0; outline: none; background: transparent; flex: 1;
  font-size: 14px; color: var(--text); font-family: var(--font);
}
.home-topactions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* 顶部金色胶囊（邀请有奖 / 会员 / 积分+签到） */
.pill-gold-solid, .pill-gold-line, .pill-credit {
  display: inline-flex; align-items: center;
  height: 40px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; font-weight: 700; font-family: var(--font);
}
.pill-gold-solid {
  gap: 7px; padding: 0 20px;
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(99,102,241,.7);
  transition: transform .16s, box-shadow .16s;
}
.pill-gold-solid:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(99,102,241,.8); }
.pill-gold-solid .pill-ico { width: 18px; height: 18px; }
.pill-gold-line {
  gap: 8px; padding: 0 22px;
  background: var(--surface); color: var(--brand);
  border: 1.5px solid var(--brand);
  transition: all .16s;
}
.pill-gold-line:hover { border-color: var(--brand-2); color: var(--brand-2); box-shadow: 0 8px 18px -10px rgba(99,102,241,.5); }
.pill-gold-line .pill-ico { width: 17px; height: 17px; }

.pill-credit { overflow: hidden; border: 1.5px solid rgba(255, 182, 72, 0.5); }
.pill-credit .pc-left {
  display: inline-flex; align-items: center; gap: 8px;
  height: 100%; padding: 0 18px;
  background: var(--surface); color: var(--text-dim);
  font-size: 13.5px; font-weight: 600;
}
.pill-credit .pc-left b { color: var(--amber); font-size: 17px; font-weight: 800; }
.pill-credit .pc-right {
  display: inline-flex; align-items: center;
  height: 100%; padding: 0 24px; border: 0;
  background: linear-gradient(120deg, #ffb648, #f5921f); color: #2a1a04;
  font-size: 14px; font-weight: 700; font-family: var(--font);
  cursor: pointer; text-decoration: none;
  transition: background .16s;
}
.pill-credit .pc-right:hover { background: #d89c35; }
.pill-credit .pc-right.done { background: #d9c39a; cursor: default; }

.topact {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-dim);
  transition: all .18s;
}
.topact .ta-ico { font-size: 15px; }
.topact:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.topact-invite:hover { border-color: var(--amber); color: var(--amber); }
.topact-vip {
  border-color: transparent;
  background: linear-gradient(120deg, #f8e7c2, #f0c674);
  color: #6b4a12;
}
.topact-vip:hover { color: #6b4a12; }
.topact-login:hover { border-color: var(--brand); color: var(--brand); }
.topact-auth {
  border-color: transparent;
  background: var(--grad); color: #fff;
}
.list-page-title { font-size: 24px; font-weight: 800; }

/* 创作区：左输入 右热门 */
.create-zone {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}
.agent-box, .hot-box, .slide-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.agent-box { padding: 34px 34px 30px; }

/* 作品广场顶部幻灯片（替换主页左侧 agent-box） */
.slide-box {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.slide-viewport { position: absolute; inset: 0; }
.slide-track { position: absolute; inset: 0; }
.slide-item {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .6s ease;
  display: block;
}
.slide-item.is-active { opacity: 1; visibility: visible; }
.slide-item img,
.slide-item video {
  width: 100%; height: 100%;
  object-fit: cover; background: #111;
}
.slide-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 60px 28px 46px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
  color: #fff;
}
.slide-title {
  display: block;
  font-size: 19px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.slide-author { font-size: 13px; color: rgba(255, 255, 255, .85); }
.slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 999px;
  border: none; cursor: pointer;
  background: rgba(0, 0, 0, .38); color: #fff;
  font-size: 24px; line-height: 1;
  display: grid; place-items: center;
  transition: background .2s; z-index: 2;
}
.slide-arrow:hover { background: rgba(0, 0, 0, .6); }
.slide-arrow.is-prev { left: 16px; }
.slide-arrow.is-next { right: 16px; }
.slide-dots {
  position: absolute; left: 0; right: 0; bottom: 16px;
  display: flex; justify-content: center; gap: 8px;
  z-index: 2;
}
.slide-dot {
  width: 8px; height: 8px; border-radius: 999px;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .45);
  transition: background .2s, width .2s;
}
.slide-dot.is-active { background: #fff; width: 20px; }
.slide-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--text-dim); font-size: 15px;
}
.agent-title { font-size: 27px; font-weight: 800; line-height: 1.35; letter-spacing: -.5px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.agent-sub { color: var(--text-dim); font-size: 14.5px; margin: 12px 0 22px; }
.agent-inputwrap textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 16px 18px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.agent-inputwrap textarea:focus { border-color: var(--brand); background: rgba(124, 108, 255, 0.07); box-shadow: 0 0 0 4px var(--brand-soft); }
.agent-suggest { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 20px; }
.agent-chip {
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all .16s;
}
.agent-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.agent-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.agent-modes { display: flex; gap: 8px; }
.amode {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1.5px solid transparent;
}
.amode.active { background: var(--brand-soft); color: var(--brand); border-color: var(--border-strong); }
.agent-go {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(99, 102, 241, .75);
  transition: transform .16s, box-shadow .16s;
}
.agent-go svg { display: block; }
.agent-go:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(99, 102, 241, .85); }
.agent-go:active { transform: translateY(0) scale(.96); }

/* 热门创作轮播：一组4个（2列×2行） */
.hot-box { padding: 26px 26px 22px; display: flex; flex-direction: column; }
.hot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hot-head h2 { font-size: 18px; font-weight: 800; }
.hot-head-right { display: flex; align-items: center; gap: 14px; }
.hot-more { font-size: 13px; color: var(--brand); font-weight: 600; }
.hot-arrows { display: flex; gap: 6px; }
.hot-arrow {
  width: 26px; height: 26px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim);
  font-size: 15px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.hot-arrow:hover { color: var(--brand); border-color: var(--brand); }
.hot-viewport { overflow: hidden; }
.hot-track { display: flex; transition: transform .35s ease; }
.hot-grid {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 10px;
  container-type: inline-size;
}
.hot-cell {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.hot-cell img {
  width: 100%;
  /* 原 16/10 高度再减 8px（列宽=(容器宽-10px间距)/2） */
  height: calc((100cqw - 10px) / 2 * 10 / 16 - 8px);
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.hot-cell:hover img { transform: scale(1.04); }
.hot-empty-card {
  height: calc((100cqw - 10px) / 2 * 10 / 16 - 8px);
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  display: flex; align-items: flex-end;
}
.hot-cap {
  position: absolute; left: 12px; right: 12px; bottom: 10px;
  background: linear-gradient(transparent, rgba(23,21,43,.72));
  color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 14px 10px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .2s;
}
.hot-cell:hover .hot-cap { opacity: 1; }
.hot-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; min-height: 6px; }
.hot-dot {
  width: 6px; height: 6px; padding: 0;
  border-radius: 50%; border: 0;
  background: var(--border); cursor: pointer;
  transition: width .2s;
}
.hot-dot.active { width: 16px; border-radius: 3px; background: var(--brand); }


/* 分类 TAB */
.cat-tabs {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 4px;
}
.cat-tab {
  border: 0; background: transparent;
  padding: 10px 18px;
  font-family: var(--font);
  font-size: 15px; font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 12px 12px 0 0;
  position: relative;
  transition: color .16s, background .16s;
}
.cat-tab:hover { color: var(--brand); }
.cat-tab.active { color: var(--brand); }
.cat-tab.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: -5px;
  height: 3px; border-radius: 3px; background: var(--grad);
}

/* 内容卡片 4 列 */
.content-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.content-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.content-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(124,108,255,.4); }
.cc-media { display: block; position: relative; }
.cc-media img, .cc-media video {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--surface-3);
}
.cc-play {
  position: absolute; inset: 0; margin: auto;
  width: 46px; height: 46px; border-radius: 999px;
  background: rgba(13, 16, 28, .5); color: #fff;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; font-size: 16px;
}
.cc-meta { padding: 13px 15px 15px; }
.cc-title {
  font-size: 14.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 8px;
}
.cc-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim);
}
.cc-author { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-dim); flex-shrink: 0; }
.cc-avatar {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 700; font-size: 11px;
  overflow: hidden;
}
.cc-avatar img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; display: block; }
.cc-model {
  max-width: 90px; flex-shrink: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-time { flex-shrink: 0; }
.cc-like {
  margin-left: auto; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  border: none; background: none; padding: 2px 4px;
  font-family: var(--font); font-size: 12px; color: var(--text-dim);
  cursor: pointer; transition: color .18s;
}
.cc-like:hover { color: #e0567a; }
.cc-like.liked { color: #e0567a; }
.cc-like.liked svg { fill: currentColor; }

/* 底部加载区 */
.grid-foot { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 26px 0 10px; }
.load-more {
  border: 1.5px solid var(--brand);
  background: var(--brand-soft); color: var(--brand);
  padding: 12px 40px; border-radius: 999px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .18s;
}
.load-more:hover { background: var(--brand-soft); transform: translateY(-1px); }
/* 列表底部透明渐变横幅：中间“进入广场查看更多” */
.grid-end-banner[hidden] { display: none; }
.grid-end-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 10px;
  color: #fff;
  font-size: 14.5px; font-weight: 700; letter-spacing: .5px;
  background:
    linear-gradient(90deg, rgba(99,102,241,0) 0%, rgba(99,102,241,.42) 22%,
      rgba(139,92,246,.55) 50%, rgba(99,102,241,.42) 78%, rgba(99,102,241,0) 100%);
  border: 1px solid rgba(139,92,246,.28);
  transition: all .2s;
}
.grid-end-banner:hover {
  background:
    linear-gradient(90deg, rgba(99,102,241,0) 0%, rgba(99,102,241,.6) 22%,
      rgba(139,92,246,.72) 50%, rgba(99,102,241,.6) 78%, rgba(99,102,241,0) 100%);
}
.grid-end-banner .geb-arrow { transition: transform .2s; }
.grid-end-banner:hover .geb-arrow { transform: translateX(4px); }
.grid-loading { color: var(--text-dim); font-size: 14px; }
.list-pager { margin-top: 30px; justify-content: center; display: flex; }

/* ========== studio 模型下拉卡片 ========== */
.model-picker { position: relative; }
.model-trigger {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--font); font-size: 14.5px; font-weight: 600; color: var(--text);
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.model-picker.open .model-trigger { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.mt-ico { font-size: 15px; }
.mt-value { flex: 1; text-align: left; }
.mt-arrow { color: var(--text-dim); transition: transform .2s; }
.model-picker.open .mt-arrow { transform: rotate(180deg); }
.model-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  max-height: 300px; overflow-y: auto;
  display: none;
  padding: 6px;
}
.model-picker.open .model-dropdown { display: block; }
.model-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  border: 0; background: transparent;
  padding: 11px 14px;
  border-radius: 11px;
  font-family: var(--font); text-align: left;
  cursor: pointer;
}
.model-option:hover { background: var(--surface-2); }
.model-option.selected { background: var(--brand-soft); }
.mo-label { font-size: 14px; font-weight: 700; color: var(--text); }
.mo-channel { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.model-empty { padding: 18px; font-size: 13.5px; color: var(--text-dim); text-align: center; }

/* ========== 主页创作模式 / 自动设置 ========== */
.agent-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mode-select, .auto-select { position: relative; }
.mode-trigger, .auto-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 11px;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.mode-trigger:hover, .auto-trigger:hover { border-color: var(--brand); }
.mode-select.open .mode-trigger,
.auto-select.open .auto-trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.ms-ico, .as-ico { font-size: 15px; }
.ms-arrow, .as-arrow { font-size: 11px; color: var(--text-dim); }

.mode-card, .auto-card {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 264px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(20, 70, 85, .16);
  padding: 12px;
  display: none;
  z-index: 40;
}
.mode-select.open .mode-card,
.auto-select.open .auto-card { display: block; }
.auto-card { width: 300px; }

.mc-title {
  font-size: 12px; font-weight: 800; color: var(--text-dim);
  letter-spacing: .08em;
  padding: 4px 8px 8px;
}
.mode-card .mode-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: 0; background: transparent;
  padding: 10px 12px;
  border-radius: 11px;
  font-family: var(--font); text-align: left;
  cursor: pointer;
}
.mode-card .mode-option:hover { background: var(--surface-2); }
.mode-card .mode-option.selected { background: var(--brand-soft); }
.mode-card .mo-ico { font-size: 17px; }
.mode-card .mo-name { font-size: 14px; font-weight: 700; color: var(--text); }

.ac-label {
  font-size: 12px; font-weight: 800; color: var(--text-dim);
  letter-spacing: .06em;
  padding: 8px 4px 7px;
}
.pref-tabs {
  display: flex; gap: 6px;
  background: var(--surface-2);
  border-radius: 11px;
  padding: 4px;
}
.pref-tab {
  flex: 1;
  border: 0; background: transparent;
  border-radius: 8px;
  padding: 7px 0;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
}
.pref-tab.active { background: var(--surface); color: var(--brand); box-shadow: 0 2px 6px rgba(20,70,85,.1); }

.ac-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ac-col .ac-label { padding-bottom: 6px; }
.ac-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}
.ac-select:focus { outline: none; border-color: var(--brand); }


/* ========== 顶部头像 + 用户下拉卡 ========== */
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 0; background: var(--brand-soft); padding: 0; cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform .18s, box-shadow .18s;
}
.user-trigger:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(99, 102, 241, .8); }
.user-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff; font-size: 13px; font-weight: 800;
}
@media (max-width: 960px) {
  .user-trigger { width: 34px; height: 34px; }
}
.user-avatar.lg { width: 42px; height: 42px; font-size: 17px; }
.user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.user-card {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(20, 70, 85, .16);
  padding: 10px;
  display: none;
  z-index: 60;
}
.user-menu.open .user-card { display: block; }
.uc-head { display: flex; align-items: center; gap: 11px; padding: 8px 8px 12px; }
.uc-name { font-size: 15px; font-weight: 800; color: var(--text); }
.uc-sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.uc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text);
}
.uc-item:hover { background: var(--surface-2); }
.uci-ico { font-size: 15px; }
.uc-foot { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.uc-logout {
  width: 100%;
  border: 0; background: transparent;
  padding: 10px;
  border-radius: 10px;
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  color: #ff7a7a;
  cursor: pointer;
}
.uc-logout:hover { background: rgba(255, 122, 122, .1); }

/* ========== 主页创作区 composer ========== */
.agent-form { margin: 0; }
.composer {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px 20px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.composer textarea {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 6px 2px 10px;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  resize: none;
  outline: none;
}

/* 左上角倾斜上传槽区 */
.upload-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin: -40px 0 8px;
}
.slot-group { display: none; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.slot-group.active { display: flex; }

.upload-tilt {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 66px;
  height: 52px;
  border: 1.5px dashed var(--brand-2);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  transform: rotate(-6deg);
  transition: transform .16s, border-color .16s, background .16s;
}
.upload-tilt:hover { transform: rotate(0deg) scale(1.04); border-color: var(--brand); }
.upload-tilt.uploading { opacity: .6; pointer-events: none; }
.ut-plus { font-size: 20px; font-weight: 700; line-height: 1; }
.ut-label { font-size: 11px; font-weight: 700; }

.slot-files { display: contents; }
.sf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 150px;
  height: 38px;
  padding: 3px 8px 3px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: default;
}
.sf-chip img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; }
.sf-ico { font-style: normal; font-size: 16px; width: 30px; text-align: center; }
.sf-chip em {
  font-style: normal; font-size: 12px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sf-x {
  font-weight: 800; color: var(--text-faint); cursor: pointer; font-size: 14px;
}
.sf-x:hover { color: #ff7a7a; }

/* @ 提及卡 */
.mention-card {
  position: absolute;
  top: 78px;
  left: 20px;
  z-index: 50;
  width: 260px;
  max-height: 230px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(20, 70, 85, .18);
  padding: 6px;
  display: none;
}
.mention-card.open { display: block; }
.mention-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  border: 0; background: transparent;
  padding: 9px 10px;
  border-radius: 10px;
  font-family: var(--font); text-align: left; cursor: pointer;
}
.mention-item:hover { background: var(--surface-2); }
.mi-ico { font-size: 15px; }
.mi-name {
  font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 底部工具 + 发送 */
.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.composer-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.composer-send { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* pick 下拉 */
.pick-select { position: relative; }
.pick-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 9px 13px;
  border-radius: 11px;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pick-trigger:hover { border-color: var(--brand); }
.pick-select.open .pick-trigger {
  border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.pt-ico { font-size: 14px; }
.pt-arrow { font-size: 11px; color: var(--text-dim); }

.pick-card {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(20, 70, 85, .16);
  padding: 12px;
  display: none;
  z-index: 40;
}
.pick-select.open .pick-card { display: block; }
.pc-wide { width: 280px; }
.pc-title {
  font-size: 12px; font-weight: 800; color: var(--text-dim);
  letter-spacing: .06em;
  padding: 2px 4px 8px;
}
.pc-title:not(:first-child) { padding-top: 12px; }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.pick-item {
  border: 0; background: transparent;
  padding: 10px 12px;
  border-radius: 11px;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  color: var(--text); text-align: left; cursor: pointer;
}
.pick-item:hover { background: var(--surface-2); }
.pick-item.selected { background: var(--brand-soft); color: var(--brand); }

/* 分段选择 */
.seg-grid { display: flex; gap: 6px; }
.seg-opt {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 4px;
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.seg-opt:hover { border-color: var(--brand); }
.seg-opt.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* 自定义宽高 */
.size-inputs { display: flex; align-items: center; gap: 8px; }
.size-inputs input {
  flex: 1; min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: var(--font); font-size: 13px;
  color: var(--text); background: var(--surface);
}
.size-inputs input:focus { outline: none; border-color: var(--brand); }
.si-x { color: var(--text-dim); font-weight: 700; }

/* 时长卡片 */
.dur-card { width: 300px; }
.dur-sliderwrap { flex: 1; min-width: 0; }
.dur-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 6px;
  background: linear-gradient(to right, var(--brand) 0%, var(--brand) 66.6%, var(--surface-3) 66.6%, var(--surface-3) 100%);
  outline: none; cursor: pointer;
}
.dur-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand);
  box-shadow: 0 3px 8px rgba(99, 102, 241,.4);
  cursor: grab;
}
.dur-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); cursor: grab;
}
.dur-marks {
  display: flex; justify-content: space-between;
  margin-top: 8px; padding: 0 2px;
  font-size: 11.5px; color: var(--text-dim); font-weight: 600;
}
.dur-card .pc-title { padding-bottom: 10px; }
.dur-card-inner { display: flex; align-items: center; gap: 14px; }
.dur-card-inner .dur-input { flex-shrink: 0; }
.dur-input {
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: 84px;
}
.dur-input input {
  flex: 1; min-width: 0; width: 100%;
  border: 0; padding: 8px 4px 8px 10px;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--text); text-align: center;
}
.dur-input input:focus { outline: none; }
.du-unit {
  padding: 0 9px; font-size: 12.5px; font-weight: 700;
  color: var(--text-dim); border-left: 1px solid var(--border);
  align-self: stretch; display: flex; align-items: center;
}

/* 模版卡 */
.tpl-option {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%;
  border: 1px solid var(--border); background: var(--surface);
  padding: 10px 13px; margin-bottom: 7px;
  border-radius: 12px; text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tpl-option:hover { border-color: var(--brand); }
.tpl-option.selected { border-color: var(--brand); background: var(--brand-soft); }
.to-name { font-size: 14px; font-weight: 800; color: var(--text); }
.tpl-option.selected .to-name { color: var(--brand); }
.to-desc { font-size: 11.5px; color: var(--text-dim); }

/* 积分总数 */
.credit-total {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: #e8a93c; font-weight: 700;
}
.credit-total b { font-size: 15px; }
.agent-go:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* 控件隐藏 */
.hide { display: none !important; }

/* ========== 开关 toggle ========== */
.switch {
  display: inline-block;
  position: relative;
  width: 46px; height: 26px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.switch i {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
  transition: left .2s;
}
.switch.on { background: var(--brand); }
.switch.on i { left: 23px; }
/* 我的作品卡片内：开关缩小；关闭态用网站主背景淡灰紫 */
.wk-toolrow .switch { width: 36px; height: 20px; background: var(--bg); }
.wk-toolrow .switch.on { background: var(--brand); }
.wk-toolrow .switch i { width: 14px; height: 14px; }
.wk-toolrow .switch.on i { left: 19px; }
.wk-toolrow .wk-del { width: 30px; height: 30px; }
.wk-toolrow .wk-like { padding: 0 2px; }
.wk-toolrow .wk-collect { height: 30px; }

/* ========== 全局美化确认对话框 / toast ========== */
.ui-modal {
  position: fixed; inset: 0; z-index: 1300;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(20, 23, 32, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ui-modal.show { display: flex; animation: uiFade .18s ease; }
/* 弹窗可能在灯箱（z-index:1000）内触发，层级需高于灯箱 */
#collectDialog.ui-modal,
#uiConfirmModal.ui-modal { z-index: 1300; }
@keyframes uiFade { from { opacity: 0; } to { opacity: 1; } }
.ui-modal-card {
  width: 100%; max-width: 380px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  animation: uiPop .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes uiPop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.ui-modal-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 50%;
}
.ui-modal-icon.danger { color: var(--red); background: var(--red-soft); }
.ui-modal-icon.share { color: var(--brand); background: var(--brand-soft); }
.ui-modal-icon.info { color: var(--brand); background: var(--brand-soft); }
.ui-modal-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.ui-modal-text { font-size: 14px; line-height: 1.6; color: var(--text-dim); margin-bottom: 22px; }
.ui-modal-actions { display: flex; gap: 12px; }
.ui-btn {
  flex: 1; font-family: var(--font); font-size: 14px; font-weight: 700;
  padding: 11px 0; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent;
  transition: filter .15s, background .15s, border-color .15s, color .15s;
}
.ui-btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.ui-btn-ghost:hover { border-color: var(--text-dim); }
.ui-btn-danger { background: linear-gradient(135deg, #ff6a6a, #ef4444); color: #fff; }
.ui-btn-danger:hover { filter: brightness(1.05); }
.ui-btn-primary { background: var(--grad); color: #fff; }
.ui-btn-primary:hover { filter: brightness(1.05); }

.ui-toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 1400;
  transform: translate(-50%, 16px);
  background: var(--glass-strong); color: var(--text);
  font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.ui-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ========== 全局采集对话框（选择分类） ========== */
.cl-card { text-align: left; max-width: 420px; }
.cl-text { margin-bottom: 18px; }
.cl-field { margin-bottom: 22px; }
.cl-label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--text-dim); margin-bottom: 8px;
}
.cl-select {
  width: 100%; appearance: none; -webkit-appearance: none;
  font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 40px 11px 14px; outline: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8f9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  transition: border-color .15s, box-shadow .15s;
}
.cl-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cl-actions { justify-content: flex-end; }

/* ========== 生成偏好 深色卡片 ========== */
.auto-card {
  width: 350px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.ac-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.ac-head-title { color: var(--text); font-size: 16px; font-weight: 800; }
.ac-auto {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text-dim);
  font-size: 14px; font-weight: 600;
}
.auto-card .pref-tabs {
  background: rgba(140, 150, 220, 0.1);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.auto-card .pref-tab {
  color: var(--text-faint);
  border-radius: 9px;
  padding: 9px 0;
  font-size: 14px;
}
.auto-card .pref-tab.active {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: none;
}
.ac-body .ac-label {
  color: var(--text-faint);
  font-size: 13px; font-weight: 700;
  letter-spacing: .02em;
  padding: 16px 2px 9px;
}

/* 比例行：深色圆角容器，9/7 格均分 */
.ratio-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  background: rgba(140, 150, 220, 0.08);
  border-radius: 14px;
  padding: 10px 8px;
}
.ratio-cell {
  border: 0;
  background: transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 7px;
  padding: 7px 2px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-dim);
  transition: background .16s;
}
.ratio-cell:hover { background: rgba(124, 108, 255, 0.1); }
.ratio-cell.selected { background: var(--brand-soft); color: var(--brand); }
.rc-shape { display: flex; align-items: center; justify-content: center; height: 24px; }
.rc-label { font-size: 13px; font-weight: 600; line-height: 1; }

/* 其他设置：两列深色下拉 */
.ac-other {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ac-body .ac-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  color: var(--text);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa3c7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.ac-body .ac-select:focus { outline: none; }
.ac-body .ac-select option { background: var(--surface-2); color: var(--text); }

/* 自动开启：下方变灰不可操作 */
.ac-body.disabled {
  opacity: .4;
  pointer-events: none;
}

/* ========== 瀑布流（平面设计 / 电商，图5） ========== */
.content-grid.masonry {
  display: block;
  column-count: 6;
  column-gap: 2px;
  column-fill: balance;
}
.content-grid.masonry .ms-card {
  display: block;
  position: relative;
  margin: 0 0 2px;
  border-radius: 2px;
  overflow: hidden;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}
.content-grid.masonry .ms-link { display: block; }
.content-grid.masonry .ms-card img,
.content-grid.masonry .ms-card video {
  width: 100%;
  display: block;
  background: #111;
}
.content-grid.masonry .ms-play {
  position: absolute; inset: 0; margin: auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  border-radius: 50%;
}
.content-grid.masonry .ms-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 9px 7px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .66));
  opacity: 0; transition: opacity .2s;
}
.content-grid.masonry .ms-card:hover .ms-foot { opacity: 1; }
.content-grid.masonry .ms-name {
  display: block;
  font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.content-grid.masonry .ms-line {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: rgba(255, 255, 255, .82);
}
.content-grid.masonry .ms-author,
.content-grid.masonry .ms-model,
.content-grid.masonry .ms-time {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.content-grid.masonry .ms-author { max-width: 52px; flex-shrink: 0; }
.content-grid.masonry .ms-model { max-width: 70px; flex: 1; }
.content-grid.masonry .ms-time { flex-shrink: 0; }
.content-grid.masonry .cc-like {
  margin-left: auto; color: rgba(255, 255, 255, .85); font-size: 10.5px;
}
.content-grid.masonry .cc-like:hover,
.content-grid.masonry .cc-like.liked { color: #ff7a9a; }

/* 响应式列数降级 */
@media (max-width: 1200px) {
  .content-grid.masonry { column-count: 5; }
}
@media (max-width: 1050px) {
  .content-grid.masonry { column-count: 4; }
}
@media (max-width: 960px) {
  .content-grid.masonry { column-count: 3; }
}
@media (max-width: 600px) {
  .content-grid.masonry { column-count: 2; }
}

/* ========== 作品广场：JS masonry 自动排版（按图片宽高自动落点，不固定列） ========== */
.content-grid.masonry-js {
  display: block;
  position: relative;
  width: 100%;
  column-count: auto;
}
.content-grid.masonry-js .ms-card {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  break-inside: auto;
}
.content-grid.masonry-js .ms-card img,
.content-grid.masonry-js .ms-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

/* ========== 侧栏：我的资产子项 ========== */
.side-link.side-link-sub {
  padding-left: 40px;
  font-size: 13.5px;
  font-weight: 500;
}
.side-link .ico svg { vertical-align: -4px; }
.acc-head .ico svg { vertical-align: -4px; }

/* ========== 我的资产页（浅色） ========== */
.asset-page {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  min-height: calc(100vh - 64px);
  padding: 22px 28px 60px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-sm);
}
.ap-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: nowrap;
  margin-bottom: 18px;
}
.ap-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; }
.ap-tools { display: flex; align-items: center; gap: 10px; }
.ap-search { display: flex; align-items: center; gap: 0; }
.ap-search-input {
  width: 200px; height: 36px;
  border: 1px solid var(--border); border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--surface-2); color: var(--text);
  padding: 0 14px; font-size: 13px; font-family: var(--font);
  outline: none;
}
.ap-search-input::placeholder { color: var(--text-faint); }
.ap-search-input:focus { border-color: var(--brand); }
.ap-tool {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface); color: var(--text-dim);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ap-search .ap-tool { border-radius: 0 10px 10px 0; background: var(--surface-2); }
.ap-tool:hover { color: var(--brand); border-color: var(--brand); }

/* TAB + 筛选同一行 */
.ap-subbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.ap-tabs {
  display: flex; align-items: center; gap: 26px;
}
.ap-tab {
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  text-decoration: none;
  padding: 14px 0 13px;
  transition: color .15s;
}
.ap-tab:hover { color: var(--text); }
.ap-tab.active { color: var(--text); font-weight: 800; border-bottom: 2px solid var(--brand); margin-bottom: -1px; }

.ap-filters {
  display: flex; align-items: center; gap: 16px;
}
.ap-dd { position: relative; }
.ap-dd-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent;
  color: var(--text-dim); font-size: 13.5px; font-weight: 600;
  font-family: var(--font); cursor: pointer; padding: 0;
}
.ap-dd-trigger:hover { color: var(--text); }
.ap-dd-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  min-width: 130px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
  display: none;
}
.ap-dd.open .ap-dd-menu { display: block; }
.ap-dd-opt {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.ap-dd-opt:hover { background: var(--surface-2); color: var(--text); }
.ap-dd-opt.selected { color: var(--brand); background: var(--brand-soft); font-weight: 700; }

.ap-day { margin-bottom: 30px; }
.ap-day-label {
  color: var(--text); font-size: 18px; font-weight: 800;
  margin-bottom: 14px;
}
.ap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 4px;
}
.ap-card {
  display: block; position: relative;
  aspect-ratio: 4/3;
  border-radius: 4px; overflow: hidden;
  background: var(--surface-2);
}
.ap-card img, .ap-card video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ap-card-audio, .ap-card-file {
  display: grid; place-items: center;
  color: var(--text-dim);
}
.ap-play {
  position: absolute; inset: 0; margin: auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  color: #fff; background: rgba(0, 0, 0, .45);
  border-radius: 50%;
}
.ap-empty {
  text-align: center;
  padding: 90px 20px;
  color: var(--text-faint);
}
.ap-empty-ico { margin-bottom: 16px; color: var(--text-faint); }
.ap-empty p { font-size: 14px; margin: 0; }

/* 自定义中文分页 */
.ap-pagination {
  margin-top: 30px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.ap-pg {
  display: inline-grid; place-items: center;
  min-width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text-dim);
  font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 0 12px;
  transition: color .15s, border-color .15s;
}
a.ap-pg:hover { color: var(--brand); border-color: var(--brand); }
.ap-pg.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ap-pg.is-disabled { opacity: .45; cursor: default; }
.ap-pg-ellipsis { color: var(--text-faint); padding: 0 2px; }

/* 通用分页条（partials/pagination） */
.pagination-nav {
  margin-top: 30px;
  display: flex; justify-content: center;
}
.pagination-nav ul {
  display: flex; gap: 6px; list-style: none; padding: 0; margin: 0;
  flex-wrap: wrap; justify-content: center;
}
.pagination-nav li a, .pagination-nav li span {
  display: inline-grid; place-items: center;
  min-width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text-dim);
  font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 0 12px;
  transition: color .15s, border-color .15s;
}
.pagination-nav li a:hover { border-color: var(--brand); color: var(--brand); }
.pagination-nav li.active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination-nav li.disabled span { opacity: .45; cursor: default; }

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .content-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1050px) {
  .create-zone { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); }
  .home-search { width: auto; max-width: none; flex: 1; }
  .home-topbar { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .content-grid { grid-template-columns: 1fr; }
  .home-topactions { flex-wrap: wrap; }
  .agent-foot { flex-direction: column; align-items: stretch; }
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .app-main { padding: 0 14px 14px; }
  .grid-2, .grid-3, .grid-4, .studio-grid { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .rail { flex-direction: row; flex-wrap: wrap; }
  .stage { overflow: visible; }
  .shot-row { grid-template-columns: 1fr; }
  .shot-row img { width: 100%; }
  .flow-steps { flex-direction: column; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .promo-bar { font-size: 12.5px; padding: 11px 40px 11px 14px; }
}

/* ========== 我的任务中心 ========== */
.tk-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.tk-tab {
  padding: 12px 18px;
  font-size: 14px; font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tk-tab:hover { color: var(--text); }
.tk-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.tk-card {
  display: flex; gap: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: border-color .2s, transform .2s;
}
.tk-card:hover { border-color: rgba(124,108,255,.45); transform: translateY(-2px); }
.tk-media {
  position: relative;
  flex: 0 0 220px;
  width: 220px;
  aspect-ratio: 16/10;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(8,10,20,.4);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}
.tk-media img, .tk-media video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.tk-play {
  position: absolute; inset: 0; margin: auto;
  width: 46px; height: 46px; border-radius: 999px;
  background: rgba(13, 16, 28, .5); color: #fff;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; font-size: 16px;
  pointer-events: none;
}

/* 多图任务：无左侧缩略图，图片网格放提示词下方，四列并列、高度自适应 */
.tk-card-multi { cursor: pointer; }
.tk-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.tk-thumb {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.tk-thumb img {
  width: 100%;
  height: auto;       /* 高度自适应，按图片原始比例 */
  display: block;
}
.tk-pending, .tk-failed {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  background: var(--surface-2);
}
.tk-failed { background: var(--red-soft); }
.tk-spinner {
  width: 34px; height: 34px;
  border: 3px solid #d4d4dd;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: tkspin .8s linear infinite;
}
@keyframes tkspin { to { transform: rotate(360deg); } }
.tk-pending-text { font-size: 13px; font-weight: 600; color: #8a8a96; }
.tk-failed .tk-pending-text { color: #c05656; }
.tk-failed-ico {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--red-soft); color: var(--red);
  font-size: 20px; font-weight: 800;
}

.tk-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-public {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
  justify-content: center; padding-left: 4px;
}
.tk-public-text { font-size: 12px; color: var(--text-dim); white-space: nowrap; text-align: center; }
.tk-status {
  font-size: 12px; font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.tk-status-succeeded, .tk-status-success { color: #3aaf7d; }
.tk-status-failed, .tk-status-fail { color: #d25555; }
.tk-status-pending, .tk-status-running,
.tk-status-processing, .tk-status-queued { color: var(--brand); }
.tk-status-stopped { color: var(--text-dim); }

.tk-prompt {
  margin: 0;
  font-size: 16px; line-height: 1.6;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.tk-prompt.open { -webkit-line-clamp: unset; display: block; overflow: visible; }
.tk-expand {
  align-self: flex-start;
  border: 0; background: none;
  color: var(--brand);
  font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 4px 0 0;
  margin-bottom: 10px;
}
.tk-expand:hover { text-decoration: underline; }

.tk-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 12px;
}
.tk-model { font-weight: 700; color: var(--text); }

/* 本次消耗积分行（位于操作按钮上一行） */
.tk-credit-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; margin-bottom: 12px;
}
.tk-credit-label { color: var(--text-dim); }
.tk-credit-num { font-weight: 800; color: #b0832c; }
.tk-credit-status {
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
.tk-credit-status.is-deducted { color: #2f9d6f; background: rgba(58,175,125,.13); }
.tk-credit-status.is-returned { color: #c0763a; background: rgba(214,150,80,.15); }

/* 任务删除按钮（公开开关下方） */
.tk-delete {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim);
  cursor: pointer; padding: 0;
  transition: color .15s, border-color .15s, background .15s;
}
.tk-delete:hover { color: #d9534f; border-color: #d9534f; background: rgba(217,83,79,.08); }

.tk-actions { display: flex; gap: 12px; margin-top: auto; align-items: center; flex-wrap: wrap; }
.tk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  padding: 8px 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.tk-btn:hover { border-color: var(--brand); color: var(--brand); }
.tk-btn.tk-stop:hover { border-color: #d9534f; color: #d9534f; }

/* 删除按钮：文字 + 背景色 */
.tk-del-btn {
  background: rgba(217,83,79,.08);
  border-color: rgba(217,83,79,.35);
  color: #d9534f;
}
.tk-del-btn:hover { background: rgba(217,83,79,.16); border-color: #d9534f; color: #d9534f; }

/* 任务采集按钮 / 已采集（整胶囊可点击下载） */
.tk-collect.is-loading {
  background: var(--brand-soft); color: var(--brand);
  border-color: var(--brand-soft); cursor: default;
}
.tk-collect.is-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
}
.tk-spin { animation: tkspin .8s linear infinite; flex: none; }

.tk-collect-progress {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

.tk-stopped { background: var(--surface-2); }
.tk-stopped .tk-pending-text { color: var(--text-faint); }
.tk-stopped .tk-failed-ico { background: var(--surface-3); color: var(--text-faint); font-size: 14px; }

.tk-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-faint);
}
.tk-empty-ico { font-size: 44px; margin-bottom: 14px; }
.tk-empty p { margin: 0 0 18px; font-size: 14px; }
.tk-empty-link {
  display: inline-block;
  background: var(--grad); color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 10px 28px; border-radius: 10px;
  text-decoration: none;
}

.tk-pagination { margin-top: 24px; display: flex; justify-content: center; }
.tk-pagination nav ul {
  display: flex; gap: 6px; list-style: none; padding: 0; margin: 0;
}
.tk-pagination li a, .tk-pagination li span {
  display: inline-grid; place-items: center;
  min-width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text-dim);
  font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 0 10px;
}
.tk-pagination li a:hover { border-color: var(--brand); color: var(--brand); }
.tk-pagination li.active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.tk-pagination li.disabled span { opacity: .4; }

/* 重新编辑弹窗 */
.tk-modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 10, 20, .6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.tk-modal {
  width: 680px; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 22px 24px 20px;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.7);
}
.tk-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.tk-modal-title { font-size: 17px; font-weight: 800; color: var(--text); }
.tk-modal-close {
  border: 0; background: none;
  font-size: 26px; line-height: 1;
  color: var(--text-faint); cursor: pointer;
}
.tk-modal-close:hover { color: var(--text); }
.cat-modal-tip { font-size: 12.5px; color: var(--text-faint); margin: 12px 0 0; }
.cat-modal .composer .composer-tools { display: none; }
.tk-modal-tip { font-size: 12.5px; color: var(--text-faint); margin: 12px 0 0; }
.tk-modal .composer .composer-tools { display: none; }

/* 分类管理弹窗 */
.cat-modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(8, 10, 20, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cat-modal-mask[hidden] { display: none; }
.cat-modal {
  width: 440px; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px 26px 22px;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.7);
}
.cat-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.plan-modal { width: 560px; }
.cat-modal-title { font-size: 18px; font-weight: 800; color: var(--text); }
.cat-modal-close {
  border: 0; background: none;
  font-size: 26px; line-height: 1;
  color: var(--text-faint); cursor: pointer;
}
.cat-modal-close:hover { color: var(--text); }
.cat-modal-actions {
  display: flex; justify-content: flex-end; gap: 12px;
  margin-top: 20px;
}

@media (max-width: 760px) {
  .tk-card { flex-direction: column; }
  .tk-media { flex-basis: auto; width: 100%; }
  .tk-cost { margin-left: 0; }
}

/* ===== 后台 TAB 设置页（API 设置 / 套餐管理） ===== */
.adm-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 4px 0 22px;
  overflow-x: auto;
}
.adm-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
}
.adm-tab:hover { color: var(--text); }
.adm-tab.active { color: var(--brand); }
.adm-tab.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}
.adm-tab-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}
.adm-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
}
.adm-tab.active .adm-tab-count {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand);
}
.adm-tab-dot.on { background: var(--lime); box-shadow: 0 0 8px rgba(47,230,154,.7); }
.adm-pane { animation: admFade .18s ease; }
@keyframes admFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.ch-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.ch-pane-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.ch-pane-head p { margin: 0; font-size: 13px; color: var(--text-faint); }
.ch-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ch-test-result { margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; border: 1px solid; }
.ch-test-result.ok { background: var(--lime-soft); border-color: rgba(47, 230, 154, 0.32); color: var(--lime); }
.ch-test-result.fail { background: var(--red-soft); border-color: rgba(255, 93, 115, 0.35); color: var(--red); }
.ch-test-result.pending { background: var(--surface-2); border-color: var(--border); color: var(--text-dim); }
.ch-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px 6px;
  margin: 0 0 18px;
  background: var(--surface);
}
.ch-group .ch-models-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--text);
  margin-bottom: 14px;
}
.ch-group .ch-models-title::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--grad);
}
.ch-group .grid { margin-bottom: 0; }

/* 停用状态用中性灰，避免与红色失败混淆 */
.status.status-off {
  color: var(--text-faint);
  background: var(--surface-2);
  border-color: var(--border);
}

/* 模型收费设置：渠道分组标题、单价单元格 */
.mp-api-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 22px 0 10px;
}
.mp-api-head:first-of-type { margin-top: 4px; }
.mp-api-head strong { font-size: 15px; color: var(--text); }
.mp-price-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-price-cell .input { width: 110px; }
.mp-price-cell .status { white-space: nowrap; }
tr.mp-pending { background: var(--amber-soft); }
tr.mp-pending:hover > td { background: transparent; }

/* 模型收费设置：表头随页面滚动吸顶（移除包裹层的滚动容器特性，保证垂直 sticky 生效） */
.mp-sticky-wrap { overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
.mp-sticky thead th { position: sticky; z-index: 10; border-bottom: 2px solid var(--border); }
.mp-sticky thead tr:first-child th { top: 0; height: 48px; box-sizing: border-box; }
.mp-sticky thead tr:nth-child(2) th { top: 48px; z-index: 9; }

/* 单图 / 四图售价分组：仅在两组之间用一条细分隔线区分，避免贯穿全表的紫色竖条 */
.mp-single-cell { border-left: 1px solid var(--border-strong) !important; }
.mp-sticky thead .mp-single-cell { border-left-color: rgba(139, 123, 255, 0.45) !important; }

/* 后台信息型小标题（渠道分组、阈值提示），不用红色失败态 */
.mp-api-head { gap: 12px; flex-wrap: wrap; }
.mp-threshold {
  display: inline-flex; align-items: center;
  padding: 3px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* 收费页表格：减小输入框与单元格留白，降低信息密度带来的压迫感 */
.mp-sticky .tbl td, .tbl.mp-sticky td { padding: 9px 10px; }
.mp-sticky .input { padding: 7px 10px; font-size: 13.5px; text-align: center; }
.mp-sticky thead th { padding: 10px; text-align: center; }
.mp-sticky td:first-child, .mp-sticky td:nth-child(2) { text-align: left; }
.mp-sticky td:nth-child(2) .input, .mp-sticky td:first-child .input { text-align: left; }

/* ---------- 后台中文分页 ---------- */
.adm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.adm-pagination-info { font-size: 13px; color: var(--text-dim); }
.adm-pagination-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all .15s ease;
}
a.adm-page-btn:hover { border-color: var(--brand); color: var(--brand); }
.adm-page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.adm-page-btn.disabled { color: var(--text-faint); background: var(--surface-2); cursor: not-allowed; }
.adm-page-btn.dots { border-color: transparent; background: transparent; }

/* =====================================================================
   阶段二 UI 美化（白色顶条 / 折叠导航 / 黑夜模式 / 简洁积分 / 模型卡片）
   ===================================================================== */

/* ---------- 统一顶条（深色玻璃） ---------- */
.app-main { position: relative; }
.home-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  margin: 0 -14px 26px;
  padding: 12px 14px;
  background: var(--glass-strong);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--glass-border);
}
.ht-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

/* 折叠按钮 */
.side-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all .18s;
  flex-shrink: 0;
}
.side-collapse:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* AI Agent 顶栏入口 */
.agent-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  transition: all .18s;
}
.agent-nav-link:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.agent-nav-link svg { color: var(--brand); }

/* ---------- 折叠态布局：侧栏仅显示图标 ---------- */
.app-shell.side-collapsed { grid-template-columns: 78px 1fr; }
.app-shell.side-collapsed .sidebar { padding: 10px 9px; align-items: stretch; }
.app-shell.side-collapsed .brand { justify-content: center; padding: 4px 0 18px !important; gap: 0; }
.app-shell.side-collapsed .label-text,
.app-shell.side-collapsed .chev { display: none; }
.app-shell.side-collapsed .side-section-title { display: none; }
.app-shell.side-collapsed .side-link {
  justify-content: center;
  padding: 11px 0;
  gap: 0;
}
.app-shell.side-collapsed .side-link .ico { width: auto; }
.app-shell.side-collapsed .side-sub { display: none !important; }
.app-shell.side-collapsed .side-credit {
  margin: 6px 2px 4px;
  padding: 12px 6px;
  text-align: center;
}
.app-shell.side-collapsed .side-credit .row1 { justify-content: center; }
.app-shell.side-collapsed .side-credit .row1 > span:first-child { display: none; }
.app-shell.side-collapsed .side-credit a { font-size: 11px; padding: 6px 4px; }
.app-shell.side-collapsed .side-copyright { padding: 14px 4px 8px; }
.app-shell.side-collapsed .side-copyright .sc-text { display: none; }
.app-shell.side-collapsed .side-copyright .sc-icon { display: inline-flex; }

/* ---------- 折叠态悬停提示 / 二级菜单卡片 ---------- */
.side-fly {
  position: fixed;
  z-index: 200;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .16);
  padding: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s;
}
.side-fly.show { opacity: 1; pointer-events: auto; }
.side-fly-tip {
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.side-fly-card .sf-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  padding: 4px 8px 7px;
  white-space: nowrap;
}
.side-fly-card a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: all .14s;
}
.side-fly-card a:hover { color: var(--brand); background: var(--brand-soft); }
.side-fly-card a.active { color: var(--brand); font-weight: 700; background: var(--brand-soft); }
.side-fly-card .sf-line {
  padding: 5px 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
  line-height: 1.5;
}

/* ---------- 黑夜 / 白天切换按钮 ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--amber);
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--amber); box-shadow: 0 6px 16px -8px rgba(245, 166, 35, .7); transform: translateY(-1px); }
.theme-toggle .tt-moon { display: none; }
.theme-toggle .tt-sun { display: block; color: var(--amber); }
[data-theme="light"] .theme-toggle .tt-sun { display: none; }
[data-theme="light"] .theme-toggle .tt-moon { display: block; color: #f5a623; }

/* ---------- 顶部右侧：邀请得奖金 / 圆形按钮 / 用户名 ---------- */
.invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #7a67f5, #6450e0);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .18s, box-shadow .18s;
}
.invite-btn svg { width: 18px; height: 18px; }
.invite-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(99, 102, 241, .85);
}

.top-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .18s, box-shadow .18s;
}
.top-circle svg { width: 19px; height: 19px; }
a.top-circle { text-decoration: none; }
.top-circle:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(99, 102, 241, .8); }
.top-circle .tt-moon { display: none; }
.top-circle .tt-sun { display: block; }
[data-theme="dark"] .top-circle .tt-moon { display: block; color: #c3bfff; }
[data-theme="dark"] .top-circle .tt-sun { display: none; }

/* 语言切换按钮 */
.lang-toggle { white-space: nowrap; }
.top-circle.lang-toggle {
  width: auto;
  min-width: 38px;
  padding: 0 11px;
}
.lang-toggle .lang-label {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .2px;
}
.btn.lang-toggle .lang-label { font-size: 13px; font-weight: 600; }

.top-username {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .invite-btn { height: 34px; padding: 0 12px; font-size: 13px; }
  .top-circle { width: 34px; height: 34px; }
  .top-username { font-size: 13px; }
}

/* ---------- 邀请得奖金对话框 ---------- */
.invite-dialog-card { max-width: 460px; width: calc(100vw - 32px); }
.invite-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.invite-stat {
  flex: 1;
  padding: 14px 10px;
  border-radius: 12px;
  background: var(--brand-soft);
  text-align: center;
}
.invite-stat-num { font-size: 24px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.invite-stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.invite-link-row { display: flex; gap: 8px; }
.invite-link-row .cl-select { flex: 1; min-width: 0; }
.invite-link-row .ui-btn { flex-shrink: 0; white-space: nowrap; }

/* ---------- 顶栏积分余额胶囊 ---------- */
.credit-balance-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.credit-balance-btn:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 14px var(--brand-soft);
  transform: translateY(-1px);
}
.credit-balance-btn svg { color: #f5a623; flex-shrink: 0; }
.credit-balance-btn .cb-label { color: var(--text-dim); font-weight: 500; }
.credit-balance-btn .cb-num { font-weight: 800; color: var(--brand); }
.credit-balance-btn .cb-vip,
.credit-balance-btn .cb-open-vip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  margin-left: 2px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}
.credit-balance-btn .cb-vip {
  color: #8a5a00;
  background: linear-gradient(135deg, #ffe9a8, #f7c948);
  border: 1px solid #eab83c;
}
.credit-balance-btn .cb-open-vip {
  color: #fff;
  background: linear-gradient(135deg, #ff8a3d, #ff5f6d);
  box-shadow: 0 2px 6px rgba(255, 95, 109, .35);
}

/* ---------- 积分购买灯箱（宽幅 wd） ---------- */
.wd-card {
  width: calc(100vw - 48px);
  max-width: 1060px;
  max-height: calc(100vh - 48px);
  padding: 26px 32px 22px;
  text-align: left;
  background: #1e2027;
  border: 1px solid rgba(255, 255, 255, .07);
  overflow-y: auto;
}

/* 顶部：用户信息 + 积分胶囊 + 关闭 */
.wd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.wd-user { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wd-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f5c518;
  box-shadow: 0 0 0 4px rgba(245, 197, 24, .15);
}
.wd-avatar-ph {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f5c518, #e0a800);
  color: #3a2c00;
  font-size: 20px;
  font-weight: 800;
}
.wd-username {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-top-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.wd-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a7abb8;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.wd-balance-val {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #2b2e37;
  color: #fff;
  font-size: 15px;
}
.wd-balance-val b { font-weight: 700; }
.wd-x {
  display: grid;
  place-items: center;
  padding: 0 2px 0 16px;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, .14);
  border-radius: 0;
  background: transparent;
  color: #c6cad6;
  cursor: pointer;
  transition: color .18s;
}
.wd-x:hover { color: #fff; }

/* 主体左右分栏 */
.wd-body { display: flex; }
.wd-left { flex: 1; min-width: 0; padding-right: 32px; }
.wd-right {
  width: 330px;
  flex-shrink: 0;
  padding-left: 32px;
  border-left: 1px solid rgba(255, 255, 255, .08);
}

/* 分栏标题（两侧横线）+ 分类切换 */
.wd-section-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 26px; }
.wd-section-line { flex: 1; height: 1px; background: rgba(255, 255, 255, .12); }
.wd-section-title { font-size: 22px; font-weight: 800; color: #fff; white-space: nowrap; }
.wd-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #2b2e37;
}
.wd-swi {
  padding: 5px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #a7abb8;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.wd-swi.active { background: #fff; color: #1e2027; }

/* 套餐网格 3×2 */
.wd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.wd-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 10px 20px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: #2a2d36;
  color: #fff;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.wd-plan:hover { border-color: rgba(255, 255, 255, .35); }
.wd-plan.selected { border-color: #fff; background: #2f323c; }
.wd-plan-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a7a, #ef4444);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.wd-plan-credits {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
}
.wd-plan-name { font-size: 18px; text-align: center; }
.wd-plan-price { font-size: 17px; font-weight: 600; color: #b3b8c4; }
.wd-plan-sub { font-size: 12px; color: #b3b8c4; }
.wd-empty { padding: 50px 10px; text-align: center; color: #8b90a0; font-size: 14px; }
.wd-tip { margin-top: 18px; font-size: 12.5px; line-height: 1.7; color: #7e8394; text-align: left; }

/* 右侧支付方式区 */
.wd-pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.wd-pay-title { font-size: 16px; font-weight: 600; color: #cfd3de; }
.wd-pay-icons { display: flex; gap: 8px; }
.wd-pi { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.wd-pi-ali { background: #1677ff; }
.wd-pi-wx { background: #07c160; }

/* 支付方式列表 */
.wd-methods { display: flex; flex-direction: column; gap: 12px; }
.wd-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: #2a2d36;
  color: #fff;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.wd-method:hover { border-color: rgba(255, 255, 255, .35); }
.wd-method.selected { border-color: #fff; background: #2f323c; }
.wd-method:disabled { opacity: .65; cursor: default; }
.wd-method-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wd-method-name { flex: 1; font-size: 15px; font-weight: 600; text-align: left; }
.wd-method-arrow { display: flex; align-items: center; color: #8b90a0; flex-shrink: 0; }

/* 微信二维码结果页 */
.wd-pay-result { display: flex; flex-direction: column; align-items: center; }
.wd-result-head { align-self: stretch; margin-bottom: 14px; }
.wd-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: #a7abb8;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: color .18s;
}
.wd-back:hover { color: #fff; }
.wd-qr-box { display: flex; align-items: center; justify-content: center; }
.wd-qr-box canvas,
.wd-qr-box img { background: #fff; padding: 10px; border-radius: 10px; }
.wd-qr-status {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #8b90a0;
  text-align: center;
}

@media (max-width: 860px) {
  .wd-card { padding: 20px 18px; }
  .wd-body { flex-direction: column; }
  .wd-left { padding-right: 0; }
  .wd-right { width: 100%; padding-left: 0; border-left: none; }
  .wd-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .wd-username { font-size: 17px; }
  .wd-balance-pill { font-size: 13px; }
  .wd-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .credit-balance-btn { height: 34px; padding: 0 10px; font-size: 12px; gap: 4px; }
  .credit-balance-btn .cb-label { display: none; }
  .credit-balance-btn .cb-vip,
  .credit-balance-btn .cb-open-vip { height: 20px; padding: 0 7px; font-size: 10px; }
}

/* 注册页邀请提示 */
.invite-notice {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

/* 后台设置：开关行 */
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
}

/* ---------- 简洁积分：无边框无背景，仅图标 + 数量 ---------- */
.credit-plain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  height: 40px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: color .18s;
}
.credit-plain:hover { color: var(--brand); }
.credit-plain .cp-ico { color: var(--amber); flex-shrink: 0; }
.credit-plain b { font-size: 16px; font-weight: 800; }

/* ---------- 模型下拉卡片（模型名 + 渠道标签 + 简介） ---------- */
.pick-item-card {
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  gap: 5px;
  padding: 11px 13px !important;
  text-align: left;
  border-radius: 13px !important;
  border: 1px solid transparent;
}
.pick-item-card .pi-top { display: flex; align-items: center; gap: 8px; }
.pick-item-card .pi-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick-item-card .pi-tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.pick-item-card .pi-desc {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-item-card.selected { border-color: var(--brand); }
.pick-item-card.selected .pi-name { color: var(--brand); }
.pick-item-card:hover .pi-name { color: var(--brand); }
.pick-item-card .pi-prices {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.4;
}
.pick-item-card .pi-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ---------- 后台顶栏（修复清除缓存按钮错位） ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 -14px;
  padding: 14px 14px;
  background: rgba(13, 15, 28, .72);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.topbar-title { font-size: 18px; font-weight: 800; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

/* 后台顶条贴左菜单边缘，无间隙 */
.admin-shell > .app-main { padding: 0; }
.admin-shell > .app-main > .topbar { margin: 0; padding: 14px 26px; }

/* ---------- 后台模型管理表格 ---------- */
.mm-tbl { margin-top: 8px; }
.mm-tbl th, .mm-tbl td { vertical-align: middle; }
.mm-name { font-weight: 700; color: var(--text); }
.mm-channel { color: var(--text-dim); font-size: 13px; }
.mm-input { width: 100%; }

/* ---------- 重新编辑弹窗：显示底部工具区 ---------- */
.tk-modal { width: 720px; max-width: calc(100vw - 32px); max-height: 88vh; overflow-y: auto; }
.tk-modal .composer .composer-tools { display: flex; }
.tk-modal .composer-foot { align-items: flex-end; }

/* =====================================================================
   浅色模式（data-theme="light"，可选切换；默认深色）
   ===================================================================== */
[data-theme="light"] {
  --bg: #eef2f9;
  --bg-2: #e4eaf4;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f7fc;
  --surface-3: #ebf0f9;
  --media-stage: #f1f4fa;
  --media-stage-border: #dde4f0;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(80, 90, 160, 0.14);
  --border: #e3e9f3;
  --border-strong: #cdd7e8;
  --text: #141d2e;
  --text-dim: #5d6c87;
  --text-faint: #93a0b8;
  --brand: #635bf0;
  --brand-2: #0ea5c4;
  --brand-3: #9333ea;
  --brand-soft: rgba(99, 91, 240, 0.1);
  --brand-soft-2: rgba(14, 165, 196, 0.1);
  --red: #e22d45;
  --red-soft: rgba(226, 45, 69, 0.1);
  --lime: #13a86c;
  --lime-soft: rgba(19, 168, 108, 0.1);
  --cyan: #0891b2;
  --cyan-soft: rgba(8, 145, 178, 0.1);
  --amber: #d9820a;
  --amber-soft: rgba(217, 130, 10, 0.12);
  --grad: linear-gradient(120deg, #635bf0, #9333ea 60%, #0ea5c4);
  --grad-brand: linear-gradient(120deg, #635bf0, #0ea5c4);
  --glow: 0 0 0 1px rgba(99, 91, 240, 0.25), 0 8px 26px -8px rgba(99, 91, 240, 0.4);
  --glow-cyan: 0 0 0 1px rgba(14, 165, 196, 0.22), 0 8px 26px -8px rgba(14, 165, 196, 0.32);
  --shadow: 0 20px 48px -24px rgba(40, 50, 110, 0.35);
  --shadow-sm: 0 8px 22px -12px rgba(40, 50, 110, 0.25);
}
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .home-topbar {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: var(--border);
}

/* =====================================================================
   AI 绘画页：画面比例（排名卡片）+ 生成数量
   ===================================================================== */
.ratio-pick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.ratio-cell-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all .18s;
}
.ratio-cell-btn .rcb-shape { color: var(--text-faint); display: flex; transition: color .18s; }
.ratio-cell-btn .rcb-label { font-size: 12.5px; font-weight: 700; }
.ratio-cell-btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.ratio-cell-btn:hover .rcb-shape { color: var(--brand); }
.ratio-cell-btn.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}
.ratio-cell-btn.selected .rcb-shape { color: var(--brand); }

/* 生成数量 / 模式 / 分辨率：分段按钮行内均分撑满 */
.n-pick { display: flex; gap: 8px; flex-wrap: nowrap; }
.n-cell-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s;
}
.n-cell-btn:hover { border-color: var(--brand); color: var(--brand); }
.n-cell-btn.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: 0 8px 18px -10px rgba(99, 102, 241, .8);
}
.ratio-cell-btn .rcb-k { font-size: 13px; font-weight: 800; line-height: 1; color: var(--text); }
.ratio-cell-btn.selected .rcb-k { color: var(--brand); }

/* =====================================================================
   studio 页：模型选择卡片（一行三个：名称 + 简介 / NEW 角标 / 选中对勾，超长省略）
   ===================================================================== */
.brand-model-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
/* 动作复刻页：所有品牌分组连续平铺，每行 2 个，避免单模型分组留白错位 */
#modelList.model-list-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#modelList.model-list-2col .brand-model-group {
  display: contents;
}
.model-option.model-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  max-height: 56px;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
  cursor: pointer;
  transition: all .16s;
}
.model-option.model-option-card .mo-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-option.model-option-card .mo-desc {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-faint);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-option.model-option-card:hover { border-color: #c7d2fe; }
.model-option.model-option-card.selected {
  border-color: var(--brand);
  background: var(--panel);
}
.model-option.model-option-card.selected .mo-label { color: var(--brand); }

/* NEW 角标（卡片右上角，橙色） */
.model-option .mo-new {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 9px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(135deg, #ff8a3d, #ff6a2b);
  border-radius: 0 12px 0 12px;
}
.model-option .mo-new svg { width: 11px; height: 11px; fill: #fff; }

/* 推荐角标（卡片右上角，红色，9px） */
.model-option .mo-rec {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  background: #e23b3b;
  border-radius: 0 12px 0 12px;
}

/* 选中对勾（卡片右下角紫色折角） */
.model-option .mo-check {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30px;
  height: 30px;
  display: none;
  pointer-events: none;
}
.model-option .mo-check svg { width: 100%; height: 100%; display: block; }
.model-option.model-option-card.selected .mo-check { display: block; }

/* =====================================================================
   studio 页：绘画描述框（上传缩略图 + + 号 + 图片库图标/数量 + 底部AI优化/字数/清空）
   ===================================================================== */
.pd-box {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  padding: 16px;
}
.pd-box.is-dragover { border-color: var(--brand); background: var(--brand-soft); }
.pd-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.pd-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}
.pd-thumb img, .pd-thumb video { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pd-thumb:hover .pd-thumb-del { display: flex; }
.pd-add {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1.5px solid #c7d2fe;
  border-radius: 6px;
  background: var(--panel);
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-add:hover { background: var(--brand-soft); }
.pd-add[disabled] { opacity: .45; cursor: not-allowed; }
.pd-lib {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1.5px solid #c7d2fe;
  border-radius: 6px;
  background: var(--panel);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-lib svg { width: 24px; height: 24px; stroke: var(--brand); fill: none; stroke-width: 1.8; }
.pd-lib:hover { background: var(--brand-soft); }
.pd-count { font-size: 15px; font-weight: 600; color: var(--text-dim); flex-shrink: 0; }
.pd-divider { border: none; border-top: 1.5px solid var(--border); margin: 14px 0; }
.pd-textarea {
  width: 100%;
  min-height: 120px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.pd-textarea::placeholder { color: var(--text-faint); }
.pd-textarea[contenteditable] { overflow-y: auto; cursor: text; word-break: break-word; }
.pd-textarea[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-faint);
  pointer-events: none;
}
.pd-textarea[contenteditable]:focus { outline: none; }

/* ---------- @ 引用图片卡片 ---------- */
.mention-card {
  position: fixed;
  z-index: 300;
  width: 300px;
  max-height: 286px;
  display: none;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mention-card.show { display: flex; }
.mc-head {
  flex: none;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.mc-list { flex: 1; overflow-y: auto; padding: 6px; }
.mc-empty, .mc-loading { padding: 22px 10px; text-align: center; font-size: 12.5px; color: var(--text-faint); }
.mc-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.mc-item:hover, .mc-item.active { background: var(--brand-soft); }
.mc-no {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mc-thumb {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.mc-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 已选图片名高亮标签 */
.mention-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  vertical-align: baseline;
}
.mention-chip.active { background: var(--brand); color: #fff; }
.mcp-name { line-height: 1.5; }
.mcp-x {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  width: 17px;
  height: 17px;
  border: none;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.mention-chip.active .mcp-x { display: flex; }
.pd-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.pd-ai {
  display: none;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  cursor: pointer;
}
.pd-ai svg { width: 16px; height: 16px; fill: #fff; }
.pd-ai:hover { background: #4f46e5; }
.pd-ai[disabled] { opacity: .6; cursor: default; }
.pd-meta { display: flex; align-items: center; gap: 14px; }
.pd-num { font-size: 14px; color: var(--text-dim); }
.pd-clear {
  border: none;
  background: none;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
}
.pd-clear:hover { color: var(--brand); }

/* =====================================================================
   studio 页：图片库弹窗
   ===================================================================== */
.ml-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 24, 35, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ml-overlay.show { display: flex; }
.ml-dialog {
  width: 1120px; max-width: 94vw; height: 740px; max-height: 90vh;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(20, 20, 50, .4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ml-head {
  display: flex; align-items: center; gap: 22px;
  padding: 18px 22px 0;
  flex-shrink: 0;
}
.ml-title { font-size: 20px; font-weight: 800; color: var(--text); }
.ml-tabs { display: flex; gap: 8px; }
.ml-tab {
  border: 1.5px solid var(--border);
  background: var(--panel);
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  color: var(--text-dim);
  padding: 7px 16px;
  cursor: pointer;
}
.ml-tab.active { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.ml-close {
  margin-left: auto;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ml-close:hover { background: var(--surface-3); }
.ml-filters {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  flex-shrink: 0;
}
.ml-search {
  position: relative; flex: 1; max-width: 360px;
}
.ml-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: var(--text-faint); fill: none; stroke-width: 2;
}
.ml-search input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px; outline: none; background: var(--panel); color: var(--text);
}
.ml-select {
  position: relative;
}
.ml-select select {
  appearance: none;
  padding: 9px 34px 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px; background: var(--panel); color: var(--text);
  cursor: pointer; min-width: 132px;
}
.ml-select::after {
  content: ''; position: absolute; right: 13px; top: 50%;
  border: 5px solid transparent; border-top-color: var(--text-dim);
  transform: translateY(-2px); pointer-events: none;
}
.ml-fav {
  display: flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden;
}
.ml-fav button {
  border: none; background: var(--panel);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  padding: 9px 16px; cursor: pointer;
}
.ml-fav button.active { color: var(--brand); background: var(--brand-soft); }
.ml-sort {
  margin-left: auto;
  border: none; background: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer;
}
.ml-sort svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.ml-body {
  flex: 1; min-height: 0;
  display: flex; gap: 18px;
  padding: 0 22px;
}
.ml-list-wrap {
  flex: 3; min-width: 0;
  display: flex; flex-direction: column;
}
.ml-grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  padding-right: 4px;
}
.ml-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.ml-item img, .ml-item video { width: 100%; height: 100%; object-fit: cover; }
.ml-play {
  position: absolute; inset: 0; margin: auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: #fff; background: rgba(0, 0, 0, .45);
  border-radius: 50%;
}
.ml-item-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 8px 6px;
  font-size: 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ml-item.active { border-color: var(--brand); }
.ml-check {
  position: absolute; top: 7px; left: 7px;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: rgba(255,255,255,.85);
  border: 1.5px solid #cfd6de;
  display: none;
  align-items: center; justify-content: center;
}
.ml-item.active .ml-check { display: flex; }
.ml-check svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; fill: none; display: none; }
.ml-item.checked .ml-check { display: flex; background: var(--brand); border-color: var(--brand); }
.ml-item.checked .ml-check svg { display: block; }
.ml-empty {
  grid-column: 1 / -1;
  align-self: center; justify-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-faint); font-size: 14px;
  padding: 40px 0;
}
.ml-empty svg { width: 150px; height: 130px; }
.ml-pager {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 0; flex-shrink: 0;
}
.ml-pager button {
  min-width: 30px; height: 30px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--text-dim);
  font-size: 13px; cursor: pointer; padding: 0 8px;
}
.ml-pager button.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.ml-pager button:disabled { opacity: .45; cursor: not-allowed; }
.ml-preview {
  flex: 2; min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  overflow: hidden;
  padding: 16px;
}
.ml-preview img, .ml-preview video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.ml-preview-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-faint); font-size: 14px; }
.ml-preview-empty svg { width: 150px; height: 130px; }
.ml-foot {
  display: flex; align-items: center;
  padding: 14px 22px;
  flex-shrink: 0;
  border-top: 1.5px solid var(--border);
}
.ml-selected-text { font-size: 14px; color: var(--text-dim); }
.ml-foot-actions { margin-left: auto; display: flex; gap: 12px; }
.ml-btn {
  border-radius: 10px; font-size: 14px; font-weight: 700;
  padding: 9px 26px; cursor: pointer;
}
.ml-btn-cancel { border: 1.5px solid var(--border); background: var(--panel); color: var(--text-dim); }
.ml-btn-ok { border: none; background: var(--grad); color: #fff; }
.ml-btn-ok:hover { box-shadow: var(--glow); }
.ml-btn-ok:disabled { opacity: .5; cursor: not-allowed; }

/* =====================================================================
   账户设置：头像上传
   ===================================================================== */
.avatar-edit {
  display: flex;
  align-items: center;
  gap: 18px;
}
.avatar-preview {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback {
  font-size: 32px;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
}
.avatar-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* =====================================================================
   studio 页（文生图 / 图生图）：左侧固定 420px + 提交按钮
   ===================================================================== */
.studio-grid { grid-template-columns: 520px minmax(0, 1fr); gap: 10px; align-items: stretch; }

/* 页面高度自适应视窗：卡片限定高度，内容超出在区块内滚动（不显示滚动条） */
.studio-grid { height: calc(100dvh - 124px); }
.studio-card {
  height: 100%;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  scrollbar-width: none;
}
.studio-card::-webkit-scrollbar { display: none; }
/* 右侧作品展示：头部固定，画廊区独立滚动 */
.studio-showcase { display: flex; flex-direction: column; overflow: hidden; padding: 18px 20px; }
.studio-tabrow { flex: none; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.studio-tabs { flex: none; display: flex; gap: 6px; background: var(--brand-soft); border-radius: 12px; padding: 4px; }
.studio-tab {
  flex: none; width: 100px; padding: 8px 0; border: none; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--text-dim); border-radius: 9px; transition: all .18s;
}
.studio-tab.active { background: var(--glass-strong); color: var(--brand); box-shadow: 0 2px 10px -2px rgba(124,108,255,.45); }
.studio-tabpane { display: none; }
.studio-tabpane.active { display: block; }
.studio-gallery-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-right: 4px; }
.studio-gallery-scroll::-webkit-scrollbar { display: none; }

/* 右侧作品广场卡片：一行三个 */
.sq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sq-card { display: flex; flex-direction: column; min-width: 0; }
.sq-cover { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 3/2; background: var(--brand-soft); }
.sq-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.sq-cover video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; background: #000; }
.sq-cover:hover img { transform: scale(1.05); }
.sq-cover:hover video { transform: scale(1.05); }
.sq-author { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.sq-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.sq-avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700;
}
.sq-author-name { font-size: 14px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-prompt-wrap { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.sq-prompt-main { flex: 1 1 auto; min-width: 0; }
.sq-prompt-label { font-size: 13px; color: var(--text-dim); }
.sq-prompt-text {
  font-size: 13.5px; line-height: 1.5; color: var(--text); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-all;
}
.sq-prompt-wrap .js-sq-copy { flex: none; align-self: center; }
.sq-loading, .sq-more-entry { display: block; text-align: center; font-size: 12.5px; color: var(--text-dim); padding: 14px 0 4px; }
.sq-more-entry { color: var(--brand); font-weight: 600; }
.sq-more-entry:hover { color: var(--brand-2); }
.st-login-btn {
  display: inline-block; margin-top: 14px; padding: 8px 26px; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: 13.5px; font-weight: 700;
}
.studio-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
/* 一行显示 4 个 */
.studio-gallery-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.studio-card-item {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.studio-card-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(124,108,255,.4); }
.studio-card-thumb { aspect-ratio: 1 / 1; background: var(--surface-3); overflow: hidden; }
.studio-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.studio-card-item:hover .studio-card-thumb img { transform: scale(1.05); }
.studio-card-body { padding: 9px 10px 6px; flex: 1 1 auto; }
.studio-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.studio-card-model {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-card-time { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.studio-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 9px;
}
.sc-cost {
  margin-right: auto; /* 积分靠左，其余按钮在右 */
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.sc-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  padding: 3px;
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  transition: color .15s, transform .15s;
}
.sc-like:hover { color: #e0645f; }
.sc-like.liked { color: #e0645f; }
.sc-like:active { transform: scale(1.2); }
.sc-more {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  padding: 0;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.sc-more:hover { color: var(--brand); border-color: var(--brand); }

/* ========== 旋转图标（扁平化） ========== */
.sc-spin {
  animation: sc-rotate .8s linear infinite;
  color: var(--brand);
  flex: none;
}
@keyframes sc-rotate { to { transform: rotate(360deg); } }

/* ========== 生成中占位卡 ========== */
.sc-pending {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 20px 14px;
  text-align: center;
}
.sc-pending-text { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.sc-progress {
  width: 100%;
  max-width: 130px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.sc-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  /* 多色块渐变：进度增长时颜色条块依次跟随出现 */
  background: repeating-linear-gradient(
    90deg,
    var(--brand) 0 12px,
    #8b5cf6 12px 24px,
    #43c4cd 24px 36px
  );
  background-size: 36px 100%;
  transition: width .4s ease;
}
.js-sc-pending.is-failed .sc-pending-text { color: var(--red); }
.js-sc-pending.is-failed .sc-progress { background: var(--red-soft); }

/* ========== 采集按钮 / 成功态 / 下载 ========== */
.sc-collect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  padding: 0 12px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.sc-collect:hover { background: var(--brand); color: #fff; }
.sc-collect.is-loading { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-soft); cursor: default; }
.sc-collect.is-loading .sc-spin { width: 14px; height: 14px; }
.sc-collect.is-done {
  border-color: var(--brand-soft);
  background: var(--brand-soft);
  color: var(--brand);
  cursor: default;
  gap: 6px;
}

/* =====================================================================
   studio 右侧「我的作品」任务维度卡（一行一个）
   布局：状态+模型时间 → 提示词(3行省略) → 四列图片 → 操作行
   ===================================================================== */
.st-task-list { display: flex; flex-direction: column; gap: 14px; }
.st-task-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: box-shadow .2s, border-color .2s;
}
.st-task-card:hover { border-color: var(--brand-soft); box-shadow: var(--shadow); }

/* 顶部：状态徽标 + 模型名（紧挨在状态右侧） */
.st-top { display: flex; align-items: center; gap: 8px; flex: none; }
.st-status {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.st-status.is-done { background: var(--brand-soft); color: var(--brand); }
.st-status.is-running { background: var(--amber-soft); color: var(--amber); }
.st-model {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-time { flex: none; font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* 提示词：最多 3 行，超出省略号 */
.st-prompt {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 图片内容：四列并排；单图仅占首格 */
.st-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.st-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-3);
  cursor: pointer;
}
.st-thumb img { display: block; width: 100%; height: auto; }

/* 视频作品：宽度占一半，高度按原始比例自适应（不拉伸） */
.st-grid-video { grid-template-columns: minmax(0, 1fr); gap: 0; }
.st-grid-video .st-cell { width: 100%; }
.st-grid-video .st-thumb {
  width: 50%;
  border-radius: 12px;
  background: #000;
}
.st-grid-video .st-thumb video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

/* 多图逐图采集：单元格与缩略图下方操作行 */
.st-cell { min-width: 0; }
.st-thumb-line {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

/* 生成中图片区：占满整行居中放置旋转图标 + 文字 + 进度条 */
.st-grid-pending { display: block; border-radius: 10px; background: var(--surface-2); }
.st-grid-pending .sc-pending { min-height: 190px; }

/* 操作行：消耗积分 / 喜欢 / 采集 / 再次生成 / 省略号，所有按钮等高 */
.st-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.st-cost {
  margin-right: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.st-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.st-icon:hover { color: var(--brand); border-color: var(--brand); }
.st-icon.liked { color: var(--red); border-color: rgba(255,93,115,.4); background: var(--red-soft); }
.st-like-num { font-size: 11.5px; font-weight: 700; }

.st-collect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--brand);
  border-radius: 9px;
  background: transparent;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.st-collect:hover { background: var(--brand); color: #fff; }
.st-collect.is-done { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand); cursor: pointer; }


/* 失败态：状态徽标转红 */
.js-sc-pending.is-failed .st-status.is-running { background: var(--red-soft); color: var(--red); }

/* ========== 公告胶囊（只显标题 / 垂直向上滚动 / 点击看详情） ========== */
.sc-notice {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.sc-notice:hover { background: transparent; }
.sc-notice svg { flex: none; }
.sc-notice-viewport {
  flex: 1;
  min-width: 0;
  height: 18px;
  overflow: hidden;
}
.sc-notice-track {
  display: flex;
  flex-direction: column;
  animation: sc-notice-scroll 6s ease-in-out infinite;
}
.sc-notice-item {
  flex: none;
  height: 18px;
  line-height: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-notice:hover .sc-notice-track { animation-play-state: paused; }
@keyframes sc-notice-scroll {
  0%, 35% { transform: translateY(0); }
  60%, 100% { transform: translateY(-18px); }
}

/* 公告详情弹窗正文 */
.ui-alert-body {
  max-height: min(56vh, 460px);
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.75;
}
.ui-alert-actions { justify-content: center; }

/* ========== 省略号正上方小弹层 ========== */
.sc-pop {
  position: fixed;
  z-index: 120;
  min-width: 168px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 44px -14px rgba(14, 60, 70, .32);
  display: none;
}
.sc-pop.show { display: block; }
.sc-pop-arrow {
  position: absolute;
  bottom: -6px;
  width: 11px;
  height: 11px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.sc-pop.is-down .sc-pop-arrow {
  bottom: auto;
  top: -6px;
  border: none;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.sc-pop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}
.sc-pop-item:hover { background: var(--surface-2); }
.sc-pop-item.danger { color: var(--red); }
.sc-pop-item.danger:hover { background: var(--red-soft); }
.sc-pop .sc-sheet-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
}
.sc-pop .sc-sheet-ico-share { background: var(--brand-soft); color: var(--brand); }
.sc-pop .sc-sheet-ico-del { background: var(--red-soft); color: var(--red); }
@media (max-width: 1200px) {
  .studio-gallery-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.studio-work { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-2, #eef1f6); }
.studio-work img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .25s ease; }
.studio-work:hover img { transform: scale(1.05); }
.studio-work-title { padding: 7px 10px; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px) {
  .studio-grid { height: auto; }
  .studio-card { height: auto; overflow: visible; }
  .studio-showcase { overflow: visible; }
  .studio-gallery-scroll { overflow: visible; }
}

.gen-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  font-weight: 700;
}
.gen-btn .gb-text { font-size: 15px; font-weight: 700; }
.gen-btn .gb-cost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}
.gen-btn .gb-cost b { font-size: 15px; font-weight: 800; color: #fff; }

/* 未登录：立即生成按钮下方的登录引导 */
.gen-login-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}
.gen-login-hint a { color: var(--brand); font-weight: 600; }
.gen-login-hint a:hover { color: var(--brand-2); }

/* 比例示意图方框：深色模式下用浅灰，保持可见 */
[data-theme="dark"] .rcb-rect { fill: #cdd6de; stroke: #cdd6de; }

/* ========== 作品灯箱（资产页 / studio 共用） ========== */
body.lb-lock { overflow: hidden; }
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(18, 26, 32, .62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  box-sizing: border-box;
  animation: lb-fade .18s ease;
}
.lb-overlay[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lb-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 20px 28px;
  background: var(--surface);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}
.lb-loading .ws-spin { width: 20px; height: 20px; }

.lb-inner {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100dvh - 56px);
  animation: lb-pop .22s ease;
}
@keyframes lb-pop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1001;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lb-close:hover { background: #d9534f; color: #fff; }

.lb-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  grid-template-rows: minmax(0, 1fr); /* 关键：行高随容器收缩，避免图片固有高度撑出灯箱 */
  gap: 22px;
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  box-sizing: border-box;
  max-height: calc(100dvh - 56px);
}
.lb-media {
  min-height: 0;
  min-width: 0;
  height: calc(100dvh - 96px); /* 给定确定高度：百分比高的 img/video 才能正确等比缩放 */
}
/* 灯箱媒体区：flex 居中，媒体按自身比例 contain，避免竖版视频控件被裁掉 */
.lb-media.ws-media { display: flex; align-items: center; justify-content: center; }
.lb-media.ws-media img,
.lb-media.ws-media video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lb-info {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
@media (max-width: 860px) {
  .lb-overlay { padding: 14px; }
  .lb-card { grid-template-columns: 1fr; grid-template-rows: none; max-height: calc(100dvh - 28px); overflow-y: auto; }
  .lb-media { min-height: 240px; height: auto; }
  .lb-media.ws-media img,
  .lb-media.ws-media video { max-height: 70vh; }
  .lb-close { top: 12px; right: 12px; width: 34px; height: 34px; }
}

/* ========== 主页公开作品灯箱（左大图 + 右详情面板） ========== */
.lb-inner.plb {
  width: min(1180px, 100%);
  max-height: calc(100dvh - 56px);
}
.plb-card {
  grid-template-columns: minmax(0, 1.55fr) 380px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

/* 左侧媒体区 */
.plb-media {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(8, 10, 20, .35);
  border-right: 1px solid var(--border);
}
.plb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.plb-model-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.plb-zoom {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.plb-zoom-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.plb-zoom-btn:hover { background: var(--brand-soft); color: var(--brand); }
.plb-zoom-val {
  min-width: 52px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.plb-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  border-radius: 12px;
  scrollbar-width: thin;
}
.plb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .12s ease;
  cursor: zoom-in;
  user-select: none;
}
.plb-stage img.is-zoomed { cursor: grab; }
.plb-stage video {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

/* 右侧详情面板 */
.plb-info {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px 22px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.plb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.plb-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}
.plb-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.plb-close:hover { background: rgba(217,83,79,.12); color: #d9534f; }

.plb-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
}
.plb-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 19px;
  font-weight: 700;
  flex: none;
  overflow: hidden;
}
.plb-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.plb-author-meta { display: flex; flex-direction: column; gap: 3px; }
.plb-author-name { font-size: 15px; font-weight: 700; color: var(--text); }
.plb-author-date { font-size: 13px; color: var(--text-dim); }

.plb-idline {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text);
}
.plb-prompt {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.plb-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.plb-prompt-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.plb-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.plb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.plb-row-label { font-size: 13.5px; color: var(--text-dim); white-space: nowrap; }
.plb-row-value { font-size: 13.5px; font-weight: 700; text-align: right; }

.plb-collect-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.plb-collect-line .ws-collect { flex: 1; width: 100%; }

.plb-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}
.plb-actions .ws-like {
  flex: 1;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 16px;
}
.plb-same { flex: 1.3; }

@media (max-width: 860px) {
  .plb-card { grid-template-columns: 1fr; grid-template-rows: none; overflow-y: auto; }
  .plb-media { border-right: none; border-bottom: 1px solid var(--border); min-height: 320px; }
  .plb-stage { min-height: 240px; }
  .plb-info { overflow-y: visible; }
}

/* ========== 会员中心 ========== */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.mc-top {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.mc-hero {
  flex: 1;
  min-width: 240px;
  border-radius: 20px;
  padding: 24px 28px;
  color: #fff;
  background: var(--grad);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px -16px rgba(124, 108, 255, .65);
}
.mc-hero::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .45), transparent 70%);
}
.mc-hero-label { font-size: 13px; opacity: .85; letter-spacing: 1px; }
.mc-hero-num { font-size: 36px; font-weight: 800; margin-top: 6px; }
.mc-hero-sub { font-size: 12.5px; opacity: .82; margin-top: 8px; }

.mc-status {
  flex: 1;
  min-width: 240px;
  padding: 24px 28px;
}
.mc-status-label { font-size: 13px; color: var(--text-faint); letter-spacing: 1px; }
.mc-status-name { font-size: 26px; font-weight: 800; margin-top: 8px; }
.mc-status-name .is-vip {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mc-status-name .is-normal { color: var(--text-faint); }
.mc-status-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 8px; }

.mc-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mc-tab {
  border: 0;
  cursor: pointer;
  padding: 9px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--text-dim);
  transition: background .2s, color .2s, box-shadow .2s;
}
.mc-tab.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(124, 108, 255, .7);
}

.mc-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.plan-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 26px 22px;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 18px 40px -18px rgba(124, 108, 255, .6);
}
.plan-badge {
  position: absolute;
  top: 0;
  right: 18px;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
}
.plan-name { font-size: 18px; font-weight: 700; color: var(--text); }
.plan-price { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; }
.plan-price .now { font-size: 30px; font-weight: 800; color: var(--brand); }
.plan-price .old { font-size: 13px; color: var(--text-faint); text-decoration: line-through; }
.plan-meta { margin-top: 12px; font-size: 13px; color: var(--text-dim); line-height: 1.9; }
.plan-desc { color: var(--text-faint); margin-top: 4px; }
.plan-check {
  display: none;
  position: absolute;
  top: 18px;
  left: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  text-align: center;
  line-height: 22px;
  font-weight: 700;
}
.plan-card.selected .plan-check { display: block; }

.mc-pay {
  padding: 24px 28px;
  margin-top: 24px;
}
.mc-pay-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.mc-pay-methods { display: flex; gap: 14px; flex-wrap: wrap; }
.pay-method {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.pay-method:hover { border-color: rgba(124, 108, 255, .5); }
.pay-method.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}
.pay-method input { accent-color: var(--brand); }
.pay-ico { font-size: 22px; display: inline-flex; align-items: center; }
.pay-ico .pay-svg { width: 24px; height: 24px; display: block; }
.pay-name { font-size: 14px; font-weight: 600; color: var(--text); }
.mc-pay-btn {
  margin-top: 20px;
  width: 100%;
  border: 0;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: box-shadow .2s, opacity .2s;
}
.mc-pay-btn:hover { box-shadow: var(--glow); }
.mc-pay-btn:disabled { opacity: .65; cursor: default; box-shadow: none; }

.mc-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 20, .6);
  backdrop-filter: blur(6px);
}
.mc-modal.open { display: flex; }
.mc-modal-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 34px 38px;
  text-align: center;
  width: 380px;
  max-width: 92vw;
  position: relative;
  box-shadow: var(--shadow-lg, 0 30px 70px -24px rgba(0,0,0,.7));
}
.mc-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: none;
  font-size: 18px;
  color: var(--text-faint);
  cursor: pointer;
}
.mc-modal-close:hover { color: var(--red); }
.mc-modal-title { font-size: 18px; font-weight: 700; color: var(--text); }
.mc-qr {
  display: inline-block;
  margin: 20px auto 8px;
  padding: 14px;
  background: #fff;
  border-radius: 14px;
}
.mc-qr img, .mc-qr canvas { display: block; }
.mc-qr-fail {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 12px;
}
.mc-codeurl {
  font-size: 11px;
  color: var(--text-faint);
  word-break: break-all;
  text-align: left;
  padding: 8px;
  background: var(--surface-2);
  border-radius: 8px;
  margin-top: 10px;
}
.mc-modal-tip { font-size: 13px; color: var(--text-dim); }
.wx-green { color: #07c160; font-weight: 700; }
.mc-modal-wait { font-size: 12px; color: var(--text-faint); margin-top: 8px; }

/* ========== 会员套餐页 UI 美化 ========== */
/* 顶部信息区 */
.mc-hero { padding: 26px 30px; border-radius: 22px; }
.mc-hero-num { font-size: 40px; letter-spacing: -.5px; }
.mc-hero::before {
  content: "";
  position: absolute;
  bottom: -60px; left: -30px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 91, 255, .5), transparent 70%);
}
.mc-status { border-radius: 22px; }

/* 选项卡 */
.mc-tabs { gap: 6px; padding: 6px; }
.mc-tab { padding: 10px 32px; }
.mc-tab:not(.active):hover { color: var(--text); background: var(--surface-2); }

/* 套餐网格与卡片 */
.mc-plan-grid {
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 20px;
}
#panel-membership .plan-card {
  border-radius: 22px;
  padding: 30px 24px 26px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(139, 123, 255, .06), transparent 42%),
    var(--glass);
  transition: transform .22s cubic-bezier(.22,.61,.36,1), border-color .22s, box-shadow .22s;
  overflow: hidden;
}
#panel-membership .plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .22s;
}
#panel-membership .plan-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 123, 255, .4);
  box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(139, 123, 255, .12);
}
#panel-membership .plan-card.selected {
  border-color: transparent;
  box-shadow: var(--glow), 0 24px 50px -22px rgba(124, 108, 255, .55);
  background:
    linear-gradient(180deg, rgba(139, 123, 255, .12), rgba(139, 123, 255, .02) 50%),
    var(--glass);
}
#panel-membership .plan-card.selected::before,
#panel-membership .plan-card:hover::before { opacity: 1; }

/* 套餐名称 / 价格 */
#panel-membership .plan-name { font-size: 19px; letter-spacing: .2px; transition: padding-left .2s; }
#panel-membership .plan-card.selected .plan-name { padding-left: 32px; }
#panel-membership .plan-price { margin-top: 16px; align-items: baseline; }
#panel-membership .plan-price .now {
  font-size: 34px;
  letter-spacing: -.5px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
#panel-membership .plan-price .old { opacity: .8; }

/* 权益信息 */
#panel-membership .plan-meta { margin-top: 16px; font-size: 13.5px; line-height: 2.05; }
#panel-membership .plan-meta > div { display: flex; align-items: center; gap: 7px; }
#panel-membership .plan-desc {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--glass-border);
  line-height: 1.7;
}

/* 角标 */
.plan-badge {
  right: 22px;
  font-size: 11.5px;
  padding: 5px 14px;
  letter-spacing: .5px;
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  box-shadow: 0 8px 18px -8px rgba(255, 71, 87, .8);
}

/* 选中勾 */
.plan-check {
  top: 20px; left: 20px;
  width: 24px; height: 24px;
  line-height: 24px;
  font-size: 13.5px;
  box-shadow: 0 4px 12px -3px rgba(124, 108, 255, .8);
}

/* 支付区 */
.mc-pay { border-radius: 22px; }
.pay-method { border-radius: 16px; padding: 17px 20px; }
.mc-pay-btn { border-radius: 16px; padding: 17px; letter-spacing: .3px; }


/* ========== 错误页 ========== */
.error-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.error-code {
  font-size: clamp(96px, 22vw, 220px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 20px 50px rgba(124,108,255,.45));
}
.error-title { font-size: 26px; font-weight: 800; margin: 18px 0 10px; }
.error-desc { color: var(--text-dim); font-size: 15.5px; margin-bottom: 30px; }
.error-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ========== 支付配置 ========== */
.pay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.pay-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.pay-card-head strong { font-size: 16.5px; font-weight: 800; display: block; }
.pay-card-head .faint { font-size: 12.5px; }
.pay-badge {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-size: 13px; font-weight: 800;
}
.pay-badge-wx { background: rgba(7,193,96,.14); color: #07c160; }
.pay-badge-ali { background: rgba(22,119,255,.14); color: #1677ff; }
.pay-switch { margin-left: auto; }
.pay-key {
  min-height: 130px;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

/* 标准 checkbox 开关（不依赖 JS，区别于旧的 .switch） */
.tgl {
  position: relative;
  display: inline-block;
  width: 46px; height: 26px;
  flex: 0 0 auto;
}
.tgl input { position: absolute; opacity: 0; width: 0; height: 0; }
.tgl .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: .2s;
}
.tgl .slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: .2s;
}
.tgl input:checked + .slider { background: var(--brand); border-color: transparent; }
.tgl input:checked + .slider::before { transform: translateX(20px); background: #fff; }

/* ========== 上传组件 ========== */
.up-box { display: flex; flex-direction: column; gap: 10px; }
.up-preview {
  display: grid; place-items: center;
  min-height: 96px; padding: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}
.up-preview img { max-width: 100%; max-height: 72px; object-fit: contain; border-radius: 6px; }
.up-preview-icon { width: 88px; height: 88px; }
.up-preview-icon img { max-width: 64px; max-height: 64px; }
.up-ph { color: var(--text-faint); font-size: 13px; }
.up-input { font-size: 13px; color: var(--text-dim); }
.up-input::file-selector-button {
  margin-right: 12px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s;
}
.up-input::file-selector-button:hover { border-color: var(--brand); color: var(--brand); }

/* ===== 会员中心：左侧菜单 + 右侧内容 ===== */
.member-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.member-aside { position: sticky; top: 14px; }
.mm-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.mm-item:hover { background: var(--brand-soft); color: var(--brand); }
.mm-item.active { background: var(--grad); color: #fff; }
.mm-ico { font-size: 16px; line-height: 1; }
.member-content { min-width: 0; }
@media (max-width: 900px) {
  .member-shell { grid-template-columns: 1fr; }
  .member-aside { position: static; }
  .mm-nav { flex-direction: row; flex-wrap: wrap; }
  .mm-item { flex: 1 1 auto; }
}

/* 账户设置页：右栏全宽 + 一行两个 */
.profile-wrap { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.profile-credits-card { padding: 18px; }
.profile-form-card { padding: 22px; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.profile-field-full { margin-bottom: 18px; }
.profile-actions { margin-top: 20px; }
@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* 我的消费 */
.consume-wrap { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.consume-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
}
.consume-tab {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: background .15s, color .15s;
}
.consume-tab:hover { color: var(--brand); }
.consume-tab.active { background: var(--grad); color: #fff; }

/* 认证页 TAB + 验证码行 */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1 1 0;
  padding: 9px 0;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  transition: background .15s, color .15s;
}
.auth-tab.active { background: var(--grad); color: #fff; }
.code-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.code-row .input { flex: 1 1 200px; min-width: 0; }
.btn-code { flex: 0 0 auto; white-space: nowrap; }
.auth-err { color: var(--red); font-size: 13px; display: block; margin-top: 6px; }

/* =====================================================================
   电商海报页：商品上传区 / 主题输入 / 描述框 / chips
   ===================================================================== */
.poster-upload {
  position: relative;
  border: 1.5px dashed var(--border-strong, var(--border));
  border-radius: 16px;
  background: var(--surface-2, var(--panel));
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all .18s;
}
.poster-upload.is-dragover { border-color: var(--brand); background: var(--brand-soft); }
.poster-upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px;
  color: var(--text-faint);
  cursor: pointer;
  text-align: center;
}

/* =====================================================================
   动作复刻：主体图片（标题 + 规格提示 + 虚线上传框 + 试一试 + 参考视频卡片）
   ===================================================================== */
.subj-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}
.subj-help {
  width: 20px; height: 20px;
  display: inline-flex;
  cursor: help;
}
.subj-help svg { width: 100%; height: 100%; }
.subj-help svg circle { fill: var(--text-faint); }

.subj-tip {
  margin-top: 10px;
  padding: 12px 16px;
  border-left: 4px solid #e8963d;
  border-radius: 8px;
  background: rgba(232, 150, 61, .12);
  color: #d9882f;
  font-size: 13px;
  line-height: 1.6;
}

.subj-drop {
  margin-top: 14px;
  border: 1.6px dashed var(--border);
  border-radius: 16px;
  background: var(--panel);
  transition: border-color .18s, background .18s;
  overflow: hidden;
  min-height: 156px;
}
.subj-drop.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.subj-empty {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  cursor: pointer;
}
.subj-empty[hidden] { display: none; }
.subj-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 132px;
  height: 100%;
}
.subj-local {
  font-size: 15px;
  color: var(--text);
}
.subj-lib-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 26px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .18s;
}
.subj-lib-btn:hover { filter: brightness(1.08); }
.subj-right { min-width: 0; }
.subj-main {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.subj-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-faint);
}

/* 选中主体图后：图片贴最左、贴最顶，宽度固定，高度按比例，超出隐藏 */
.subj-filled[hidden] { display: none; }
.subj-filled {
  position: relative;
  height: 156px;
  margin: -1.6px 0;
}
.subj-filled-img {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 34%;
  height: auto;
  max-width: none;
}
.subj-actions {
  position: absolute;
  left: 34%;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
}
.subj-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .18s, transform .15s;
}
.subj-act svg { width: 30px; height: 30px; }
.subj-act:hover { color: var(--brand); transform: translateY(-1px); }

.subj-try-title {
  margin: 20px 0 12px;
  font-size: 14px;
  color: var(--text-dim);
}
.subj-try {
  position: relative;
  display: flex;
  align-items: center;
}
.subj-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
  padding: 2px 4px;
  scrollbar-width: none;
}
.subj-track::-webkit-scrollbar { display: none; }
.subj-sample {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: var(--panel);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.subj-sample:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 91, 240, .22);
}
.subj-sample img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.subj-arrow {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .15s, background .15s;
}
.subj-arrow svg { width: 18px; height: 18px; }
.subj-arrow:hover { color: var(--brand); background: var(--brand-soft); }
.subj-arrow.off { opacity: .3; pointer-events: none; }

.subj-scrollbar {
  position: relative;
  height: 5px;
  margin: 10px 30px 0;
  border-radius: 3px;
  background: var(--border);
}
.subj-scrollbar span {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--brand);
}

/* 选择参考视频卡片 */
.mv-title {
  font-size: 16px;
  font-weight: 700;
}
.mv-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 30px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, box-shadow .18s;
}
.mv-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 20px rgba(99, 91, 240, .16);
}
.mv-ico {
  flex-shrink: 0;
  width: 56px; height: 56px;
  color: var(--text-dim);
  display: flex;
}
.mv-ico svg { width: 100%; height: 100%; }
.mv-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mv-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.mv-desc {
  font-size: 13px;
  color: var(--text-faint);
}
.mv-arrow {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--text-faint);
}
.motion-preview {
  position: relative;
  margin-top: 12px;
}
.motion-preview video {
  width: 100%;
  border-radius: 12px;
  display: block;
  background: #000;
}
.motion-del {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.motion-del:hover { background: rgba(0,0,0,.8); }
.poster-upload-empty .pu-main { font-size: 14px; font-weight: 700; color: var(--text-dim); }
.poster-upload-empty small { font-size: 12px; color: var(--text-faint); }
.poster-upload-filled {
  width: 100%;
  height: 100%;
  min-height: 170px;
  position: relative;
}
.poster-upload-filled img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  background: var(--surface, #fff);
  display: block;
}
.poster-prod-del {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.poster-lib-link {
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.poster-lib-link svg { fill: none; stroke: var(--brand); stroke-width: 1.8; }

.poster-input-wrap { position: relative; }
.poster-input {
  width: 100%;
  height: 48px;
  padding: 0 64px 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.poster-input:focus { border-color: var(--brand); }
.poster-count {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  color: var(--text-faint);
  pointer-events: none;
}

.poster-desc-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.poster-ai {
  border: 1.5px solid #c7d2fe;
  background: var(--panel);
  color: var(--brand);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.poster-ai svg { width: 15px; height: 15px; fill: var(--brand); }
.poster-ai:disabled { opacity: .5; cursor: not-allowed; }
.poster-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  font-family: inherit;
  transition: border-color .15s;
}
.poster-textarea:focus { border-color: var(--brand); }

.poster-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.poster-chip {
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poster-chip:hover { border-color: var(--brand); color: var(--brand); }
.poster-chip.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}
#posterForm #modelList { margin-top: 16px; }

/* =====================================================================
   作品详情页：全屏沉浸式 · 左右双栏（左图自适应 / 竖直尖括号切换）
   ===================================================================== */

/* 作品详情页：保留左侧导航，背景跟随系统日夜主题 */
.app-shell.work-detail-shell {
  min-height: 100vh;
}

/* 返回箭头 */
.wd-back-arrow { text-decoration: none; }

/* 卡片：左右双栏，两列等高（左图 DIV 与右侧详情区高度一致），去掉玻璃外壳 */
.work-detail-shell .ws-card {
  height: auto;
  align-items: stretch;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr);
  gap: 28px;
}

/* 左侧图片面板：外层 DIV 与右侧区域等高，图片在其内部按比例自适应 */
.work-detail-shell .ws-media.wd-carousel {
  position: relative;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  background: var(--media-stage);
  border: 1px solid var(--media-stage-border);
  border-radius: 18px;
  overflow: hidden;
}
/* 轨道铺满外层 DIV */
.work-detail-shell .wd-carousel-track {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
}
/* 幻灯片铺满轨道 */
.work-detail-shell .wd-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 图片在 DIV 内按原始宽高比自适应（contain 居中，不裁切） */
.work-detail-shell .wd-slide img,
.work-detail-shell .wd-slide img.js-zoom-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* 模型徽标玻璃 */
.work-detail-shell .wd-model-badge {
  background: var(--glass-strong);
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- 竖直上 / 下尖括号 ---------- */
.wd-vnav {
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.wd-vbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .15s, transform .15s;
}
.wd-vbtn:hover { color: var(--brand); transform: scale(1.12); }

/* 右侧详情：自然高度，不内部滚动 */
.work-detail-shell .ws-info {
  height: auto;
  overflow: visible;
  padding: 4px 2px 0;
}
.work-detail-shell .ws-info .wd-author { margin: 2px 0 18px; }
.work-detail-shell .ws-info .wd-author .cc-avatar {
  width: 44px;
  height: 44px;
  font-size: 18px;
}
.work-detail-shell .wd-meta-lines {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.work-detail-shell .wd-meta-k { color: var(--text-dim); }

/* ---------- 窄屏：上下堆叠，图片区给固定高度 ---------- */
@media (max-width: 860px) {
  .work-detail-shell .ws-card { grid-template-columns: 1fr; }
  .work-detail-shell .ws-media { min-height: 60vh; }
  .wd-vnav { right: 10px; }
}

/* =====================================================================
   裁剪图片对话框
   ===================================================================== */
.cr-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(20, 24, 35, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cr-overlay.show { display: flex; }
.cr-dialog {
  width: 1040px; max-width: 94vw;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(20, 20, 50, .4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cr-head {
  display: flex; align-items: center;
  padding: 20px 24px 0;
  flex-shrink: 0;
}
.cr-title { font-size: 20px; font-weight: 800; color: var(--text); }
.cr-close {
  margin-left: auto;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.cr-close:hover { background: var(--surface-3); }

.cr-stage {
  position: relative;
  flex: 1 1 auto;
  margin: 20px 24px;
  border-radius: 12px;
  background: #4a4d55;
  overflow: hidden;
  height: 52vh;
  min-height: 320px;
}
.cr-img {
  position: absolute;
  top: 50%; left: 50%;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  max-width: none;
}

.cr-box {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 9999px rgba(20, 22, 28, .55);
  cursor: move;
}
/* 三分构图线 */
.cr-grid {
  position: absolute;
  pointer-events: none;
}
.cr-grid-v {
  top: 0; bottom: 0;
  left: 33.333%;
  width: 1px;
  background: rgba(255,255,255,.45);
}
.cr-grid-v::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: calc(100% * 2);
  width: 1px;
  background: rgba(255,255,255,.45);
}
.cr-grid-h {
  left: 0; right: 0;
  top: 33.333%;
  height: 1px;
  background: rgba(255,255,255,.45);
}
.cr-grid-h::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: calc(100% * 2);
  height: 1px;
  background: rgba(255,255,255,.45);
}

.cr-handle {
  position: absolute;
  width: 12px; height: 12px;
  background: #fff;
  box-sizing: border-box;
  z-index: 2;
}
.cr-handle[data-h="nw"] { top: -7px; left: -7px; cursor: nwse-resize; }
.cr-handle[data-h="n"]  { top: -7px; left: 50%; margin-left: -6px; cursor: ns-resize; }
.cr-handle[data-h="ne"] { top: -7px; right: -7px; cursor: nesw-resize; }
.cr-handle[data-h="e"]  { top: 50%; right: -7px; margin-top: -6px; cursor: ew-resize; }
.cr-handle[data-h="se"] { bottom: -7px; right: -7px; cursor: nwse-resize; }
.cr-handle[data-h="s"]  { bottom: -7px; left: 50%; margin-left: -6px; cursor: ns-resize; }
.cr-handle[data-h="sw"] { bottom: -7px; left: -7px; cursor: nesw-resize; }
.cr-handle[data-h="w"]  { top: 50%; left: -7px; margin-top: -6px; cursor: ew-resize; }

.cr-foot {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px 24px;
  flex-shrink: 0;
}
.cr-zoom-label { font-size: 15px; color: var(--text); white-space: nowrap; }
.cr-zoom {
  flex: 1 1 auto;
  max-width: 460px;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--brand) 0%, var(--brand) 0%, var(--border) 0%);
  outline: none;
}
.cr-zoom::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  cursor: pointer;
}
.cr-zoom::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  cursor: pointer;
}
.cr-ok {
  margin-left: auto;
  border: none;
  border-radius: 11px;
  padding: 11px 44px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .18s;
}
.cr-ok:hover { filter: brightness(1.08); }
