/* 妙剪 MiaoCut - 全局样式（浅色 SaaS 风，蓝紫渐变点缀） */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #e8ecf5;
  --text: #1c2333;
  --text-2: #6b7280;
  --primary: #4f7cff;
  --primary-2: #8a5bff;
  --grad: linear-gradient(135deg, #4f7cff 0%, #8a5bff 100%);
  --grad-soft: linear-gradient(135deg, rgba(79, 124, 255, 0.08), rgba(138, 91, 255, 0.08));
  --danger: #e5484d;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(31, 41, 72, 0.06);
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 40px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 14px; height: 14px; fill: #fff; }
.brand-text { font-size: 18px; font-weight: 700; line-height: 1.1; }
.brand-text small {
  display: block; font-size: 10px; font-weight: 400; color: var(--text-2);
  letter-spacing: 1px;
}
.nav { display: flex; gap: 8px; flex: 1; }
.nav a {
  padding: 8px 16px; border-radius: 10px; font-size: 14px; color: var(--text-2);
}
.nav a:hover { background: var(--grad-soft); color: var(--text); }
.nav a.active { background: var(--grad-soft); color: var(--primary); font-weight: 600; }
.topbar-right { font-size: 12px; color: var(--text-2); }

/* ---------- 顶栏登录态（账号 / 积分） ---------- */
.topbar-user { position: relative; flex: none; margin-left: auto; }

/* 未登录：醒目的「登录 / 注册」入口，常驻顶栏右上角 */
.mc-login-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 20px; border: none; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; line-height: 1;
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.35);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.mc-login-btn:hover { filter: brightness(1.06); }
.mc-login-btn:active { transform: translateY(1px); }
.mc-login-ico {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.mc-user-chip {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 13px; white-space: nowrap;
}
.mc-user-chip:hover { border-color: var(--primary); }
.mc-nick { font-weight: 600; color: var(--text); }
.mc-role {
  font-size: 11px; color: #fff; background: var(--primary);
  padding: 1px 7px; border-radius: 6px;
}
.mc-points {
  font-size: 12px; color: var(--primary); font-weight: 600;
  background: var(--grad-soft); padding: 2px 8px; border-radius: 999px;
}
.mc-caret { color: var(--text-2); font-size: 11px; }
.mc-user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 180px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 24, 40, 0.12); padding: 6px; z-index: 60;
}
.mc-menu-info { font-size: 12px; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; word-break: break-all; }
.mc-menu-item {
  display: block; padding: 9px 10px; border-radius: 8px; font-size: 13px;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.mc-menu-item:hover { background: var(--grad-soft); }
.mc-menu-item.mc-danger { color: var(--danger); }
.mc-menu-item.mc-danger:hover { background: rgba(229, 72, 77, 0.1); }

/* ---------- 通用弹窗（登录 / 账户） ---------- */
.mc-modal-mask {
  position: fixed; inset: 0; background: rgba(15, 18, 32, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 2000;
}
.mc-modal {
  width: 380px; max-width: calc(100vw - 32px); background: #fff;
  border-radius: 16px; overflow: hidden; box-shadow: 0 24px 64px rgba(15, 18, 32, 0.25);
}
.mc-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.mc-modal-title { font-size: 16px; font-weight: 700; }
.mc-modal-x {
  border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer;
  color: var(--text-2); padding: 0 4px;
}
.mc-modal-x:hover { color: var(--text); }
.mc-tabs { display: flex; gap: 4px; }
.mc-tab {
  border: none; background: none; padding: 6px 12px; font-size: 14px; cursor: pointer;
  color: var(--text-2); border-radius: 8px;
}
.mc-tab.active { color: var(--primary); font-weight: 700; background: var(--grad-soft); }
.mc-modal-body { padding: 20px 22px 22px; }
.mc-form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mc-label { width: 44px; font-size: 13px; color: var(--text-2); flex: none; }
.mc-input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; background: #fff;
}
.mc-input:focus { outline: none; border-color: var(--primary); }
.mc-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.mc-hint { font-size: 12px; color: var(--text-2); margin-top: 12px; line-height: 1.6; }
.mc-account-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.mc-account-row span:first-child { color: var(--text-2); }
.mc-points-big { font-size: 20px; font-weight: 800; color: var(--primary); }
.mc-recharge-note { display: block; }
.mc-recharge-note span:last-child { text-align: right; line-height: 1.5; }
.mc-tx-title { font-size: 14px; margin: 16px 0 10px; }
.mc-tx-list { max-height: 240px; overflow-y: auto; }
.mc-tx-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.mc-tx-amount { font-weight: 700; flex: none; width: 52px; }
.mc-tx-in { color: #16a34a; }
.mc-tx-out { color: var(--danger); }
.mc-tx-note { flex: 1; color: var(--text); word-break: break-all; }
.mc-tx-time { color: var(--text-2); font-size: 11px; flex: none; white-space: nowrap; }

/* 消费按钮上的积分角标 */
.cost-tag { font-size: 11px; color: var(--primary); background: var(--grad-soft); padding: 1px 7px; border-radius: 999px; margin-left: 6px; }

/* ---------- 布局 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; }
.container.narrow { max-width: 860px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
}
.section-title { font-size: 18px; margin: 32px 0 16px; }
.page-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px;
}
.page-head h1 { font-size: 24px; }
.hint { font-size: 13px; color: var(--text-2); }

/* ---------- 首页 ---------- */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(120deg, rgba(79, 124, 255, 0.10), rgba(138, 91, 255, 0.10)), #fff;
}
.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { color: var(--text-2); font-size: 14px; }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column;
  gap: 10px; transition: transform 0.15s, box-shadow 0.15s; position: relative;
}
.feature-card:not(.disabled):hover {
  transform: translateY(-3px); box-shadow: 0 8px 24px rgba(79, 124, 255, 0.16);
}
.feature-card.disabled { opacity: 0.55; cursor: not-allowed; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--grad-soft);
  display: grid; place-items: center;
}
.feature-icon svg { width: 22px; height: 22px; stroke: var(--primary); fill: none; stroke-width: 1.8; }
.feature-card h3 { font-size: 16px; }
.feature-card p { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: var(--grad); color: #fff;
}
.badge.gray { background: #eceff5; color: var(--text-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 24px; border-radius: 12px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 4px 16px rgba(79, 124, 255, 0.35); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn:disabled { background: #e5e9f2; color: #a5adbf; cursor: not-allowed; box-shadow: none; filter: none; }

/* ---------- 分步导航 ---------- */
.stepper {
  display: flex; list-style: none; gap: 0; margin-bottom: 32px;
  counter-reset: step;
}
.stepper li {
  flex: 1; display: flex; align-items: center; gap: 8px;
  color: var(--text-2); font-size: 14px; position: relative;
}
.stepper li:not(:last-child)::after {
  content: ""; flex: 1; height: 2px; margin: 0 12px; background: var(--border); border-radius: 2px;
}
.step-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: #eceff5; color: var(--text-2); transition: all 0.2s;
}
.stepper li.active { color: var(--text); font-weight: 600; }
.stepper li.active .step-num { background: var(--grad); color: #fff; }
.stepper li.done .step-num { background: var(--primary); color: #fff; }
.stepper li.done:not(:last-child)::after { background: var(--primary); opacity: 0.35; }

/* ---------- 表单 ---------- */
.panel h2 { font-size: 18px; margin-bottom: 6px; }
.panel .hint { margin-bottom: 20px; }
.field { display: block; margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
input[type="text"], textarea, select {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; font-family: inherit; color: var(--text);
  background: #fafbfe; outline: none; transition: border 0.15s;
}
input[type="text"]:focus, textarea:focus, select:focus { border-color: var(--primary); background: #fff; }
textarea { resize: vertical; line-height: 1.8; }
.actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 16px; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 卖点输入行 */
.point-row { display: flex; gap: 8px; margin-bottom: 8px; }
.point-row .btn-sm { flex: none; }

/* 时长选择 */
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; cursor: pointer; color: var(--text-2);
}
.seg button.active {
  border-color: transparent; background: var(--grad-soft);
  color: var(--primary); font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--primary);
}

/* 语速滑块 */
.rate-row { display: flex; align-items: center; gap: 12px; }
.rate-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.rate-row output { font-size: 13px; font-weight: 600; color: var(--primary); min-width: 48px; }

/* ---------- 素材缩略图 ---------- */
.upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 36px; border: 2px dashed #ccd4e6; border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s; margin-bottom: 16px; background: #fafbfe;
}
.upload-zone:hover { border-color: var(--primary); background: var(--grad-soft); }
.upload-zone svg { width: 32px; height: 32px; stroke: var(--primary); fill: none; stroke-width: 1.6; }
.thumb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px;
}
.thumb {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: #eceff5;
}
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px;
  font-size: 11px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb-tags {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none;
}
.thumb-tags .tag {
  background: rgba(79, 124, 255, 0.9); color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 8px; line-height: 1.4;
}
.queue-actions {
  display: flex; gap: 6px; margin-top: 8px;
}
.queue-error {
  margin: 6px 0 0; font-size: 12px; color: #d9534f;
}
.thumb-del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.thumb-del:hover { background: var(--danger); }
.count { margin-top: 14px; font-size: 13px; color: var(--text-2); }
.count b { color: var(--primary); }
.count.warn { color: var(--danger); }
.count.warn b { color: var(--danger); }

/* ---------- 任务进度 ---------- */
.task-card { text-align: center; padding: 48px 40px; }
.task-card h2 { margin: 16px 0 24px; }
.progress {
  height: 10px; border-radius: 999px; background: #eceff5; overflow: hidden;
}
.progress .bar {
  height: 100%; width: 0%; background: var(--grad); border-radius: 999px;
  transition: width 0.6s ease;
}
.pct { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.task-card video {
  width: 100%; max-width: 420px; border-radius: 12px; background: #000;
  margin-bottom: 20px;
}
.task-card .actions { justify-content: center; border-top: none; padding-top: 0; }
.error-text { color: var(--danger); font-size: 14px; margin-bottom: 20px; word-break: break-all; }

/* ---------- 作品库 ---------- */
.works-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.work-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform 0.15s;
}
.work-card:hover { transform: translateY(-3px); }
.work-cover { aspect-ratio: 3 / 4; background: #eceff5; position: relative; }
.work-cover img, .work-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-cover .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--primary); font-weight: 600; font-size: 13px;
}
.work-dur {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px;
}
.work-profile {
  position: absolute; left: 8px; top: 8px; max-width: 70%; padding: 2px 8px; border-radius: 999px;
  background: rgba(79, 124, 255, 0.88); color: #fff; font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.work-info { padding: 14px 16px 16px; }
.work-info h3 {
  font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.work-info p { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.empty { text-align: center; color: var(--text-2); padding: 64px 0; }
.queue-section { margin-bottom: 24px; }
.queue-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.queue-head h2 { font-size: 18px; }
.queue-list { display: grid; gap: 10px; }
.queue-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.queue-card.status-error { border-color: rgba(229,72,77,.35); }
.queue-title, .queue-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-title span, .queue-meta { font-size: 12px; color: var(--text-2); }
.queue-card .progress { height: 7px; margin: 10px 0 7px; }
.queue-error { color: var(--danger); font-size: 12px; margin-top: 8px; overflow-wrap: anywhere; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 20, 34, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-inner {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px;
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  padding: 20px 28px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h2 { font-size: 18px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: #f0f3fa;
  font-size: 20px; cursor: pointer; color: var(--text-2);
}
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-body { padding: 24px 28px; overflow-y: auto; }
.modal-body video { width: 100%; border-radius: 12px; background: #000; margin-bottom: 16px; }
.media-preview-box { position: relative; width: auto; max-width: min(400px, 88vw); max-height: 82vh; padding: 40px 16px 14px;
  background: #fff; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.media-preview-box video, .media-preview-box img { max-width: min(360px, 80vw); max-height: 56vh; width: auto; height: auto;
  object-fit: contain; background: #0b0d12; border-radius: 10px; }
.media-preview-box .modal-close { position: absolute; top: 10px; right: 10px; }
.media-preview-box p { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-profile { position: absolute; left: 6px; right: 6px; bottom: 28px; width: calc(100% - 12px); z-index: 2;
  font-size: 11px; padding: 4px; border-radius: 7px; background: rgba(255,255,255,.94); }
.modal-body h3 { font-size: 16px; margin-bottom: 4px; }
.modal-body .meta { font-size: 12px; color: var(--text-2); margin-bottom: 16px; }
.modal-foot {
  padding: 16px 28px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 12px;
}

/* ---------- 表单分区 ---------- */
.form-section { margin-bottom: 28px; }
.section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; margin-bottom: 6px;
}
.section-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 12px;
  display: grid; place-items: center; flex: none;
}
.section-hint { margin-bottom: 16px; font-size: 12px; }
.req { color: var(--danger); }

/* ---------- Toast ---------- */
.duration-range { width: 100%; accent-color: var(--primary); cursor: pointer; }
.duration-label { display: flex; justify-content: space-between; align-items: center; }
.duration-label output { color: var(--primary); font-weight: 700; }
.duration-bounds { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.voice-picker { position: relative; width: 100%; }
.voice-fields { align-items: start; }
.voice-trigger { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; text-align: left; cursor: pointer; font: inherit; }
.voice-panel { margin-top: 8px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; max-height: 340px; overflow-y: auto; padding: 6px; }
.voice-option { display: flex; gap: 8px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.voice-option:last-child { border-bottom: 0; }
.voice-description { flex: 1; min-width: 0; display: grid; gap: 4px; }
.voice-description .hint { overflow-wrap: anywhere; font-size: 12px; }
.voice-option button { flex-shrink: 0; }
.voice-option button[aria-pressed="true"] { color: var(--primary); font-weight: 700; }
.voice-player { width: 100%; margin-top: 8px; }
.voice-custom { padding: 10px 6px; }
.voice-custom summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.voice-custom input, .voice-custom select { width: 100%; margin-top: 8px; }
.voice-custom .btn { margin-top: 8px; }

#toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  z-index: 200; padding: 10px 20px; border-radius: 12px; font-size: 14px;
  background: rgba(28, 35, 51, 0.92); color: #fff; box-shadow: var(--shadow);
  animation: toastIn 0.25s ease;
}
#toast.err { background: rgba(229, 72, 77, 0.95); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } }

@media (max-width: 720px) {
  .topbar-inner { height: auto; min-height: 60px; flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
  .topbar-right { display: none; }
  /* 移动端：品牌 + 登录入口留在第一行，导航换到第二行 */
  .brand { order: 1; }
  .topbar-user { order: 2; margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; gap: 4px; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .stepper li span:not(.step-num) { display: none; }
  .stepper li:not(:last-child)::after { margin: 0 6px; }
}

/* ---------- 素材库分组 ---------- */
.mat-group { margin-bottom: 28px; }
.mat-group-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; margin-bottom: 12px;
  background: var(--grad-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.mat-group-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.mat-group-head .hint { margin-top: 2px; font-size: 12px; }
.group-upload input { display: none; }

/* ---------- 剪辑模板 ---------- */
.tpl-section {
  padding: 16px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fafbff;
}
.tpl-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tpl-tab {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 13px; cursor: pointer; color: var(--text-1);
}
.tpl-tab.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tpl-card {
  position: relative; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 6px;
}
.tpl-card:hover { border-color: var(--primary); }
.tpl-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,124,255,.18); }
.tpl-card b { font-size: 14px; }
.tpl-card .hint { font-size: 12px; }
.tpl-card .tpl-del { position: absolute; top: 6px; right: 6px; padding: 2px 8px; }

/* ---------- 分镜编辑 ---------- */
.shot-row {
  padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
}
.shot-head { display: flex; align-items: center; gap: 10px; }
.shot-num { font-size: 13px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.shot-title { flex: 1; }
.shot-hint { margin: 6px 0 0; font-size: 12px; }
.shot-row textarea { margin-top: 8px; width: 100%; }

/* 字幕颜色样式卡片（Step3） */
.sub-style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sub-style-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; background: #fff; transition: all .15s; }
.sub-style-card:hover { border-color: var(--primary); }
.sub-style-card.active { border-color: var(--primary); background: var(--primary-soft, #f0f3ff); }
.sub-preview { font-size: 22px; font-weight: 800; line-height: 1; padding: 8px 14px; border-radius: 8px; }
.sub-name { font-size: 11px; color: var(--text-2); }
