:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ink: #1e2a26;
  --ink-soft: #3c4a45;
  --muted: #67756f;
  --faint: #8fa09a;
  --line: #e2eae6;
  --line-strong: #ccdad3;
  --accent: #0e8a63;
  --accent-deep: #0b6b50;
  --accent-soft: #e7f4ee;
  --accent-grad: linear-gradient(120deg, #12a06f, #0e8a63);
  --gold: #c98f1f;
  --gold-grad: linear-gradient(180deg, #d9a53c, #c98f1f);
  --danger: #c2415a;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #f6faf8;
  /* 侧栏导航专用文字色：比正文更深，字号更大，观感更高级 */
  --nav-ink: #152a23;
  --nav-note: #6e8179;
  --nav-icon: #2f6b57;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(30, 60, 48, .08), 0 1px 2px rgba(30, 60, 48, .05);
}

html[data-theme="dark"] {
  --ink: #e7e9ee;
  --ink-soft: #c3c9d3;
  --muted: #8b94a3;
  --faint: #6a7382;
  --line: #232935;
  --line-strong: #2e3644;
  --accent: #22b37f;
  --accent-deep: #189266;
  --accent-soft: #12261f;
  --accent-grad: linear-gradient(120deg, #26c289, #17a06e);
  --gold: #d9a53c;
  --gold-grad: linear-gradient(180deg, #e2b155, #cf9a30);
  --bg: #0c0e13;
  --panel: #141821;
  --panel-soft: #171c26;
  --nav-ink: #f2f5f9;
  --nav-note: #8b95a4;
  --nav-icon: #5fd0a5;
  --shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
/* 深色主题：原生 select 展开菜单强制深色，避免白底白字看不清（含 model-bench / 爆款二创 / 各设置浮层） */
html[data-theme="dark"], html[data-theme="dark"] body { color-scheme: dark; }
html[data-theme="dark"] select { color-scheme: dark; }
html[data-theme="dark"] select option,
html[data-theme="dark"] optgroup { background: #1c1f24; color: #e8eaed; }
html[data-theme="dark"] select option:checked,
html[data-theme="dark"] select option:hover { background: #4c2fa6; color: #fff; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ============================================================
   背景系统 —— 5 套可切换氛围（html[data-bg]）
   mist 晨雾 / aurora 极光 / galaxy 星河 / gold 鎏金 / ink 墨韵
   ============================================================ */

.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
  transition: background-color .4s ease;
}
.app-bg::before,
.app-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  will-change: transform;
}
@keyframes bgFloatA {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-36px, 30px, 0) scale(1.1); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes bgFloatB {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  50%  { transform: translate3d(30px, -26px, 0) scale(.95); }
  100% { transform: translate3d(0, 0, 0) scale(1.05); }
}

/* —— 1. 晨雾（默认）：淡雅、带细网格，最不打扰阅读 —— */
html[data-bg="mist"] .app-bg {
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(14, 138, 99, .13), transparent 62%),
    radial-gradient(720px 460px at -8% 26%, rgba(53, 120, 200, .09), transparent 64%),
    linear-gradient(transparent 95%, var(--line) 95%) 0 0 / 100% 44px,
    linear-gradient(90deg, transparent 95%, var(--line) 95%) 0 0 / 44px 100%,
    linear-gradient(180deg, #eef5f2, #e5edf2);
}
html[data-bg="mist"] .app-bg::before {
  width: 520px; height: 520px; top: -150px; right: -70px;
  background: radial-gradient(circle, rgba(18, 160, 111, .38), transparent 66%);
  animation: bgFloatA 26s ease-in-out infinite;
}
html[data-bg="mist"] .app-bg::after {
  width: 460px; height: 460px; bottom: -170px; left: -90px;
  background: radial-gradient(circle, rgba(56, 120, 190, .26), transparent 66%);
  animation: bgFloatB 34s ease-in-out infinite;
}

/* —— 2. 极光：青绿到紫的流动光带，最有科技感 —— */
html[data-bg="aurora"] .app-bg {
  background:
    linear-gradient(115deg, rgba(20, 200, 160, .20) 0%, transparent 40%, rgba(124, 92, 226, .18) 70%, transparent 94%),
    radial-gradient(1100px 620px at 82% -12%, rgba(24, 190, 160, .28), transparent 62%),
    radial-gradient(900px 560px at -6% 18%, rgba(96, 120, 230, .24), transparent 64%),
    radial-gradient(800px 520px at 55% 110%, rgba(150, 90, 220, .22), transparent 64%),
    linear-gradient(165deg, #dcf3ea 0%, #d9e4fa 46%, #e8d8f6 100%);
}
html[data-bg="aurora"] .app-bg::before {
  width: 640px; height: 640px; top: -200px; left: -110px;
  background: radial-gradient(circle, rgba(22, 205, 165, .52), transparent 64%);
  animation: bgFloatA 22s ease-in-out infinite;
}
html[data-bg="aurora"] .app-bg::after {
  width: 580px; height: 580px; top: 34%; right: -160px;
  background: radial-gradient(circle, rgba(126, 92, 228, .44), transparent 64%);
  animation: bgFloatB 30s ease-in-out infinite;
}

/* —— 3. 星河：星点 + 星云，纵深感最强 —— */
html[data-bg="galaxy"] .app-bg {
  background:
    radial-gradient(1300px 640px at 18% -12%, rgba(88, 110, 220, .20), transparent 62%),
    radial-gradient(900px 560px at 92% 8%, rgba(150, 90, 220, .16), transparent 62%),
    radial-gradient(1.6px 1.6px at 34px 42px, rgba(72, 96, 168, .42), transparent 100%) 0 0 / 190px 170px repeat,
    radial-gradient(1.2px 1.2px at 96px 120px, rgba(120, 88, 190, .34), transparent 100%) 0 0 / 240px 210px repeat,
    linear-gradient(175deg, #e9ebf9 0%, #e2e4f6 46%, #ece2f9 100%);
}
html[data-bg="galaxy"] .app-bg::before {
  width: 600px; height: 600px; top: -190px; right: 8%;
  background: radial-gradient(circle, rgba(96, 116, 226, .42), transparent 66%);
  animation: bgFloatA 28s ease-in-out infinite;
}
html[data-bg="galaxy"] .app-bg::after {
  width: 540px; height: 540px; bottom: -190px; left: 12%;
  background: radial-gradient(circle, rgba(158, 96, 226, .34), transparent 66%);
  animation: bgFloatB 36s ease-in-out infinite;
}

/* —— 4. 鎏金：暖香槟金，商务大气 —— */
html[data-bg="gold"] .app-bg {
  background:
    radial-gradient(1000px 560px at 88% -12%, rgba(201, 143, 31, .20), transparent 62%),
    radial-gradient(820px 520px at -6% 34%, rgba(176, 120, 44, .13), transparent 64%),
    linear-gradient(160deg, #fbf5e6 0%, #f6eeda 52%, #faf2e2 100%);
}
html[data-bg="gold"] .app-bg::before {
  width: 600px; height: 600px; top: -190px; right: -80px;
  background: radial-gradient(circle, rgba(214, 158, 52, .42), transparent 66%);
  animation: bgFloatA 30s ease-in-out infinite;
}
html[data-bg="gold"] .app-bg::after {
  width: 520px; height: 520px; bottom: -170px; left: -90px;
  background: radial-gradient(circle, rgba(196, 122, 42, .26), transparent 66%);
  animation: bgFloatB 38s ease-in-out infinite;
}

/* —— 5. 墨韵：宣纸底 + 墨晕，东方克制 —— */
html[data-bg="ink"] .app-bg {
  background:
    radial-gradient(860px 540px at 88% 4%, rgba(38, 58, 52, .11), transparent 62%),
    radial-gradient(760px 540px at 2% 82%, rgba(28, 48, 42, .09), transparent 66%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .012) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #f8f8f3 0%, #eceee7 100%);
}
html[data-bg="ink"] .app-bg::before {
  width: 620px; height: 620px; top: -210px; right: -60px;
  background: radial-gradient(circle, rgba(30, 56, 48, .22), transparent 68%);
  animation: bgFloatA 32s ease-in-out infinite;
}
html[data-bg="ink"] .app-bg::after {
  width: 540px; height: 540px; bottom: -200px; left: -70px;
  background: radial-gradient(circle, rgba(52, 74, 66, .16), transparent 68%);
  animation: bgFloatB 40s ease-in-out infinite;
}

/* —— 深色模式下的对应氛围（更浓、更亮） —— */
html[data-theme="dark"][data-bg="mist"] .app-bg {
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(34, 179, 127, .18), transparent 62%),
    radial-gradient(720px 460px at -8% 26%, rgba(70, 130, 210, .12), transparent 64%),
    linear-gradient(transparent 95%, rgba(255, 255, 255, .03) 95%) 0 0 / 100% 44px,
    linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, .03) 95%) 0 0 / 44px 100%,
    linear-gradient(180deg, #0c0f14, #090b10);
}
html[data-theme="dark"][data-bg="aurora"] .app-bg {
  background:
    linear-gradient(115deg, rgba(26, 220, 180, .20) 0%, transparent 38%, rgba(140, 100, 240, .20) 68%, transparent 94%),
    radial-gradient(1100px 620px at 82% -12%, rgba(24, 200, 170, .26), transparent 62%),
    radial-gradient(900px 560px at -6% 18%, rgba(96, 120, 230, .22), transparent 64%),
    linear-gradient(165deg, #08110f 0%, #090c16 48%, #100a1a 100%);
}
html[data-theme="dark"][data-bg="galaxy"] .app-bg {
  background:
    radial-gradient(1300px 640px at 18% -12%, rgba(96, 118, 240, .30), transparent 62%),
    radial-gradient(900px 560px at 92% 8%, rgba(160, 96, 240, .24), transparent 62%),
    radial-gradient(1.8px 1.8px at 34px 42px, rgba(200, 214, 255, .62), transparent 100%) 0 0 / 190px 170px repeat,
    radial-gradient(1.3px 1.3px at 96px 120px, rgba(176, 150, 255, .48), transparent 100%) 0 0 / 240px 210px repeat,
    linear-gradient(175deg, #070912 0%, #080a14 46%, #0c0716 100%);
}
html[data-theme="dark"][data-bg="gold"] .app-bg {
  background:
    radial-gradient(1000px 560px at 88% -12%, rgba(214, 158, 52, .24), transparent 62%),
    radial-gradient(820px 520px at -6% 34%, rgba(176, 120, 44, .16), transparent 64%),
    linear-gradient(160deg, #100d08 0%, #0d0b07 52%, #12100a 100%);
}
html[data-theme="dark"][data-bg="ink"] .app-bg {
  background:
    radial-gradient(860px 540px at 88% 4%, rgba(120, 160, 150, .14), transparent 62%),
    radial-gradient(760px 540px at 2% 82%, rgba(96, 140, 130, .10), transparent 66%),
    linear-gradient(180deg, #0b0d0c 0%, #080a09 100%);
}
html[data-theme="dark"] .app-bg::before,
html[data-theme="dark"] .app-bg::after { opacity: .38; }

@media (prefers-reduced-motion: reduce) {
  .app-bg::before, .app-bg::after { animation: none !important; }
}

/* ---------- 外观菜单（明暗配色 + 页面背景，合并一处） ---------- */

.quickbar { position: relative; }

.look-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  width: 278px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 18px 44px rgba(20, 40, 32, .16);
  display: grid;
  gap: 4px;
}
html[data-theme="dark"] .look-menu { background: rgba(20, 24, 33, .97); }

.look-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--faint);
  padding: 7px 6px 5px;
}
.look-head:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

/* 第一行：明暗配色 */
.look-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.look-seg-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.look-seg-item:hover { border-color: var(--line-strong); }
.look-seg-item.is-active {
  background: var(--accent-soft);
  border-color: rgba(14, 138, 99, .3);
  color: var(--accent-deep);
}
html[data-theme="dark"] .look-seg-item.is-active { color: var(--accent); }
.seg-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .12);
  flex: 0 0 auto;
}
.seg-dot.seg-light { background: linear-gradient(140deg, #ffffff, #e8eeeb); }
.seg-dot.seg-dark { background: linear-gradient(140deg, #33404d, #0e1218); }

/* 第二段：页面背景 */
.look-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.look-item:hover { background: var(--panel-soft); }
.look-item.is-active {
  background: var(--accent-soft);
  border-color: rgba(14, 138, 99, .25);
  color: var(--accent-deep);
}
html[data-theme="dark"] .look-item.is-active { color: var(--accent); }
.look-item .look-name { flex: 1; }
.look-item .look-tag { font-size: 11px; font-weight: 500; color: var(--faint); }
.look-dot {
  width: 26px; height: 26px;
  border-radius: 8px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .5);
}
.look-dot[data-k="mist"] { background: linear-gradient(140deg, #eefaf5, #dfeee8 55%, #e8f0f6); }
.look-dot[data-k="aurora"] { background: linear-gradient(140deg, #7ff0d0, #7fa8f5 50%, #b58cf0); }
.look-dot[data-k="galaxy"] { background: linear-gradient(140deg, #1a2246, #35246b 55%, #0d1430); }
.look-dot[data-k="gold"] { background: linear-gradient(140deg, #f7e2b4, #d9a53c 60%, #b8791f); }
.look-dot[data-k="ink"] { background: linear-gradient(140deg, #f7f7f3, #cfd6d1 55%, #8a958f); }

/* ---------- shell ---------- */

.shell { position: relative; z-index: 1; min-height: 100vh; }

.main-col { max-width: 1200px; margin: 0 auto; padding: 0 20px 24px; }

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 5px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: var(--ink);
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 20px; height: 20px; }

.page-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.02em;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-title::before {
  content: "";
  display: inline-block;
  width: 5px; height: 20px;
  border-radius: 3px;
  background: var(--accent);
  margin-right: 12px;
  vertical-align: -2px;
}

.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--accent-deep);
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
}
html[data-theme="dark"] .chip { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform .12s ease, filter .18s ease, background .18s ease, border-color .18s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14, 138, 99, .25);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.05); }

.btn.recharge { background: var(--gold-grad); color: #fff; box-shadow: 0 6px 16px rgba(201, 143, 31, .28); }
.btn.recharge:hover:not(:disabled) { filter: brightness(1.05); }

.btn.ghost { background: var(--panel); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
html[data-theme="dark"] .btn.ghost:hover:not(:disabled) { color: var(--accent); }

.btn.small { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; border-color: var(--line-strong); color: var(--danger); }

.user-chip { color: var(--ink); font-weight: 600; }
.user-chip .pts { color: var(--accent-deep); font-weight: 750; }
html[data-theme="dark"] .user-chip .pts { color: var(--accent); }

/* ---------- quickbar / contact ---------- */

.quickbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 3px;
}

.qbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
}
.qbtn svg { width: 17px; height: 17px; color: var(--accent); }
.qbtn:hover { border-color: var(--accent); color: var(--accent-deep); }
html[data-theme="dark"] .qbtn:hover { color: var(--accent); }

.contact-row {
  padding: 0 0 2px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.contact-row b { color: var(--ink-soft); }

/* ---------- content & panels ---------- */

.content { outline: none; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 9px 0;
  overflow: hidden;
}

/* 玻璃质感：让内容与背景氛围融合（mist/ink 等浅背景下更通透） */
html[data-bg] .panel {
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}
html[data-theme="dark"][data-bg] .panel {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel-head h2 svg { width: 18px; height: 18px; color: var(--accent); }
.panel-head .side-note { font-size: 12.5px; color: var(--muted); }
.panel-body { padding: 11px 20px; }
.panel-body.tight { padding: 7px 20px 9px; }

.hero-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 8px 2px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--accent);
  opacity: .8;
  margin-top: 18px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.h-big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 6px; }

/* ---------- form fields ---------- */

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 650; color: var(--ink-soft); }

.input, .select, textarea.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input:hover, .select:hover { border-color: var(--accent); }
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 138, 99, .12);
}

textarea.input { min-height: 130px; resize: vertical; line-height: 1.7; }

.select-wrap { position: relative; }
.select-wrap .select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.form-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; }
.form-row > * { flex: 1 1 200px; }

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

.counter { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* option cards */

.opt-grid { display: grid; gap: 10px; }
.opt-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.opt {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px 14px;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.opt:hover { border-color: var(--accent); }
.opt.is-active { border-color: var(--accent); background: var(--accent-soft); }
.opt .opt-title { font-size: 15px; font-weight: 750; }
.opt .opt-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.opt .opt-tag {
  position: absolute;
  top: 8px; right: 10px;
  font-size: 10.5px;
  color: var(--gold);
  font-weight: 700;
}
.opt .ratio-box {
  display: block;
  border: 2px solid currentColor;
  border-radius: 4px;
  margin: 2px auto 8px;
  opacity: .8;
}

.seg {
  display: inline-flex;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.seg button.is-active { background: var(--panel); color: var(--accent-deep); box-shadow: 0 1px 3px rgba(20, 40, 32, .12); }
html[data-theme="dark"] .seg button.is-active { color: var(--accent); }

/* ---------- estimate & submit ---------- */

.estimate {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--line-strong);
  margin-top: 16px;
  padding-top: 14px;
}
.estimate .est-label { font-size: 13.5px; color: var(--muted); }
.estimate .est-value { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.estimate .est-unit { font-size: 12px; color: var(--faint); }
.estimate .est-right { margin-left: auto; }

.submit-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 0 2px;
}
.submit-note svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- task list / gallery ---------- */

.task-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.task-item:last-child { border-bottom: 0; }

.task-thumb {
  width: 76px; height: 76px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--faint);
}
.task-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.task-main { min-width: 0; flex: 1; }
.task-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.task-line .task-prompt { flex: 1; min-width: 0; }
.copy-mini {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--faint);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.copy-mini:hover {
  color: var(--accent-deep);
  border-color: rgba(14, 138, 99, .35);
  background: var(--accent-soft);
}
html[data-theme="dark"] .copy-mini:hover { color: var(--accent); }
.copy-mini svg { width: 13px; height: 13px; }
.task-prompt {
  font-size: 13.5px;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}
.task-meta { font-size: 11.5px; color: var(--faint); margin-top: 4px; }

.progress {
  height: 7px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin-top: 8px;
}
.progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent-grad);
  transition: width .3s ease;
}

/* 进度条 + 百分比 */
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.progress-row .progress { flex: 1; margin-top: 0; }
.progress-pct {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep);
  min-width: 38px;
  text-align: right;
}
html[data-theme="dark"] .progress-pct { color: var(--accent); }

/* 任务缩略图 */
.task-thumb { position: relative; cursor: default; }
.task-thumb.has-preview { cursor: zoom-in; }
.task-thumb.has-preview:hover img,
.task-thumb.has-preview:hover video { transform: scale(1.06); }
.task-thumb img,
.task-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.task-thumb .thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 14, 24, .55);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.task-thumb .thumb-play svg { width: 14px; height: 14px; }
/* 生成中：百分比呼吸占位 */
.task-thumb.is-running { border-style: dashed; animation: thumbPulse 1.6s ease-in-out infinite; }
.task-thumb .thumb-pct {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
@keyframes thumbPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.task-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.status-tag.queued { background: var(--panel-soft); color: var(--muted); border: 1px solid var(--line); }
.status-tag.running { background: var(--accent-soft); color: var(--accent-deep); }
html[data-theme="dark"] .status-tag.running { color: var(--accent); }
.status-tag.done { background: var(--accent-soft); color: var(--accent-deep); }
html[data-theme="dark"] .status-tag.done { color: var(--accent); }
.status-tag.failed { background: #fbeef1; color: var(--danger); }
html[data-theme="dark"] .status-tag.failed { background: #2a1a20; }
.status-tag.staged { background: #fdf6e7; color: var(--gold); }
html[data-theme="dark"] .status-tag.staged { background: #2a2415; }

.empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--muted);
}
.empty .empty-icon {
  width: 52px; height: 52px;
  margin: 0 auto 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
  color: var(--faint);
}
.empty .empty-icon svg { width: 24px; height: 24px; }
.empty p { margin: 2px 0; font-size: 13.5px; }
.empty .btn { margin-top: 10px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }

.work-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  cursor: zoom-in;
  transition: transform .15s ease, box-shadow .15s ease;
  text-align: left;
  padding: 0;
  display: block;
  width: 100%;
}
.work-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
/* 参考素材 / 项目成片统一 9:16 竖版容器；contain 保证任意比例的素材完整显示、不拉伸、不裁切 */
.work-card .thumb { aspect-ratio: 9 / 16; background: var(--panel-soft); overflow: hidden; }
.work-card .thumb img,
.work-card .thumb canvas,
.work-card .thumb video {
  width: 100%; height: 100%; object-fit: contain; object-position: center; display: block;
}
.work-card .thumb video-anim { display: block; }
.work-card .work-info { padding: 7px 9px 8px; }
.work-card .work-prompt {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-card .work-meta { font-size: 10.5px; color: var(--faint); margin-top: 2px; display: flex; justify-content: space-between; gap: 8px; }
.play-badge {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(10, 14, 12, .55);
  color: #fff;
  display: grid;
  place-items: center;
}
.play-badge svg { width: 13px; height: 13px; margin-left: 1px; }

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

.series-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 2px 12px;
}
.series-head h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
}
.series-head h3::before {
  content: '';
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.series-head span {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 12px;
}

.model-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 16px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.model-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 18px rgba(15, 43, 76, .08);
  transform: translateY(-2px);
}
html[data-theme="dark"] .model-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.model-card .mc-top { display: flex; align-items: flex-start; gap: 12px; }
.model-card .mc-icon {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
html[data-theme="dark"] .model-card .mc-icon { color: var(--accent); }
.model-card .mc-icon.is-video {
  background: rgba(201, 143, 31, .13);
  color: #a97c1c;
}
html[data-theme="dark"] .model-card .mc-icon.is-video { color: var(--gold); }
.model-card .mc-icon svg { width: 22px; height: 22px; }
.model-card .mc-name { font-size: 14.5px; font-weight: 750; line-height: 1.45; }
.model-card .mc-sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.model-card .mc-price-tag {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 4px 10px;
  white-space: nowrap;
}
html[data-theme="dark"] .model-card .mc-price-tag { color: var(--accent); }

.model-card .mc-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 37px;
}
.tag-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.tag {
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 3px 8px;
  background: var(--panel-soft);
}

.spec-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.spec-chip {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--panel-soft);
}
.spec-chip b { color: var(--accent-deep); font-size: 13px; }
html[data-theme="dark"] .spec-chip b { color: var(--accent); }

.mc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px dashed var(--line);
  margin-top: 10px;
  padding-top: 10px;
}
.mc-stats .stat-label { font-size: 11px; color: var(--faint); }
.mc-stats .stat-value { font-size: 15px; font-weight: 800; margin-top: 2px; }
.mc-stats .stat-value.gold { color: var(--gold); }

.trend { display: flex; gap: 3px; margin-top: 4px; }
.trend i { flex: 1; height: 8px; border-radius: 3px; background: var(--line); }
.trend i.ok { background: #2f9e77; }
.trend i.slow { background: #d9a53c; }
.trend i.bad { background: #d97a8c; }

.mc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}
.mc-foot .price { font-size: 15px; font-weight: 800; color: var(--accent-deep); }
html[data-theme="dark"] .mc-foot .price { color: var(--accent); }

/* ---------- account ---------- */

.points-hero {
  background: linear-gradient(135deg, var(--accent-soft), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
}
.points-hero .ph-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.points-hero .ph-label svg { width: 18px; height: 18px; color: var(--accent); }
.points-hero .ph-value { font-size: 44px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 4px; }
.points-hero .ph-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--line-strong);
  padding-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.tx-list li:last-child { border-bottom: 0; }
.tx-amount { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount.plus { color: var(--accent-deep); }
html[data-theme="dark"] .tx-amount.plus { color: var(--accent); }
.tx-amount.minus { color: var(--danger); }
.tx-time { font-size: 11px; color: var(--faint); white-space: nowrap; }
.tx-memo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- modals ---------- */

.modal-root, .login-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-root { background: rgba(18, 26, 23, .45); backdrop-filter: blur(4px); }

.modal {
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(10, 20, 16, .3);
}
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.modal-head h2 { margin: 0; font-size: 19px; font-weight: 750; flex: 1; }
.modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--accent-soft); color: var(--ink); }
.modal-close svg { width: 18px; height: 18px; }
.modal-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; line-height: 1.7; }

.notice-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 12px;
}
.notice-banner .nb-icon {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--accent-grad);
  color: #fff;
  display: grid;
  place-items: center;
}
.notice-banner .nb-icon svg { width: 20px; height: 20px; }
.notice-banner b { font-size: 14px; }
.notice-banner p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.info-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 14px 16px;
  margin: 10px 0;
}
.info-card .ic-title { font-size: 17px; font-weight: 800; }
.info-card .ic-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.info-card p { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.8; }

/* 客服微信弹窗：号码大卡片 */
.wx-card {
  margin: 14px 0 4px;
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid rgba(14, 138, 99, .22);
  background:
    radial-gradient(420px 180px at 88% -30%, rgba(14, 138, 99, .18), transparent 70%),
    linear-gradient(150deg, #f3fbf7, #eef6fb);
  text-align: center;
}
html[data-theme="dark"] .wx-card {
  border-color: rgba(34, 179, 127, .3);
  background:
    radial-gradient(420px 180px at 88% -30%, rgba(34, 179, 127, .22), transparent 70%),
    linear-gradient(150deg, #10201b, #0f1622);
}
.wx-card-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.wx-card-num {
  margin: 8px 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .wx-card-num { color: var(--accent); }
.wx-card-hint { font-size: 12.5px; color: var(--muted); }

/* ---------- login overlay ---------- */

.login-root {
  background:
    radial-gradient(800px 500px at 15% 10%, rgba(20, 190, 140, .25), transparent 55%),
    radial-gradient(700px 480px at 90% 80%, rgba(30, 120, 220, .28), transparent 55%),
    radial-gradient(900px 600px at 70% 0%, rgba(10, 160, 110, .18), transparent 60%),
    #07130f;
  color: #eef4f1;
  overflow: auto;
}

.login-wrap { width: min(560px, 100%); margin: auto; padding: 26px 0; }
.login-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 750; }
.login-brand .lb-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, #20d59a, #0e9a6e);
  display: grid;
  place-items: center;
  color: #05231a;
}
.login-brand .lb-icon svg { width: 22px; height: 22px; }
.login-skip {
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #eef4f1;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 650;
}
.login-skip:hover { background: rgba(255, 255, 255, .2); }

.login-headline { font-size: 38px; font-weight: 800; letter-spacing: -.01em; margin: 4px 0 26px; line-height: 1.25; }
.login-headline em { font-style: normal; color: #35e6b0; }

.login-card {
  background: rgba(8, 16, 13, .72);
  border: 1px solid rgba(70, 220, 170, .25);
  border-radius: 20px;
  padding: 26px 28px;
  backdrop-filter: blur(10px);
}
.login-card h2 { margin: 0 0 4px; font-size: 20px; }
.login-card .lc-sub { margin: 0 0 18px; font-size: 13px; color: #9db8ae; }

.login-card label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 7px; color: #d7e6df; }
.login-card .input {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(120, 230, 190, .3);
  color: #eef4f1;
}
.login-card .input::placeholder { color: #6f8a80; }
.login-card .input:focus { border-color: #35e6b0; box-shadow: 0 0 0 3px rgba(53, 230, 176, .15); }

.login-submit {
  width: 100%;
  margin-top: 22px;
  height: 50px;
  font-size: 16px;
  font-weight: 750;
  color: #052a1e;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, #35e6b0, #29c3e0);
  box-shadow: 0 10px 26px rgba(41, 195, 224, .3);
}
.login-submit:hover { filter: brightness(1.06); }
.login-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.login-links a { color: #35e6b0; }
.recovery-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  word-break: break-all;
  background: rgba(53, 230, 176, .08);
  border: 1px dashed rgba(53, 230, 176, .4);
  color: #b9f3dd;
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.9;
  user-select: all;
}

/* ---------- 沉浸式预览（无边框全屏） ---------- */

html.vw-open, html.vw-open body { overflow: hidden; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  background: rgba(7, 10, 9, .88);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  backdrop-filter: blur(24px) saturate(125%);
  color: #fff;
  opacity: 0;
  transition: opacity .22s ease;
}
.viewer.in { opacity: 1; }

.vw-glow {
  position: absolute;
  inset: -12%;
  background-size: cover;
  background-position: center;
  filter: blur(70px) saturate(150%);
  opacity: .42;
  pointer-events: none;
}

.vw-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 62px 26px 84px;
}

.vw-media {
  display: grid;
  place-items: center;
  max-width: 100%;
  max-height: 100%;
  will-change: transform;
  transition: transform .13s ease-out;
  touch-action: none;
}
.vw-media.zoomed { cursor: grab; }
.vw-media.dragging { cursor: grabbing; transition: none; }
.vw-media img,
.vw-media video,
.vw-media canvas {
  display: block;
  max-width: min(92vw, 1680px);
  max-height: calc(100vh - 168px);
  border-radius: 10px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .48);
  background: #050706;
  user-select: none;
}
.vw-media canvas { background: transparent; }
.vw-empty { color: rgba(255, 255, 255, .6); font-size: 14px; padding: 80px 0; }

.vw-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  pointer-events: none;
}
.vw-top > * { pointer-events: auto; }
.vw-info { max-width: min(62vw, 780px); }
.vw-prompt {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .93);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .55);
  cursor: pointer;
  transition: color .18s ease;
}
.vw-prompt:hover { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); }
.vw-meta {
  margin-top: 5px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .55);
  font-variant-numeric: tabular-nums;
}

.vw-tools { display: flex; gap: 8px; flex: 0 0 auto; }
.vw-btn {
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .18s ease, transform .18s ease;
}
.vw-btn:hover { background: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.vw-btn svg { width: 19px; height: 19px; }
.vw-tools .vw-btn:last-child:hover { background: rgba(203, 58, 78, .85); }

.vw-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 2;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .2s ease;
}
.vw-nav:hover { background: rgba(255, 255, 255, .22); }
.vw-nav.prev { left: 14px; }
.vw-nav.next { right: 14px; }
.vw-nav svg { width: 22px; height: 22px; }

.vw-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 18px;
}
.vw-count { font-size: 12.5px; color: rgba(255, 255, 255, .62); font-variant-numeric: tabular-nums; }
.vw-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.vw-zbtn {
  min-width: 26px; height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.vw-zbtn:hover { background: rgba(255, 255, 255, .16); }
.vw-zbtn.reset { padding: 0 9px; font-size: 11.5px; }
.vw-zval { min-width: 44px; text-align: center; font-size: 11.5px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }

.vw-hint {
  position: absolute;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  color: rgba(255, 255, 255, .38);
  pointer-events: none;
  white-space: nowrap;
}

.vw-confirm {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  background: rgba(30, 16, 20, .88);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 13px;
  color: #fff;
}

/* ---------- 作品网格（图片即卡片，不套边框） ---------- */

/* 紧凑密度：竖版 9:16 高度 = 列宽 x 16/9，收窄列宽到 126px 能同时增加列数、
   降低每行高度；比例与 cover/contain 规则不变，缩略图不会被拉伸或裁切。
   126px 已扣除桌面滚动条占位，实测 768/1024px 也能多排一列。 */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 8px; }

/* ---------- 作品翻页条：图片 / 视频均按每页最多 100 项展示 ---------- */
.w-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px;
  flex-wrap: wrap; margin: 0 0 9px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-soft); font-size: 12.5px; color: var(--muted);
}
.w-pager.is-bottom { margin: 10px 0 0; }
.w-pager-info { font-weight: 600; white-space: nowrap; }
.w-pager-ctrl { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.w-pager-ctrl button {
  min-width: 32px; height: 30px; padding: 0 9px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); color: var(--muted);
  font-size: 12.5px; font-weight: 600; line-height: 1;
  transition: border-color .15s, color .15s, background .15s;
}
.w-pager-ctrl button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
.w-pager-ctrl button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.w-pager-ctrl button:disabled { opacity: .42; cursor: not-allowed; }
/* 当前页码既是高亮态又是禁用态，不能跟着变淡 */
.w-pager-ctrl button.is-active:disabled { opacity: 1; cursor: default; }
.w-pager-dots { padding: 0 2px; color: var(--faint); }
.w-pager-jump { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.w-pager-jump input {
  width: 58px; height: 30px; padding: 0 6px; text-align: center;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); color: var(--ink); font-size: 12.5px;
  appearance: textfield; -moz-appearance: textfield;
}
.w-pager-jump input::-webkit-outer-spin-button,
.w-pager-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
html[data-theme="dark"] .w-pager-ctrl button:hover:not(:disabled) { color: var(--accent); }

.wtile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.wtile:hover { transform: translateY(-3px); }
.wtile .wt-thumb {
  position: relative;
  /* 作品墙统一 9:16 竖版长方形：容器定比例，图片再按自身比例填充，绝不拉伸 */
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-soft);
}
.wtile .wt-thumb img,
.wtile .wt-thumb video,
.wtile .wt-thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
/* 非 9:16 的作品 / 程序生成的占位图：完整显示不裁切，容器仍是统一的 9:16 */
.wtile .wt-thumb img.is-contain,
.wtile .wt-thumb video.is-contain,
.wtile .wt-thumb canvas.is-contain { object-fit: contain; }
.wtile:hover .wt-thumb img,
.wtile:hover .wt-thumb video { transform: scale(1.05); }

.wtile .wt-ov {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 10px 8px;
  background: linear-gradient(to top, rgba(6, 10, 8, .82), rgba(6, 10, 8, 0));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.wtile:hover .wt-ov { opacity: 1; transform: none; }
.wtile .wt-prompt {
  font-size: 12px;
  line-height: 1.5;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wtile .wt-meta {
  margin-top: 3px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .64);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wtile .wt-tools {
  position: absolute;
  top: 7px; right: 7px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity .2s ease;
}
.wtile:hover .wt-tools,
.wtile:focus-within .wt-tools { opacity: 1; }
.wtile .wt-btn {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 14, 12, .55);
  color: #fff;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .18s ease;
}
.wtile .wt-btn:hover { background: rgba(14, 16, 22, .92); transform: scale(1.06); }
.wtile .wt-btn.is-del:hover { background: rgba(203, 58, 78, .92); }
.wtile .wt-btn svg { width: 15px; height: 15px; }

.wtile .wt-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(10, 14, 12, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.wtile .wt-play svg { width: 17px; height: 17px; margin-left: 2px; }

@media (max-width: 640px) {
  /* 窄屏 84px / gap 6px：扣除滚动条后 360px 视口仍可排 3 列，作品墙行数 50→34；
     悬浮按钮改竖排并收小，窄卡片上 3 个按钮也不会被 overflow 裁切 */
  .wgrid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
  .w-pager { padding: 6px 8px; }
  .wtile .wt-tools { top: 5px; right: 5px; gap: 2px; flex-direction: column; }
  .wtile .wt-btn { width: 24px; height: 24px; }
  .wtile .wt-btn svg { width: 12px; height: 12px; }
  .wtile .wt-play { width: 36px; height: 36px; }
  .wtile .wt-play svg { width: 15px; height: 15px; }
  .w-pager-info { white-space: normal; }
  .w-pager-ctrl button { min-width: 30px; padding: 0 7px; }
  .w-pager-jump { margin-left: 0; }
  .vw-stage { padding: 56px 10px 96px; }
  .vw-media img, .vw-media video, .vw-media canvas { max-width: 96vw; max-height: calc(100vh - 200px); }
  .vw-info { max-width: 56vw; }
  .vw-hint { display: none; }
  .vw-nav { width: 40px; height: 40px; }
}

/* ---------- lightbox ---------- */

.lightbox { width: min(880px, 100%); }
.lb-stage {
  background: #0b0f0d;
  border-radius: 14px;
  display: grid;
  place-items: center;
  min-height: 300px;
  overflow: hidden;
}
.lb-stage img, .lb-stage canvas { max-width: 100%; max-height: 62vh; display: block; }
.lb-meta { margin-top: 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.lb-meta .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--faint); }
.lb-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- sidebar ---------- */

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  z-index: 50;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .22s ease;
  box-shadow: 0 0 40px rgba(10, 20, 16, .15);
}
html[data-theme="dark"] .sidebar { background: rgba(17, 21, 28, .80); }
.sidebar.open { transform: translateX(0); }
.side-mask {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(12, 20, 17, .4);
}

.side-head { display: flex; align-items: center; gap: 11px; padding: 16px 16px 12px; }
.side-logo {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--accent-grad);
  color: #fff;
  display: grid;
  place-items: center;
}
.side-logo svg { width: 21px; height: 21px; }
.side-title { font-size: 16.5px; font-weight: 750; flex: 1; }

.side-nav { flex: 1; overflow: auto; padding: 4px 12px 12px; }
.side-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--accent-deep);
  padding: 16px 10px 7px;
  opacity: .85;
}
.side-group::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(14, 138, 99, .28), transparent);
}
html[data-theme="dark"] .side-group { color: var(--accent); }
.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--nav-ink);
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
/* 菜单文字始终保持一行，避免「个人中心」等字样被挤成两行 */
.side-link > span {
  flex: 0 0 auto;
  white-space: nowrap;
  letter-spacing: .015em;
}
.side-link svg {
  width: 19px;
  height: 19px;
  color: var(--nav-icon);
  flex: 0 0 auto;
  opacity: .85;
  transition: color .18s ease, opacity .18s ease;
}
.side-link:hover {
  background: linear-gradient(90deg, rgba(14, 138, 99, .09), rgba(14, 138, 99, .02));
  color: var(--accent-deep);
  transform: translateX(2px);
}
.side-link:hover svg { color: var(--accent); opacity: 1; }
html[data-theme="dark"] .side-link:hover {
  background: linear-gradient(90deg, rgba(34, 179, 127, .16), rgba(34, 179, 127, .03));
  color: #fff;
}
.side-link.is-active {
  background: linear-gradient(90deg, #e2f4ec, #f2faf6);
  border-color: rgba(14, 138, 99, .22);
  color: var(--accent-deep);
  font-weight: 750;
  box-shadow: 0 4px 14px rgba(14, 138, 99, .14), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.side-link.is-active::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 3px;
  background: var(--accent-grad);
}
.side-link.is-active svg { color: var(--accent); opacity: 1; }
html[data-theme="dark"] .side-link.is-active {
  background: linear-gradient(90deg, rgba(34, 179, 127, .22), rgba(34, 179, 127, .06));
  border-color: rgba(34, 179, 127, .34);
  color: #eafff5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
.side-link small {
  margin-left: auto;
  min-width: 0;
  flex: 0 1 auto;
  font-size: 10.5px;
  color: var(--nav-note);
  font-weight: 600;
  letter-spacing: .01em;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .9;
}

.side-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); display: flex; flex-direction: column; gap: 4px; }

/* ---------- 桌面端：左侧功能栏与主内容作为一个整体居中 ---------- */
@media (min-width: 1024px) {
  .shell {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    max-width: 1520px;
    margin: 0 auto;
    padding: 14px 26px 30px;
  }
  .sidebar {
    position: sticky;
    top: 14px;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 268px;
    width: 268px;
    height: calc(100vh - 40px);
    min-height: 460px;
    transform: none;
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  html[data-theme="dark"] .sidebar {
    background: rgba(17, 21, 28, .88);
    border-color: var(--line);
  }
  .side-close { display: none; }
  #menuBtn { display: none; }
  .side-mask { display: none !important; }
  .main-col {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0 0 24px;
  }
  .topbar { padding-top: 6px; }
}

/* 中等屏幕：侧栏略收，保证内容区宽度 */
@media (min-width: 1024px) and (max-width: 1199px) {
  .shell { gap: 18px; padding: 12px 18px 28px; }
  .sidebar { flex-basis: 236px; width: 236px; }
  .main-col { padding: 0 0 20px; }
}

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

.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

.copy-box {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.copy-box .input { flex: 1; }

.stat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.stat-cards .sc {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel-soft);
}
.stat-cards .sc b { display: block; font-size: 22px; margin-top: 4px; }
.stat-cards .sc span { font-size: 12px; color: var(--muted); }

.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-soft); }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }

.linkish { background: none; border: 0; color: var(--accent); padding: 0; font-size: inherit; }
.linkish:hover { text-decoration: underline; }
.linkish svg { width: 13px; height: 13px; vertical-align: -1.5px; }

.mc-price { font-size: 13px; font-weight: 750; color: var(--accent-deep); margin-top: 3px; }
html[data-theme="dark"] .mc-price { color: var(--accent); }

.divider { border: 0; border-top: 1px dashed var(--line-strong); margin: 10px 0; }

.shot-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.shot-row:last-child { border-bottom: 0; }
.shot-no {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 750;
  display: grid;
  place-items: center;
  font-size: 13px;
}
html[data-theme="dark"] .shot-no { color: var(--accent); }
.shot-row .input { flex: 1; }
.shot-row .btn { flex: 0 0 auto; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 90;
  max-width: min(480px, calc(100% - 32px));
  padding: 11px 17px;
  border-radius: 11px;
  background: #1d2823;
  color: #f2f7f4;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 30px rgba(15, 25, 20, .3);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
html[data-theme="dark"] .toast { background: #e7ece9; color: #17211d; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #3a1d24; color: #ffd9df; }
html[data-theme="dark"] .toast.is-error { background: #fdeef1; color: #8c2537; }

.spin { animation: yk-spin 1s linear infinite; }
@keyframes yk-spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .main-col { padding: 0 14px 28px; }
  .page-title { font-size: 19px; }
  .topbar-right .chip#billingChip { display: none; }
  .opt-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opt-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cards { grid-template-columns: 1fr; }
  .login-headline { font-size: 29px; }
  .sidebar { width: min(300px, 86vw); }
}

/* ---------- 代理合作 ---------- */

.partner { display: flex; flex-direction: column; gap: 16px; }
.partner-loading { padding: 60px 0; text-align: center; color: var(--faint); font-size: 13.5px; }

.partner-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr);
  gap: 22px;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(680px 320px at 92% -30%, rgba(14, 138, 99, .16), transparent 65%),
    linear-gradient(135deg, var(--accent-soft), var(--panel) 62%);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .partner-hero {
  background:
    radial-gradient(680px 320px at 92% -30%, rgba(34, 179, 127, .18), transparent 65%),
    linear-gradient(135deg, #16211c, var(--panel) 62%);
}
.ph-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent-deep);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  border-radius: 999px;
}
html[data-theme="dark"] .ph-badge { color: var(--accent); }
.ph-title { font-size: 27px; line-height: 1.3; margin: 12px 0 8px; letter-spacing: -.01em; }
.ph-desc { font-size: 13.5px; line-height: 1.85; color: var(--ink-soft); margin: 0; max-width: 56ch; }
.ph-site {
  font-size: 12.5px;
  color: var(--accent-deep);
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 12px 0 0;
}
html[data-theme="dark"] .ph-site { color: var(--accent); }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.ph-stats { display: flex; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
.phs span { display: block; font-size: 12px; color: var(--muted); }
.phs b { font-size: 19px; letter-spacing: -.01em; }

.ph-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 18px;
  align-self: start;
  box-shadow: 0 6px 20px rgba(20, 50, 40, .06);
}
.phc-label { font-size: 11.5px; color: var(--faint); letter-spacing: .04em; }
.phc-name { font-size: 19px; font-weight: 800; margin-top: 5px; }
.phc-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  margin-top: 9px;
  word-break: break-all;
}
.phc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.phc-tag { font-size: 11.5px; color: var(--accent-deep); background: var(--accent-soft); border-radius: 6px; padding: 3px 8px; }
html[data-theme="dark"] .phc-tag { color: var(--accent); }
.phc-note { font-size: 12px; line-height: 1.75; color: var(--faint); margin: 12px 0 0; }

.bill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bill-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); padding: 15px 16px; }
.bill-card b { font-size: 15px; }
.bill-sub { display: block; font-size: 12px; color: var(--accent-deep); margin-top: 3px; }
html[data-theme="dark"] .bill-sub { color: var(--accent); }
.bill-list { margin: 10px 0 0; padding-left: 17px; }
.bill-list li { font-size: 12.5px; line-height: 1.85; color: var(--muted); }

.price-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pv-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 64px 100px minmax(0, 1.1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.pv-row:last-child { border-bottom: 0; }
.pv-row:nth-child(even) { background: var(--panel-soft); }
.pv-head { font-size: 11.5px; font-weight: 700; color: var(--faint); background: var(--panel-soft); }
.pv-name { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-price { font-weight: 700; color: var(--ink-soft); }
.pv-mode { font-size: 12px; }

.tier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tier {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  padding: 14px 15px;
  border-top: 3px solid var(--tc, var(--accent));
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tier-head { display: flex; align-items: center; justify-content: space-between; }
.tier-head b { font-size: 15px; }
.tier-key {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--tc, var(--accent));
  border-radius: 6px;
  padding: 2px 7px;
}
.tier-rate { font-size: 12px; color: var(--muted); }
.tier-rate b { font-size: 25px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-right: 2px; }
.tier-price { font-size: 12.5px; color: var(--accent-deep); font-weight: 650; }
html[data-theme="dark"] .tier-price { color: var(--accent); }
.tier-meta { font-size: 12px; color: var(--muted); }
.tier-meta2 { font-size: 11.5px; color: var(--faint); }
.tier-perms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.perm { font-size: 11px; color: var(--muted); background: var(--panel-soft); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }

.calc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.calc-field { display: flex; flex-direction: column; gap: 6px; }
.calc-field > span { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }
.calc-out {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}
.co { border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); padding: 12px 14px; }
.co span { display: block; font-size: 11.5px; color: var(--faint); }
.co b { font-size: 19px; letter-spacing: -.01em; }
.co.hl { border-color: var(--accent); background: var(--accent-soft); }
.co.hl b { color: var(--accent-deep); }
html[data-theme="dark"] .co.hl b { color: var(--accent); }

.login-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; }
.login-msg { font-size: 12.5px; min-height: 0; margin-top: 8px; }
.login-msg:empty { display: none; }
.login-msg.err { color: var(--danger); }
.login-msg.ok { color: var(--accent-deep); }
html[data-theme="dark"] .login-msg.ok { color: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.apply-levels > span { font-size: 13px; font-weight: 650; color: var(--ink-soft); }
.prefix-preview {
  margin-top: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  padding: 8px 11px;
  word-break: break-all;
}
.apply-done { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 13px; padding: 20px; }
.ad-title { font-size: 17px; font-weight: 800; color: var(--accent-deep); }
html[data-theme="dark"] .ad-title { color: var(--accent); }
.ad-sub { font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); margin: 6px 0 14px; }
.apply-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-bottom: 14px; }
.kv-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 7px 10px; background: var(--panel); border-radius: 8px; }
.kv-row span { color: var(--muted); }
.kv-row b { font-weight: 700; word-break: break-all; text-align: right; }

@media (max-width: 980px) {
  .partner-hero { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .partner-hero { padding: 20px; }
  .ph-title { font-size: 22px; }
  .bill-grid { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .calc-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .login-row { grid-template-columns: 1fr; }
  .apply-kv { grid-template-columns: 1fr; }
  .pv-row { grid-template-columns: minmax(0, 1.4fr) 54px 84px; }
  .pv-row span:last-child { display: none; }
}

/* ---------- 注册页联系方式 ---------- */
.login-card .lc-contact {
  margin-top: 16px;
  padding: 12px 14px 6px;
  border: 1px solid rgba(53, 230, 176, .18);
  border-radius: 12px;
  background: rgba(53, 230, 176, .05);
}
.login-card .lc-contact-title {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 800;
  color: #b9f3dd;
  letter-spacing: .02em;
}
.login-card .lc-req { color: #ff8a94; }
.login-card .lc-hint { margin: 5px 0 0; font-size: 11.5px; line-height: 1.65; color: #7f9a90; }
.login-card .lc-contact label { margin-top: 11px; font-size: 12.5px; }
.login-card .lc-contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }

.login-card .lc-summary {
  margin: 4px 0 12px;
  border: 1px solid rgba(53, 230, 176, .18);
  border-radius: 10px;
  background: rgba(53, 230, 176, .05);
  padding: 6px 12px;
}
.login-card .lc-srow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(120, 230, 190, .14);
}
.login-card .lc-srow:last-child { border-bottom: 0; }
.login-card .lc-srow span { color: #8fada2; }
.login-card .lc-srow b { color: #eef4f1; font-weight: 700; word-break: break-all; text-align: right; }

/* ---------- 个人中心 ---------- */
.pc-hero { position: relative; }
.pc-quick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.pc-stat { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 13px; }
.pc-stat span { display: block; font-size: 11.5px; color: var(--muted); }
.pc-stat b { font-size: 17px; letter-spacing: -.01em; }

.pc-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 14px; }
.pc-tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: .15s;
}
.pc-tab svg { width: 15px; height: 15px; }
.pc-tab:hover { color: var(--ink); border-color: var(--line-strong); }
.pc-tab.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: transparent; }

.pc-body { min-height: 120px; }
.pc-stack { display: flex; flex-direction: column; gap: 14px; }
.pc-loading { padding: 40px 0; text-align: center; color: var(--faint); font-size: 13px; }

.pc-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 4px; }
.pc-amount {
  border: 1px solid var(--line); background: var(--panel-soft); border-radius: 11px;
  padding: 12px 10px; text-align: center; cursor: pointer; transition: .15s; color: var(--ink);
}
.pc-amount b { display: block; font-size: 16px; }
.pc-amount span { font-size: 11.5px; color: var(--muted); }
.pc-amount:hover { border-color: var(--line-strong); }
.pc-amount.active { border-color: var(--accent); background: var(--accent-soft); }
.pc-amount.active span { color: var(--accent-deep); }
html[data-theme="dark"] .pc-amount.active span { color: var(--accent); }
.pc-custom { min-height: 60px; text-align: center; }

.pc-field { margin-top: 14px; }
.pc-field > label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-soft); margin-bottom: 7px; }
.pc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-chip {
  border: 1px solid var(--line); background: var(--panel-soft); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer;
}
.pc-chip.active { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
html[data-theme="dark"] .pc-chip.active { color: var(--accent); }

/* ---------- 充值 · 在线支付 / 卡密充值 ---------- */
.rc-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.rc-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 13px; padding: 0 2px 10px; cursor: pointer; transition: .15s;
}
.rc-tab:hover { color: var(--ink); }
.rc-tab.active { color: var(--accent-deep); border-bottom-color: var(--accent); font-weight: 650; }
html[data-theme="dark"] .rc-tab.active { color: var(--accent); }
.rc-pane.hidden, .rc-result.hidden { display: none !important; }
.rc-field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-soft); margin-bottom: 7px; }
.rc-hint { display: block; font-size: 11.5px; color: var(--muted); margin: -3px 0 8px; }
.rc-code { width: 100%; min-height: 44px; letter-spacing: .02em; }
.rc-notice {
  margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel-soft);
}
.rc-notice b { display: block; font-size: 12.5px; margin-bottom: 8px; }
.rc-notice ul { margin: 0; padding-left: 18px; }
.rc-notice li { font-size: 12px; color: var(--muted); line-height: 1.9; }
.rc-result { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.6; }
.rc-result.ok { background: rgba(14, 138, 99, .12); color: var(--accent-deep); }
html[data-theme="dark"] .rc-result.ok { color: var(--accent); }
.rc-result.err { background: rgba(194, 65, 90, .12); color: var(--danger); }
.rc-result-icon { width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; background: currentColor; color: #fff; font-size: 11px; font-weight: 700; }
.rc-result.err .rc-result-icon { color: var(--danger); }
.rc-spinner { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: rc-spin .7s linear infinite; margin-right: 6px; vertical-align: -2px; }
@keyframes rc-spin { to { transform: rotate(360deg); } }
.rc-redeem.is-loading { opacity: .78; cursor: wait; }
.rc-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rc-actions .btn { flex: 1; }

.pc-order-box:empty { display: none; }
.pc-order { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
html[data-theme="dark"] .pc-order { background: rgba(34, 179, 127, .08); }
.pc-order-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.pc-order-top b { font-size: 14.5px; }
.pc-qr { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin: 10px 0; padding: 10px 12px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 10px; }
.pc-qr span { font-size: 11.5px; color: var(--muted); }
.pc-qr code { font-size: 10.5px; color: var(--faint); word-break: break-all; }

.pc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.pc-row:last-child { border-bottom: 0; }
.pc-row-k { color: var(--muted); font-size: 12.5px; flex: none; }
.pc-row-v { font-weight: 650; word-break: break-all; text-align: right; }
.pc-row-v.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .04em; color: var(--accent-deep); }
html[data-theme="dark"] .pc-row-v.mono { color: var(--accent); }
.pc-row-v.small { font-size: 11.5px; font-weight: 500; color: var(--muted); }

.pc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.pc-list { list-style: none; margin: 6px 0 0; padding: 0; }
.pc-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.pc-item:last-child { border-bottom: 0; }
.pc-item-col { display: block; }
.pc-item-main { min-width: 0; }
.pc-item-title { font-size: 13px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pc-item-title.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.pc-item-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; word-break: break-word; }
.pc-item-amt { font-size: 14px; font-weight: 750; white-space: nowrap; }
.pc-item-amt.minus { color: var(--danger); }
.pc-item-amt.plus { color: var(--accent-deep); }
html[data-theme="dark"] .pc-item-amt.plus { color: var(--accent); }

.pc-tag { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 5px; }
.pc-tag.on { background: rgba(20, 140, 100, .12); color: var(--accent-deep); }
html[data-theme="dark"] .pc-tag.on { background: rgba(34, 179, 127, .18); color: var(--accent); }
.pc-tag.dim { background: rgba(120, 130, 150, .14); color: var(--muted); }
.pc-tag.off { background: rgba(200, 70, 80, .12); color: var(--danger); }

.pc-empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 22px; text-align: center; margin-top: 10px; }
.pc-empty p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }

.pc-invite { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); padding: 6px 14px 12px; margin-top: 6px; }

.pc-form { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 6px; }
.pc-form.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-textarea { min-height: 92px; resize: vertical; font-family: inherit; line-height: 1.6; padding: 10px 12px; }

.pc-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 12px; }
.pc-contact { border: 1px solid var(--line); background: var(--panel-soft); border-radius: 11px; padding: 11px 13px; display: flex; flex-direction: column; gap: 3px; position: relative; }
.pc-contact span { font-size: 11.5px; color: var(--muted); }
.pc-contact b { font-size: 14px; word-break: break-all; }
.pc-contact button { position: absolute; right: 9px; top: 9px; }

.pc-legal-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.pc-legal-item:last-child { border-bottom: 0; }
.pc-legal-item b { font-size: 13.5px; }
.pc-legal-body { max-height: 52vh; overflow: auto; margin-top: 8px; }
.pc-legal-body h4 { font-size: 13.5px; margin: 16px 0 6px; }
.pc-legal-body p { font-size: 12.8px; line-height: 1.85; color: var(--ink-soft); margin: 0; }

.pc-reply { margin-top: 8px; padding: 9px 11px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 8px; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }
html[data-theme="dark"] .pc-reply { background: rgba(34, 179, 127, .08); }

@media (max-width: 860px) {
  .pc-stats { grid-template-columns: 1fr; }
  .pc-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-form.cols-3 { grid-template-columns: 1fr; }
  .pc-contact-grid { grid-template-columns: 1fr; }
  .pc-item { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .rc-tabs { gap: 18px; }
  .rc-actions { flex-direction: column; }
  .rc-actions .btn { width: 100%; }
  .rc-notice li { line-height: 1.8; }
}

/* ---------- AI 帮写 ---------- */

.prompt-wrap { position: relative; display: block; }
.prompt-wrap > textarea.input { padding-bottom: 46px; }

.ai-write-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  height: 30px;
  padding: 0 12px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--accent-deep);
  background: #eaf5ef;
  border: 1px solid rgba(18, 160, 111, .34);
  border-radius: 999px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(14, 138, 99, .08);
}
.ai-write-btn svg { width: 14px; height: 14px; }
.ai-write-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  opacity: 0;
  transform: translateX(-60%);
  pointer-events: none;
}
.ai-write-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  background: linear-gradient(135deg, #14a273, #0e8a63);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(14, 138, 99, .28);
}
.ai-write-btn:hover::after { opacity: 1; animation: ai-shine .8s ease; }
.ai-write-btn:active { transform: translateY(0); }

html[data-theme="dark"] .ai-write-btn {
  color: var(--accent);
  background: #142a21;
  border-color: rgba(34, 179, 127, .38);
  box-shadow: none;
}
html[data-theme="dark"] .ai-write-btn:hover { color: #06241a; background: linear-gradient(135deg, #35c48f, #22b37f); }
html[data-theme="dark"] .ai-write-btn::after { background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); }

@keyframes ai-shine { from { transform: translateX(-60%); } to { transform: translateX(60%); } }

.ai-modal { display: flex; flex-direction: column; gap: 0; }
.ai-head-badge {
  font-size: 11.5px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid rgba(14, 138, 99, .16);
}
html[data-theme="dark"] .ai-head-badge { color: var(--accent); background: rgba(34, 179, 127, .12); border-color: rgba(34, 179, 127, .22); }

textarea.ai-brief { min-height: 84px; resize: vertical; line-height: 1.7; }

.ai-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.ai-examples { margin-top: 9px; }
.ai-chip {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .16s ease;
  line-height: 1.2;
}
.ai-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.ai-chip.on {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 138, 99, .22);
}
.ai-chip.ghost { background: var(--panel-soft); border-style: dashed; font-size: 12px; color: var(--muted); }
.ai-chip.ghost:hover { color: var(--accent-deep); border-style: solid; }
html[data-theme="dark"] .ai-chip.on { color: #06241a; }

.ai-opts { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.ai-sec { margin-top: 6px; }
.ai-sec-title { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }

.ai-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.ai-actions .hint.warn { color: var(--danger); }

.ai-foot-note { font-size: 11.5px; color: var(--faint); margin-top: 14px; line-height: 1.7; }

.ai-out { margin-top: 16px; }

.ai-loading { border: 1px solid var(--line); background: var(--panel-soft); border-radius: 14px; padding: 18px; }
.ai-loading-dots { display: flex; gap: 6px; }
.ai-loading-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: ai-bounce 1s infinite ease-in-out;
}
.ai-loading-dots span:nth-child(2) { animation-delay: .15s; }
.ai-loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }
.ai-loading-text { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.ai-loading-track { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 12px; }
.ai-loading-bar {
  height: 100%; width: 40%; border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: ai-slide 1.2s infinite ease-in-out;
}
@keyframes ai-slide { from { transform: translateX(-100%); } to { transform: translateX(280%); } }

.ai-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }

.ai-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 15px 12px;
  margin-bottom: 12px;
  animation: ai-rise .32s ease both;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.ai-card:hover { border-color: rgba(14, 138, 99, .35); box-shadow: 0 6px 20px rgba(30, 60, 48, .06); }
@keyframes ai-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ai-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-card-idx {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-size: 11px; font-weight: 750; color: var(--accent-deep); background: var(--accent-soft);
}
.ai-card-title { font-size: 14px; font-weight: 700; }
.ai-badge { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: var(--panel-soft); border: 1px solid var(--line); color: var(--muted); }

.ai-block { border-top: 1px dashed var(--line); padding-top: 9px; margin-top: 9px; }
.ai-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.ai-block-label { font-size: 11.5px; font-weight: 650; color: var(--faint); letter-spacing: .02em; margin-bottom: 4px; }
.ai-block-text { font-size: 13px; line-height: 1.85; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
.ai-block.is-shot .ai-block-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.2px; line-height: 1.9; }

.ai-card-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ---------- AI 帮写：批量结果 ---------- */
.ai-multi { display: grid; gap: 8px; margin-top: 2px; }
.ai-multi-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
  animation: ai-rise .28s ease both;
}
.ai-multi-idx {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
html[data-theme="dark"] .ai-multi-idx { color: var(--accent); }
.ai-multi-text {
  flex: 1;
  min-width: 0;
  font-size: 12.8px;
  line-height: 1.75;
  color: var(--ink-soft);
  word-break: break-word;
}
.ai-multi-row .btn { flex: 0 0 auto; }
.ai-multi-act {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}

@media (max-width: 620px) {
  .ai-write-btn { height: 28px; padding: 0 10px 0 8px; font-size: 12px; }
  .ai-write-btn span { display: none; }
  .ai-card-foot .btn { flex: 1; }
  .ai-opts { gap: 2px; }
}

/* ---------- 视频创作：参考素材上传 ---------- */

.ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.ref-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
  min-width: 0;
}
.ref-tile:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.ref-tile.is-full { cursor: default; opacity: .58; transform: none; }
.ref-tile.is-full:hover { border-color: var(--line-strong); background: var(--panel-soft); }
.ref-tile.is-busy { border-style: solid; border-color: var(--accent); animation: ref-pulse 1s ease-in-out infinite; }
@keyframes ref-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.ref-tile-icon {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(14, 138, 99, .1);
  color: var(--accent-deep);
}
html[data-theme="dark"] .ref-tile-icon { background: rgba(34, 179, 127, .16); color: var(--accent); }
.ref-tile-icon svg { width: 16px; height: 16px; }

.ref-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ref-tile-text b { font-size: 12.8px; font-weight: 650; }
.ref-tile-hint { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ref-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ref-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 11px;
  padding: 7px 9px;
}
.ref-thumb {
  position: relative;
  width: 56px; height: 42px; flex: 0 0 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #0f1512;
  display: grid; place-items: center;
}
.ref-thumb img, .ref-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-audio { color: var(--accent); }
.ref-audio svg { width: 18px; height: 18px; }
.ref-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); pointer-events: none; }
.ref-tag {
  position: absolute; left: 3px; bottom: 3px;
  font-size: 9.5px; line-height: 1.4; padding: 0 4px; border-radius: 4px;
  background: rgba(12, 18, 15, .62); color: #fff;
}
.ref-meta { flex: 1; min-width: 0; }
.ref-name { font-size: 12.8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.ref-del {
  width: 26px; height: 26px; flex: 0 0 26px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  border-radius: 8px; display: grid; place-items: center; cursor: pointer;
}
.ref-del:hover { color: var(--danger); background: rgba(194, 65, 90, .1); border-color: rgba(194, 65, 90, .2); }
.ref-del svg { width: 14px; height: 14px; }
.ref-empty {
  font-size: 12px; color: var(--faint); line-height: 1.7;
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px;
}

@media (max-width: 720px) {
  .ref-grid { grid-template-columns: 1fr; }
}


/* ==================== 短剧制作 ==================== */
.dr-body { padding-bottom: 26px; }
.dr-spacer { flex: 1; }

/* 顶部主视觉栏 */
.dr-hero {
  display: flex; align-items: stretch; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--panel-soft), var(--panel));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 22px; margin-bottom: 14px;
}
.dr-hero-main { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 9px; }
.dr-title {
  width: 100%; border: 0; outline: none; background: transparent;
  font-size: 24px; font-weight: 900; letter-spacing: .01em; color: var(--ink);
  padding: 0 0 4px; border-bottom: 2px dashed transparent;
}
.dr-title:focus { border-bottom-color: var(--accent); }
.dr-title::placeholder { color: rgba(47, 111, 237, .38); font-weight: 700; opacity: 1; }
html[data-theme="dark"] .dr-title::placeholder { color: rgba(148, 180, 255, .40); }
.dr-hero-sub { display: flex; align-items: center; gap: 14px; }
.dr-logline {
  flex: 1; min-width: 220px; border: 0; outline: none; background: transparent;
  font-size: 13.5px; color: var(--ink-soft); padding: 0;
}
.dr-logline::placeholder { color: var(--faint); }
.dr-save { font-size: 12px; color: var(--faint); white-space: nowrap; }
.dr-save.is-ok { color: var(--accent-deep); }
.dr-save.is-warn { color: #c0392b; }

/* 步骤向导条 */
.dr-guide {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 20px; margin-bottom: 14px;
}
.dr-guide-label { font-size: 14px; font-weight: 900; color: var(--faint); margin-right: 8px; white-space: nowrap; letter-spacing: .02em; }
.dr-gstep {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); background: var(--panel-soft);
  border-radius: 999px; padding: 10px 20px;
  font-size: 15.5px; font-weight: 800; color: var(--faint); cursor: pointer;
  transition: all .15s ease;
}
.dr-gstep .n {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(216, 52, 43, .12); color: #d8342b;
  display: grid; place-items: center; font-size: 15px; font-weight: 900;
}
.dr-gstep .ck { color: #d8342b; font-size: 13.5px; font-weight: 900; }
.dr-gstep:hover { border-color: #d8342b; }
.dr-gstep.is-done { color: var(--ink-soft); }
.dr-gstep.is-done .n { background: rgba(216, 52, 43, .12); color: #d8342b; }
.dr-gstep.is-cur {
  border-color: #d8342b; background: rgba(216, 52, 43, .08);
  color: #b8302a; box-shadow: 0 0 0 4px rgba(216, 52, 43, .13);
}
.dr-gstep.is-cur .n { background: #d8342b; color: #fff; }
.dr-guide-right { margin-left: auto; display: flex; align-items: center; }
.dr-next { height: 42px; padding: 0 22px; font-size: 14.5px; font-weight: 900; border-radius: 12px; white-space: nowrap; }
.dr-next:disabled { opacity: .65; cursor: default; filter: saturate(.6); }
.dr-guide-hint {
  flex-basis: 100%; font-size: 12.5px; font-weight: 700;
  color: var(--accent-deep); padding-top: 2px;
}
.dr-hero-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dr-hero-acts .btn { height: 40px; padding: 0 16px; font-size: 13.5px; border-radius: 11px; }
.dr-proj { min-width: 170px; font-weight: 700; color: var(--ink); }

/* 数据统计条 */
.dr-statbar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px;
  margin-bottom: 16px;
}
.dr-stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
}
.dr-stat b { font-size: 20px; font-weight: 900; color: var(--ink); line-height: 1.25; }
.dr-stat span { font-size: 12px; color: var(--faint); }

/* 两栏布局（角色库已移到上方全宽区） */
.dr-layout {
  display: grid;
  grid-template-columns: 328px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.dr-left, .dr-board { min-width: 0; }

.dr-block {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.dr-block h4 { margin: 0; font-size: 16px; font-weight: 900; letter-spacing: .02em; }
.dr-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dr-count { font-size: 12px; color: var(--faint); }
.dr-label { display: block; margin: 14px 0 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }

.dr-script {
  width: 100%; min-height: 340px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--ink);
  font: inherit; font-size: 14px; line-height: 1.9;
  padding: 14px; resize: vertical;
}
.dr-script:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* 画风大块选择器 */
.dr-stylegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dr-stylechip {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  border-radius: 10px; padding: 10px 4px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.dr-stylechip:hover { border-color: var(--accent); }
.dr-stylechip.is-active {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-deep); box-shadow: 0 2px 8px rgba(16, 32, 26, .08);
}

/* 参数胶囊 */
.dr-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.dr-seg { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.dr-segchips { display: flex; gap: 5px; flex-wrap: wrap; }
.dr-segnum-wrap {
  display: inline-flex; align-items: center; gap: 3px;
  height: 31px; padding: 0 9px 0 6px;
  border: 1px dashed var(--line-strong, var(--line)); border-radius: 999px;
  background: var(--panel);
}
.dr-segnum {
  width: 44px; border: 0; outline: none; background: transparent;
  color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 800; text-align: center;
  -moz-appearance: textfield; appearance: textfield;
}
.dr-segnum::-webkit-outer-spin-button, .dr-segnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dr-segnum::placeholder { color: var(--faint); font-weight: 700; font-size: 11.5px; }
.dr-segnum:focus { color: var(--accent-deep); }
.dr-segnum-unit { font-size: 11.5px; color: var(--faint); }
.dr-segbtn {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: all .14s ease;
}
.dr-segbtn:hover { border-color: var(--accent); }
.dr-segbtn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.dr-split { width: 100%; height: 46px; margin-top: 16px; font-size: 15px; font-weight: 800; border-radius: 13px; }
.dr-subacts { margin-top: 8px; }
.dr-subacts .btn { flex: 1; height: 34px; font-size: 12.5px; }
.dr-tip { margin: 10px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--faint); }
.dr-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dr-row + .dr-row { margin-top: 8px; }

.dr-sel {
  height: 36px; max-width: 220px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink-soft);
  font-size: 13px; padding: 0 10px;
}

/* 分镜板 */
.dr-board { display: flex; flex-direction: column; gap: 12px; }
.dr-board-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.dr-board-title { font-size: 17px; font-weight: 900; }
.dr-board-head .dr-row { margin-left: auto; }
.dr-batch { height: 40px; padding: 0 18px; font-size: 13.5px; font-weight: 800; border-radius: 11px; }
.dr-batch svg { width: 16px; height: 16px; }
/* 合并成片：紧跟「出视频」的金色主操作，最后一步最醒目 */
.btn.merge-gold {
  background: var(--gold-grad);
  border-color: transparent;
  color: #fff;
  font-weight: 850;
  letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(201, 143, 31, .32);
  white-space: nowrap;
}
.btn.merge-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, #c8932f, #b57d16);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 9px 22px rgba(201, 143, 31, .44);
  transform: translateY(-1px);
}
.btn.merge-gold:disabled { opacity: .7; cursor: wait; transform: none; }
/* 模型选择（醒目带标签） */
.dr-model {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-soft); border: 1px solid var(--line);
  border-radius: 11px; padding: 4px 6px 4px 12px;
}
.dr-model-tag { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.dr-model .dr-sel { height: 32px; max-width: 148px; border-color: transparent; background: var(--panel); font-weight: 700; }
.dr-board-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dr-head-tools { display: flex; align-items: center; gap: 10px; }
.dr-aiwrite { white-space: nowrap; }
.dr-aiwrite svg { width: 14px; height: 14px; }
.dr-filters { display: flex; gap: 4px; background: var(--panel-soft); border-radius: 999px; padding: 4px; }
.dr-chip {
  border: 0; background: transparent; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--faint); cursor: pointer;
}
.dr-chip.is-active { background: var(--panel); color: var(--accent-deep); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.dr-progress { font-size: 12.5px; color: var(--accent-deep); }

.dr-shots { display: flex; flex-direction: column; gap: 20px; }
.dr-scene-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 2px 10px;
  border-bottom: 1px dashed var(--line-strong, var(--line));
  margin-bottom: 12px;
}
.dr-scene-head b { font-size: 15px; }
.dr-scene-meta { font-size: 12.5px; color: var(--faint); }
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 14px; }

.dr-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); overflow: hidden;
  box-shadow: 0 2px 10px rgba(16, 32, 26, .05);
  transition: box-shadow .16s ease, transform .16s ease;
}
.dr-card:hover { box-shadow: 0 10px 26px rgba(16, 32, 26, .12); transform: translateY(-1px); }
.dr-card-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.dr-no {
  font-size: 12px; font-weight: 900; letter-spacing: .04em;
  color: var(--accent-deep); background: var(--accent-soft);
  border-radius: 7px; padding: 3px 9px;
}
.dr-size-tag { font-size: 11.5px; color: var(--faint); }
.dr-badge { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--panel-soft); color: var(--faint); }
.dr-badge.is-img, .dr-badge.is-vid { background: rgba(240, 180, 80, .16); color: #a9762a; }
.dr-badge.is-imgdone { background: var(--accent-soft); color: var(--accent-deep); }
.dr-badge.is-done { background: rgba(20, 160, 110, .14); color: #0d7a55; }
.dr-badge.is-fail { background: rgba(203, 58, 78, .14); color: #b83049; }

.dr-media {
  position: relative; aspect-ratio: 3 / 4; background: #0f1620;
  display: grid; place-items: center; overflow: hidden;
}
.dr-media img, .dr-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-media.is-clickable { cursor: zoom-in; }
.dr-ph { font-size: 13px; color: rgba(255, 255, 255, .55); }
.dr-progress-mask {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(8, 14, 22, .55);
  color: #fff; font-size: 16px; font-weight: 800;
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}

.dr-card-body { padding: 10px 12px 0; display: flex; flex-direction: column; gap: 7px; }
.dr-desc, .dr-dialogue {
  font-size: 13.5px; line-height: 1.7; color: var(--ink);
  border-radius: 9px; padding: 7px 9px; min-height: 34px;
  border: 1px solid transparent; outline: none;
}
.dr-desc:hover, .dr-dialogue:hover { border-color: var(--line); }
.dr-desc:focus, .dr-dialogue:focus { border-color: var(--accent); background: var(--panel-soft); }
.dr-desc:empty::before, .dr-dialogue:empty::before {
  content: attr(data-ph); color: var(--faint);
}
.dr-dialogue { font-style: italic; color: var(--ink-soft); font-size: 13px; }
.dr-card-meta { display: flex; gap: 6px; }
.dr-mini {
  flex: 1; min-width: 0; height: 30px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-soft);
  font-size: 12.5px; color: var(--ink-soft); padding: 0 5px;
}
.dr-card-acts { display: flex; gap: 7px; align-items: center; padding: 10px 12px 6px; flex-wrap: wrap; }
.dr-card-acts .btn { height: 32px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.dr-card-tools { display: flex; gap: 6px; justify-content: flex-end; padding: 0 12px 11px; }
.dr-card-tools .btn { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.dr-del { color: #b83049; }
/* 漫剧 / 剧情：台词说话人、配音入口、镜头排序 */
.dr-dlg-head { display: flex; align-items: center; gap: 8px; }
.dr-dlg-head .dr-field-label { flex: 1; }
.dr-speaker { flex: 0 0 auto; width: auto; max-width: 104px; height: 26px; font-size: 12px; }
.dr-voice-tag {
  font-size: 11px; font-weight: 700; color: #1f7a4d;
  background: rgba(31, 122, 77, .1); border-radius: 999px; padding: 2px 7px;
}
.dr-audbtn.is-on { color: #1f7a4d; border-color: rgba(31, 122, 77, .35); background: rgba(31, 122, 77, .08); }
.dr-movebtn { width: 30px !important; padding: 0 !important; font-size: 13px !important; }
.dr-movebtn:disabled { opacity: .35; cursor: not-allowed; }
.dr-voice-prev { min-height: 42px; display: flex; align-items: center; }
.dr-voice-prev audio { width: 100%; height: 38px; }
.dr-voice-src, .dr-voice-tts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dr-voice-tts .dr-voice-sel { flex: 1; min-width: 150px; }
.dr-voice-msg { font-size: 12.5px; line-height: 1.65; color: var(--ink-soft); min-height: 18px; }
.dr-tip.is-warn { color: #b8860b; font-weight: 600; }
/* 成片设置 */
.dr-final-set {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  background: var(--panel); display: flex; flex-direction: column; gap: 9px;
}
.dr-final-set-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dr-final-set-head b { font-size: 14px; color: var(--ink); }
.dr-final-set-head span { font-size: 12px; color: var(--faint); }
.dr-set-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dr-set-label { flex: 0 0 64px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.dr-set-seg { display: inline-flex; gap: 4px; }
.dr-set-seg .dr-segbtn { height: 27px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.dr-set-name { font-size: 12.5px; color: var(--ink-soft); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-set-hint { font-size: 12.5px; color: var(--faint); }
.dr-set-audio { height: 28px; max-width: 220px; }
.dr-set-vol { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.dr-set-vol input { width: 90px; }
.dr-set-volval { min-width: 32px; text-align: right; color: var(--ink-soft); }

/* 角色库（全宽醒目区） */
.dr-charsband {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 18px; margin-bottom: 16px;
}
.dr-charsband-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dr-charsband-title {
  margin: 0; font-size: 16px; font-weight: 900; color: var(--ink);
  display: flex; align-items: center; gap: 9px;
}
.dr-charsband-title::before {
  content: ''; width: 4px; height: 18px; border-radius: 3px; background: #d8342b;
}
.dr-charsband-tip { flex: 1; min-width: 220px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.dr-charsband .dr-char-count { font-size: 12.5px; color: var(--faint); }
/* 角色库 / 道具库的「新建」按钮统一金色，视觉一致 */
.dr-charsband .dr-addchar {
  width: auto; height: 36px; padding: 0 16px; border: 0; font-size: 13px;
  background: var(--gold-grad); color: #fff;
  box-shadow: 0 6px 16px rgba(201, 143, 31, .26);
}
.dr-charsband .dr-addchar:hover {
  background: linear-gradient(180deg, #c8932f, #b57d16);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(201, 143, 31, .34);
}
/* 道具库：与角色库同版式，用金色竖条区分 */
.dr-propsband .dr-charsband-title::before { background: #c98f1f; }
.dr-chars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.dr-charrow { flex-direction: row; gap: 10px; margin-bottom: 0; overflow-x: auto; padding-bottom: 4px; }
.dr-charrow .dr-char { flex: 0 0 268px; }
.dr-charrow .dr-chars-empty { flex: 1 1 100%; }
.dr-chars-empty {
  font-size: 13px; color: var(--faint); line-height: 1.7;
  padding: 18px 14px; border: 1.5px dashed var(--line-strong, var(--line));
  border-radius: 14px; text-align: center;
}
.dr-char {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px;
  padding: 12px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line);
}
.dr-char-th {
  width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
  background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; font-weight: 900; font-size: 20px;
}
.dr-char-th img { width: 100%; height: 100%; object-fit: cover; }
.dr-char-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dr-char-info b { font-size: 14.5px; }
.dr-char-info span {
  font-size: 12.5px; color: var(--faint); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dr-char-acts { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; }
.dr-mini-btn {
  border: 0; background: transparent; font-size: 12.5px; font-weight: 700;
  color: var(--accent-deep); cursor: pointer; padding: 2px 4px;
}
.dr-mini-btn.is-del { color: #b83049; }
.dr-addchar {
  width: 100%; height: 44px;
  border: 1.5px dashed var(--line-strong, var(--line));
  border-radius: 12px; background: transparent; color: var(--accent-deep);
  font-size: 14px; font-weight: 800; cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.dr-addchar:hover { border-color: var(--accent); background: var(--accent-soft); }
.dr-empty-line { font-size: 13px; color: var(--faint); padding: 12px 2px; }

/* 角色弹窗 */
.dr-modal-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(8, 14, 20, .5);
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.dr-modal {
  width: min(520px, calc(100vw - 40px));
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px;
  box-shadow: 0 30px 70px rgba(8, 16, 12, .35);
  display: flex; flex-direction: column; gap: 10px;
}
.dr-modal h3 { margin: 0; font-size: 18px; }
.dr-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--faint); }
.dr-field .input { font-size: 13.5px; }
.dr-char-desc { min-height: 90px; resize: vertical; line-height: 1.65; }
.dr-ref-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dr-ref-prev {
  width: 76px; height: 76px; border-radius: 12px; overflow: hidden;
  background: var(--panel-soft); border: 1px dashed var(--line-strong, var(--line));
  display: grid; place-items: center; font-size: 11.5px; color: var(--faint);
}
.dr-ref-prev img { width: 100%; height: 100%; object-fit: cover; }
.dr-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* 连续预览 */
.dr-play-mask {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(6, 9, 14, .96);
  display: flex; flex-direction: column;
  padding: 22px;
}
.dr-play-stage { flex: 1; display: grid; place-items: center; min-height: 0; }
.dr-play-stage img, .dr-play-stage video {
  max-width: min(92vw, 780px); max-height: 100%;
  border-radius: 12px; display: block;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.dr-play-info {
  padding: 12px 4px 0; color: rgba(255, 255, 255, .88);
  display: flex; flex-direction: column; gap: 4px; max-width: 860px; margin: 0 auto; width: 100%;
}
.dr-play-info b { font-size: 13px; }
.dr-play-info span { font-size: 12.5px; line-height: 1.6; color: rgba(255, 255, 255, .72); }
.dr-play-info em { font-style: normal; font-size: 12.5px; color: #ffd479; }
.dr-play-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 4px 0; max-width: 860px; margin: 0 auto; width: 100%;
}
.dr-play-count { font-size: 12px; color: rgba(255, 255, 255, .6); }
.dr-play-btn {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 16px; cursor: pointer;
}
.dr-play-btn:hover { background: rgba(255, 255, 255, .24); }
.dr-play-close { margin-left: 6px; }

@media (max-width: 1440px) {
  .dr-layout { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 1320px) {
  .dr-layout { grid-template-columns: 290px minmax(0, 1fr); }
  .dr-statbar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .dr-layout { grid-template-columns: 1fr; }
  .dr-script { min-height: 220px; }
  .dr-title { font-size: 20px; }
  .dr-guide { padding: 12px 14px; gap: 8px; }
  .dr-gstep { padding: 8px 14px; font-size: 14px; gap: 7px; }
  .dr-gstep .n { width: 24px; height: 24px; font-size: 13px; }
}
.dr-ref-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 6px; max-height: 168px; overflow-y: auto;
  padding: 6px; border-radius: 10px; background: var(--panel-soft);
}
.dr-ref-tile { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--panel); }
.dr-ref-tile:hover { border-color: var(--accent); }
.dr-ref-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==================== 成片预览：站内嵌入播放 + 素材总览 ==================== */
.dr-final {
  margin: 16px 0 4px; padding: 14px 16px 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); box-shadow: var(--shadow);
}
.dr-final-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
}
.dr-final-title { margin: 0; font-size: 16px; font-weight: 900; color: var(--ink); white-space: nowrap; }
.dr-final-sub { font-size: 12px; color: var(--faint); }
.dr-final-grid {
  display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.dr-final-stage {
  border-radius: 12px; overflow: hidden; background: #0d131b;
  display: flex; flex-direction: column;
}
.dr-final-stage video {
  display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 430px;
  object-fit: contain; background: #000;
}
.dr-final-cap {
  padding: 8px 10px; font-size: 11.5px; line-height: 1.5;
  color: #dfe8e5; background: rgba(255, 255, 255, .07);
}
.dr-final-empty {
  aspect-ratio: 9 / 16; max-height: 430px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  text-align: center; color: rgba(255, 255, 255, .58); font-size: 12px;
}
.dr-final-empty b { font-size: 16px; color: rgba(255, 255, 255, .85); }
.dr-final-side { min-width: 0; }
.dr-final-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dr-final-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft);
}
.dr-final-row span { flex: 0 0 36px; font-size: 11px; color: var(--faint); }
.dr-final-row b {
  min-width: 0; font-size: 12.5px; font-weight: 750; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dr-final-strip-title { margin: 14px 0 8px; font-size: 12.5px; font-weight: 850; color: var(--ink-soft); }
.dr-final-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 9px; max-height: 288px; overflow-y: auto; padding: 2px;
}
.dr-final-cell {
  min-width: 0; padding: 5px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft);
  transition: border-color .14s ease, transform .14s ease;
}
.dr-final-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.dr-final-thumb {
  position: relative; display: block; aspect-ratio: 3 / 4;
  border-radius: 8px; overflow: hidden; background: #0f1620;
}
.dr-final-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-final-thumb i {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-style: normal; font-size: 20px; font-weight: 800; color: rgba(255, 255, 255, .55);
}
.dr-final-kind {
  position: absolute; left: 4px; bottom: 4px; font-style: normal;
  font-size: 10px; font-weight: 800; color: #fff;
  background: rgba(8, 14, 22, .68); border-radius: 5px; padding: 2px 5px;
}
.dr-final-cell.is-video .dr-final-kind { background: linear-gradient(120deg, #d9a53c, #b57d16); }
.dr-final-cell.is-image .dr-final-kind { background: linear-gradient(120deg, #3b7ae8, #2f5fc4); }
.dr-final-cell-no {
  display: block; padding: 5px 2px 1px; font-size: 11px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ==================== 分镜卡片：图片 / 视频 层次重排 ==================== */
.dr-scene-head { position: relative; padding: 10px 2px 10px 14px; }
.dr-scene-head::before {
  content: ''; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 4px; border-radius: 4px; background: var(--accent-grad);
}
.dr-scene-meta {
  font-size: 11.5px; font-weight: 750; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 9px;
}
.dr-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.dr-dur-tag {
  font-size: 11.5px; font-weight: 800; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 7px; padding: 3px 8px;
}
.dr-media { aspect-ratio: 9 / 16; }
.dr-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px transparent;
}
.dr-media.is-video::after { box-shadow: inset 0 0 0 2px rgba(217, 165, 60, .8); }
.dr-media.is-image::after { box-shadow: inset 0 0 0 2px rgba(59, 122, 232, .55); }
.dr-media-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10.5px; font-weight: 800; color: #fff;
  padding: 3px 8px; border-radius: 999px; background: rgba(8, 14, 22, .66);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.dr-media-tag.is-video { background: linear-gradient(120deg, #d9a53c, #b57d16); }
.dr-media-tag.is-image { background: linear-gradient(120deg, #3b7ae8, #2f5fc4); }
.dr-media-tag.is-none { color: rgba(255, 255, 255, .72); }
.dr-media-save {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  border: 0; border-radius: 8px; padding: 4px 8px;
  font-size: 10.5px; font-weight: 750; color: #fff;
  background: rgba(8, 14, 22, .66); cursor: pointer;
}
.dr-media-save:hover:not(:disabled) { background: var(--accent); }
.dr-media-save:disabled { opacity: .7; cursor: wait; }
.dr-media-switch {
  position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 3px; padding: 3px; border-radius: 999px;
  background: rgba(8, 14, 22, .72);
}
.dr-media-tab {
  border: 0; border-radius: 999px; padding: 4px 12px;
  font-size: 11px; font-weight: 750; color: rgba(255, 255, 255, .8);
  background: transparent; cursor: pointer;
}
.dr-media-tab.is-active { background: #fff; color: #1e2a26; }
.dr-field {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 7px 8px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel-soft);
}
.dr-field:focus-within { border-color: var(--accent); }
.dr-field-label {
  flex: 0 0 auto; margin-top: 2px; padding: 3px 5px;
  font-size: 10.5px; font-weight: 850; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 5px;
}
.dr-field .dr-desc, .dr-field .dr-dialogue {
  flex: 1; min-width: 0; min-height: 22px; padding: 0;
  font-size: 12.5px; line-height: 1.55;
  border: 0; background: transparent; border-radius: 0;
}
.dr-card-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dr-meta-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dr-meta-item > span { font-size: 10.5px; font-weight: 700; color: var(--faint); }
.dr-meta-item .dr-mini { width: 100%; flex: none; height: 28px; font-size: 12px; }
.dr-card-acts { border-top: 1px solid var(--line); margin-top: 4px; }

@media (max-width: 1100px) {
  .dr-final-grid { grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .dr-final-grid { grid-template-columns: 1fr; }
  .dr-final-stage video, .dr-final-empty { max-height: 400px; }
  .dr-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ==================== 生成流程：5 个顺序步骤分区 ==================== */
.dr-stages { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.dr-stage {
  position: relative; padding: 16px 18px 18px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); box-shadow: var(--shadow);
  scroll-margin-top: 16px;
  transition: box-shadow .2s ease;
}
.dr-stage.is-focus { box-shadow: 0 0 0 3px rgba(14, 138, 99, .22), var(--shadow); }
.dr-stage-5.is-focus { box-shadow: 0 0 0 3px rgba(201, 143, 31, .3), var(--shadow); }
.dr-stage::before {
  content: ''; position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 4px; border-radius: 0 4px 4px 0; background: var(--accent-grad);
}
.dr-stage-5::before { background: var(--gold-grad); }
.dr-stage-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
}
.dr-stage-no {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: var(--accent-grad); font-size: 15px; font-weight: 900;
}
.dr-stage-5 .dr-stage-no { background: var(--gold-grad); }
.dr-stage-titles { min-width: 0; }
.dr-stage-titles h3 { margin: 0; font-size: 16px; font-weight: 900; color: var(--ink); }
.dr-stage-hint { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.dr-stage-state {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-soft);
  font-size: 11.5px; font-weight: 800; color: var(--faint);
}
.dr-stage-state.is-done { border-color: transparent; background: var(--accent-soft); color: var(--accent-deep); }
.dr-stage-5 .dr-stage-state.is-done { background: rgba(201, 143, 31, .15); color: #a9762a; }

/* 每区唯一的主动作行 */
.dr-stage-action {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px; border-radius: 13px; background: var(--accent-soft);
}
.dr-stage-5 .dr-stage-action { background: rgba(201, 143, 31, .11); }
.dr-stage-action .btn { height: 40px; padding: 0 18px; font-size: 14px; font-weight: 850; }
.dr-stage-action .dr-model { margin-left: auto; }
.dr-stage-action .dr-model-tag { font-size: 12px; }
.dr-stage-extra { display: grid; gap: 12px; margin-top: 12px; }
.dr-stage-extra .dr-charsband { margin-bottom: 0; }

/* 每区的结果展示 */
.dr-stage-result {
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 14px; margin-top: 14px;
  border-top: 1px dashed var(--line-strong);
}
.dr-stage-action + .dr-stage-result { margin-top: 14px; }
.dr-stage-extra + .dr-stage-result { margin-top: 14px; }
.dr-stage-result > .dr-block,
.dr-stage-result > .dr-charsband,
.dr-stage-result > .dr-board,
.dr-stage-result > .dr-final,
.dr-stage-result > .dr-stage-strip { margin: 0; }
.dr-stage .dr-block, .dr-stage .dr-charsband, .dr-stage .dr-final {
  border: 0; box-shadow: none; background: transparent; padding: 0; border-radius: 0;
}
.dr-stage .dr-statbar { margin-bottom: 0; }
.dr-stage .dr-script { min-height: 190px; }
.dr-stage .dr-board { gap: 10px; }
.dr-board-subtitle { font-size: 12px; color: var(--faint); }

/* 第 2 步：拆解设置项按网格铺开，主按钮独占一行 */
.dr-splitopts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 6px 18px; width: 100%; align-items: start;
}
.dr-splitopts .dr-label { margin: 0 0 6px; }
.dr-splitopts .dr-style-wrap,
.dr-splitopts .dr-opts,
.dr-splitopts .dr-split,
.dr-splitopts .dr-subacts,
.dr-splitopts .dr-tip { grid-column: 1 / -1; }
.dr-splitopts .dr-stylegrid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dr-splitopts .dr-stylechip { padding: 8px 4px; font-size: 12.5px; }
.dr-splitopts .dr-split { justify-self: start; min-width: 230px; height: 42px; font-size: 14px; font-weight: 850; }
.dr-splitopts .dr-tip { margin-top: 4px; }

/* 第 3 / 4 步：本步生成结果条 */
.dr-stage-strip {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-soft); padding: 12px;
}
.dr-stage-strip-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.dr-stage-strip-head b { font-size: 13px; font-weight: 850; color: var(--ink); }
.dr-stage-strip-head span { font-size: 12px; color: var(--faint); }
.dr-stage-strip-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 9px; max-height: 236px; overflow-y: auto; padding: 2px;
}
.dr-stage-cell {
  min-width: 0; padding: 5px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel);
  transition: border-color .14s ease, transform .14s ease;
}
.dr-stage-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.dr-stage-cell.is-done { border-color: rgba(14, 138, 99, .4); }
.dr-stage-thumb {
  position: relative; display: block; aspect-ratio: 3 / 4;
  border-radius: 8px; overflow: hidden; background: #0f1620;
}
.dr-stage-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-stage-thumb i {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-style: normal; font-size: 20px; font-weight: 800; color: rgba(255, 255, 255, .55);
}
.dr-stage-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-style: normal; font-size: 22px; color: #fff;
  background: rgba(8, 14, 22, .28); text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.dr-stage-flag {
  position: absolute; left: 4px; bottom: 4px; font-style: normal;
  font-size: 10px; font-weight: 800; color: #fff;
  background: rgba(8, 14, 22, .7); border-radius: 5px; padding: 2px 5px;
}
.dr-stage-cell.is-done .dr-stage-flag { background: linear-gradient(120deg, #12a06f, #0b6b50); }
.dr-stage-cell-no {
  display: block; padding: 5px 2px 1px; font-size: 11px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .dr-splitopts { grid-template-columns: 1fr; }
  .dr-splitopts .dr-stylegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dr-stage { padding: 14px; }
  .dr-stage-action .dr-model { margin-left: 0; }
}

/* ===== 排序优先级徽章：道具 ① / 人物形象 ② ===== */
.dr-prio-tag {
  flex: 0 0 auto; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: #8a5d0a;
  background: linear-gradient(120deg, #fff2cf, #ffe4a6);
  border: 1px solid rgba(201, 143, 31, .35);
}
html[data-theme="dark"] .dr-prio-tag {
  color: #ffd88a; background: rgba(201, 143, 31, .18); border-color: rgba(201, 143, 31, .4);
}

/* ===== 首尾帧链条：每镜首帧 + 尾帧缺一不可 ===== */
.dr-chain-tag {
  position: absolute; top: 34px; left: 8px; z-index: 2;
  font-size: 10px; font-weight: 800; color: #ffe0b0;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(120, 60, 10, .74); border: 1px solid rgba(255, 200, 120, .32);
}
.dr-chain-tag.is-ok {
  color: #dcffee; background: rgba(8, 90, 62, .8); border-color: rgba(120, 230, 180, .38);
}
.dr-media-switch .dr-media-tab { padding: 4px 9px; font-size: 10.5px; }
.dr-stage-strip-head .dr-strip-chain {
  margin-left: auto; font-size: 11px; font-weight: 800; color: #a06a12;
  background: rgba(201, 143, 31, .12); border-radius: 999px; padding: 3px 10px;
}
.dr-stage-strip-head .dr-strip-chain.is-ok { color: #0b7a55; background: rgba(14, 138, 99, .13); }
html[data-theme="dark"] .dr-stage-strip-head .dr-strip-chain { color: #ffcf7a; }
html[data-theme="dark"] .dr-stage-strip-head .dr-strip-chain.is-ok { color: #7fe0b2; }
.dr-stage-cell.is-pair { border-color: rgba(201, 143, 31, .5); }
.dr-stage-endthumb {
  position: absolute; right: 4px; top: 4px; z-index: 2;
  width: 30%; aspect-ratio: 3 / 4; border-radius: 5px; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .88); box-shadow: 0 2px 8px rgba(0, 0, 0, .42);
}
.dr-stage-endthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-stage-endthumb em {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font-style: normal; font-size: 9px; font-weight: 800; color: #fff;
  background: linear-gradient(120deg, #c98f1f, #a06a12);
}
@media (max-width: 900px) {
  .dr-stage-strip-head { flex-wrap: wrap; }
  .dr-stage-strip-head .dr-strip-chain { margin-left: 0; }
}

/* ===== 素材配置前置区：道具 ① 恒排在整个界面最前面 ===== */
.dr-asset-front {
  margin: 0 0 16px; padding: 14px 16px 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 3px 14px rgba(20, 30, 60, .05);
}
.dr-asset-front-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 11px; margin-bottom: 13px;
  border-bottom: 1px dashed var(--line-strong);
}
.dr-asset-front-no {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #c98f1f, #a06a12);
}
.dr-asset-front-head h3 { margin: 0; font-size: 16px; font-weight: 900; color: var(--ink); }
.dr-asset-front-tip { font-size: 12px; color: var(--faint); line-height: 1.6; min-width: 220px; flex: 1; }
.dr-asset-front .dr-charsband { margin-bottom: 12px; }
.dr-asset-front .dr-charsband:last-child { margin-bottom: 0; }
.dr-asset-front .dr-propsband {
  border: 1px solid rgba(201, 143, 31, .42); border-radius: 13px; padding: 12px;
  background: rgba(201, 143, 31, .05);
}
html[data-theme="dark"] .dr-asset-front .dr-propsband { background: rgba(201, 143, 31, .09); }
.dr-asset-quick {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px;
  background: var(--panel-soft); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--faint);
}
.dr-asset-quick .btn { margin-left: auto; }
.dr-stat.is-cfg b { font-size: 12.5px; line-height: 1.5; font-weight: 800; word-break: break-all; }

/* AI 帮写：目标时长下拉 */
.ai-sec-field { grid-column: 1 / -1; }
.ai-sec-field label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 800; color: var(--faint); }
.ai-sec-sel { width: 100%; max-width: 320px; height: 38px; }

/* 自定义配置项：选项较多时自动换行，按钮保持紧凑 */
.dr-splitopts .dr-segbtn { padding: 6px 10px; font-size: 12px; }
.dr-splitopts .dr-segnum { width: 74px; }
@media (max-width: 700px) {
  .dr-asset-front { padding: 12px; }
  .dr-asset-front-tip { min-width: 0; }
  .dr-asset-quick .btn { margin-left: 0; }
}

/* ===== 人物形象定版锁定（跨镜同脸同装） ===== */
.dr-lock-tag {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .2px;
  color: #6b6f76; background: rgba(120, 128, 140, .12);
  border: 1px dashed rgba(120, 128, 140, .35);
}
.dr-lock-tag.is-on {
  color: #0c6b4d; background: linear-gradient(120deg, #dff7ec, #c8f0dd);
  border: 1px solid rgba(14, 138, 99, .38);
}
html[data-theme="dark"] .dr-lock-tag { color: #9aa2ad; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .dr-lock-tag.is-on { color: #7de3bb; background: rgba(14, 138, 99, .18); border-color: rgba(14, 138, 99, .45); }

.dr-lock-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  background: rgba(120, 128, 140, .08); border: 1px solid rgba(120, 128, 140, .18);
}
.dr-lock-state { font-size: 11.5px; font-weight: 700; color: #6b6f76; }
.dr-lock-state.is-on { color: #0c6b4d; }
html[data-theme="dark"] .dr-lock-state { color: #9aa2ad; }
html[data-theme="dark"] .dr-lock-state.is-on { color: #7de3bb; }

/* 第 3 / 4 步：模型选择器在生成按钮之前，横向对齐 */
.dr-stage-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dr-stage-action .dr-model { min-width: 220px; margin: 0; }

/* ===== 全局模型胶囊：各工作流统一显示模型名称与切换状态 ===== */
.yk-mpill { position: relative; display: inline-flex; align-items: center; max-width: 100%; vertical-align: middle; font-size: 12.5px; }
.yk-mpill-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; max-width: 100%;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel-soft); color: var(--ink); cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.yk-mpill-btn:hover { border-color: var(--accent); box-shadow: 0 3px 12px rgba(0, 0, 0, .08); }
.yk-mpill-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--faint); }
.yk-mpill-dot.is-on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.yk-mpill-label { color: var(--muted); font-weight: 700; white-space: nowrap; }
.yk-mpill-value { color: var(--ink); font-weight: 800; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yk-mpill.is-auto .yk-mpill-value { color: var(--muted); font-weight: 700; }
.yk-mpill-chev { color: var(--faint); font-size: 10px; }
.yk-mpill.is-small .yk-mpill-btn { min-height: 27px; padding: 3px 9px; font-size: 11.5px; }
.yk-mpill-menu {
  position: absolute; z-index: 1200; top: calc(100% + 6px); left: 0; min-width: 228px; max-width: min(340px, 86vw);
  max-height: 320px; overflow: auto; padding: 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow);
}
.yk-mpill-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink);
  text-align: left; cursor: pointer; font-size: 12.5px;
}
.yk-mpill-item:hover { background: var(--panel-soft); }
.yk-mpill-item.is-sel { background: var(--accent-soft); color: var(--accent-deep); }
.yk-mpill-item-t { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yk-mpill-item-s { color: var(--faint); font-size: 11px; white-space: nowrap; }
.yk-mpill-check { color: var(--accent); font-weight: 900; }
.yk-mpill-empty { display: block; padding: 10px; color: var(--faint); font-size: 12px; }
html[data-theme="dark"] .yk-mpill-btn { background: rgba(255,255,255,.05); }
html[data-theme="dark"] .yk-mpill-item.is-sel { color: #d9c7ff; }
@media (max-width: 700px) {
  .yk-mpill-menu { left: auto; right: 0; }
  .yk-mpill-value { max-width: 130px; }
}

/* 素材上传后的识别结果：短剧角色 / 道具弹窗 */
.dr-ai-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.dr-ai-out {
  flex: 1 1 100%; min-height: 18px; padding: 8px 10px; border-radius: 9px;
  background: var(--panel-soft); color: var(--muted); font-size: 11.5px; line-height: 1.6;
}
.dr-ai-out:empty { display: none; }
.dr-ai-out b { display: block; color: var(--accent-deep); margin-bottom: 2px; }

/* 代运营参考图识别标签 */
.dai-rf-tags {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 9.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== 统一胶囊下拉（YK.capsuleSelect，20261123cap1）=====
   画布节点配置弹窗 / 图片创作页 / 爆款二创页的模型与参数选择，
   视觉复用模型广场的 .mb-chip / .mb-chip-menu（styles-model-bench.css）。 */
.yk-capsule { position: relative; display: block; }
.yk-capsule .mb-chip {
  width: 100%; box-sizing: border-box; height: 34px; padding: 0 10px;
  justify-content: space-between; border-radius: 9px;
}
.yk-capsule .mb-chip-val { max-width: none; font-size: 12.5px; }
.yk-capsule .mb-chip-chev { flex: 0 0 auto; font-size: 10px; line-height: 1; }
/* fixed 菜单挂在 body 下：位置由 JS 按触发器实时计算，避免被弹窗 overflow 裁剪 */
.mb-chip-menu.is-fixed { position: fixed; }
.yk-capsule .mb-chip-menu-item {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px;
  font-size: 12.5px; padding: 8px 11px;
}

/* 2026-11-25 模型广场暂未开放卡片置灰 */
.model-card.is-paused { opacity: .45; filter: grayscale(1); cursor: not-allowed; }
.model-card.is-paused .mc-price-tag::after { content: " · 暂未开放"; }
