:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --panel: #171b24;
  --panel-2: #1d2230;
  --border: #262c3a;
  --border-soft: #202634;
  --text: #eef1f7;
  --text-dim: #9aa3b5;
  --text-faint: #6b7488;
  --primary: #5b8cff;
  --primary-strong: #3f74f5;
  --accent: #22c39a;
  --warn: #f5a524;
  --danger: #f0524d;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0;
}

p {
  margin: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  color: inherit;
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background: #252b3a;
  border-color: #333b4d;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-danger {
  background: transparent;
  border-color: rgba(240, 82, 77, 0.5);
  color: #ff8b87;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(240, 82, 77, 0.12);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

/* -------------------------------------------------------------- inputs */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.field-label .req {
  color: var(--danger);
  margin-left: 3px;
}

.field-help {
  font-size: 12px;
  color: var(--text-faint);
}

.field-error {
  font-size: 12px;
  color: #ff8b87;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.16);
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.input[type="file"] {
  padding: 8px;
  cursor: pointer;
}

.input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

/* --------------------------------------------------------------- cards */

.card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.muted {
  color: var(--text-dim);
}

.faint {
  color: var(--text-faint);
}

.tiny {
  font-size: 12px;
}

.small {
  font-size: 13px;
}

/* ---------------------------------------------------------------- auth */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1100px 500px at 15% -10%, #1a2440 0%, var(--bg) 60%);
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 22px;
}

.auth-brand .logo {
  font-size: 20px;
  font-weight: 700;
}

.auth-brand .sub {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 4px;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 500;
}

.auth-tab.active {
  background: var(--panel-2);
  color: var(--text);
}

.auth-footer {
  text-align: center;
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 12px;
}

/* ----------------------------------------------------------------- app */

.app-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-soft);
  border-right: 1px solid var(--border-soft);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  font-size: 15px;
  font-weight: 700;
  padding: 0 8px;
  overflow-wrap: anywhere;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  background: rgba(91, 140, 255, 0.14);
  color: #a8c1ff;
}

.nav-item .icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

.balance-mini {
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.balance-mini .num {
  font-size: 18px;
  font-weight: 700;
}

.main {
  padding: 26px 30px 60px;
  max-width: 1180px;
  width: 100%;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  padding-right: 132px;
}

.page-title {
  font-size: 22px;
  font-weight: 650;
}

.page-sub {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 3px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.stat-label {
  color: var(--text-dim);
  font-size: 12px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}

.balance-card {
  background: linear-gradient(135deg, #1c2a4d 0%, #171b24 65%);
  border: 1px solid #2b3a5e;
  border-radius: var(--radius);
  padding: 22px;
}

.balance-card .label {
  color: #b9c8e8;
  font-size: 13px;
}

.balance-card .value {
  font-size: 34px;
  font-weight: 700;
  margin: 6px 0 14px;
}

/* 工作台顶部统计卡：压缩高度，去掉冗余说明。 */
.compact-stats .balance-card,
.compact-stats .stat-card {
  padding: 10px 20px;
}

.compact-stats .balance-card .value {
  font-size: 28px;
  margin: 2px 0 0;
}

/* 会员摘要行保持紧凑，避免撑高余额卡。 */
.compact-stats .balance-card .tiny {
  line-height: 1.35;
}

.balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compact-stats .stat-card .stat-value {
  margin-top: 2px;
}

/* 功能卡：标题与分类标签分两行，避免文字重叠。 */
.feature-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.feature-card-head .name {
  line-height: 1.3;
}

.feature-card-head .feature-cat {
  max-width: 100%;
  white-space: normal;
  line-height: 1.5;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

/* 排序切换：与分类标签同区，做热度 / 好评排序。 */
.feature-sort {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: -8px 0 16px;
}

.sort-tab {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}

.sort-tab:hover {
  color: var(--text);
  border-color: #37415a;
}

.sort-tab.active {
  background: rgba(91, 140, 255, 0.16);
  border-color: rgba(91, 140, 255, 0.55);
  color: #bcd1ff;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.cat-tab:hover {
  border-color: #37415a;
  color: var(--text);
}

.cat-tab.active {
  background: var(--panel-2);
  border-color: #4a5a80;
  color: var(--text);
  font-weight: 600;
}

.cat-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-dim);
}

/* 小分类标签：从属于上方的大分类，视觉上更轻。 */
.cat-tabs-sub {
  margin-top: -6px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.cat-tabs-sub .cat-tab {
  padding: 5px 12px;
  font-size: 12px;
}

.cat-tabs-sub .cat-tab.active {
  background: var(--bg-soft);
  border-color: #4a5a80;
}

.cat-section {
  margin-bottom: 26px;
}

.cat-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.cat-title {
  font-size: 15px;
  font-weight: 600;
}

/* 生成记录里的小分类分组。 */
.job-subgroup {
  margin: 0 0 18px 0;
}

.job-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.feature-card:hover {
  border-color: #37415a;
  transform: translateY(-1px);
}

.feature-card .name {
  font-size: 16px;
  font-weight: 600;
}

.feature-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  margin-bottom: 12px;
}

.feature-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #223050 0%, #171b24 70%);
}

.feature-cover-fallback span {
  font-size: 30px;
  font-weight: 700;
  color: #7f9bd6;
  letter-spacing: 2px;
}

.cover-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  margin-top: 8px;
  display: block;
}

.table-cover {
  width: 72px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  display: block;
}

.table-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  background: var(--bg-soft);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.5px;
}

.feature-card .desc {
  color: var(--text-dim);
  font-size: 13px;
  min-height: 40px;
}

/* 推荐标签：放在功能标题旁，和后台上线状态区分开。 */
.feature-recommend {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #ffd479;
  background: rgba(245, 165, 36, 0.16);
  border: 1px solid rgba(245, 165, 36, 0.4);
}

/* 功能点赞 / 点踩：同一用户只能选一个态度。 */
.feature-vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}

.feature-vote:hover {
  border-color: #37415a;
  color: var(--text);
}

.feature-vote.active {
  color: #bcd1ff;
  background: rgba(91, 140, 255, 0.16);
  border-color: rgba(91, 140, 255, 0.55);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--panel-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.tag-accent {
  background: rgba(34, 195, 154, 0.14);
  color: #6fe0bf;
  border-color: rgba(34, 195, 154, 0.3);
}

.tag-warn {
  background: rgba(245, 165, 36, 0.14);
  color: #f7c76b;
  border-color: rgba(245, 165, 36, 0.3);
}

.tag-danger {
  background: rgba(240, 82, 77, 0.14);
  color: #ff8b87;
  border-color: rgba(240, 82, 77, 0.3);
}

/* --------------------------------------------------------------- forms */

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.cost-box {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 24px;
}

.cost-line {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-dim);
}

.cost-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--border-soft);
  margin-top: 10px;
  padding-top: 14px;
}

.cost-total .num {
  font-size: 26px;
  font-weight: 700;
  color: #ffd479;
}

.upload-preview {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-dim);
}

.upload-preview img,
.upload-preview video {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}

.upload-preview audio {
  width: 100%;
}

/* -------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 640px;
}

th,
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

th {
  background: var(--bg-soft);
  color: var(--text-dim);
  font-weight: 500;
  font-size: 12px;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* --------------------------------------------------------------- jobs */

.job-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

/* 作品卡片横排：一行放不下再换行，避免竖着排浪费空间。 */
.job-list > .job-card {
  flex: 1 1 360px;
  min-width: 300px;
}

.job-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
}

.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.job-meta {
  color: var(--text-faint);
  font-size: 12px;
}

.job-media {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.job-media video,
.job-media img {
  width: 100%;
  border-radius: var(--radius-sm);
  background: #000;
  display: block;
  max-height: 340px;
  object-fit: contain;
}

/* 功能文档页排版 */
.doc-card { line-height: 1.75; }
.doc-card .doc-h { margin: 18px 0 8px; }
.doc-card .doc-p { margin: 6px 0; color: var(--text-dim); }
.doc-card .doc-code {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow-x: auto;
  font-size: 13px;
  white-space: pre;
}
.doc-card code { background: var(--panel-2); border-radius: 4px; padding: 1px 5px; }

/* 生成记录底部操作：下载与再次生成并排，附一句说明。 */
.job-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.progress {
  height: 4px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar {
  height: 100%;
  width: 35%;
  background: var(--primary);
  border-radius: 999px;
  animation: slide 1.4s ease-in-out infinite;
}

/* 进度条改为按预计时长匀速填充，不再使用滚动动画。 */
.progress-bar-fill {
  width: 4%;
  animation: none;
  transition: width 1s linear;
}

/* ---- 意见反馈 ---- */
.fb-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fb-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--bg-soft);
}

.fb-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fb-card-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.fb-reply {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  background: rgba(79, 124, 255, 0.08);
}

.fb-reply-head {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.fb-reply-body {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

/* 后台回复弹窗里的原文引用。 */
.fb-quote {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  font-size: 14px;
  line-height: 1.6;
  max-height: 220px;
  overflow: auto;
  word-break: break-word;
}

/* 后台反馈列表的内容列。 */
.fb-content {
  max-width: 520px;
  white-space: normal;
  word-break: break-word;
}

@keyframes slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* --------------------------------------------------------------- pay */

.pay-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.pay-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.pay-brand {
  color: var(--text-dim);
  font-size: 13px;
}

.pay-title {
  font-size: 18px;
  margin: 8px 0 18px;
}

.pay-amount {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 22px;
}

.pay-symbol {
  font-size: 22px;
  margin-right: 2px;
  color: var(--text-dim);
}

.pay-meta {
  text-align: left;
  margin: 0 0 22px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 0;
}

.pay-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.pay-meta dt {
  color: var(--text-dim);
  font-size: 13px;
}

.pay-meta dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pay-note {
  color: var(--text-faint);
  font-size: 12px;
  margin-top: 12px;
}

.pay-back {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
}

/* --------------------------------------------------------------- misc */

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
  max-width: 340px;
}

.toast.error {
  border-color: rgba(240, 82, 77, 0.5);
  color: #ffb3b0;
}

.toast.success {
  border-color: rgba(34, 195, 154, 0.5);
  color: #8fe8cd;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 900;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: var(--text-dim);
}

.icon-btn:hover {
  color: var(--text);
  border-color: #3a4358;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

.code-block {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow: auto;
}

.skeleton {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1b2030 25%, #232a3b 50%, #1b2030 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .cost-box {
    position: static;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    padding: 14px;
    gap: 14px;
  }
  .nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .sidebar-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
  }
  .balance-mini {
    flex: 1;
    margin-bottom: 0;
  }
  .main {
    padding: 18px 16px 50px;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .page-title {
    font-size: 19px;
  }
  .toast-host {
    left: 14px;
    right: 14px;
  }
}

/* ---------------------------------------------------- feature examples */

.example-strip {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.example-strip-head {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.example-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.example-card {
  flex: 0 0 auto;
  width: 220px;
  margin: 0;
}

.example-card img,
.example-card video {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: cover;
  border-radius: 6px;
  background: #0b1020;
  border: 1px solid var(--border);
}

/* 示例视频按原比例完整展示，竖版 9:16 也不会被裁剪。 */
.example-card video {
  height: 260px;
  object-fit: contain;
}

.example-card figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.example-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 124px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0b1020;
}

.example-audio audio {
  flex: 1;
  min-width: 0;
}

.example-audio-icon {
  font-size: 22px;
  color: var(--primary);
}

/* admin example editor */

.example-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.example-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0b1020;
}

.example-item .example-media {
  flex: 0 0 auto;
  width: 96px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: #05070f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.example-item .example-media img,
.example-item .example-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.example-item .example-audio-icon {
  font-size: 20px;
  color: var(--primary);
}

.example-item .example-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.example-item .example-actions {
  display: flex;
  gap: 4px;
}

/* subcategory rows in admin category table */
.subcat-row td {
  background: rgba(255, 255, 255, 0.02);
}
.subcat-mark {
  color: var(--text-faint);
  margin-right: 4px;
}

/* custom caption input inside the admin example editor */
.example-item .example-caption {
  flex: 1;
  min-width: 0;
  height: 34px;
  font-size: 13px;
}


/* 分类路径：视频（大分类）-数字人（小分类） */
.cat-path {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.4;
}
.cat-path-big,
.cat-path-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cat-path-sub {
  color: var(--muted, #9aa4b2);
}
.cat-path-tag {
  font-size: 10px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(127, 145, 175, 0.16);
  color: var(--muted, #9aa4b2);
}
.cat-path-sep {
  opacity: 0.5;
}

/* ---------------------------------------------------------- membership */
.member-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 2px;
}
.member-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  color: var(--text-dim);
}
.member-price.active {
  border-color: rgba(34, 195, 154, 0.5);
  background: rgba(34, 195, 154, 0.1);
  color: var(--text);
}
.member-price em {
  font-style: normal;
  color: var(--text-dim);
}
.member-price b {
  color: #8fd8ff;
  font-weight: 600;
}
.member-price i {
  font-style: normal;
  color: var(--text-faint);
  font-size: 11px;
}
.member-current {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: rgba(91, 140, 255, 0.06);
}
.member-current-name {
  font-weight: 600;
}
.member-quote {
  border-top: 1px dashed var(--border-soft);
  margin-top: 10px;
  padding-top: 8px;
}
.member-quote-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-dim);
}
.member-quote-row.active {
  color: var(--text);
}
.member-quote-row.active b {
  color: #6fe0bf;
}
.member-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.member-level-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-2);
}
.member-level-card.active {
  border-color: rgba(34, 195, 154, 0.55);
  box-shadow: inset 0 0 0 1px rgba(34, 195, 154, 0.2);
}
.member-level-name {
  font-weight: 600;
}
.member-level-rate {
  color: #8fd8ff;
  font-size: 13px;
  margin-top: 8px;
}
.member-level-meta {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 4px;
}
.member-level-active {
  color: #6fe0bf;
  font-size: 12px;
  margin-top: 8px;
}

/* mobile overflow guard */
.app-shell > .sidebar,
.app-shell > .main {
  min-width: 0;
}
.main .example-strip,
.main .example-row,
.main .studio-layout,
.main .page-head {
  min-width: 0;
}
@media (max-width: 720px) {
  .example-card {
    width: 180px;
  }
  .member-level-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------- covers / notes / auto duration */
.feature-cover-video {
  position: relative;
}

.feature-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 12, 22, 0.72);
  color: #eef3ff;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  cursor: pointer;
}

.cover-toggle:hover {
  background: rgba(8, 12, 22, 0.9);
}

.cover-toggle.is-paused {
  background: rgba(91, 140, 255, 0.85);
  border-color: rgba(91, 140, 255, 0.9);
}

.feature-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(145, 170, 230, 0.65);
  cursor: pointer;
}

.feature-link:hover {
  color: #a9c2ff;
}

.cover-preview-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  background: var(--bg-soft);
}
.cover-preview-box img,
.cover-preview-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-note {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(91, 140, 255, 0.35);
  background: rgba(91, 140, 255, 0.1);
  color: #a9c3ff;
  font-size: 12px;
  line-height: 1.5;
}

.page-note {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(91, 140, 255, 0.35);
  background: rgba(91, 140, 255, 0.1);
  color: #a9c3ff;
  font-size: 12px;
}

.auto-duration-hint {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-size: 12px;
}


/* ----------------------------------------------------------- support */

.support-fab {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 850;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(91, 140, 255, 0.5);
  background: linear-gradient(135deg, #2b3c66 0%, #1c2436 100%);
  color: #dce6ff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  transition: transform 0.15s, border-color 0.15s;
}

.support-fab:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 140, 255, 0.85);
}

.support-fab-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(91, 140, 255, 0.9);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.support-modal {
  max-width: 620px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.support-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 14px;
  text-align: center;
}

.support-name {
  font-weight: 650;
  margin-bottom: 4px;
}

.support-wechat {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.support-qr {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

.support-editor-row {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 12px;
  background: var(--bg-soft);
}

.support-editor-index {
  font-weight: 600;
  margin-bottom: 8px;
}

.support-qr-preview {
  margin-top: 8px;
}

.support-qr-preview img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 3px;
}

/* -------------------------------------------------------------- news */

.news-support {
  margin-bottom: 18px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px 18px;
}

.news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.news-title {
  font-size: 15px;
  font-weight: 650;
}

.news-meta {
  color: var(--text-faint);
  font-size: 12px;
}

.news-content {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .page-head {
    padding-right: 0;
  }
  .support-fab {
    top: auto;
    bottom: 18px;
    right: 14px;
    padding: 8px 12px 8px 8px;
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------- announcement popup */

.announcement-popup {
  max-width: 560px;
}

.announcement-popup-body {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.75;
  max-height: 46vh;
  overflow-y: auto;
  overflow-wrap: anywhere;
  padding-right: 4px;
}

/* ------------------------------------------------------------ referral */

.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(91, 140, 255, 0.6);
  background: rgba(91, 140, 255, 0.08);
  color: #c9d9ff;
  overflow-wrap: anywhere;
}

.rule-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 13px;
}

.rule-line:last-child {
  border-bottom: none;
}

.rule-line b {
  color: #6fe0bf;
  font-size: 15px;
}

.tier-list {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 10px 12px;
}

.tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-dim);
}

.tier-row b {
  color: var(--text);
}

/* 收益规则清单：与参考图一致的项目符号列表。 */
.rule-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
}

.rule-list li {
  margin-bottom: 2px;
}

.rule-list b {
  color: #6fe0bf;
}

/* 会员名额说明框：绿色高亮。 */
.slot-box {
  border: 1px solid rgba(111, 224, 191, 0.45);
  background: rgba(111, 224, 191, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.slot-box-title {
  font-size: 13px;
  font-weight: 700;
  color: #6fe0bf;
  margin-bottom: 8px;
}

.slot-box-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(111, 224, 191, 0.4);
  background: rgba(111, 224, 191, 0.06);
  font-size: 12px;
  color: var(--text-dim);
}

.tier-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.tier-note b {
  color: #6fe0bf;
}

.tier-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.tier-table th,
.tier-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

.tier-table th {
  color: var(--text-dim);
  font-weight: 600;
  background: var(--bg-soft);
}

.tier-table .tier-rate {
  font-weight: 700;
  color: var(--text);
}

.tier-table tr.tier-done {
  background: rgba(91, 140, 255, 0.07);
}

.tier-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  color: #6fe0bf;
  border: 1px solid rgba(111, 224, 191, 0.45);
  background: rgba(111, 224, 191, 0.1);
}

.tier-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tier-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.tier-cell b {
  color: var(--text);
}

.tier-cell i {
  font-style: normal;
  color: #6fe0bf;
}

.tag-danger {
  color: #ff8b87;
  border-color: rgba(240, 82, 77, 0.5);
  background: rgba(240, 82, 77, 0.12);
}

.hidden {
  display: none !important;
}

/* ---------------------------------------------------- wechat scan login */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--text-dim);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.wechat-login {
  margin-bottom: 4px;
}

.wechat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #07c160;
  border-color: #07c160;
  color: #fff;
}

.wechat-btn:hover {
  background: #06ad56;
  border-color: #06ad56;
}

.wechat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
}

.wechat-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  text-align: center;
}

.wechat-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.wechat-qr-inner {
  color: #333;
  font-size: 13px;
  padding: 12px;
  word-break: break-all;
}

.wechat-iframe {
  width: 180px;
  height: 180px;
  border: 0;
}

.wechat-tip {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

/* 分段筛选：全部 / 增加 / 消耗 */
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--accent);
  color: #fff;
}

/* 后台：前端选项可视化配置 */
.field-editor {
  display: grid;
  gap: 10px;
}

.field-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.field-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.field-row .field-label {
  margin-bottom: 4px;
}

/* ---------------------------------------------------------- 爆款灵感 */

.showcase-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
}

.showcase-toolbar .seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  gap: 2px;
}

.showcase-toolbar .seg-item {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.showcase-toolbar .seg-item:hover {
  color: var(--text);
}

.showcase-toolbar .seg-item.active {
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.showcase-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}

.showcase-media-wrap {
  aspect-ratio: 3 / 4;
  /*
   * r38：原来是 #0b0e14 纯深色底。
   * 只要 poster 或 preview 任何一个没到（CDN 抖动、移动网络切换、快照冷启动），
   * 用户看到的就是一块黑 —— 这正是「爆款灵感黑块」的视觉本体。
   * 换成柔和占位渐变：正常情况被封面/视频完全覆盖，失败时是浅色占位而不是黑。
   */
  background:
    radial-gradient(120% 90% at 50% 0%, #f7f9ff 0%, #eef1fa 45%, #e6ebf7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 全屏时按原始视频比例完整播放，避免 9:16 竖屏被 16:9 裁切。 */
.showcase-media:fullscreen,
.showcase-media:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.showcase-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 标题固定单行,超长省略,避免撑高卡片与换行错位。 */
.showcase-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.showcase-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.showcase-billing {
  border-top: 1px dashed var(--border-soft);
  padding-top: 7px;
}
/* 会员等级逐行展示:一个等级一行,禁止同行拼接多个等级。 */
.showcase-member-costs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-top: 4px;
}
.showcase-member-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text-dim);
  white-space: nowrap;
}
.showcase-member-cost em {
  font-style: normal;
  min-width: 62px;
}
.showcase-member-cost b {
  font-weight: 600;
}
.showcase-member-cost.active {
  background: rgba(34, 195, 154, 0.14);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(34, 195, 154, 0.45);
}
.showcase-member-cost.active b {
  color: #6fe0bf;
}

@media (max-width: 640px) {
  .showcase-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

/* 客服弹窗：微信号 + 复制按钮 */
.support-wechat-id {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.support-copy {
  margin-bottom: 10px;
}

/* 「我的」页面沿用爆款灵感卡片，无需额外布局样式 */

/* ------------------------------------------------- 功能配置工具栏 */

.feature-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 12px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.input-sm,
.select-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.select-sm {
  min-width: 130px;
}

.th-sortable {
  cursor: pointer;
  user-select: none;
}

.th-sortable:hover {
  color: var(--text);
}

.th-sortable.active {
  color: var(--accent);
}

.stat-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.col-settings-panel {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 12px;
  margin-bottom: 12px;
}

.col-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 14px;
}

.col-setting {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.col-setting span {
  white-space: nowrap;
}

.col-setting .col-width {
  width: 70px;
  height: 28px;
  padding: 0 6px;
  margin-left: auto;
  font-size: 12px;
  text-align: right;
}

.feature-table td {
  vertical-align: middle;
}


/* ------------------------------------------------- guest login entries */

.guest-gate {
  max-width: 520px;
  text-align: center;
  padding: 32px 26px;
}

.guest-gate-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.guest-gate-text {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.sidebar-foot > .btn-block {
  margin-bottom: 10px;
}

/* 登录页：微信扫码为唯一主入口 */
.wechat-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 6px 0 2px;
}

.wechat-primary .wechat-qr {
  width: 208px;
  height: 208px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.wechat-primary .wechat-qr-inner {
  color: #333;
  font-size: 14px;
  text-align: center;
  padding: 0 14px;
}

.wechat-primary .wechat-iframe {
  width: 208px;
  height: 208px;
  border: 0;
}

.wechat-open-hint {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.7;
}

.wechat-open-hint a {
  color: var(--primary);
}

.wechat-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.auth-alt-toggle {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

.auth-alt-toggle button {
  background: none;
  border: 0;
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.auth-alt-toggle button:hover {
  color: var(--primary);
}


/* 游客状态下侧边栏底部的登录按钮 */
.sidebar-foot #sideLogin {
  width: 100%;
}


/* 随机提示词按钮与提示文字 */
[data-random-prompt] {
  white-space: nowrap;
}

/* 提示/上传说明统一单行显示，过长时悬停可查看完整内容。 */
.field-help-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 参数标题与最短说明同排显示，超长时悬停查看完整内容。 */
.field-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.field-head .field-label {
  flex: 0 0 auto;
}
.field-desc {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.field-help:empty {
  display: none;
}

.zoom-backdrop {
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.zoom-image {
  max-width: 94vw;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}
.showcase-zoom {
  cursor: zoom-in;
}

/* 列表自动预览：点击后切换为完整成品。 */
.showcase-preview {
  cursor: pointer;
}

/* ===== LIGHT THEME START ===== */
/* ==================================================================
   浅色主题 · 视觉重做（参考 WorkBuddy 设计语言）
   ------------------------------------------------------------------
   这一整段由 work/_apply-theme.mjs 自动写入 styles.css 末尾，
   位于 LIGHT THEME 标记之间，重新执行即可整体替换。
   ================================================================== */

:root {
  --bg: #f4f5fa;
  --bg-soft: #f7f8fd;
  --panel: #ffffff;
  --panel-2: #f1f2f9;
  --border: #e7e9f3;
  --border-soft: #eef0f7;
  --text: #1b1e2c;
  --text-dim: #676e82;
  --text-faint: #949bb0;
  --primary: #6b5bfa;
  --primary-strong: #5a48e8;
  --accent: #12b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 30, 44, 0.04), 0 8px 24px rgba(27, 30, 44, 0.06);
  --shadow-lg: 0 18px 50px rgba(27, 30, 44, 0.14);
  --primary-soft: #f0edff;
  --primary-ring: rgba(107, 91, 250, 0.18);
}

/* ------------------------------------------------------- 基础排版 */

body {
  font-size: 14px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
}

::selection {
  background: rgba(107, 91, 250, 0.18);
}

::-webkit-scrollbar-thumb {
  background: #d5d8e6;
}
::-webkit-scrollbar-thumb:hover {
  background: #c0c4d8;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.2px;
}

a {
  color: var(--primary);
}
a:hover {
  text-decoration: none;
}

/* ------------------------------------------------------- 按钮 */

.btn {
  border-radius: var(--radius-sm);
  font-weight: 550;
  padding: 9px 16px;
  background: #fff;
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(27, 30, 44, 0.04);
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s, transform 0.16s, opacity 0.16s;
}

.btn:hover:not(:disabled) {
  background: #f7f8fd;
  border-color: #d8dcec;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #8f7dff 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-ring);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-strong) 0%, #7c68ff 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(107, 91, 250, 0.3);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
  background: #f4f5fb;
}

.btn-danger {
  background: #fff;
  border-color: rgba(239, 68, 68, 0.35);
  color: #dc2626;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.55);
}

.btn:disabled {
  opacity: 0.5;
}

/* ------------------------------------------------------- 表单 */

.field-label {
  color: var(--text);
  font-weight: 550;
}

.field-error {
  color: #dc2626;
}

.input,
.select,
.textarea {
  background: #fff;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--text);
}

.input::placeholder,
.textarea::placeholder {
  color: #a7adc0;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.input[type="file"]::file-selector-button {
  background: #f4f5fb;
  border-color: var(--border);
  color: var(--text);
  border-radius: 7px;
}

/* ------------------------------------------------------- 布局骨架 */

/*
 * 布局相关覆盖限定在桌面宽度：本文件会被追加到 styles.css 末尾，而文件下方的
 * @media (max-width:720px) 用的是同类选择器，级联只按源码顺序判定，不限定宽度
 * 就会盖掉整套移动端布局。
 */
@media (min-width: 721px) {
  .app-shell {
    grid-template-columns: 244px 1fr;
  }

  .sidebar {
    padding: 22px 14px;
    gap: 20px;
  }

  .main {
    padding: 28px 34px 64px;
  }

  .page-title {
    font-size: 23px;
  }
}

/* 侧栏底色与描边在移动端同样适用。 */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
}

.sidebar-logo {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  padding: 0 10px 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  gap: 3px;
}

.nav-item {
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  color: var(--text-dim);
  font-weight: 500;
  transition: background 0.16s, color 0.16s;
}

.nav-item:hover {
  background: #f4f5fb;
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .icon {
  font-size: 14.5px;
  opacity: 0.9;
}

.sidebar-foot {
  border-top: 1px solid var(--border-soft);
}

.balance-mini {
  background: #f7f8fd;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.balance-mini .num {
  font-size: 19px;
  color: var(--text);
  margin-top: 2px;
}

.main {
  max-width: 1240px;
}

.page-head {
  margin-bottom: 24px;
}

.page-title {
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-sub {
  color: var(--text-dim);
  margin-top: 4px;
}

/* ------------------------------------------------------- 卡片 / 统计 */

.card,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 22px;
}

.stat-card {
  padding: 18px 20px;
}

.card-head {
  margin-bottom: 18px;
}

.card-title {
  font-size: 15.5px;
  font-weight: 650;
}

.stat-label {
  color: var(--text-dim);
  font-weight: 500;
}

.stat-value {
  letter-spacing: -0.4px;
}

/* 余额卡：品牌紫渐变，作为页面视觉锚点 */
.balance-card {
  background: linear-gradient(135deg, #6b5bfa 0%, #8f7dff 55%, #a78bfa 100%);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(107, 91, 250, 0.28);
  color: #fff;
}

.balance-card .label {
  color: rgba(255, 255, 255, 0.85);
}

.balance-card .value {
  color: #fff;
  letter-spacing: -0.5px;
}

.balance-card .tiny {
  color: rgba(255, 255, 255, 0.82) !important;
}

.balance-card .btn-primary {
  background: #fff;
  border-color: transparent;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(20, 16, 60, 0.16);
}

.balance-card .btn-primary:hover:not(:disabled) {
  background: #f4f2ff;
  color: var(--primary-strong);
}

/* ------------------------------------------------------- 标签 / 筛选 */

.cat-tab {
  background: #fff;
  border-color: var(--border);
  color: var(--text-dim);
  box-shadow: 0 1px 2px rgba(27, 30, 44, 0.03);
}

.cat-tab:hover {
  border-color: #cfd4e6;
  color: var(--text);
}

.cat-tab.active {
  background: var(--primary-soft);
  border-color: rgba(107, 91, 250, 0.32);
  color: var(--primary);
  font-weight: 600;
}

.cat-count {
  background: #eef0f7;
  color: var(--text-dim);
}

.cat-tab.active .cat-count {
  background: rgba(107, 91, 250, 0.16);
  color: var(--primary);
}

.cat-tabs-sub {
  border-left-color: var(--border);
}

.cat-tabs-sub .cat-tab.active {
  background: var(--primary-soft);
  border-color: rgba(107, 91, 250, 0.32);
}

.cat-head {
  border-bottom-color: var(--border-soft);
}

.job-subhead {
  border-left-color: var(--border);
}

.sort-tab {
  background: #fff;
  border-color: var(--border);
  color: var(--text-dim);
}

.sort-tab:hover {
  border-color: #cfd4e6;
  color: var(--text);
}

.sort-tab.active {
  background: var(--primary-soft);
  border-color: rgba(107, 91, 250, 0.32);
  color: var(--primary);
  font-weight: 600;
}

.tag {
  background: #f1f2f9;
  border-color: var(--border);
  color: var(--text-dim);
  padding: 3px 9px;
  font-weight: 500;
}

.tag-accent {
  background: rgba(18, 185, 129, 0.12);
  color: #0d9668;
  border-color: rgba(18, 185, 129, 0.28);
}

.tag-warn {
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}

.tag-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.28);
}

.segmented,
.showcase-toolbar .seg {
  background: #f1f2f9;
  border-color: var(--border);
}

.seg-btn:hover,
.showcase-toolbar .seg-item:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-ring);
}

.showcase-toolbar .seg-item.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(27, 30, 44, 0.1);
}

/* ------------------------------------------------------- 功能卡 */

.feature-card {
  background: #fff;
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.feature-card:hover {
  border-color: rgba(107, 91, 250, 0.32);
  box-shadow: 0 10px 30px rgba(27, 30, 44, 0.1);
  transform: translateY(-2px);
}

.feature-card .desc {
  color: var(--text-dim);
}

.feature-card .name {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.feature-cover {
  background: #f1f2f9;
  border-color: var(--border-soft);
  border-radius: var(--radius-sm);
}

.feature-cover-fallback {
  background: linear-gradient(135deg, #eef0fb 0%, #e6e9f7 100%);
}

.feature-cover-fallback span {
  color: #a5a0d0;
}

.feature-recommend {
  color: #b45309;
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.32);
  font-weight: 600;
}

.feature-vote {
  background: #fff;
  border-color: var(--border);
  color: var(--text-dim);
}

.feature-vote:hover {
  border-color: #cfd4e6;
  color: var(--text);
}

.feature-vote.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(107, 91, 250, 0.32);
}

.feature-note,
.page-note {
  border-color: rgba(107, 91, 250, 0.24);
  background: rgba(107, 91, 250, 0.06);
  color: #5a48e8;
}

.auto-duration-hint {
  background: #f7f8fd;
  border-color: var(--border);
  color: var(--text-dim);
}

.cover-preview-box {
  background: #f1f2f9;
  border-color: var(--border-soft);
}

.feature-link {
  border-bottom-color: rgba(107, 91, 250, 0.4);
}

.feature-link:hover {
  color: var(--primary-strong);
}

/* ------------------------------------------------------- 表格 */

.table-wrap {
  border-color: var(--border);
  border-radius: var(--radius);
  background: #fff;
}

th,
td {
  border-bottom-color: var(--border-soft);
}

th {
  background: #f7f8fd;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
}

tbody tr:hover {
  background: #fafbff;
}

.subcat-row td {
  background: #fafbff;
}

/* ------------------------------------------------------- 作品 / 媒体 */

.job-card {
  background: #fff;
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.job-media video {
  background: #0f1116;
}

.job-media img {
  background: #f1f2f9;
}

.upload-preview {
  background: #f7f8fd;
  border-color: #d8dcec;
}

.upload-preview img {
  background: #f1f2f9;
}

.upload-preview video {
  background: #000;
}

.progress {
  background: #e9ebf5;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary) 0%, #8f7dff 100%);
}

/* ------------------------------------------------------- 反馈 */

.fb-card {
  background: #fafbff;
  border-color: var(--border);
  border-radius: var(--radius-sm);
}

.fb-reply {
  background: rgba(107, 91, 250, 0.06);
  border-left-color: var(--primary);
}

.fb-quote {
  background: #f7f8fd;
  border-color: var(--border);
}

/* ------------------------------------------------------- 弹窗 / 提示 */

.modal-backdrop {
  background: rgba(20, 22, 34, 0.42);
}

.modal {
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
}

.icon-btn {
  border-radius: 8px;
  background: #fff;
}

.icon-btn:hover {
  border-color: #cfd4e6;
  background: #f7f8fd;
}

.toast {
  background: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #dc2626;
}

.toast.success {
  border-color: rgba(18, 185, 129, 0.4);
  color: #0d9668;
}

.empty {
  border-color: var(--border);
  color: var(--text-faint);
  background: #fafbff;
}

.code-block {
  background: #f7f8fd;
  border-color: var(--border);
}

.skeleton {
  background: linear-gradient(90deg, #eceef7 25%, #f4f5fb 50%, #eceef7 75%);
  background-size: 200% 100%;
}

/* ------------------------------------------------------- 登录 / 支付 */

.auth-body {
  background: radial-gradient(1200px 560px at 12% -12%, #ece7ff 0%, #f4f5fa 55%, #eef2fb 100%);
}

.auth-brand .logo {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.auth-brand .sub {
  color: var(--text-dim);
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  background: #f1f2f9;
  border-radius: var(--radius-sm);
}

.auth-tab {
  border-radius: 8px;
  color: var(--text-dim);
}

.auth-tab.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(27, 30, 44, 0.1);
}

.auth-footer {
  color: var(--text-faint);
}

.pay-body {
  background: radial-gradient(1200px 560px at 12% -12%, #ece7ff 0%, #f4f5fa 55%, #eef2fb 100%);
}

.pay-card {
  border-color: var(--border);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.pay-note {
  color: var(--text-faint);
}

/* ------------------------------------------------------- 邀请 / 会员 */

.invite-code {
  border-color: rgba(107, 91, 250, 0.4);
  background: rgba(107, 91, 250, 0.06);
  color: #5a48e8;
}

.rule-line {
  border-bottom-color: var(--border-soft);
}

.rule-line b {
  color: #0d9668;
}

.tier-list {
  background: #f7f8fd;
  border-color: var(--border);
}

.member-price {
  background: #fff;
  border-color: var(--border);
}

.member-price.active {
  border-color: rgba(18, 185, 129, 0.45);
  background: rgba(18, 185, 129, 0.08);
}

.member-price b {
  color: var(--primary);
}

.member-current {
  background: rgba(107, 91, 250, 0.05);
  border-color: var(--border);
}

.member-quote {
  border-top-color: var(--border);
}

.member-quote-row.active b {
  color: #0d9668;
}

.member-level-card {
  background: #fafbff;
  border-color: var(--border);
  border-radius: var(--radius-sm);
}

.member-level-card.active {
  border-color: rgba(18, 185, 129, 0.45);
  box-shadow: inset 0 0 0 1px rgba(18, 185, 129, 0.16);
  background: rgba(18, 185, 129, 0.05);
}

.member-level-rate {
  color: var(--primary);
}

.member-level-active {
  color: #0d9668;
}

/* ------------------------------------------------------- 爆款灵感 */

.showcase-card {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s, transform 0.18s;
}

.showcase-card:hover {
  box-shadow: 0 12px 32px rgba(27, 30, 44, 0.12);
  transform: translateY(-2px);
}

.showcase-member-cost.active {
  background: rgba(18, 185, 129, 0.1);
  box-shadow: inset 0 0 0 1px rgba(18, 185, 129, 0.38);
}

.showcase-member-cost.active b {
  color: #0d9668;
}

.showcase-body {
  padding: 13px;
}

.showcase-title {
  font-weight: 650;
}

/* ------------------------------------------------------- 客服 / 新闻 / 附件 */

.support-fab {
  border-color: rgba(107, 91, 250, 0.35);
  background: linear-gradient(135deg, #6b5bfa 0%, #8f7dff 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(107, 91, 250, 0.34);
}

.support-fab:hover {
  border-color: rgba(107, 91, 250, 0.6);
  box-shadow: 0 10px 26px rgba(107, 91, 250, 0.42);
}

.support-fab-icon {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.support-card,
.support-editor-row {
  background: #fafbff;
  border-color: var(--border);
}

.news-card {
  background: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.news-content {
  color: var(--text-dim);
}

.news-title {
  font-weight: 650;
}

.example-strip {
  background: #fafbff;
  border-color: var(--border);
  border-radius: var(--radius-sm);
}

.example-card img,
.example-card video {
  background: #f1f2f9;
  border-color: var(--border);
}

/* 示例视频按原比例完整展示：竖版 9:16 与横版 16:9 都不拉伸、不裁剪。 */
.example-card video {
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

.example-card figcaption {
  color: var(--text-dim);
}

.example-audio {
  background: #f1f2f9;
  border-color: var(--border);
}

.example-item {
  background: #fafbff;
  border-color: var(--border);
}

.example-item .example-media {
  background: #eef0f7;
}

.example-item .example-caption {
  background: #fff;
}

/* ------------------------------------------------------- 弹窗里的排版 */

.doc-card .doc-p {
  color: var(--text-dim);
}

.doc-card .doc-code,
.doc-card code {
  background: #f7f8fd;
  border-color: var(--border);
}

.announcement-popup-body {
  color: var(--text-dim);
}

.zoom-image {
  box-shadow: 0 18px 60px rgba(27, 30, 44, 0.28);
}

.cost-box {
  background: #fff;
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cost-line {
  color: var(--text-dim);
}

.cost-total {
  border-top-color: var(--border);
}

.cost-total .num {
  color: #d97706;
}

.col-settings-panel {
  background: #fafbff;
  border-color: var(--border);
}

.field-row {
  background: #fafbff;
  border-color: var(--border);
  border-radius: var(--radius-sm);
}

.guest-gate-text {
  color: var(--text-dim);
}

/* 分类路径标签 */
.cat-path-sub {
  color: var(--text-dim);
}

.cat-path-tag {
  background: rgba(107, 114, 134, 0.12);
  color: var(--text-dim);
}

/* 深色遮罩上的浮层控件仍需保持浅色文字 */
.cover-toggle {
  color: #eef3ff;
}

.support-qr,
.support-qr-preview img,
.wechat-qr,
.wechat-primary .wechat-qr,
.m-qr,
.m-login-qr {
  background: #fff;
}
/* ===== LIGHT THEME END ===== */


/* ---------------------------------------------------------- 品牌 LOGO */
.sidebar-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  vertical-align: -6px;
  margin-right: 8px;
}
.sidebar-logo {
  display: flex;
  align-items: center;
}
.sidebar-logo .sidebar-brand-mark {
  flex: 0 0 auto;
  margin-right: 8px;
}
.brand-mark {
  width: min(320px, 78vw);
  height: auto;
  display: block;
  margin: 0 auto 10px;
}
.auth-brand .logo[hidden] {
  display: none !important;
}

/* ------------------------------------------------------- 站点公告条 + 登录注册 tab */
.site-announcement-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.04));
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.site-announcement-icon { color: var(--primary); flex: none; }
.site-announcement-text { flex: 1 1 auto; word-break: break-word; }
.site-announcement-close {
  flex: none;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.site-announcement-close:hover { color: var(--text); }

.auth-tabs { display: flex; }

/* 工作台主列：公告条 + 内容同处一列，保持左侧栏 + 主内容两列布局。 */
.main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.main-col > .site-announcement-bar {
  margin: 14px 22px 0;
}

/* 原片已过期：保留预览片段，明确标注，避免黑块。 */
.showcase-expired { position: relative; width: 100%; aspect-ratio: 9 / 16; background: linear-gradient(160deg, #f2f4fa 0%, #e6eaf5 55%, #dfe4f1 100%); display: flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; }
.showcase-expired video { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.showcase-expired-box { color: #98a1b8; font-size: 13px; letter-spacing: .5px; }
.showcase-expired-badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(17,24,39,.62); color: #fff; font-size: 11px; line-height: 18px; }

/* ---- 我的作品：批量选择 ---- */
.job-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border-soft);
}

.job-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.job-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.job-check input:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.job-card-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}


/* ---------------------------------------------------------- 教程动态 */

.tutorial-group-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(34, 195, 154, 0.12), rgba(34, 195, 154, 0.02));
}

.tg-icon {
  font-size: 30px;
  line-height: 1;
  flex: 0 0 auto;
}

.tg-body {
  flex: 1 1 auto;
  min-width: 0;
}

.tg-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tg-note {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.tutorial-videos-card {
  margin-bottom: 18px;
}

.tutorial-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.tutorial-video {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tv-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  display: block;
}

.tv-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tv-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.tv-desc {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tv-qr-modal {
  max-width: 420px;
  text-align: center;
}

.tv-qr-modal img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.tv-qr-modal video {
  width: 100%;
  border-radius: 10px;
  background: #000;
}

/* 后台教程配置 */
.tut-editor-row {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 14px;
  margin-top: 12px;
}

.tut-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tut-editor-index {
  font-weight: 650;
}

@media (max-width: 760px) {
  .tutorial-group-card {
    flex-wrap: wrap;
  }
  .tutorial-videos {
    grid-template-columns: 1fr;
  }
}


/* ==================================================================
   r38 · 封面失败兜底
   ------------------------------------------------------------------
   poster 连续两次取不到时，卡片原本会一直保持 .showcase-media-wrap 的
   #0b0e14 深色底 —— 也就是用户报的「黑块」。
   这里给失败态一个柔和的占位渐变，并显式标注，绝不再留纯黑。
   ================================================================== */
.showcase-poster-failed,
.showcase-preview-failed {
  background:
    radial-gradient(120% 90% at 50% 0%, #f7f9ff 0%, #eef1fa 45%, #e6ebf7 100%);
}

.showcase-media-wrap.showcase-media-failed,
.showcase-media-wrap:has(> video.showcase-poster-failed) {
  background: radial-gradient(120% 90% at 50% 0%, #f7f9ff 0%, #eef1fa 45%, #e6ebf7 100%);
}

/* r38：视频本体在无帧可画时是透明的，垫一层同色占位，任何状态都不露黑。 */
.showcase-media {
  background:
    radial-gradient(120% 90% at 50% 0%, #f7f9ff 0%, #eef1fa 45%, #e6ebf7 100%);
}
