/* ==========================================================================
   带货短剧工作台
   沿用 base.css 的黑底 / 细线 / 反相主按钮；所有类名用 dh- 前缀，避免串味
   ========================================================================== */

.dh-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 74px 28px 90px;
}

.dh-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 26px;
}
.dh-hero-copy { max-width: 820px; }
.dh-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
}
.dh-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.16;
  letter-spacing: -.03em;
  max-width: 840px;
}
.dh-hero p {
  max-width: 760px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}
.dh-hero-actions { display: flex; gap: 10px; flex: none; }

.dh-primary, .dh-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), opacity .18s;
}
.dh-primary { background: var(--btn); color: var(--btn-ink); }
.dh-primary:hover { background: var(--btn-h); transform: translateY(-1px); }
.dh-ghost { border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--ink); }
.dh-ghost:hover { background: var(--hover); border-color: var(--line-3); }
.dh-primary:disabled, .dh-ghost:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.dh-primary.sm, .dh-ghost.sm { min-height: 34px; padding: 0 13px; font-size: 12px; }
.dh-primary.full { width: 100%; margin-top: 14px; }
.dh-ghost b { color: var(--ink-2); font-weight: 500; margin-left: 2px; }

/* 步骤条 */
.dh-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.dh-steps button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-3);
  font-size: 12px;
  background: rgba(255,255,255,.015);
  transition: .18s var(--ease);
}
.dh-steps button span { font-variant-numeric: tabular-nums; font-size: 10px; opacity: .75; }
.dh-steps button svg { margin-left: auto; }
.dh-steps button:hover { color: var(--ink); border-color: var(--line-2); }
.dh-steps button.on { color: var(--btn-ink); background: var(--btn); border-color: var(--btn); }
.dh-steps button.done { color: var(--teal); border-color: rgba(79,211,209,.32); background: rgba(79,211,209,.06); }

/* 两栏 */
.dh-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 18px;
  align-items: start;
}
.dh-main { min-width: 0; }
.dh-aside {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dh-panel {
  min-height: 560px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(79,211,209,.055), transparent 55%),
    var(--surface);
  box-shadow: var(--sh-1);
}
.dh-panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.dh-stepnum {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(79,211,209,.26);
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dh-panel-head h2 { font-size: 20px; letter-spacing: -.02em; }
.dh-panel-head p { margin-top: 6px; color: var(--ink-2); font-size: 13px; line-height: 1.7; max-width: 820px; }
.dh-cat-inline { margin-left: 4px; color: #ff9b8f; font-weight: 600; }

/* 商品 */
.dh-product-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.dh-upload {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--line-3);
  border-radius: 16px;
  background: var(--surface-2);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--ink-2);
  overflow: hidden;
  cursor: pointer;
  transition: .18s var(--ease);
}
.dh-upload:hover { border-color: var(--teal); background: rgba(79,211,209,.045); }
.dh-upload b { color: var(--ink); font-size: 13px; }
.dh-upload span { font-size: 11px; color: var(--ink-3); }
.dh-upload.has-img { border-style: solid; border-color: var(--line-2); }
.dh-upload.has-img img { width: 100%; height: 100%; object-fit: cover; }
.dh-upload-x {
  position: absolute; right: 8px; top: 8px;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(0,0,0,.65); border: 1px solid var(--line-2);
}
.dh-upload-mask {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.66); color: var(--ink); font-size: 12px;
}

.dh-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dh-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dh-templates-bottom { max-width: 1116px; margin: 22px auto 0; }
.dh-template-gallery { margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.dh-template-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dh-template-head h3 { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.dh-template-head h3 svg { color: var(--teal); }
.dh-template-head span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 10.5px; }
.dh-template-head em { color: var(--teal); font-style: normal; font-size: 10.5px; white-space: nowrap; }
.dh-template-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dh-template-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.014); cursor: pointer; transition: border-color .15s, transform .15s; }
.dh-template-card:hover { border-color: var(--line-3); transform: translateY(-1px); }
.dh-template-card.on { border-color: rgba(79,211,209,.55); background: rgba(79,211,209,.05); }
.dh-template-cover { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 8px; font-size: 10.5px; letter-spacing: .08em; color: #071c1c; }
.dh-template-cover.face { background: linear-gradient(135deg, #61e0dd, #2b8f95); }
.dh-template-cover.noFace { background: linear-gradient(135deg, #9ad9d7, #3b6f77); }
.dh-template-card b { font-size: 12px; }
.dh-template-card p { color: var(--ink-3); font-size: 10.5px; line-height: 1.55; flex: 1; }
.dh-template-tags { color: var(--teal); font-size: 10px; }
.dh-template-actions { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
.dh-template-actions .btn { width: 100%; }
.dh-row3 { grid-template-columns: 1.15fr .95fr .72fr; align-items: end; }
.dh-face-field .dh-select { width: 100%; min-width: 0; }
.dh-field { display: flex; flex-direction: column; gap: 7px; }
.dh-field > span { color: var(--ink-2); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.dh-field > span em { font-style: normal; color: var(--ink-3); font-size: 10px; }
.dh-field > span em.req {
  padding: 1px 7px; border-radius: 999px;
  border: 1px solid rgba(244, 114, 114, .42);
  background: rgba(244, 114, 114, .16);
  color: #ffb4a8; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.dh-field > span em.opt {
  padding: 1px 7px; border-radius: 999px;
  border: 1px solid rgba(79, 211, 209, .26);
  background: rgba(79, 211, 209, .10);
  color: #7fe3e0; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.dh-field input, .dh-field textarea {
  width: 100%;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .18s, background .18s;
  font-size: 13px;
}
.dh-field textarea { resize: vertical; min-height: 72px; line-height: 1.65; }
.dh-field input::placeholder, .dh-field textarea::placeholder { color: var(--ink-3); }
.dh-field input:focus, .dh-field textarea:focus { border-color: rgba(79,211,209,.55); background: var(--surface-3); }
.dh-field-note { margin: 0; color: var(--ink-3); font-size: 11px; line-height: 1.6; }
.dh-field-note.bad { color: #ff9b8f; }

.dh-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 18px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,.018);
  color: var(--ink-3); font-size: 11.5px; line-height: 1.6;
}
.dh-note svg { margin-top: 2px; flex: none; }
.dh-note.ok { color: var(--teal); border-color: rgba(79,211,209,.24); background: rgba(79,211,209,.05); }

.dh-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line);
}

/* 4 维度 */
.dh-dim-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.dh-dim {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  min-width: 0;
}
.dh-dim span { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 10.5px; }
.dh-dim b { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dh-subhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 4px 0 12px; }
.dh-subhead h3, .dh-pick-grid h3, .dh-subtitle, .dh-world h3, .dh-save-card h3, .dh-lib-head h3 {
  display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink);
}
.dh-subhead p { margin-top: 5px; color: var(--ink-3); font-size: 11.5px; }

.dh-trope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.dh-trope {
  display: flex; flex-direction: column; gap: 8px;
  text-align: left; padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  transition: .18s var(--ease);
  min-width: 0;
}
.dh-trope:hover { border-color: var(--line-3); background: var(--surface-3); transform: translateY(-1px); }
.dh-trope.on { border-color: rgba(79,211,209,.55); background: rgba(79,211,209,.07); box-shadow: inset 0 0 0 1px rgba(79,211,209,.18); }
.dh-tag {
  align-self: flex-start;
  padding: 2px 7px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); color: var(--ink-2);
  font-size: 10px; font-weight: 500;
}
.dh-trope b { font-size: 13.5px; line-height: 1.4; }
.dh-trope p { color: var(--ink-3); font-size: 11.5px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dh-hookline { color: var(--ink-2); font-size: 11px; line-height: 1.5; }
.dh-hookline::before { content: '“'; color: var(--teal); }
.dh-hookline::after { content: '”'; color: var(--teal); }
.dh-card-foot {
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px; color: var(--ink-3); font-size: 10px; line-height: 1.5;
}
.dh-card-foot em { color: var(--teal); font-style: normal; opacity: .85; }
.dh-trope-grid.compact .dh-trope p { -webkit-line-clamp: 2; }

.dh-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin: 12px 0; padding: 9px;
  border: 1px dashed var(--line-2); border-radius: 10px;
  color: var(--ink-2); font-size: 11.5px;
}
.dh-more:hover { color: var(--ink); border-color: var(--line-3); }
.dh-all { padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.014); }
.dh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dh-chips button {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--ink-3); font-size: 11px;
}
.dh-chips button:hover { color: var(--ink); border-color: var(--line-2); }
.dh-chips button.on { color: var(--btn-ink); background: var(--btn); border-color: var(--btn); }

.dh-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.dh-style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.dh-style-grid button {
  text-align: left; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2);
  transition: .18s var(--ease);
}
.dh-style-grid button:hover { border-color: var(--line-3); }
.dh-style-grid button.on { border-color: rgba(79,211,209,.55); background: rgba(79,211,209,.07); }
.dh-style-grid b { display: block; font-size: 12px; }
.dh-style-grid span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 10.5px; line-height: 1.5; }

/* 时长 */
.dh-duration-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.dh-duration {
  display: flex; flex-direction: column; gap: 8px;
  text-align: left; padding: 14px 13px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2); min-width: 0;
  transition: .18s var(--ease);
}
.dh-duration:hover { border-color: var(--line-3); transform: translateY(-1px); }
.dh-duration.on { border-color: rgba(79,211,209,.55); background: rgba(79,211,209,.07); box-shadow: inset 0 0 0 1px rgba(79,211,209,.18); }
.dh-dur-num { color: var(--teal); font-size: 26px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dh-dur-num em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.dh-duration b { font-size: 12.5px; line-height: 1.4; }
.dh-duration p { color: var(--ink-2); font-size: 11px; line-height: 1.55; }
.dh-dur-meta { display: flex; flex-wrap: wrap; gap: 4px 7px; color: var(--ink-3); font-size: 10px; }
.dh-dur-meta i { font-style: normal; color: var(--teal); }
.dh-duration small { color: var(--ink-3); font-size: 10.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.dh-duration-note {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-top: 18px; padding: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018);
}
.dh-duration-note b { font-size: 13px; }
.dh-duration-note p { margin-top: 5px; color: var(--ink-3); font-size: 11.5px; line-height: 1.65; }
.dh-duration-note ul { display: flex; flex-direction: column; gap: 7px; }
.dh-duration-note li { display: flex; gap: 7px; color: var(--ink-2); font-size: 11.5px; line-height: 1.55; }
.dh-duration-note li svg { color: var(--teal); flex: none; margin-top: 2px; }

/* 剧情 */
.dh-script-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 2px 0 18px; border-bottom: 1px solid var(--line); }
.dh-script-head h3 { margin: 7px 0 6px; font-size: 20px; letter-spacing: -.02em; }
.dh-script-head p { color: var(--ink-2); font-size: 12px; line-height: 1.7; max-width: 760px; }
.dh-script-actions { display: flex; gap: 8px; flex: none; }
.dh-subtitle { margin: 18px 0 9px; }
.dh-subtitle span { color: var(--ink-3); font-weight: 400; font-size: 10.5px; margin-left: 4px; }
.dh-hooks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.dh-hooks button {
  display: flex; align-items: flex-start; gap: 8px;
  text-align: left; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  color: var(--ink-2); font-size: 12px; line-height: 1.55;
  transition: .18s var(--ease);
}
.dh-hooks button:hover { border-color: var(--line-3); color: var(--ink); }
.dh-hooks button.on { border-color: rgba(79,211,209,.55); background: rgba(79,211,209,.07); color: var(--ink); }
.dh-hooks em { font-style: normal; color: var(--teal); font-size: 10px; font-weight: 700; flex: none; padding-top: 1px; }
.dh-hooks svg { flex: none; margin-left: auto; color: var(--teal); }

.dh-beats { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; }
.dh-beats span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--ink-2); font-size: 10.5px; }
.dh-beats b { color: var(--teal); font-weight: 600; font-variant-numeric: tabular-nums; }

.dh-shot-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dh-shot {
  display: grid; grid-template-columns: 32px 68px minmax(0, 1fr) auto;
  gap: 10px; align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.dh-shot:last-child { border-bottom: 0; }
.dh-shot:nth-child(even) { background: rgba(255,255,255,.022); }
.dh-shot-n { color: var(--ink-3); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 2px; }
.dh-shot-time { color: var(--teal); font-size: 10.5px; font-variant-numeric: tabular-nums; padding-top: 1px; white-space: nowrap; }
.dh-shot-copy b { display: block; font-size: 12px; }
.dh-shot-copy p { margin-top: 3px; color: var(--ink-3); font-size: 11.5px; line-height: 1.55; }
.dh-shot-copy blockquote { margin: 5px 0 0; padding-left: 8px; border-left: 2px solid rgba(79,211,209,.4); color: var(--ink-2); font-size: 11.5px; }
.dh-prod {
  display: inline-flex; align-items: center; align-self: start;
  padding: 2px 7px; border-radius: var(--r-pill);
  border: 1px solid rgba(245,196,81,.28); background: rgba(245,196,81,.08);
  color: #f5c451; font-size: 9.5px; white-space: nowrap;
}

/* 角色 */
.dh-char-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dh-char { display: flex; flex-direction: column; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); min-width: 0; }
.dh-char-top { display: flex; align-items: baseline; gap: 8px; }
.dh-char-top b { font-size: 17px; letter-spacing: -.02em; }
.dh-char-top > span:last-child { margin-left: auto; color: var(--ink-3); font-size: 10.5px; }
.dh-role { padding: 2px 7px; border-radius: var(--r-pill); border: 1px solid rgba(79,211,209,.3); background: var(--teal-soft); color: var(--teal); font-size: 9.5px; }
.dh-char-id { color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.dh-char dl { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.dh-char dl div { display: grid; grid-template-columns: 58px 1fr; gap: 6px; font-size: 11px; line-height: 1.55; }
.dh-char dt { color: var(--ink-3); }
.dh-char dd { margin: 0; color: var(--ink-2); }
.dh-char-img { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0c0c0c; }
.dh-char-img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.dh-char-actions { margin-top: auto; display: flex; flex-direction: column; gap: 7px; }
.dh-char-actions .dh-primary, .dh-char-actions .dh-ghost { width: 100%; }
.dh-err { color: var(--danger); font-size: 10.5px; line-height: 1.5; }

.dh-world { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.dh-world > div { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.014); }
.dh-world h3 { font-size: 11.5px; }
.dh-world p { margin-top: 6px; color: var(--ink-3); font-size: 11px; line-height: 1.65; }

/* 分镜 */
.dh-sb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dh-sb-list { display: flex; flex-direction: column; gap: 9px; }
.dh-sb { border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); overflow: hidden; }
.dh-sb > header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  color: var(--ink-3); font-size: 10.5px;
  background: rgba(255,255,255,.018);
}
.dh-sb > header b { color: var(--teal); font-size: 11.5px; }
.dh-sb > header span:first-of-type { font-variant-numeric: tabular-nums; }
.dh-sb-body { padding: 11px 12px; display: flex; flex-direction: column; gap: 8px; }
.dh-sb-copy p { font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }
.dh-sb-copy b { display: inline-block; min-width: 34px; margin-right: 7px; color: var(--ink-3); font-weight: 500; font-size: 10.5px; }
.dh-sb details { border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.14); }
.dh-sb summary { cursor: pointer; padding: 8px 10px; color: var(--ink-2); font-size: 11px; }
.dh-sb details p { padding: 0 10px 8px; color: var(--ink-3); font-size: 10.5px; line-height: 1.65; word-break: break-word; }
.dh-textbtn { color: var(--teal); font-size: 11px; background: none; padding: 0 0 0 10px; }
.dh-textbtn:hover { text-decoration: underline; }
.dh-sb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 12px 12px; }
.dh-sb-img { width: 100%; max-width: 220px; border-radius: 10px; border: 1px solid var(--line); margin-top: 2px; }

/* 分段成片 */
.dh-model-line .dh-model-hint { color: var(--ink-3); font-size: 10.5px; }
.dh-seg-sum {
  margin-left: auto; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); font-size: 10.5px; font-variant-numeric: tabular-nums;
}
.dh-seg-list { display: flex; flex-direction: column; gap: 12px; }
.dh-seg > header .dh-seg-gen { color: var(--teal); border: 1px solid rgba(79,211,209,.25); border-radius: 999px; padding: 2px 7px; }
.dh-seg.locked { opacity: .62; border-style: dashed; }
.dh-seg-lock { margin-left: auto; color: #ffb45e; border: 1px solid rgba(255,180,94,.32); border-radius: 999px; padding: 2px 7px; }
.dh-seg-beats { color: var(--teal); font-size: 10.5px; letter-spacing: .02em; }
.dh-seg-shots { display: flex; flex-direction: column; gap: 8px; }
.dh-seg-shot { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.12); }
.dh-seg-shot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--ink-3); font-size: 10.5px; }
.dh-seg-shot-head b { color: var(--teal); font-size: 11px; }
.dh-seg-shot p { margin-top: 5px; color: var(--ink-2); font-size: 11.5px; line-height: 1.6; }
.dh-seg-shot blockquote { margin-top: 4px; color: var(--ink-3); font-size: 11px; }
.dh-seg-prompt { white-space: pre-wrap; }
.dh-seg-cost { color: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.dh-seg-status { color: var(--ink-3); font-size: 10.5px; }
.dh-seg-status.ok { color: var(--teal); }
.dh-takes { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 12px 12px; }
.dh-take { width: 190px; max-width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 8px; background: rgba(0,0,0,.14); display: flex; flex-direction: column; gap: 7px; }
.dh-take.on { border-color: rgba(79,211,209,.55); box-shadow: 0 0 0 1px rgba(79,211,209,.18) inset; }
.dh-take-video { width: 100%; aspect-ratio: 9 / 16; border-radius: 8px; background: #000; object-fit: cover; }
.dh-take-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; color: var(--ink-3); font-size: 10.5px; }
.dh-take-meta b { color: var(--ink-2); font-weight: 500; }
.dh-take-video-wrap { position: relative; }
.dh-take-hover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 8px;
  background: rgba(0,0,0,.62); opacity: 0; transition: opacity .15s;
}
.dh-take:hover .dh-take-hover, .dh-take-hover:focus-within { opacity: 1; }
.dh-take-hover button, .dh-take-hover a {
  padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff;
  font-size: 10.5px; border: 1px solid rgba(255,255,255,.16); cursor: pointer;
}
.dh-take-hover button:hover, .dh-take-hover a:hover { background: var(--teal); color: #081c1c; }
.dh-take-hover button:disabled { opacity: .5; cursor: not-allowed; }

.dh-gen-top { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.dh-gen-bar {
  flex: 1; height: 8px; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(255,255,255,.06);
}
.dh-gen-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--teal), rgba(79,211,209,.55));
  transition: width .3s ease;
}
.dh-gen-top span { color: var(--ink-3); font-size: 10.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dh-gen-nav { margin-top: 18px; }
.dh-gen-bottom {
  margin-top: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
}
.dh-gen-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; color: var(--ink-3); font-size: 11.5px; }
.dh-gen-total b { color: var(--teal); font-size: 1.15rem; }
.dh-gen-total em { color: #ffb45e; font-style: normal; font-size: 11px; }
.dh-gen-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dh-gen-actions .btn { flex: 1; min-width: 180px; }
.dh-gen-hint { color: var(--ink-3); font-size: 10.5px; }
.dh-gen-hint.warn { color: #ffb45e; }
.dh-asr-toggle { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 11px; }
.dh-asr-toggle input { width: 14px; height: 14px; accent-color: var(--teal); }
.dh-merge-result {
  margin-top: 16px; padding: 12px; display: flex; flex-direction: column; gap: 9px;
  border: 1px solid rgba(79,211,209,.25); border-radius: 14px; background: rgba(79,211,209,.04);
}
.dh-merge-head { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); font-size: 11.5px; }
.dh-merge-head b { color: var(--teal); }
.dh-merge-result video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.dh-merge-result .btn { align-self: flex-start; }
.dh-sub-editor { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.dh-sub-editor p { color: var(--ink-3); font-size: 10.5px; line-height: 1.65; }
.dh-sub-editor p b { color: var(--teal); font-weight: 500; }
.dh-sub-editor textarea {
  width: 100%; min-height: 220px; resize: vertical; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: rgba(0,0,0,.2);
  color: var(--ink); font: 12px/1.6 ui-monospace, Consolas, monospace;
}
.dh-sub-editor .btn { align-self: flex-start; }
.dh-preview-modal { width: min(760px, 96vw); }
.dh-preview-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.dh-preview-body video { width: 100%; max-height: 65vh; border-radius: 12px; background: #000; }
.dh-preview-actions { display: flex; gap: 9px; flex-wrap: wrap; }
@media (hover: none) {
  .dh-take-hover { position: static; opacity: 1; background: transparent; padding: 0 0 4px; justify-content: flex-start; }
  .dh-take-hover button, .dh-take-hover a { background: rgba(255,255,255,.08); }
}
@media (max-width: 640px) {
  .dh-seg-sum { margin-left: 0; }
  .dh-take { width: 160px; }
}

/* 保存 */
.dh-save-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dh-save-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.dh-save-card > p { margin-top: 8px; color: var(--ink-3); font-size: 11.5px; line-height: 1.65; }
.dh-save-card .dh-field { margin-top: 12px; }
.dh-save-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }

.dh-library { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.dh-lib-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.dh-lib-head b { color: var(--ink-3); font-weight: 500; font-size: 11px; }
.dh-lib-list { display: flex; flex-direction: column; gap: 6px; }
.dh-lib-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  transition: .18s var(--ease); min-width: 0;
}
.dh-lib-item:hover { border-color: var(--line-3); background: var(--surface-3); }
.dh-lib-item.on { border-color: rgba(79,211,209,.5); background: rgba(79,211,209,.06); }
.dh-lib-item img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.dh-lib-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dh-lib-copy b { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-lib-copy span { color: var(--ink-3); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-lib-del { margin-left: auto; color: var(--ink-3); font-size: 11px; flex: none; padding: 4px; }
.dh-lib-del:hover { color: var(--danger); }

/* 空状态 */
.dh-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 26px 16px; border: 1px dashed var(--line-2); border-radius: 13px;
  color: var(--ink-3); font-size: 11.5px; text-align: center; line-height: 1.6;
}
.dh-empty.big { min-height: 330px; gap: 11px; }
.dh-empty b { color: var(--ink); font-size: 14px; }
.dh-empty .dh-primary { margin-top: 7px; }

/* 侧栏 */
.dh-summary { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dh-sum-product { display: flex; align-items: center; gap: 10px; margin: 11px 0 13px; min-width: 0; }
.dh-sum-product img, .dh-sum-ph { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.dh-sum-ph { display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.dh-sum-product div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dh-sum-product b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-sum-product span { color: var(--ink-3); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-summary dl { display: flex; flex-direction: column; gap: 0; margin: 0; }
.dh-summary dl div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 11px; }
.dh-summary dt { color: var(--ink-3); }
.dh-summary dd { margin: 0; color: var(--ink-2); max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dh-tips { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018); }
.dh-tips b { display: block; font-size: 12px; margin-bottom: 8px; }
.dh-tips p { display: flex; gap: 7px; color: var(--ink-3); font-size: 10.5px; line-height: 1.65; margin-top: 6px; }
.dh-tips p span { color: var(--teal); font-size: 9.5px; font-weight: 700; flex: none; padding-top: 1px; }
.dh-tips.muted { background: transparent; }
.dh-tips.muted p { display: block; }
.dh-model-pick { display: flex; flex-direction: column; gap: 5px; margin-top: 11px; }
.dh-model-pick > span { color: var(--ink-3); font-size: 10px; }
.dh-select {
  width: 100%; padding: 8px 9px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface-2); color: var(--ink);
  font-size: 11px; outline: none;
}
.dh-select:focus { border-color: rgba(79,211,209,.55); }

.dh-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 80; max-width: min(92vw, 620px);
  padding: 10px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: #222; color: var(--ink);
  font-size: 12px; box-shadow: var(--sh-2);
}
.dh-toast.err { border-color: rgba(255,138,126,.4); color: #ffb4aa; }

/* 响应式 */
@media (max-width: 1180px) {
  .dh-layout { grid-template-columns: minmax(0, 1fr); }
  .dh-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .dh-summary { grid-row: span 2; }
  .dh-trope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-duration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dh-char-grid { grid-template-columns: 1fr 1fr; }
  .dh-world { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .dh-page { padding: 64px 16px 70px; }
  .dh-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .dh-steps { display: flex; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .dh-steps::-webkit-scrollbar { display: none; }
  .dh-steps li { flex: none; }
  .dh-steps button { min-width: 104px; }
  .dh-panel { padding: 20px; min-height: 0; }
  .dh-product-grid { grid-template-columns: 1fr; }
  .dh-upload { max-width: 240px; }
  .dh-dim-grid { grid-template-columns: 1fr 1fr; }
  .dh-duration-grid { grid-template-columns: 1fr 1fr; }
  .dh-duration-note { grid-template-columns: 1fr; }
  .dh-hooks { grid-template-columns: 1fr; }
  .dh-pick-grid { grid-template-columns: 1fr; }
  .dh-save-grid, .dh-library { grid-template-columns: 1fr; }
  .dh-script-head { flex-direction: column; }
  .dh-char-grid { grid-template-columns: 1fr; }
  .dh-world { grid-template-columns: 1fr; }
  .dh-aside { grid-template-columns: 1fr; }
  .dh-shot { grid-template-columns: 28px 1fr; }
  .dh-shot-time { grid-column: 2; }
  .dh-shot-copy { grid-column: 2; }
  .dh-shot .dh-prod { grid-column: 2; justify-self: start; }
  .dh-row2, .dh-row3 { grid-template-columns: 1fr; }
  .dh-template-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .dh-hero h1 { font-size: 28px; }
  .dh-hero-actions { width: 100%; }
  .dh-hero-actions .dh-primary, .dh-hero-actions .dh-ghost { flex: 1; padding: 0 12px; }
  .dh-trope-grid, .dh-trope-grid.compact { grid-template-columns: 1fr; }
  .dh-duration-grid { grid-template-columns: 1fr; }
  .dh-dim-grid { grid-template-columns: 1fr; }
  .dh-actions { flex-direction: column-reverse; }
  .dh-actions .dh-primary, .dh-actions .dh-ghost { width: 100%; }
  .dh-script-actions { width: 100%; }
  .dh-script-actions .dh-primary, .dh-script-actions .dh-ghost { flex: 1; }
  .dh-style-grid { grid-template-columns: 1fr; }
}


/* ==========================================================================
   与订阅支付页（recharge.html）对齐
   ========================================================================== */
#app.rc { max-width: 1180px; }

.dh-head { margin: 0 0 22px; }
.dh-head .rc-sub { margin-bottom: 18px; }
.dh-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.dh-bal { margin-bottom: 18px; }
.dh-bal-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.dh-bal-meta { margin-left: auto; color: var(--ink-3); font-size: .8rem; }
.dh-bal .rc-bal-more { background: none; cursor: pointer; }

.dh-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 0; overflow: visible; }
.dh-steps .rc-pay { min-width: 0; padding: 8px 15px; font-size: .84rem; }

.dh-model-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 14px; margin: 0 0 18px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: rgba(255,255,255,.014); color: var(--ink-3); font-size: .82rem;
}
.dh-model-line .dh-select { width: auto; min-width: 240px; max-width: 440px; flex: 1; }

.dh-layout { display: block; }
.dh-main { min-width: 0; }

.dh-panel {
  min-height: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
.dh-panel-head {
  display: block; padding: 0 0 16px; margin: 0 0 20px;
  border-bottom: 0;
}
.dh-stepnum { display: none; }
.dh-panel-head h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.015em; }
.dh-panel-head p { margin-top: 6px; max-width: 60ch; color: var(--ink-2); font-size: .9rem; line-height: 1.7; }

.dh-primary, .dh-ghost {
  min-height: 0; height: 40px; padding: 0 22px;
  border-radius: var(--r-pill); font-size: 14px; font-weight: 600;
}
.dh-primary { background: var(--btn); color: var(--btn-ink); }
.dh-primary:hover { background: var(--btn-h); transform: none; }
.dh-ghost { border: 1px solid var(--line-3); background: transparent; color: var(--ink); }
.dh-ghost:hover { background: var(--hover); }
.dh-primary.sm, .dh-ghost.sm { height: 34px; padding: 0 14px; font-size: 12.5px; }

.dh-actions {
  margin-top: 24px; padding: 14px 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface-2);
}

.dh-trope, .dh-duration { display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.dh-trope:hover, .dh-duration:hover { transform: translateY(-2px); }
.dh-trope.on, .dh-duration.on, .dh-style-card.on {
  border-color: var(--teal); background: var(--teal-soft); box-shadow: none;
}
.dh-trope b, .dh-duration b { font-size: .95rem; }
.dh-trope p { font-size: .78rem; line-height: 1.55; }
.dh-tag {
  border: 0; padding: 2px 8px;
  background: rgba(79,211,209,.16); color: var(--teal); font-size: .7rem;
}
.dh-dur-num { font-size: 1.5rem; }
.dh-duration p { font-size: .82rem; }
.dh-duration small { font-size: .78rem; }
.dh-duration-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.dh-trope-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dh-style-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
.dh-style-card { display: block; padding: 14px; }
.dh-style-card b { font-size: .9rem; }
.dh-style-card span { margin-top: 3px; color: var(--ink-3); font-size: .76rem; }

.dh-dim { border-color: var(--line-2); border-radius: var(--r-md); padding: 14px; }
.dh-duration-note { border-color: var(--line-2); border-radius: var(--r-md); }
.dh-note { border: 0; background: transparent; padding: 0; }
.dh-notes { margin-top: 28px; }

.dh-toast { z-index: 80; }

@media (max-width: 640px) {
  #app.rc { padding-top: 64px; }
  .dh-head-actions .btn { flex: 1; }
  .dh-bal-meta { width: 100%; margin-left: 0; }
  .dh-steps { gap: 8px; }
  .dh-steps .rc-pay { padding: 7px 11px; font-size: .78rem; }
  .dh-trope-grid, .dh-duration-grid { grid-template-columns: 1fr 1fr; }
  .dh-style-grid { grid-template-columns: 1fr; }
  .dh-panel-head h2 { font-size: 1.15rem; }
  .dh-actions { padding: 12px; }
}
@media (max-width: 420px) {
  .dh-trope-grid, .dh-duration-grid { grid-template-columns: 1fr; }
}

/* 步骤胶囊按充值页的支付方式胶囊来，不要继承旧步骤条的通栏宽度 */
.dh-steps .rc-pay {
  width: auto; min-width: 0; min-height: 0; height: auto; gap: 0;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  border-radius: var(--r-pill); font-size: .84rem; font-weight: 400; line-height: 1.2;
}
.dh-steps .rc-pay:hover { color: var(--ink); border-color: var(--line-3); }
.dh-steps .rc-pay.on {
  background: var(--btn); color: var(--btn-ink); border-color: transparent; font-weight: 600;
}

.dh-actions { justify-content: space-between; }
.dh-action-note { margin-right: auto; color: var(--ink-3); font-size: .82rem; line-height: 1.5; }

.dh-dur-num { color: var(--ink); font-size: 1.4rem; }

@media (max-width: 640px) { .dh-action-note { width: 100%; margin-right: 0; } }

/* 文字模型参与标记 */
.dh-ai-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: var(--r-pill); border: 1px solid rgba(79,211,209,.3);
  background: rgba(79,211,209,.12); color: var(--teal);
  font-size: 10px; font-weight: 600; white-space: nowrap;
}
.dh-ai-analysis {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 0 0 14px; color: var(--ink-3); font-size: 11.5px; line-height: 1.6;
}
.dh-ai-analysis span:not(.dh-ai-badge) { color: var(--ink-2); }
.dh-script-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }


/* ==========================================================================
   本轮：居中标题、步骤解锁、项目下移、字体对比度
   ========================================================================== */
#app.rc,
#app.rc button,
#app.rc input,
#app.rc textarea,
#app.rc select {
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
#app.rc .dh-head { text-align: center; }
#app.rc .dh-head .rc-sub { margin-left: auto; margin-right: auto; }
#app.rc .dh-head-actions { justify-content: center; }
.dh-steps { justify-content: center; }
.dh-steps .rc-pay.locked { opacity: .42; cursor: not-allowed; }
.dh-steps .rc-pay.locked:hover { color: var(--ink-2); border-color: var(--line-2); }
.dh-lock { margin-left: 2px; opacity: .75; }

#app.rc .rc-sub { color: #c6c6ce; font-size: 1rem; }
#app.rc .dh-panel-head h2 { color: #fff; font-size: 1.35rem; }
#app.rc .dh-panel-head p { color: #bcbcc6; font-size: .95rem; }
#app.rc .dh-subhead p { color: #b9b9c3; font-size: 12.5px; }
#app.rc .dh-field > span { color: #b7b7c1; font-size: 13px; }
#app.rc .dh-field > span em { color: #9a9aa4; }
#app.rc .dh-field input,
#app.rc .dh-field textarea { color: #f4f4f7; font-size: 14px; }
#app.rc .dh-field input::placeholder,
#app.rc .dh-field textarea::placeholder { color: #92929c; }
#app.rc .dh-trope p,
#app.rc .dh-trope .dh-hookline,
#app.rc .dh-duration p,
#app.rc .dh-duration small { color: #b8b8c2; }
#app.rc .dh-trope b,
#app.rc .dh-duration b { color: #f5f5f7; }
#app.rc .dh-tag { font-size: 11px; }
#app.rc .dh-note,
#app.rc .dh-note p,
#app.rc .dh-notes li { color: #b8b8c2; font-size: .9rem; }
#app.rc .dh-note svg { color: #8f8f99; }
#app.rc .dh-dim span,
#app.rc .dh-char dt,
#app.rc .dh-sb summary { color: #aaaab4; }
#app.rc .dh-dim b,
#app.rc .dh-char dd,
#app.rc .dh-sb-copy p { color: #d8d8df; }

.dh-projects {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.dh-projects .dh-library {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#app.rc .dh-head .rc-sub { max-width: 720px; color: #d0d0d8; }
#app.rc .dh-panel-head p { color: #d0d0d8; }
#app.rc .dh-field > span { color: #c6c6d0; }
#app.rc .dh-trope p, #app.rc .dh-trope .dh-hookline, #app.rc .dh-duration p, #app.rc .dh-duration small { color: #c3c3cc; }
#app.rc .dh-note, #app.rc .dh-note p, #app.rc .dh-notes li { color: #c8c8d1; }
#app.rc .dh-lib-copy b { font-size: 12.5px; }
#app.rc .dh-lib-copy span { font-size: 11px; }
.dh-steps .rc-pay.locked { opacity: .5; }


/* ==========================================================================
   可读性：Windows 优先用微软雅黑 UI，正文加粗半档、整体提亮
   ========================================================================== */
#app.rc,
#app.rc button,
#app.rc input,
#app.rc textarea,
#app.rc select,
#app.rc .rc-h1,
#app.rc .dh-panel-head h2 {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "Segoe UI", sans-serif;
}
#app.rc { font-size: 15px; color: #f2f2f6; }
#app.rc .rc-h1 { font-weight: 800; letter-spacing: -.02em; }
#app.rc .rc-sub { color: #e2e2e8; font-size: 1.05rem; line-height: 1.75; font-weight: 400; }
#app.rc .dh-panel-head h2 { color: #fff; font-size: 1.4rem; font-weight: 700; }
#app.rc .dh-panel-head p { color: #dedee5; font-size: .98rem; line-height: 1.75; }
#app.rc .dh-field > span { color: #e2e2e8; font-size: 13.5px; font-weight: 500; }
#app.rc .dh-field > span em { color: #adadb8; }
#app.rc .dh-field input,
#app.rc .dh-field textarea { color: #f8f8fb; font-size: 14.5px; font-weight: 400; }
#app.rc .dh-field input::placeholder,
#app.rc .dh-field textarea::placeholder { color: #a8a8b4; }
#app.rc .dh-trope b,
#app.rc .dh-duration b { color: #ffffff; font-size: 1rem; }
#app.rc .dh-trope p,
#app.rc .dh-trope .dh-hookline,
#app.rc .dh-duration p,
#app.rc .dh-duration small { color: #d2d2da; font-size: 13px; line-height: 1.6; }
#app.rc .dh-tag { color: #7fe3e0; font-size: 11px; font-weight: 600; }
#app.rc .dh-note,
#app.rc .dh-note p { color: #d2d2da; font-size: .92rem; }
#app.rc .dh-lib-copy b { color: #f2f2f6; font-size: 13px; }
#app.rc .dh-lib-copy span { color: #b8b8c4; font-size: 11.5px; }
.dh-steps .rc-pay { color: #d2d2da; font-weight: 500; font-size: .86rem; }
.dh-steps .rc-pay.on { color: var(--btn-ink); font-weight: 600; }
.dh-steps .rc-pay.locked { opacity: .52; }
.dh-bal .rc-bal-lab,
.dh-bal .rc-bal-unit { color: #c8c8d2; }
.dh-bal .dh-bal-meta { color: #b8b8c4; }


/* ==========================================================================
   版式整理：一个清晰的向导卡片 + 卡片内工具栏 + 统一的左右边界
   ========================================================================== */
.dh-mode-switch {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  margin: 0 0 16px;
}
.dh-mode-switch .rc-pay { min-width: 104px; }
.dh-oral-sub { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.dh-oral-sub button {
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-3); font-size: 11px;
}
.dh-oral-sub button.on { background: var(--teal); color: #071c1c; border-color: transparent; }
.dh-oral-mode-grid { margin-top: 18px; }
.dh-oral-duration { margin-top: 18px; }
.dh-oral-duration h3 { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.dh-oral-duration .dh-chips { margin-top: 9px; }
.dh-oral-duration > p { margin-top: 8px; color: var(--ink-3); font-size: 10.5px; line-height: 1.6; }

.dh-wizard {
  width: 100%;
  max-width: 1116px;
  margin: 6px auto 0;
  padding: 18px 26px 26px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--sh-2);
}
.dh-wizard-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.dh-wizard .dh-steps {
  flex: 1;
  justify-content: flex-start;
  margin: 0;
  gap: 8px;
}
.dh-new {
  flex: none;
  height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
}
.dh-wizard .dh-model-line {
  margin: -4px 0 18px;
}
.dh-wizard .dh-panel { padding: 0; }
.dh-wizard .dh-panel-head {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.dh-wizard .dh-product-grid {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
}
.dh-wizard .dh-upload {
  width: 100%;
  max-width: 260px;
  max-height: 320px;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
}
.dh-wizard .dh-fields { max-width: 760px; }
.dh-wizard .dh-actions { margin-top: 28px; }
.dh-bal { max-width: 1116px; margin: 18px auto 0; }
.dh-projects {
  max-width: 1116px;
  margin: 18px auto 0;
  padding: 22px 26px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--surface);
}
.dh-projects .dh-library { gap: 24px; }

@media (max-width: 860px) {
  .dh-wizard { padding: 16px; border-radius: 16px; }
  .dh-wizard-bar { flex-wrap: wrap; gap: 12px; }
  .dh-new { order: 1; margin-left: auto; }
  .dh-wizard .dh-steps { order: 2; width: 100%; flex: 0 0 100%; justify-content: flex-start; }
  .dh-wizard .dh-product-grid { grid-template-columns: 1fr; gap: 20px; }
  .dh-wizard .dh-upload { max-width: 220px; }
  .dh-wizard .dh-fields { max-width: none; }
  .dh-bal, .dh-projects { padding: 16px; }
}


/* 商品图：最多 6 张 */
.dh-upload-empty {
  width: 100%; height: 100%; min-height: 280px;
  display: grid; place-content: center; justify-items: center; gap: 8px;
  color: var(--ink-2); cursor: pointer;
}
.dh-upload-empty b { color: var(--ink); font-size: 13.5px; }
.dh-upload-empty span { font-size: 12px; color: #a8a8b4; }
.dh-upload-empty:hover b { color: #fff; }
.dh-upload.has-img {
  aspect-ratio: auto;
  max-height: none;
  display: block;
  padding: 8px;
  background: var(--surface-2);
}
.dh-prod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
}
.dh-prod-img, .dh-prod-add {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-3);
}
.dh-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.dh-prod-del {
  position: absolute; right: 4px; top: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.7); color: #fff; border: 1px solid rgba(255,255,255,.25);
}
.dh-prod-del:hover { background: rgba(0,0,0,.9); }
.dh-prod-add {
  display: grid; place-content: center; justify-items: center; gap: 2px;
  border-style: dashed; color: #c8c8d2; cursor: pointer;
  font-size: 20px; line-height: 1;
}
.dh-prod-add small { font-size: 10.5px; color: #a8a8b4; }
.dh-prod-add:hover { border-color: var(--teal); color: var(--teal); }


/* 向导工具 / 素材库 / 编辑弹窗 */
.dh-wizard-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.dh-tool { height: 34px; padding: 0 12px; font-size: 12.5px; }
.dh-tool b { color: var(--teal); font-weight: 600; }
.dh-sheet-note {
  margin: 0 0 14px; padding: 9px 12px;
  border: 1px solid rgba(79,211,209,.22); border-radius: 10px;
  background: rgba(79,211,209,.05); color: #c8f5f2; font-size: 12px;
}
.dh-bound { color: #7fe3e0; font-size: 11.5px; line-height: 1.5; }
.dh-char-img img { aspect-ratio: 16 / 9; object-fit: cover; }
.dh-char-actions .dh-textbtn { padding: 2px 0; text-align: left; }

.dh-modal-mask {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 18px;
  background: rgba(0,0,0,.66); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.dh-modal {
  width: min(920px, 96vw); max-height: 88vh;
  display: flex; flex-direction: column;
  border: 1px solid var(--line-2); border-radius: 18px;
  background: var(--surface); box-shadow: var(--sh-3); overflow: hidden;
}
.dh-modal-head {
  display: flex; align-items: flex-start; gap: 16px; justify-content: space-between;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--line);
}
.dh-modal-head h2 { margin-top: 5px; font-size: 1.25rem; }
.dh-modal-x {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  border: 1px solid var(--line-2); color: var(--ink-2);
}
.dh-modal-x:hover { background: var(--hover); color: var(--ink); }
.dh-modal-tabs { display: flex; gap: 8px; padding: 12px 22px 0; }
.dh-modal-tabs button {
  height: 32px; padding: 0 13px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); color: var(--ink-2); font-size: 12px;
}
.dh-modal-tabs button.on { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.dh-modal-tabs b { color: var(--teal); font-weight: 600; }
.dh-modal-body { padding: 16px 22px 22px; overflow-y: auto; }
.dh-modal-hint { margin-bottom: 12px; color: #b8b8c4; font-size: 12px; line-height: 1.65; }
.dh-media-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.dh-media-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.dh-media-card img, .dh-media-ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: grid; place-items: center; background: #0c0c0e; color: var(--ink-3); font-size: 11px; }
.dh-media-card p { padding: 7px 8px; color: #b8b8c4; font-size: 10.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dh-asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.dh-asset {
  display: flex; flex-direction: column; gap: 5px; padding: 7px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  text-align: left; color: #d8d8df; font-size: 11px;
}
.dh-asset:hover { border-color: var(--teal); }
.dh-asset img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 7px; }
.dh-asset span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dh-edit-modal { width: min(1000px, 97vw); }
.dh-edit-body { padding: 16px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.dh-edit-two { display: grid; grid-template-columns: 1fr 260px; gap: 12px; }
.dh-edit-hooks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.dh-edit-shots { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.dh-edit-shot { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.dh-edit-shot-head { display: flex; gap: 8px; align-items: baseline; color: #a8a8b4; font-size: 11px; }
.dh-edit-shot-head b { color: var(--teal); }
.dh-edit-shot textarea, .dh-edit-shot input { width: 100%; }
.dh-modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .dh-wizard-tools { width: 100%; order: 0; flex-wrap: wrap; }
  .dh-wizard .dh-steps { order: 2; }
  .dh-tool { flex: 1; }
  .dh-media-grid { grid-template-columns: 1fr 1fr; }
  .dh-edit-two, .dh-edit-hooks { grid-template-columns: 1fr; }
}

.dh-draft-tag { display:inline-flex; align-items:center; margin-left:5px; padding:1px 6px; border-radius:var(--r-pill); border:1px solid rgba(245,196,81,.35); color:#f5c451; font-style:normal; font-size:9.5px; font-weight:600; vertical-align:1px; }

.dh-edit-shot textarea, .dh-edit-shot input {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.6; outline: none;
}
.dh-edit-shot textarea:focus, .dh-edit-shot input:focus { border-color: rgba(79,211,209,.55); }

.dh-sb-plan { margin: 0 0 12px; padding: 8px 11px; border: 1px dashed rgba(79,211,209,.25); border-radius: 9px; color: #b8b8c4; font-size: 11px; line-height: 1.6; }

/* 必填 / 可选胶囊在 rc 主题下也要保持醒目（rc-theme 有更高优先级的灰色 em 规则） */
#app.rc .dh-field > span em.req {
  color: #ffb4a8; background: rgba(244, 114, 114, .20);
  border-color: rgba(244, 114, 114, .50); font-weight: 700;
}
#app.rc .dh-field > span em.opt {
  color: #7fe3e0; background: rgba(79, 211, 209, .14);
  border-color: rgba(79, 211, 209, .34); font-weight: 600;
}
