/* ============================================================
 * pc.css — 顺顺AI 创作台 PC 版（三栏桌面布局）
 * 左栏 300px 记录 / 中栏表单(自适应, max 600) / 右栏结果区(弹性)
 * ============================================================ */

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

:root {
  --primary: #2f6bff;
  --primary-deep: #1f54d6;
  --primary-soft: #eaf1ff;
  --bg: #f3f5fa;
  --panel: #ffffff;
  --border: #e6eaf2;
  --text: #1c2434;
  --text-2: #5a6778;
  --text-3: #9aa8b8;
  --danger: #e5484d;
  --ok: #18a058;
  --run: #d8860b;
  --radius: 14px;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; outline: none; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cdd6e4; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b3c0d4; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 品牌区（左栏顶部，宽同左栏） ================= */
.brand-bar {
  flex: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #2f6bff, #6a3df0);
  color: #fff; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.brand-name { font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-slogan { font-size: 11px; color: var(--text-3); line-height: 1.2; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================= 三栏布局 ================= */
.layout {
  display: flex;
  gap: 12px;
  padding: 14px;
  height: 100vh;
  align-items: stretch;
}

.col-left {
  width: 440px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.col-mid {
  flex: 1 1 0;
  max-width: 35vw;
  min-width: 420px;
  overflow: hidden;          /* 由内层 .mid-scroll 滚动 */
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
/* 上方可滚动区：提示词/按钮固定在底部时，这里负责滚 */
.mid-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;        /* 滚动条不贴边 */
}

.col-right {
  flex: 1.2 1 0;
  min-width: 380px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
/* 底部固定区卡片，不被压缩（参考图/提示词/草稿横幅） */
#promptPanel, #draftEditBanner, #refPanel { flex: none; }

.panel-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.optional { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ================= 左栏底部·单行账户条 ================= */
.account-bar {
  flex: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.account-bar:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(47,107,255,.12); }
.account-bar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #2f6bff, #6a3df0);
  color: #fff; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
}
.account-bar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-bar-info { flex: 1; min-width: 0; }
.account-bar-name {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-bar-bal {
  font-size: 12px; color: var(--text-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* 当前身份的余额高亮（企业模式→企业蓝粗体，个人模式→个人蓝粗体） */
.account-bar-bal .bal-cur { color: var(--primary); font-weight: 700; }
.account-bar-arrow { font-size: 18px; color: var(--text-3); flex: none; }

/* ================= 账户弹窗（内容同 qc） ================= */
.account-top { display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; }
.account-avatar-wrap { position: relative; cursor: pointer; }
.account-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #2f6bff, #6a3df0);
  color: #fff; font-size: 22px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit-badge {
  position: absolute; right: -2px; bottom: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.account-name-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.account-name { font-size: 16px; font-weight: 700; }
.name-edit-icon { color: var(--text-3); font-size: 13px; padding: 4px; }
.name-edit-icon:hover { color: var(--primary); }
.name-edit-form { display: none; align-items: center; gap: 8px; margin-top: 10px; }
.name-edit-form.show { display: flex; }
.name-edit-form input {
  width: 160px; height: 34px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0 10px; font-size: 14px;
}
.name-save-btn, .name-cancel-btn {
  height: 34px; padding: 0 14px; border-radius: 17px;
  font-size: 13px; font-weight: 600;
}
.name-save-btn { background: var(--primary); color: #fff; }
.name-cancel-btn { background: #f5f7fb; color: var(--text-2); }
.account-mobile { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.account-company {
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
  background: #f7f9fd; border: 1px solid var(--border);
}
.account-company.invited { background: #fff8e8; border-color: #ffe8b8; }
.company-line { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.company-line.personal { color: var(--text-2); }
.company-tag, .invite-tag {
  font-size: 10px; font-weight: 600; border-radius: 7px; padding: 1px 6px;
}
.company-tag { background: var(--primary-soft); color: var(--primary); }
.invite-tag { background: #ffe8b8; color: #b37400; }
.company-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.invite-actions { display: none; gap: 10px; margin-top: 10px; }
.invite-actions.show { display: flex; }
.invite-btn-decline, .invite-btn-accept {
  flex: 1; height: 34px; border-radius: 17px; font-size: 13px; font-weight: 600;
}
.invite-btn-decline { background: #f5f7fb; color: var(--text-2); }
.invite-btn-accept { background: var(--primary); color: #fff; }

.txn-entry, .super-entry, .manage-entry, .identity-switch-entry {
  width: 100%; height: 42px;
  border-radius: 10px;
  background: #f7f9fd; border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--text);
  display: none;
  align-items: center; justify-content: space-between;
  padding: 0 14px;
  margin-bottom: 10px;
  text-align: left;
}
.txn-entry { display: flex; }
.super-entry.show, .manage-entry.show, .identity-switch-entry.show { display: flex; }
.txn-entry:hover, .super-entry:hover, .manage-entry:hover, .identity-switch-entry:hover { border-color: var(--primary); }
.txn-entry .arrow, .super-entry .arrow, .manage-entry .arrow { color: var(--text-3); }

.bind-wechat-tip {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #b37400;
  background: #fff8e8; border-radius: 8px;
  padding: 8px 12px; margin-top: 10px;
}
.bind-wechat-link { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ================= 生成统计 ================= */
.stats-block {
  margin-top: 12px; padding: 12px;
  background: #f7f9ff; border: 1px solid #e8edfb; border-radius: 10px;
}
.stats-title { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 10px; }
.stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats-card {
  background: #fff; border-radius: 8px; padding: 8px 4px; text-align: center;
  border: 1px solid #eef1f8;
}
.stats-num { font-size: 16px; font-weight: 700; color: var(--primary); }
.stats-label { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.stats-types { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.stats-types .st-item { display: inline-flex; align-items: center; gap: 4px; }
.stats-types .st-item b { color: var(--text-1); }
.stats-sub-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }
.stats-member-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 12px; color: var(--text-2);
  border-bottom: 1px dashed #edf0f7;
}
.stats-member-row:last-child { border-bottom: none; }
.stats-member-rank { width: 18px; text-align: center; color: var(--text-3); flex-shrink: 0; }
.stats-member-name { flex: 1; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-member-name .me-tag {
  font-size: 10px; color: var(--primary); background: #eaf1ff;
  border-radius: 4px; padding: 1px 4px; margin-left: 4px;
}
.stats-member-num { color: var(--text-3); flex-shrink: 0; }
.stats-member-amount { color: var(--primary); font-weight: 600; flex-shrink: 0; min-width: 64px; text-align: right; }

/* ================= 流水弹窗 ================= */
.txn-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.txn-filter {
  height: 28px; padding: 0 12px; border-radius: 14px;
  font-size: 12px; color: var(--text-2); background: #f5f7fb;
}
.txn-filter.active { background: var(--primary); color: #fff; font-weight: 600; }
.txn-list { min-height: 120px; max-height: 50vh; overflow-y: auto; }
.txn-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #f0f3f9; gap: 10px;
}
.txn-row:last-child { border-bottom: none; }
.txn-info { flex: 1; min-width: 0; }
.txn-type { font-size: 13px; font-weight: 600; }
.txn-sub {
  font-size: 11px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.txn-amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.txn-amt.pos { color: var(--ok); }
.txn-amt.neg { color: var(--danger); }

.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.balance-card {
  background: #f7f9fd;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
}
.balance-label { font-size: 12px; color: var(--text-2); }
.balance-value { font-size: 18px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.recharge-btn {
  position: absolute; right: 10px; top: 10px;
  font-size: 12px; font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 4px 10px;
}
.recharge-btn:hover { background: #dce9ff; }

.account-ops { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.account-op-btn {
  width: 100%; height: 34px;
  border-radius: 17px;
  background: #f5f7fb;
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
}
.account-op-btn:hover { background: #eceff6; color: var(--text); }

/* ================= 左栏·记录列表 ================= */
.records-panel {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px;
}
.records-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.records-title { font-size: 14px; font-weight: 700; }
.records-status-tabs { display: flex; background: #f0f3f9; border-radius: 13px; padding: 2px; }
.records-scope-tabs { display: flex; background: #e8f0ff; border-radius: 13px; padding: 2px; }
.records-scope-tabs .rst-tab.active { background: var(--primary); color: #fff; }
.rst-tab {
  height: 24px; padding: 0 10px; border-radius: 11px;
  font-size: 12px; color: var(--text-2); font-weight: 500;
}
.rst-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20,40,80,.12); }

.records-type-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.rtt-tab {
  height: 26px; padding: 0 10px; border-radius: 13px;
  font-size: 12px; color: var(--text-2);
  background: #f5f7fb;
}
.rtt-tab.active { background: var(--primary); color: #fff; font-weight: 600; }

/* 音乐/图片类型下的跳转按钮（音乐播放器 / 图片广场） */
.music-player-jump, .type-jump-btn {
  width: 100%; height: 32px; margin: 0 0 10px;
  border-radius: 16px;
  border: 1px solid #d6e4ff;
  font-size: 12px; font-weight: 600;
  color: var(--primary); background: #eef4ff;
  cursor: pointer;
}
.music-player-jump:hover, .type-jump-btn:hover { background: #e0ebff; }

.records-search { margin-bottom: 10px; }
.records-search input {
  width: 100%; height: 34px;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 0 14px;
  font-size: 13px;
  background: #f9fafc;
}
.records-search input:focus { border-color: var(--primary); background: #fff; }

.records-list { flex: 1 1 0; overflow-y: auto; min-height: 0; }

.record-item {
  display: flex; gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 6px;
}
.record-item:hover { background: #f7f9fd; }
.record-item.active { background: var(--primary-soft); border-color: #c9dbff; }

.record-thumb {
  width: 64px; height: 64px; border-radius: 8px;
  background: #eef1f7;
  overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-3);
  position: relative;
}
.record-thumb img, .record-thumb video { width: 100%; height: 100%; object-fit: cover; }

.record-info { flex: 1 1 0; min-width: 0; }
.record-line1 { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.record-type-tag {
  font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary);
  flex: none;
}
.record-type-tag--video { background: #f0e9ff; color: #6a3df0; }
.record-type-tag--gif { background: #e6f9ee; color: #15924f; }
.record-type-tag--music { background: #fff4e0; color: #b37400; }
.record-type-tag--html { background: #e0f2fe; color: #0369a1; }
.record-status { font-size: 11px; font-weight: 500; flex: none; }
.record-status.ok { color: var(--ok); }
.record-status.fail { color: var(--danger); }
.record-status.run { color: var(--run); }
.record-owner { font-size: 11px; color: var(--primary); flex: none; margin-left: 2px; }
.record-prompt {
  font-size: 12px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-height: 1.5;
  word-break: break-all;
}
/* 音乐记录：歌名一行加粗；歌词只显示一行，防止卡片被撑高 */
.record-song-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin: 2px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.record-item--music .record-prompt { -webkit-line-clamp: 1; }
.record-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.records-empty { text-align: center; color: var(--text-3); font-size: 12px; padding: 30px 0; }
.records-more {
  text-align: center; font-size: 12px; color: var(--text-3);
  padding: 10px 0 4px; font-weight: 500;
}

/* ================= 中栏·类型 ================= */
.media-type-group { display: flex; gap: 8px; flex-wrap: wrap; }
.media-btn {
  flex: 1 1 80px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  cursor: pointer;
  background: #fafbfe;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.media-btn i { font-style: normal; font-size: 18px; line-height: 1; }
.media-btn span { font-size: 12px; color: var(--text-2); font-weight: 500; }
.media-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.media-btn.active span { color: var(--primary); font-weight: 600; }
.media-btn--tip { opacity: .75; }
.media-btn--link { text-decoration: none; }
.media-btn--link:hover { border-color: var(--primary); background: var(--primary-soft); }
.media-btn--link:hover span { color: var(--primary); }

.mobile-only-tip {
  margin-top: 12px;
  font-size: 13px; color: #b37400;
  background: #fff8e8; border: 1px solid #ffe8b8;
  border-radius: 10px; padding: 10px 12px;
  line-height: 1.6;
}

/* ================= 中栏·参考图 ================= */
/* 标签行：标题+提示 / 历史按钮 */
.ref-head-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.ref-head-left { display: flex; align-items: baseline; gap: 8px; }
.ref-head-title { font-size: 15px; font-weight: 700; }
.ref-head-hint { font-size: 12px; color: var(--text-3); }

/* 浅蓝虚线描边按钮 */
.ref-hist-btn--outline {
  border: 1px dashed #7ea8ff; background: #f0f5ff;
  color: #4a7dff; border-radius: 999px;
  padding: 5px 14px; font-size: 12px; font-weight: 500;
  font-family: inherit; cursor: pointer; flex: none;
  transition: background .15s, border-color .15s;
}
.ref-hist-btn--outline:hover { background: #e4edff; border-color: #4a7dff; }

/* 已选参考图缩略图 + 上传按钮同一行 */
.ref-thumbs-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.ref-thumbs-grid:empty { display: none; }

.ref-upload-box {
  width: 88px; height: 70px; aspect-ratio: auto;
  border: 1px dashed #c3cede; border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text-3); cursor: pointer; background: #fafbfe;
  font-size: 12px; flex: none;
}
.ref-upload-box span:first-child { font-size: 18px; line-height: 1; }
.ref-upload-box:hover { border-color: var(--primary); color: var(--primary); }

.ref-thumb-cell {
  width: 88px; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  position: relative; background: #eef1f7; flex: none;
}
.ref-thumb-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-thumb-cell .thumb-del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; line-height: 20px; text-align: center;
  cursor: pointer;
}
.ref-thumb-cell.uploading { display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 12px; }

/* 历史参考图弹窗 */
.ref-hist-sheet { width: auto; max-width: none; max-height: none; display: flex; flex-direction: column; }
.ref-hist-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex: none;
}
.ref-hist-title { font-size: 15px; font-weight: 700; flex: none; }
.ref-hist-search {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 13px; font-family: inherit; outline: none;
}
.ref-hist-search:focus { border-color: var(--primary); }
.ref-hist-close {
  border: 0; background: transparent; font-size: 22px;
  color: var(--text-3); cursor: pointer; padding: 0 4px; flex: none;
}
.ref-hist-body {
  padding: 16px 18px; overflow-y: auto; flex: 1;
  display: flex; flex-wrap: wrap; gap: 18px 26px;
  align-content: flex-start; align-items: flex-start;
}
.ref-hist-body:empty::after {
  content: '还没有历史参考图，上传图片后会自动保存在这里';
  display: block; text-align: center; color: var(--text-3);
  font-size: 13px; padding: 40px 0;
}
.ref-hist-group { flex: none; max-width: 100%; }
/* 未分类独立成行 */
.ref-hist-group--uncat { width: 100%; }
/* 分类置顶📌按钮（标题旁，淡灰→置顶后蓝底高亮） */
.ref-top-btn {
  background: none; border: 0; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 2px 5px; margin-left: 6px;
  border-radius: 6px; opacity: .3; filter: grayscale(1);
  vertical-align: 1px;
}
.ref-top-btn:hover { opacity: .7; }
.ref-top-btn.active { opacity: 1; filter: none; background: var(--primary-soft); }
.ref-hist-group h4 { font-size: 13px; color: var(--text); margin: 0 0 8px; font-weight: 600; }
.ref-hist-group h4 span { color: var(--text-3); font-weight: 400; }
.ref-hist-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.ref-hist-thumb {
  width: 96px; height: 96px; border-radius: 12px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; position: relative;
  flex: none; transition: .18s; background: #eef1f7;
}
.ref-hist-thumb:hover { border-color: var(--primary); transform: scale(1.03); }
.ref-hist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-hist-thumb .ref-edit-btn {
  position: absolute; right: 4px; top: 4px;
  width: 22px; height: 22px; border-radius: 7px; border: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
  line-height: 1; cursor: pointer; display: none;
  align-items: center; justify-content: center; padding: 0;
}
.ref-hist-thumb:hover .ref-edit-btn { display: flex; }
.ref-hist-thumb .ref-edit-btn:hover { background: var(--primary); }
.ref-hist-thumb .ref-time {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; padding: 2px 4px; text-align: center;
}
/* 企业图库角标（左上角蓝色「企」） */
.ref-hist-thumb .ref-company-badge {
  position: absolute; left: 4px; top: 4px;
  min-width: 20px; height: 20px; border-radius: 6px; padding: 0 4px;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* 参考图编辑弹窗 */
.ref-edit-sheet { width: auto; max-width: none; max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.ref-edit-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex: none;
}
.ref-edit-head span { font-size: 15px; font-weight: 700; }
.ref-edit-body { padding: 16px 18px; overflow-y: auto; flex: 1; display: flex; gap: 18px; align-items: flex-start; }
.ref-edit-imgcol { flex: none; width: 280px; min-width: 0; }
.ref-edit-imgcol img { width: 100%; max-height: 400px; object-fit: contain; border-radius: 12px; border: 1px solid var(--border); background: #fafbff; display: block; }
.ref-edit-formcol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ref-edit-label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.ref-edit-formcol input[type=text] {
  width: 100%; border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 11px; font-size: 14px; font-family: inherit;
  color: var(--text); background: #fff; outline: none; margin-bottom: 12px;
}
.ref-edit-formcol input[type=text]:focus { border-color: var(--primary); }
/* 企业图库开关行（编辑弹窗，仅管理员可见） */
.ref-edit-company-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--primary-soft); border: 1px solid #cfdefc;
  border-radius: 9px; padding: 9px 11px;
  font-size: 13px; color: var(--text); cursor: pointer;
  user-select: none;
}
.ref-edit-company-row input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.ref-edit-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex: none; }
.btn-danger-sm { border: 1px solid #f5c6c0; background: #fdf2f0; color: #d9483a; border-radius: 8px; padding: 7px 16px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.btn-danger-sm:hover { background: #fce8e6; }
.btn-primary-sm { border: 0; background: var(--primary); color: #fff; border-radius: 8px; padding: 7px 20px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.btn-primary-sm:hover { opacity: .9; }

/* 上传缩略图（主体弹窗用） */
.upload-thumb {
  aspect-ratio: 1;
  border: 1px dashed #c3cede;
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  color: var(--text-3);
  cursor: pointer;
  background: #fafbfe;
  font-size: 12px;
}
.upload-thumb span:first-child { font-size: 22px; line-height: 1; }
.upload-thumb:hover { border-color: var(--primary); color: var(--primary); }
.upload-thumb--sm { width: 72px; }

/* 参考图缩略图（复用） */
.image-thumb {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  position: relative; background: #eef1f7;
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-thumb .thumb-del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; line-height: 20px; text-align: center;
  cursor: pointer;
}
.image-thumb.uploading { display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 12px; }

/* ================= 中栏·提示词 ================= */
/* 标题边短提示：怎么结合参考图（胶囊样式） */
.prompt-inline-tip {
  font-size: 12px; color: #b37400; font-weight: 600;
  background: #fff8e8; border: 1px solid #ffe8b8;
  height: 26px; line-height: 24px; padding: 0 12px; border-radius: 999px;
  max-width: 75%; flex: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.prompt-wrapper { position: relative; }
#promptInput {
  width: 100%; min-height: 120px; max-height: 360px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px; line-height: 1.7;
  resize: none;          /* 高度由内容自动撑开，禁止手动拖拽 */
  overflow-y: auto;
  background: #fafbfe;
}
#promptInput:focus { border-color: var(--primary); background: #fff; }
.char-counter { position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: var(--text-3); }

/* 提示词标题行：左「提示词」/ 中胶囊提示 / 右放大按钮 */
.panel-label--prompt { position: relative; justify-content: flex-start; }
.panel-label--prompt .prompt-label-text { flex: none; }
.panel-label--prompt .prompt-inline-tip {
  position: absolute; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 160px);
}
.prompt-zoom-btn {
  flex: none; margin-left: auto;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 3px 12px;
  font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.prompt-zoom-btn:hover { border-color: var(--primary); color: var(--primary); background: #f5f8ff; }

/* 提示词放大编辑弹窗（需比 .modal-sheet 特异性高，否则定位被基础样式覆盖） */
.modal-sheet.prompt-zoom-sheet {
  left: 50%; right: auto; top: 50%; bottom: auto;
  transform: translate(-50%, -50%);
  width: 65vw; height: 65vh;
  max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.prompt-zoom-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex: none; }
.prompt-zoom-title { font-size: 16px; font-weight: 700; }
/* 弹窗内参考图行（点击插入 [参考图N]），无参考图时隐藏 */
.prompt-zoom-refs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; flex: none; align-items: center; }
.prompt-zoom-refs:empty { display: none; }
.pz-ref-tip { flex: none; font-size: 12px; color: var(--text-3); line-height: 1.5; padding-left: 2px; }
.pz-ref {
  position: relative; flex: none; width: 56px; height: 56px;
  border-radius: 8px; overflow: visible; cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.pz-ref img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.pz-ref:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(64,110,255,.15); }
.pz-ref .pz-ref-no {
  position: absolute; left: 0; bottom: 0;
  background: rgba(20,30,60,.72); color: #fff;
  font-size: 10px; line-height: 1; padding: 2px 5px;
  border-radius: 0 6px 0 8px; pointer-events: none;
}
#promptZoomInput {
  flex: 1; min-height: 0;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; font-size: 15px; line-height: 1.8; font-family: inherit;
  resize: none; overflow-y: auto;
  background: #fafbfe;
}
#promptZoomInput:focus { border-color: var(--primary); background: #fff; outline: none; }
.prompt-zoom-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex: none; }
.prompt-zoom-foot .btn-cancel, .prompt-zoom-foot .btn-confirm { flex: none; width: 110px; }
.prompt-zoom-count { font-size: 12px; color: var(--text-3); }

/* ================= 中栏·比例 ================= */
.ratio-tabs { display: inline-flex; gap: 8px; margin-left: 22px; margin-right: auto; }
.ratio-tab {
  border: 1px solid var(--border); background: #fff;
  color: var(--text-2); border-radius: 999px;
  padding: 4px 14px; font-size: 12px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.ratio-tab:hover { border-color: var(--primary); color: var(--primary); }
.ratio-tab.active {
  border-color: var(--primary); background: var(--primary-soft);
  color: var(--primary); font-weight: 600;
}
.ratio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
/* 自定义长宽（cm）：填完按比例自动匹配最近的标准画面比例 */
.ratio-custom { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.ratio-custom input {
  width: 54px; height: 28px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0 8px; font-size: 12px; text-align: center;
  background: #fafbfe;
  -webkit-appearance: none; -moz-appearance: textfield; appearance: none;
}
.ratio-custom input::-webkit-outer-spin-button,
.ratio-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ratio-custom input:focus { border-color: var(--primary); background: #fff; }
.ratio-custom i { font-style: normal; font-size: 12px; color: var(--text-3); }
.ratio-custom em { font-style: normal; font-size: 11px; color: var(--text-3); }
.ratio-custom-hint {
  margin-top: 8px;
  background: #fff8e8; border: 1px solid #ffe8b8; border-radius: 8px;
  padding: 5px 10px; font-size: 11px; color: #b37400; line-height: 1.45;
}
/* 生成张数/视频时长卡片内的实时扣款金额（淡红色） */
.duration-price { color: #e57373; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
/* 参考图来源三选一弹窗 */
.ref-src-sheet { width: 340px; max-width: calc(100vw - 60px); padding: 20px 18px 14px; }
.ref-src-title { font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.ref-src-item {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 14px; margin-bottom: 10px;
  background: #f7f9fd; border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--text); text-align: left;
  transition: all .15s;
}
.ref-src-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.ref-src-item span { font-size: 12px; color: var(--text-3); font-weight: 400; }
.ref-src-cancel {
  width: 100%; height: 38px; border-radius: 19px; font-size: 14px; font-weight: 600;
  background: #f5f7fb; color: var(--text-2); margin-top: 4px;
}
.ref-src-cancel:hover { background: #eef1f8; }
/* 未选画面比例时的闪烁提醒 */
@keyframes ratioPanelAlert {
  0%, 100% { border-color: var(--border); box-shadow: none; }
  25%, 75% { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229,72,77,.15); }
}
.ratio-panel--alert { animation: ratioPanelAlert .45s ease 3; }
.ratio-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  background: #fafbfe;
  user-select: none;
}
.ratio-item.active { border-color: var(--primary); background: var(--primary-soft); }
.ratio-icon { border: 1.5px solid var(--text-3); border-radius: 3px; display: block; }
.ratio-item.active .ratio-icon { border-color: var(--primary); }
.ratio-name { font-size: 12px; color: var(--text-2); font-weight: 500; }
.ratio-item.active .ratio-name { color: var(--primary); font-weight: 600; }

/* ================= 中栏·chips（模型/画质/时长） ================= */
.chip-scroll { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-scroll + .chip-scroll { margin-top: 8px; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 17px;
  background: #f5f7fb; color: var(--text-2);
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
}
.chip.active { background: var(--primary); color: #fff; font-weight: 600; }
.chip .q-economy {
  font-size: 10px; font-weight: 600;
  background: #ff9800; color: #fff;
  border-radius: 7px; padding: 1px 5px;
}
.chip.active .q-economy { background: rgba(255,255,255,.25); }

/* 模型 + 时长/张数 左右分卡片 */
.model-duration-row {
  display: flex; gap: 14px; align-items: stretch;
}
.model-duration-row > .panel { margin-bottom: 0; }
#modelPanel { flex: 6; min-width: 0; }
#durationPanel { flex: 3; min-width: 0; }

.chip-scroll--sm { gap: 6px; }
.chip-scroll--sm .chip {
  height: 28px; padding: 0 10px; border-radius: 14px;
  font-size: 12px; gap: 4px;
}

/* ================= 中栏·生成按钮 ================= */
.draft-edit-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff8e8; border: 1px solid #ffe8b8;
  border-radius: 10px; padding: 8px 14px;
  font-size: 13px; color: #b37400; font-weight: 500;
}
.draft-edit-banner button { color: var(--primary); font-size: 13px; font-weight: 600; }

.action-row {
  display: flex; gap: 10px;
  flex: none;                 /* 底部固定，不被压缩 */
  background: var(--bg);
  padding: 0;
}
.generate-btn {
  flex: 1;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f6bff, #6a3df0);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 14px rgba(47,107,255,.3);
}
.generate-btn:hover { filter: brightness(1.06); }
.generate-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.generate-btn-main { font-size: 16px; font-weight: 700; }
.generate-btn-info { font-size: 11px; opacity: .85; font-weight: 400; }
.save-draft-btn {
  width: 110px; height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2); font-size: 14px; font-weight: 500;
}
.save-draft-btn:hover { border-color: var(--primary); color: var(--primary); }
/* 直接生成（跳过 AI 润色）：尺寸同保存草稿，绿底区分于蓝色主按钮 */
.direct-gen-btn {
  width: 110px; height: 52px; flex: none;
  border-radius: 12px; border: 0;
  background: linear-gradient(135deg, #12b76a, #0e9f6e);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 14px rgba(18,183,106,.28);
}
.direct-gen-btn:hover { filter: brightness(1.06); }
.direct-gen-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.direct-gen-main { font-size: 14px; font-weight: 600; }
.direct-gen-info { font-size: 11px; opacity: .85; font-weight: 400; }
.direct-gen-info:empty { display: none; }

/* ================= 右栏·结果区 ================= */
.result-panel {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-head .result-status { margin-left: auto; }
.result-title { font-size: 15px; font-weight: 700; }
.result-status { font-size: 12px; font-weight: 600; }
.result-status.ok { color: var(--ok); }
.result-status.fail { color: var(--danger); }
.result-status.run { color: var(--run); }

/* ================= 左右栏收起/展开 ================= */
/* 图标（图二风格：圆角方框 + 内侧竖线，CSS 绘制） */
.right-collapse-btn i, .right-expand-bar i,
.left-collapse-btn i, .left-expand-bar i {
  width: 14px; height: 14px; display: block; position: relative;
  border: 1.6px solid var(--text-3); border-radius: 4px;
}
.right-collapse-btn i::before, .right-expand-bar i::before,
.left-collapse-btn i::before, .left-expand-bar i::before {
  content: ''; position: absolute; top: 1.5px; bottom: 1.5px;
  width: 1.6px; border-radius: 1px; background: var(--text-3);
}
.right-collapse-btn i::before, .left-expand-bar i::before { right: 2.5px; }  /* 收起右栏/展开左栏：竖线靠右 */
.right-expand-bar i::before, .left-collapse-btn i::before { left: 2.5px; }   /* 展开右栏/收起左栏：竖线靠左 */
.right-collapse-btn, .left-collapse-btn {
  flex: none; width: 26px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border-radius: 7px;
}
.right-collapse-btn:hover, .left-collapse-btn:hover { background: var(--primary-soft); }
.right-collapse-btn:hover i, .right-expand-bar:hover i,
.left-collapse-btn:hover i, .left-expand-bar:hover i { border-color: var(--primary); }
.right-collapse-btn:hover i::before, .right-expand-bar:hover i::before,
.left-collapse-btn:hover i::before, .left-expand-bar:hover i::before { background: var(--primary); }
/* 品牌条文字占满中间，把收起按钮推到最右 */
.brand-bar .brand-text { flex: 1; min-width: 0; }
/* 收起后的窄展开条（默认隐藏） */
.right-expand-bar, .left-expand-bar {
  display: none; flex: 1 1 0; width: 46px; padding: 14px 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  align-items: flex-start; justify-content: center;
}
.right-expand-bar:hover, .left-expand-bar:hover { border-color: var(--primary); }
.col-right.collapsed, .col-left.collapsed { flex: none; width: 46px; min-width: 0; }
.col-right.collapsed .result-panel { display: none; }
.col-left.collapsed .brand-bar,
.col-left.collapsed .records-panel,
.col-left.collapsed .account-bar { display: none; }
.col-right.collapsed .right-expand-bar,
.col-left.collapsed .left-expand-bar { display: flex; }
/* 单侧收起：中栏 48vw；双侧收起：中栏不限宽占满 */
body.right-collapsed .col-mid,
body.left-collapsed .col-mid { max-width: 48vw; }
body.right-collapsed.left-collapsed .col-mid { max-width: none; }
/* 右栏收起时左栏改弹性（不小于原 300px）；左栏自身已收起时除外 */
body.right-collapsed .col-left:not(.collapsed) { flex: 1 1 0; width: auto; min-width: 300px; }

.result-meta { font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.8; }
.result-meta:empty { display: none; }
.result-meta .meta-tag {
  display: inline-block;
  background: #f5f7fb; border-radius: 9px;
  padding: 1px 8px; margin: 0 6px 4px 0;
  color: var(--text-2);
}
.result-prompt {
  font-size: 13px; color: var(--text-2); line-height: 1.7;
  margin-top: 10px;
  max-height: 96px; overflow-y: auto;
  background: #fafbfe; border-radius: 8px; padding: 10px 12px;
  white-space: pre-wrap; word-break: break-all;
}
.result-prompt:empty { display: none; }
/* 音乐任务：prompt 即歌词，给足展示高度 */
.result-prompt.is-lyric { max-height: 300px; font-size: 13.5px; line-height: 1.9; }
.result-fail {
  margin-top: 10px; font-size: 13px; color: var(--danger);
  background: #fdf0f0; border-radius: 8px; padding: 10px 12px;
}

.result-grid {
  flex: 1 1 0;
  overflow-y: auto;
  min-height: 0;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  align-content: start;
}
.result-card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #eef1f7;
  cursor: pointer;
  aspect-ratio: 1;
}
.result-card img, .result-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 音乐卡片：封面在上、歌名居中、播放器固定在卡片最下方 */
.result-card.is-music {
  aspect-ratio: auto; cursor: default;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border);
}
.result-card.is-music .music-card-cover {
  position: relative; width: 100%; aspect-ratio: 1;
  background: linear-gradient(160deg, #eef1fb, #e6ebf7);
  display: flex; align-items: center; justify-content: center;
}
.result-card.is-music .music-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.result-card.is-music .music-card-note { font-size: 44px; opacity: .8; }
.result-card.is-music .music-card-name {
  padding: 8px 10px 0; font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-card.is-music .music-card-audio {
  width: 100%; box-sizing: border-box; display: block;
  padding: 8px 10px 10px; margin-top: auto;
}

/* 音乐任务成品详情：左歌曲 / 右歌词 两栏 */
.music-detail {
  grid-column: 1 / -1;
  display: flex; gap: 16px;
  flex: 1; min-height: 460px;
}
.music-detail-songs {
  width: 260px; flex: none;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto; min-height: 0; padding-right: 2px;
}
.music-song-row {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; flex: none; gap: 8px;
}
.music-song-cover {
  width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: linear-gradient(160deg, #eef1fb, #e6ebf7);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.music-song-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.music-song-cover .music-card-note { font-size: 40px; opacity: .8; }
.music-song-name-line { display: flex; align-items: center; gap: 6px; }
.music-song-name {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-song-edit {
  flex: none; border: 0; background: none; cursor: pointer;
  font-size: 13px; color: var(--text-3); padding: 2px 4px; border-radius: 6px;
}
.music-song-edit:hover { background: #f0f3f8; color: var(--text); }
.music-song-audio { width: 100%; display: block; }
.music-song-rename { display: flex; gap: 6px; align-items: center; }
.music-song-input {
  flex: 1; min-width: 0; border: 1px solid var(--primary); border-radius: 8px;
  padding: 6px 8px; font-size: 13px; font-family: inherit;
}
.music-song-save, .music-song-cancel {
  flex: none; border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.music-song-save { border: 0; background: var(--primary); color: #fff; }
.music-song-save:disabled { opacity: .6; }
.music-song-cancel { border: 1px solid var(--border); background: #fff; color: var(--text-2); }

.music-detail-lyric {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: #fafbfe; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
  min-height: 0;
}
.music-detail-lyric-head { font-size: 13px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; flex: none; }
.music-detail-lyric-body {
  flex: 1; margin: 0; overflow-y: auto; min-height: 0;
  font-family: inherit; font-size: 14px; line-height: 2; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}

/* 音乐成品·歌词面板下方「音乐播放器」入口 */
.music-detail-player-jump {
  flex: none; margin-top: 10px;
  display: block; height: 34px; line-height: 34px; text-align: center;
  border-radius: 17px; border: 1px solid #d6e4ff;
  background: #eef4ff; color: var(--primary);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.music-detail-player-jump:hover { background: #e0ebff; }

/* 已完成标签（并入 meta 行） */
.meta-tag--done { color: #1a9e5c; background: #eaf8f0; border-color: #c9ecd9; }

/* 分享按钮 */
.share-entry-btn {
  border: 1px solid #ffd9b8; background: linear-gradient(135deg, #fff3e8, #ffe7d4);
  color: #e0641f; border-radius: 999px; padding: 5px 14px;
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.share-entry-btn:hover { background: linear-gradient(135deg, #ffe9d4, #ffdcc2); }
.music-share-btn { width: 100%; padding: 11px 0; font-size: 14px; margin-top: 2px; }

/* 分享二维码弹窗 */
.share-qr-sheet { width: 340px; max-width: 92vw; text-align: center; }
.share-qr-box {
  width: 220px; height: 220px; margin: 14px auto 10px;
  display: flex; align-items: center; justify-content: center;
}
.share-qr-box img, .share-qr-box canvas { display: block; }
.share-qr-tip { font-size: 14px; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.share-qr-url {
  font-size: 11px; color: var(--text-3); line-height: 1.5;
  word-break: break-all; background: #f5f7fb; border-radius: 8px; padding: 8px 10px;
  margin-bottom: 14px; max-height: 54px; overflow: hidden;
}
.result-card .result-hover {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,16,30,.72), rgba(10,16,30,0) 55%);
  opacity: 0;
  transition: opacity .18s;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 10px;
  gap: 6px; flex-wrap: wrap;
}
.result-card:hover .result-hover { opacity: 1; }
.result-op {
  height: 28px; padding: 0 10px; border-radius: 14px;
  background: rgba(255,255,255,.94); color: var(--text);
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.result-op:hover { background: #fff; }
.result-card .play-badge {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.result-empty {
  flex: 1 1 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 13px; text-align: center; line-height: 1.8;
}
.result-actions { display: flex; gap: 10px; margin-top: 12px; }
.result-op-btn {
  flex: 1; height: 38px; border-radius: 19px;
  background: #f5f7fb; color: var(--text-2);
  font-size: 13px; font-weight: 500;
}
.result-op-btn:hover { background: #eceff6; color: var(--text); }
.result-op-btn--danger:hover { background: #fdf0f0; color: var(--danger); }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  display: none;
  z-index: 100;
}
.modal-mask.show { display: block; }
.modal-sheet {
  position: absolute;
  right: 14px; top: 14px; bottom: 14px;
  left: calc(14px + 300px + 14px + 600px + 14px);
  max-width: none; max-height: none;
  overflow-y: auto;
  background: #fff; border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(10,20,50,.25);
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.modal-field input {
  width: 100%; height: 40px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0 12px; font-size: 14px;
}
.modal-field input:focus { border-color: var(--primary); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn-cancel, .btn-confirm {
  flex: 1; height: 42px; border-radius: 21px;
  font-size: 14px; font-weight: 600;
}
.btn-cancel { background: #f5f7fb; color: var(--text-2); }
.btn-cancel:hover { background: #eceff6; }
.btn-confirm { background: linear-gradient(135deg, #2f6bff, #6a3df0); color: #fff; }
.btn-confirm:hover { filter: brightness(1.06); }
.btn-confirm:disabled { opacity: .5; cursor: not-allowed; }

/* 登录 */
.login-tip { font-size: 13px; color: var(--text-3); margin-bottom: 16px; line-height: 1.6; }
.login-field {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 0 12px; height: 44px;
  margin-bottom: 12px;
}
.login-field:focus-within { border-color: var(--primary); }
.login-prefix { font-size: 14px; color: var(--text-2); font-weight: 500; }
.login-field input { flex: 1; border: none; height: 100%; font-size: 14px; background: transparent; }
.login-code-btn {
  flex: none; font-size: 13px; font-weight: 600; color: var(--primary);
  height: 30px; padding: 0 10px; border-radius: 15px;
}
.login-code-btn:disabled { color: var(--text-3); }
.login-submit-btn {
  width: 100%; height: 44px; border-radius: 22px;
  background: linear-gradient(135deg, #2f6bff, #6a3df0);
  color: #fff; font-size: 15px; font-weight: 700;
  margin-top: 4px;
}
.login-submit-btn:disabled { opacity: .5; }
.login-cancel-btn {
  width: 100%; height: 40px; border-radius: 20px;
  background: #f5f7fb; color: var(--text-2);
  font-size: 14px; font-weight: 500; margin-top: 10px;
}

/* 确认生成 */
.confirm-scroll { max-height: 50vh; overflow-y: auto; }
.confirm-row { display: flex; font-size: 13px; margin-bottom: 10px; line-height: 1.6; }
.confirm-row .k { width: 72px; flex: none; color: var(--text-3); }
.confirm-row .v { flex: 1; color: var(--text); font-weight: 500; word-break: break-all; }
.confirm-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.confirm-imgs img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.confirm-prompt {
  font-size: 13px; line-height: 1.7; color: var(--text-2);
  background: #fafbfe; border-radius: 8px; padding: 10px 12px;
  white-space: pre-wrap; word-break: break-all;
  max-height: 140px; overflow-y: auto;
  margin-bottom: 10px;
}
.confirm-price { font-size: 15px; font-weight: 700; color: var(--primary); }
.confirm-price.warn { color: var(--danger); }
/* 确认弹窗内可临时切换的参数 chips */
.confirm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip {
  appearance: none; border: 1px solid #e3e8f3; background: #fff; color: var(--text-2);
  font-size: 12px; line-height: 1; padding: 5px 10px; border-radius: 999px;
  cursor: pointer; font-weight: 500; font-family: inherit;
}
.cchip:hover { border-color: var(--primary); color: var(--primary); }
.cchip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 主体上传 */
/* subject modal removed */

/* 视频 / 图片预览弹层 */
.video-overlay, .imgview-overlay {
  position: fixed; inset: 0;
  background: rgba(8,12,24,.88);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
}
.video-overlay.show, .imgview-overlay.show { display: flex; }
.video-overlay video { max-width: 88vw; max-height: 88vh; border-radius: 10px; background: #000; }
.imgview-overlay img { max-width: 92vw; max-height: 92vh; border-radius: 10px; }
.video-close {
  position: fixed; top: 20px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 22px; line-height: 1;
}
.video-close:hover { background: rgba(255,255,255,.28); }

/* ================= 响应式 ================= */
@media (max-width: 1180px) {
  .col-left { width: 260px; }
}
@media (max-width: 1024px) {
  .col-right { display: none; }
  .col-mid { max-width: none; }
}

/* ================= 音乐创作弹窗 ================= */
.modal-sheet--music { width: auto; max-width: none; max-height: none; display: flex; flex-direction: column; }
.music-modal-head { display: flex; align-items: center; justify-content: space-between; }
.music-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: #f0f3f8; color: var(--text-2);
  font-size: 18px; line-height: 1; flex: none;
}
.music-modal-close:hover { background: #e4e9f2; }
.music-steps { display: flex; gap: 8px; margin: 10px 0 14px; }
.music-step-dot {
  font-size: 12px; color: var(--text-3);
  background: #f5f7fb; border-radius: 999px; padding: 4px 12px;
}
.music-step-dot.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.music-modal-body { overflow-y: auto; flex: 1; min-height: 0; }
.music-step.hidden, .music-player.hidden, .music-version-row.hidden { display: none; }

/* ================= 提示词澄清弹窗 ================= */
.modal-sheet--refine { width: auto; max-width: none; max-height: none; display: flex; flex-direction: column; }
.modal-sheet--refine .modal-title { display: flex; align-items: center; justify-content: space-between; }

.refine-origin {
  background: #f7f9fd; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px;
}
.refine-origin-label { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.refine-origin-text {
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.refine-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 0; gap: 14px;
}
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid #e3e9f5; border-top-color: var(--primary);
  animation: refineSpin 0.8s linear infinite;
}
@keyframes refineSpin { to { transform: rotate(360deg); } }
.refine-loading-text { font-size: 13px; color: var(--text-3); }

.refine-questions { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.refine-q-item {
  background: #f7f9fd; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
}
.refine-q-text { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 10px; }
.refine-q-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.refine-q-opt {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  background: #fff; border: 1px solid var(--border); color: var(--text-2);
  cursor: pointer; transition: all .15s;
}
.refine-q-opt:hover { border-color: var(--primary); color: var(--primary); }
.refine-q-opt.active {
  background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600;
}
.refine-q-custom {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px;
  font-size: 13px; outline: none; font-family: inherit;
}
.refine-q-custom:focus { border-color: var(--primary); }
.refine-q-custom::placeholder { color: #b3bdcd; }
.refine-q-confirmed { background: #f0faf4; border-color: #c9ecd8; }
.refine-q-confirmed-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13px; color: var(--text-2); padding: 4px 0;
}
.refine-q-confirmed-row b { color: var(--ok); font-weight: 600; flex: none; max-width: 60%; text-align: right; }

.refine-compare { display: flex; gap: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.refine-compare-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.refine-compare-label { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.refine-edit-tip { font-weight: 400; color: #b3bdcd; }
.refine-compare-text {
  background: #f7f9fd; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: var(--text-2); line-height: 1.7;
  flex: 1; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
}
.refine-compare-textarea {
  width: 100%; box-sizing: border-box; flex: 1;
  border: 1px solid var(--primary); border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: var(--text-1); line-height: 1.7; outline: none;
  font-family: inherit; resize: none; background: #fff;
}
.refine-compare-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(64,120,255,.12); }


.music-textarea {
  width: 100%; box-sizing: border-box; min-height: 96px;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 14px;
  line-height: 1.6; color: var(--text); font-family: inherit; background: #fafbfd; resize: vertical;
}
.music-textarea:focus { border-color: var(--primary); background: #fff; outline: none; }
#musicLyricInput { min-height: 240px; }
.music-grid { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.music-field { margin-bottom: 10px; }
.music-field--full { grid-column: 1 / -1; }
.music-field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.music-field select, .music-field input[type=text] {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--text);
  font-family: inherit; background: #fafbfd;
}
.music-field select:focus, .music-field input[type=text]:focus { border-color: var(--primary); background: #fff; outline: none; }
.music-dur-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; box-sizing: border-box;
  height: 6px; border-radius: 3px; background: #e6ebf7; outline: none; margin: 12px 0 4px; padding: 0; border: 0;
}
.music-dur-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #4b7bff; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(75,123,255,.4); cursor: pointer;
}
.music-dur-range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #4b7bff; border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(75,123,255,.4); cursor: pointer;
}
#musicDurLabel { color: #4b7bff; font-weight: 600; }

.music-primary-btn {
  display: block; width: 100%; margin-top: 14px; padding: 13px 0; border: 0; border-radius: 999px;
  color: #fff; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  background: linear-gradient(90deg, #6a8bff, #4b7bff 55%, #8b5cf6);
  box-shadow: 0 6px 16px rgba(75, 123, 255, .26);
}
.music-primary-btn:disabled { opacity: .6; cursor: default; }
.music-ghost-btn {
  flex: 1; margin-top: 10px; padding: 11px 0; border: 1px solid var(--border); background: #fff;
  color: var(--text-2); border-radius: 999px; font-size: 14px; font-family: inherit; cursor: pointer;
}
.music-ghost-btn:disabled { opacity: .55; cursor: default; }
.music-btn-row { display: flex; gap: 10px; }
.music-new-flow-btn { width: 100%; }

.music-version-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.music-version-chip {
  border: 1px solid #dbe3f0; background: #f7f9fd; color: #67788f;
  border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer;
}
.music-version-chip.active { background: #eaf0ff; border-color: #8ea9ff; color: #3b5bdb; font-weight: 600; }
.music-dur { font-size: 12px; color: var(--text-3); margin: 6px 0 0; }
.music-dur:empty { display: none; }
.music-progress { height: 6px; border-radius: 999px; background: #eef1f6; overflow: hidden; margin-bottom: 12px; }
.music-progress-bar {
  width: 0; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #6a8bff, #8b5cf6); transition: width .4s;
}
.music-loading { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #67788f; padding: 6px 0 2px; }
.music-spin {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid #dbe3f0; border-top-color: #4f7cff;
  animation: musicSpin .8s linear infinite;
}
@keyframes musicSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.music-player audio { width: 100%; display: block; }
.music-cover-box {
  position: relative; width: 220px; max-width: 60%; aspect-ratio: 1;
  margin: 4px auto 14px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, #eef1fb, #e2e8f5);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(60, 80, 140, .18);
}
.music-cover-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.music-cover-box .music-cover-fallback { font-size: 56px; opacity: .8; }

.music-history-list { max-height: 55vh; overflow-y: auto; }
.music-hist-row { border-bottom: 1px solid #f0f3f8; padding: 10px 0; }
.music-hist-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.music-hist-meta { font-size: 12px; color: var(--text-3); margin-bottom: 8px; line-height: 1.5; }
.music-hist-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.music-hist-chip {
  border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 999px;
  padding: 6px 14px; font-size: 12px; font-family: inherit; cursor: pointer;
}
.music-hist-chip.danger { color: #d94444; border-color: #f6d6d6; }

.music-ask-flow { margin-top: 4px; }
.music-ask-tip { font-size: 13px; color: var(--text-3); padding: 10px 0; }
.music-ask-item { margin-bottom: 14px; }
.music-ask-q {
  background: #f2f5fc; border: 1px solid #e2e9f7; border-radius: 4px 12px 12px 12px;
  padding: 10px 12px; font-size: 14px; line-height: 1.6; color: var(--text); margin-bottom: 8px;
  word-break: break-word;
}
.music-ask-no { color: #4b7bff; font-weight: 600; margin-right: 4px; }
.music-ask-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.music-ask-opt {
  border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-family: inherit; line-height: 1.2; cursor: pointer;
}
.music-ask-opt.active { border-color: #4b7bff; color: #4b7bff; background: #eef3ff; font-weight: 600; }
.music-ask-input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; font-size: 14px; color: var(--text); font-family: inherit; background: #fafbfd;
}
.music-ask-input:focus { border-color: var(--primary); background: #fff; outline: none; }
.music-ask-done {
  background: #f7f9fd; border: 1px dashed #dfe6f2; border-radius: 12px;
  padding: 9px 12px; font-size: 12px; color: #67788f; line-height: 1.7; margin-bottom: 14px;
  word-break: break-word;
}
.music-ask-done b { color: #4b7bff; font-weight: 600; }
