:root {
  --bg: #0a0c11;
  --panel: #11151d;
  --panel-2: #161b25;
  --line: #232b3a;
  --text: #e7ebf3;
  --muted: #8b95a7;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --err: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(800px 480px at 92% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 14px/1.55 "Segoe UI", "Microsoft YaHei UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 28px 14px;
}

.brand { display: flex; align-items: center; gap: 14px; }

.logo {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0c11;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
  position: relative;
  overflow: hidden;
}

/* 图标内不放任何文字/符号，只保留渐变底色 */

.brand-text h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2.5px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  background: linear-gradient(100deg, #ffffff 10%, #c9c2ff 55%, #8fe6f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 登录/找回密码页的标题是纯文字，保持可读的浅色 */
.auth-card .brand-text h1 {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
}
.brand-text p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

.provider-picker { display: flex; align-items: center; gap: 10px; }
.provider-picker label { font-size: 12px; color: var(--muted); }

select, input, textarea, button { font: inherit; color: inherit; }

select, input[type="text"] {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus, input:focus, textarea:focus {
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
}
#provider { min-width: 210px; }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 28px 40px;
  align-items: start;
}

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

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)) , var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.composer { position: sticky; top: 18px; }
@media (max-width: 960px) { .composer { position: static; } }

.panel-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- dropzone ---------- */
.dropzone {
  position: relative;
  border: 1.5px dashed #2c3546;
  border-radius: 12px;
  min-height: 148px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
}
.dropzone:hover, .dropzone:focus-visible { border-color: rgba(124, 92, 255, 0.6); background: rgba(124, 92, 255, 0.05); outline: none; }
.dropzone.drag { border-color: var(--accent-2); background: rgba(34, 211, 238, 0.08); }

.dz-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); padding: 24px;
}
.dz-empty strong { color: var(--text); font-weight: 600; }
.dz-empty span { font-size: 12px; }

.dz-preview { position: relative; width: 100%; height: 100%; }
.dz-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; background: #05070a; }
.dz-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(8, 10, 16, 0.62);
  color: var(--text); font-size: 13px;
  backdrop-filter: blur(2px);
  transition: opacity 0.2s;
}
.dz-overlay[hidden] { display: none; }
#remove-img { position: absolute; top: 8px; right: 8px; }

/* ---------- fields ---------- */
.field { display: block; margin-top: 16px; }
.field > span {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.field em { font-style: normal; font-size: 11px; opacity: 0.7; }

textarea {
  width: 100%;
  resize: vertical;
  min-height: 128px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.params { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.params:empty { display: none; }
.param { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); flex: 1 1 130px; }
.param select, .param input { width: 100%; }

/* ---------- buttons ---------- */
.primary {
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #0a0c11;
  background: linear-gradient(135deg, #a58bff, var(--accent) 45%, var(--accent-2));
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.28);
}
.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(124, 92, 255, 0.36); }
.primary:active:not(:disabled) { transform: translateY(0); }
.primary:disabled { filter: grayscale(0.5) brightness(0.8); cursor: not-allowed; box-shadow: none; }

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ghost:hover { color: var(--text); border-color: #38445c; background: rgba(255, 255, 255, 0.04); }
.ghost.tiny { padding: 5px 10px; font-size: 12px; }

.hint { margin: 12px 0 0; font-size: 11.5px; color: #66708a; }

/* ---------- jobs ---------- */
.jobs { min-height: 420px; }
.jobs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.jobs-head .panel-title { margin: 0; }
.count {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 20px; padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.job-list { display: flex; flex-direction: column; gap: 12px; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 320px; color: #5c6579; font-size: 13px;
}
.empty small { font-size: 11.5px; opacity: 0.75; }

.job {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.014);
  padding: 14px;
  transition: border-color 0.2s;
}
.job[data-status="running"] { border-color: rgba(124, 92, 255, 0.4); }
.job[data-status="error"] { border-color: rgba(248, 113, 113, 0.35); }
.job[data-status="done"] { border-color: rgba(52, 211, 153, 0.28); }

.job-top { display: flex; gap: 14px; }

.thumb {
  width: 78px; height: 78px; flex: 0 0 78px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
  color: #3d4759; font-size: 11px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.job-main { flex: 1; min-width: 0; }
.job-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.pill {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel-2);
  white-space: nowrap;
}
.pill.queued { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.pill.running { color: #b9a5ff; border-color: rgba(124, 92, 255, 0.4); background: rgba(124, 92, 255, 0.1); }
.pill.done { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.pill.error { color: var(--err); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }

.job-id { font-size: 11px; color: #55607a; font-family: ui-monospace, Consolas, monospace; }
.job-time { margin-left: auto; font-size: 11px; color: #55607a; }

.job-prompt {
  margin: 7px 0 10px;
  font-size: 13px;
  color: #c3cbd9;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.bar { height: 4px; border-radius: 999px; background: #1b2130; overflow: hidden; }
.bar > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.5s ease;
}
.job[data-status="done"] .bar > span { background: linear-gradient(90deg, #2fbf94, var(--ok)); }
.job[data-status="error"] .bar > span { background: var(--err); }

.job-meta { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--muted); }

.job-detail {
  margin: 8px 0 0; font-size: 12px; color: #9aa8bd;
}
.job-detail summary {
  cursor: pointer; color: #7dd3fc; list-style: none; padding: 2px 0;
}
.job-detail summary::-webkit-details-marker { display: none; }
.job-detail summary::before { content: "▸ "; }
.job-detail[open] summary::before { content: "▾ "; }
.job-detail pre {
  margin: 6px 0 0; padding: 9px 11px; border-radius: 9px;
  background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1; font-size: 11px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto;
}
.job-error {
  margin: 10px 0 0; padding: 9px 11px; border-radius: 9px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.22);
  color: #fca5a5; font-size: 12px;
}

.job-videos:empty { display: none; }
.job-videos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.job-video { flex: 0 0 auto; max-width: 100%; }
/* 远程成片：只给链接，点一下复制 */
.job-video { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-link-note { margin: 0; font-size: 12px; color: var(--muted); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; }

/* ---------- 后台：任务详情弹窗 ---------- */
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: rgba(124, 156, 255, 0.07); }
.jm-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px; }
.jm-modal[hidden] { display: none; }
.jm-mask { position: absolute; inset: 0; background: rgba(3, 8, 16, 0.72); backdrop-filter: blur(3px); }
.jm-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.jm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.jm-body { padding: 14px 16px 18px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.jm-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.jm-row { display: flex; gap: 10px; font-size: 13px; align-items: flex-start; }
.jm-row > b { flex: 0 0 64px; color: var(--muted); font-weight: 600; font-size: 12.5px; padding-top: 2px; }
.jm-prompt { white-space: pre-wrap; word-break: break-word; line-height: 1.65; max-height: 220px; overflow: auto; padding-right: 6px; }
.jm-err { color: #ff9b9b; }
.jm-refs { display: flex; gap: 8px; flex-wrap: wrap; }
.jm-ref { width: 78px; height: 78px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: block; }
.jm-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jm-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
/* 后台任务详情里的成片：直接在弹层里能看、能下 */
.jm-media {
  display: block; width: 100%; max-width: 560px; max-height: 420px;
  border-radius: 10px; background: #05070a; border: 1px solid var(--line);
}
video.jm-media { height: auto; }
a.jm-media img { width: 100%; height: auto; display: block; border-radius: 10px; }
.jm-expired { color: #ff9b9b; }
.jm-logs { max-height: 220px; overflow: auto; font-size: 12px; line-height: 1.7; color: #b9c6d8; }
.jm-log { white-space: pre-wrap; word-break: break-word; }
.job-video video {
  width: auto; max-width: 100%; max-height: 420px;
  border-radius: 10px; background: #05070a;
  border: 1px solid var(--line); display: block;
}
.job-video .dl {
  display: inline-block; margin-top: 6px; font-size: 12px;
  color: var(--accent-2); text-decoration: none;
}
.job-video .dl:hover { text-decoration: underline; }

.job-actions { display: flex; gap: 8px; margin-top: 12px; }
.job-actions:has(.act-retry[hidden]) { margin-top: 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(8px);
  background: #1b2130; border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; }

/* ---------------- 账号 / 充值 / 后台 ---------------- */
a { color: inherit; text-decoration: none; }

.topbar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mine { display: flex; align-items: center; gap: 8px; }
.balance { font-size: 13px; font-weight: 650; color: var(--ok); }
.who { font-size: 12.5px; color: var(--muted); }

/* 右上角头像 + 下拉菜单 */
.user-menu { position: relative; }
.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); transition: border-color 0.15s, color 0.15s;
}
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.avatar-btn svg { width: 19px; height: 19px; }
.user-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 190px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.user-pop[hidden] { display: none; }
.user-pop .pop-head {
  padding: 9px 11px 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.user-pop .pop-name { font-size: 13px; font-weight: 650; color: var(--text); word-break: break-all; }
.user-pop .pop-bal { font-size: 12px; color: var(--ok); margin-top: 3px; }
.user-pop a, .user-pop button {
  display: block; width: 100%; text-align: left;
  padding: 9px 11px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font-size: 13px; font-family: inherit; cursor: pointer;
}
.user-pop a:hover, .user-pop button:hover { background: var(--panel-2); color: var(--text); }
.user-pop .pop-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.user-pop .pop-out:hover { color: #fca5a5; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.tabs { display: flex; gap: 6px; background: var(--panel-2); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 8px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.tabs button.active { background: linear-gradient(135deg, #a58bff, var(--accent)); color: #0a0c11; font-weight: 650; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.form-row input { width: 100%; }
.msg { font-size: 12.5px; padding: 9px 12px; border-radius: 9px; margin: 0 0 14px; }
.msg[hidden] { display: none; }
.msg.err { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3); color: #fca5a5; }

.page { max-width: 1100px; margin: 0 auto; padding: 8px 28px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card h2 { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

.balance-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.balance-big { margin: 6px 0; font-size: 34px; font-weight: 700; letter-spacing: -0.5px; }
.balance-big em { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 400; }

.denoms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
@media (max-width: 640px) { .denoms { grid-template-columns: repeat(2, 1fr); } }
.denom { border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; transition: 0.15s; }
.denom strong { display: block; font-size: 20px; }
.denom small { color: var(--muted); font-size: 11.5px; }
.denom:hover { border-color: #38445c; }
.denom.active { border-color: var(--accent); background: rgba(124, 92, 255, 0.08); }

.channels { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.channel { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; }
.channel.active { border-color: var(--accent); background: rgba(124, 92, 255, 0.08); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }

/* 邀请码 + 复制按钮同一行 */
.invite-code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.invite-code-row #invite-code { margin: 6px 0; }

/* 邀请二维码 */
.invite-qr-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line, #e6e8ee);
  border-radius: 14px;
  flex-wrap: wrap;
}
.invite-qr-wrap canvas {
  width: 132px;
  height: 132px;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  image-rendering: pixelated;
}

/* 邀请落地页 */
.invite-landing { max-width: 640px; margin: 0 auto; }
.invite-landing .steps { margin: 8px 0 0; padding-left: 20px; line-height: 2; }
.invite-landing .steps li { color: var(--muted, #667085); }
.inline-form input, .inline-form select { flex: 1 1 180px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.tbl tr:last-child td { border-bottom: 0; }
.up { color: var(--ok); }
.down { color: var(--err); }

.modal { position: fixed; inset: 0; background: rgba(4, 6, 10, 0.75); display: grid; place-items: center; z-index: 80; }
.modal[hidden] { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(360px, 92vw); text-align: center; }
.modal-card h3 { margin: 0 0 4px; font-size: 15px; }
.qr { width: 240px; height: 240px; background: #fff; border-radius: 12px; padding: 8px; margin: 14px auto; display: block; }
.qr[hidden] { display: none; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat-num { margin: 4px 0 0; font-size: 24px; font-weight: 700; }

.key-output { margin-top: 14px; }
.key-text { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; resize: vertical; margin-bottom: 8px; }

/* 输入框类型补齐 + 后台表单宽度 */
.inline-form select, .inline-form input[type="number"] { flex: 0 0 150px; width: 150px; }
input[type="password"], input[type="number"] { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; }
input[type="password"]:focus, input[type="number"]:focus { border-color: rgba(124, 92, 255, 0.65); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14); }

.warn { color: var(--warn); }
.card.highlight { border-color: rgba(124, 92, 255, 0.55); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.08); }

.primary:disabled { background: #2a3040; color: #7b8497; box-shadow: none; filter: none; }

.buy-link { display: inline-block; width: auto; padding: 10px 22px; margin-top: 12px; text-align: center; }

/* 兜底：带 hidden 属性的元素一律不显示（否则自定义 display 会盖掉） */
[hidden] { display: none !important; }

.link { color: var(--accent-2); text-decoration: underline; }
.hint .link { margin-left: 6px; }

.msg.ok { background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); color: #6ee7b7; }

input[type="email"] { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; color: inherit; }
input[type="email"]:focus { border-color: rgba(124, 92, 255, 0.65); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14); }

.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.rules b { color: var(--text); }

/* 多参考素材 */
.dz-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; }
.dz-strip:empty { padding: 0; }
.ref-item { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.ref-item.uploading { opacity: 0.45; }
.ref-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.dropzone:has(.dz-strip:not(:empty)) .dz-empty { display: none; }
.refs-extra { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ref-btn { cursor: pointer; }

.stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.expired-note { padding: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12.5px; text-align: center; }

/* 成片保留提醒横幅 */
.retain-banner {
  max-width: 1280px;
  margin: 4px auto 12px;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(96, 125, 160, 0.14), rgba(96, 125, 160, 0.05));
  border: 1px solid rgba(96, 125, 160, 0.32);
  color: #9fb0c6;
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.2px;
}
.retain-banner strong { color: #c2cfdf; font-weight: 600; }
@media (max-width: 960px) { .retain-banner { margin: 4px 16px 12px; font-size: 13.5px; } }

/* 不确定进度：上游没有百分比，用流动动画代替 */
.bar { position: relative; overflow: hidden; }
.bar > span.indeterminate {
  width: 100% !important;
  background: linear-gradient(90deg, transparent, var(--accent, #7c9cff), transparent);
  animation: bar-slide 1.5s linear infinite;
}
@keyframes bar-slide {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ---------- 任务卡四段进度：提交中 / 排队中 / 生成中 / 传回中 ---------- */
.job-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}
.job-steps > span[data-phase] {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #262d3d;
  color: #667089;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
/* 已经走过的阶段 */
.job-steps > span[data-phase].is-done {
  color: #8c97ad;
  border-color: #303a4f;
}
/* 当前阶段：高亮，便于一眼看出卡在哪一步 */
.job-steps > span[data-phase].is-active {
  color: #0c1018;
  font-weight: 600;
  border-color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
/* 右侧补充上游原始文案（比如「排队中 · 等上游提交配额」），单独一行避免和胶囊抢位置 */
.job-stage {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-stage:empty { display: none; }
.job[data-status="error"] .job-steps,
.job[data-status="done"] .job-steps,
.job[data-status="error"] .job-stage,
.job[data-status="done"] .job-stage { display: none; }

/* ---------- 视频复刻 ---------- */
/* 布局：第一行「上传 + 解析记录」，第二行结果占整行（9 列的分镜表要宽度） */
.rp-result { grid-column: 1 / -1; grid-row: 2; }
/* 结果区内部：摘要在上、分镜表在下，各占满宽
   （.job-list 在别处被设成 grid，这里要强制改回纵向排列） */
.rp-result .job-list { display: flex !important; flex-direction: column; }
.rp-result .rp-summary, .rp-result .rp-table-wrap { width: 100%; min-width: 0; }
.rp-table-wrap { overflow-x: auto; }
.rp-records { grid-column: 2; grid-row: 1; }
@media (max-width: 1080px) {
  .rp-result, .rp-records { grid-column: auto; grid-row: auto; }
}
.rp-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 180px; padding: 22px; text-align: center;
  border: 1.5px dashed #2c3446; border-radius: 14px; background: rgba(10, 16, 26, 0.45);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.rp-drop:hover, .rp-drop.is-over { border-color: var(--accent); background: rgba(124, 156, 255, 0.07); }
.rp-drop-icon { font-size: 22px; color: var(--accent); }
.rp-drop p { margin: 0; }
.rp-preview { width: 100%; max-height: 280px; border-radius: 10px; background: #04070c; margin-top: 12px; }
.rp-meta { margin: 8px 0 4px; color: var(--muted); font-size: 12.5px; }
.rp-running { padding: 18px 4px; }
.rp-running p { margin: 0 0 8px; }
.rp-error { padding: 14px; border-radius: 10px; background: rgba(248, 113, 113, 0.08); color: #ffb3b3; }
.rp-summary { padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.rp-sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rp-sum-text { margin: 0 0 10px; line-height: 1.75; }
.rp-sum-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rp-tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.rp-prompt-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(8, 13, 22, 0.6); }
.rp-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rp-prompt-text { margin: 0; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.rp-table-wrap { overflow: auto; }
/* 分镜剧本：带时间码的整段文本，可复制/下载 */
.rp-script { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: rgba(8, 13, 22, 0.6); }
.rp-script-text {
  margin: 0; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.7; color: #cfe3ff;
}
.rp-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.rp-table th, .rp-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rp-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.rp-thumb { width: 84px; border-radius: 6px; display: block; background: #05070a; }
.rp-shot-prompt { max-width: 300px; }
.rp-copy { display: block; margin-top: 6px; }
.rp-qr-wrap { display: flex; gap: 16px; align-items: center; padding: 10px 0; }
.rp-qr-wrap img { width: 200px; height: 200px; border-radius: 10px; background: #fff; padding: 6px; }
.rp-record { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rp-record-prompt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 左侧导航（工作台 / 资产库 / 历史 / 充值） ---------- */
.shell {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  max-width: none;
  margin: 0 auto;
  padding: 10px 28px 40px;
  align-items: start;
}

.sidenav {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.sidenav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.sidenav a:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.sidenav a.active {
  background: rgba(124, 92, 255, 0.14);
  color: #cfc4ff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.3);
}
.sidenav svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.sidenav .nav-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* 左栏容器：导航 + 底部代理入口，整列一起 sticky */
.side-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 18px;
  align-self: start;
}
.side-col .sidenav { position: static; }

.agent-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(255, 183, 77, 0.35);
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.16), rgba(255, 120, 80, 0.1));
  color: #ffd479;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.agent-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 183, 77, 0.6);
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.26), rgba(255, 120, 80, 0.16));
}
.agent-cta svg { width: 18px; height: 18px; flex: none; opacity: 0.95; }
.agent-cta small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 11.5px;
  color: rgba(255, 212, 121, 0.78);
}
@media (max-width: 860px) {
  .side-col { position: static; }
  .agent-cta { padding: 9px 12px; font-size: 12.5px; }
  .agent-cta small { display: none; }
}

/* 手机：导航变成顶部横向滚动条 */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 6px 14px 32px; gap: 12px; }
  .sidenav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidenav::-webkit-scrollbar { display: none; }
  .sidenav a { padding: 8px 12px; font-size: 13px; }
  .sidenav .nav-sep { display: none; }
}

/* ---------- 资产库 ---------- */
.asset-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.asset-tabs { display: flex; gap: 4px; background: var(--panel-2); padding: 4px; border-radius: 10px; }
.asset-tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.asset-tabs button.active { background: rgba(124, 92, 255, 0.18); color: #cfc4ff; font-weight: 600; }

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.asset-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  overflow: hidden;
  transition: border-color 0.15s;
}
.asset-item:hover { border-color: #38445c; }
.asset-item .thumb-box {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  background: #05070a;
  overflow: hidden;
}
.asset-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-item .file-icon { font-size: 12px; color: var(--muted); text-align: center; padding: 8px; word-break: break-all; }
.asset-item .meta {
  padding: 7px 9px;
  font-size: 11px;
  color: var(--muted);
  display: flex; justify-content: space-between; gap: 6px;
}
.asset-item .meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-item .del {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(8, 10, 16, 0.75); color: #cbd3e1;
  cursor: pointer; font-size: 14px; line-height: 1;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.15s;
}
.asset-item:hover .del { opacity: 1; }
@media (max-width: 860px) { .asset-item .del { opacity: 1; } }

/* 资产库批量选择 */
.asset-item.on { border-color: rgba(124, 92, 255, 0.75); box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.22); }
.asset-item .asset-check {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(8, 10, 16, 0.72); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.asset-item.on .asset-check { background: var(--accent, #7c5cff); border-color: transparent; }
.ghost.tiny.danger { color: #ff8f8f; border-color: rgba(255, 120, 120, 0.4); }
.ghost.tiny:disabled { opacity: 0.45; cursor: not-allowed; }

/* 生成页：从资产库挑选 */
.pick-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pick-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 10px;
  max-height: 260px;
  overflow-y: auto;
}
.pick-panel[hidden] { display: none; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.pick-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #05070a;
  display: grid; place-items: center;
}
.pick-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-cell .tag { font-size: 10.5px; color: var(--muted); padding: 4px; text-align: center; word-break: break-all; }
.pick-cell.on { border-color: var(--accent); }
.pick-cell.on::after {
  content: "✓";
  position: absolute; top: 3px; right: 3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent); color: #0a0c11;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.pick-empty { color: var(--muted); font-size: 12.5px; padding: 14px; text-align: center; }

/* ---------- 首页（公开介绍页） ---------- */
.home-page { display: flex; flex-direction: column; min-height: 100vh; }
.home-topbar { padding-bottom: 8px; }
.home-main { flex: 1; width: min(1080px, 100%); margin: 0 auto; padding: 8px 20px 40px; }

.hero { text-align: center; padding: 34px 8px 30px; }
.hero-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 5.2vw, 38px);
  line-height: 1.28;
  font-weight: 650;
  letter-spacing: 0.5px;
  background: linear-gradient(100deg, #ffffff 8%, #c9c2ff 55%, #8fe6f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { margin: 0 auto 26px; max-width: 560px; color: var(--muted); font-size: 14px; }
.hero-btn {
  display: inline-block;
  width: auto;
  min-width: 200px;
  padding: 14px 34px;
  text-decoration: none;
  text-align: center;
  font-size: 15px;
}
.hero-note { margin: 14px 0 0; font-size: 12.5px; color: #9fb0c6; }

.home-h { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: 0.5px; }
.home-models { margin-top: 6px; }
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .model-grid { grid-template-columns: 1fr; } }

.model-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.model-card.skeleton { color: var(--muted); font-size: 13px; }
.model-name { font-size: 15px; font-weight: 600; color: var(--text); }
.model-price { display: flex; align-items: baseline; gap: 6px; }
.model-price em {
  font-style: normal;
  font-size: 26px;
  font-weight: 700;
  color: #b9a8ff;
  letter-spacing: 0.5px;
}
.model-price span { font-size: 12.5px; color: var(--muted); }
.model-price .model-dur {
  font-size: 11.5px; color: #7ee2a8; font-weight: 600;
  border: 1px solid rgba(126,226,168,.35); border-radius: 999px;
  padding: 1px 7px; line-height: 1.5; white-space: nowrap;
}
.model-refs { font-size: 12px; color: #7ee2a8; line-height: 1.5; margin-top: 2px; }
.model-note { font-size: 12px; color: #7ee2a8; line-height: 1.5; }

.home-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
@media (max-width: 700px) { .home-steps { grid-template-columns: 1fr; } }
.step {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.step b {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0c11; font-size: 12px;
}
.step span { font-size: 13.5px; }
.step small { margin-left: auto; color: var(--muted); font-size: 12px; }

.home-foot {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 22px 20px 30px;
  color: var(--muted); font-size: 12.5px;
}

/* ---- 卡密兑换结果 ---- */
.key-result {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.key-result-line {
  display: flex; align-items: baseline; gap: 8px;
  margin: 6px 0 0;
}
.key-result-line b { font-size: 20px; font-weight: 700; }
.key-result .buy-link { display: inline-block; }

/* 订单表里的卡密 + 复制按钮 */
.key-cell { display: inline-flex; align-items: center; gap: 8px; }
.key-cell .copy-key { padding: 2px 8px; font-size: 11.5px; }

/* ---- 邀请文案预览 ---- */
.invite-poster {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: var(--panel-2);
}
.invite-poster pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  font-family: inherit;
}

/* 后台失败率告警条 */
#fail-warn {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 86, 86, 0.12);
  border: 1px solid rgba(255, 86, 86, 0.35);
  color: #ff8a8a;
  font-size: 12.5px;
}


/* ============================================================
   海报主题（参考 NovaPix 那张图：深蓝底 + 琥珀黄 + 平涂块面）
   ============================================================ */
:root {
  --bg: #0c1e33;
  --panel: #11304f;
  --panel-2: #17395c;
  --line: #2b547e;
  --text: #eef4fb;
  --muted: #93aec9;
  --accent: #f5a623;
  --accent-2: #3f86dd;
  --ok: #38d39f;
  --err: #ff6b6b;
  --warn: #ffc857;
}

body {
  background:
    radial-gradient(900px 460px at 8% -10%, rgba(245, 166, 35, 0.16), transparent 62%),
    radial-gradient(760px 420px at 96% -6%, rgba(63, 134, 221, 0.22), transparent 58%),
    var(--bg);
}

/* 站标：女孩头像 */
.logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.16);
  background: url("/logo-128.png") center/cover no-repeat;
  flex-shrink: 0;
}

.brand-text h1 { font-weight: 800; letter-spacing: .4px; }

/* 主按钮用海报黄 */
.primary,
.hero-btn {
  background: linear-gradient(135deg, #ffc25c, #f5a623);
  color: #20160a;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(245, 166, 35, 0.22);
}

/* 落地页 hero：左边文字，右边主题图 */
.home-main .hero {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 34px 34px 30px;
  background:
    linear-gradient(100deg, #11304f 0%, #12304c 46%, rgba(17, 48, 79, 0.35) 68%, transparent 100%),
    url("/poster.jpg") right center / auto 118% no-repeat,
    #11304f;
}

.home-main .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 100% 40%, transparent 40%, rgba(12, 30, 51, 0.55) 100%);
  pointer-events: none;
}

.home-main .hero > * { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.8px;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  max-width: 12em;
}

.hero-sub { color: #cfe0f2; max-width: 30em; }

.hero-note {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.16);
  border: 1px solid rgba(245, 166, 35, 0.45);
  color: #ffd58a;
  font-size: 12.5px;
}

/* 模型卡片：平涂块面 + 粗描边 */
.model-card {
  border: 2px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, #17395c, #11304f);
}

.model-card .model-price em { color: var(--accent); font-weight: 900; }

@media (max-width: 720px) {
  .home-main .hero {
    padding: 24px 20px;
    background:
      linear-gradient(180deg, rgba(17, 48, 79, 0.92) 0%, rgba(17, 48, 79, 0.75) 55%, rgba(17, 48, 79, 0.35) 100%),
      url("/poster.jpg") center top / cover no-repeat,
      #11304f;
  }
  .hero-title { font-size: 26px; max-width: none; }
}


/* ---------- 参数行：模型独占一行，画幅/分辨率/时长并排 ---------- */
.params { gap: 10px; }
.param-model { flex: 1 1 100%; }
.params .param:not(.param-model) { flex: 1 1 0; min-width: 96px; }

.param-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.param-head em {
  font-style: normal;
  color: var(--accent);
  font-weight: 800;
  font-size: 12.5px;
}

/* 拖动条 */
.param input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 42%, #22405f 42%, #22405f 100%);
  outline: none;
  cursor: pointer;
  margin: 12px 0 6px;
}
.param input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #20160a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: grab;
}
.param input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid #20160a;
}
.param input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: #22405f;
}

/* 只读项（分辨率） */
.static-val {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e2438;
  color: #cfe0f2;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.4px;
}


/* ============================================================
   绚丽渐变（贴近主题图的蓝 × 琥珀，中间过渡带粉紫）
   ============================================================ */
:root {
  --grad-aurora: linear-gradient(100deg, #c9a7f0 0%, #f6b26b 38%, #f5a623 55%, #58a9f2 100%);
  --grad-aurora-soft: linear-gradient(100deg, rgba(201,167,240,.22), rgba(245,166,35,.20) 45%, rgba(88,169,242,.22));
}

/* 主按钮：虹彩渐变 + 高光扫过 */
.primary,
.hero-btn,
#submit,
#pay-btn {
  position: relative;
  background: linear-gradient(100deg, #cfa9f2 0%, #f6b26b 34%, #f5a623 52%, #6fb3f5 100%);
  color: #17110a;
  font-weight: 800;
  letter-spacing: .3px;
  border: 0;
  box-shadow: 0 10px 26px rgba(245, 166, 35, 0.22), inset 0 1px 0 rgba(255,255,255,.45);
  transition: filter .2s ease, transform .12s ease, box-shadow .2s ease;
  overflow: hidden;
}
.primary:hover,
.hero-btn:hover,
#submit:hover,
#pay-btn:hover {
  filter: brightness(1.06) saturate(1.05);
  box-shadow: 0 14px 32px rgba(245, 166, 35, 0.3), inset 0 1px 0 rgba(255,255,255,.55);
}
.primary:active,
#submit:active { transform: translateY(1px) scale(.995); }
.primary::after,
#submit::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg);
  animation: sheen 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 55% { left: -60%; }
  75%, 100% { left: 120%; }
}

/* 卡片：虹彩描边 + 极淡底光 */
.panel, .card, .model-card {
  position: relative;
  border-color: rgba(120, 170, 230, 0.30);
}
.panel::before, .card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(201,167,240,.45), rgba(245,166,35,.35) 45%, rgba(88,169,242,.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: .5;
}

/* 顶部加一层很淡的极光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(620px 320px at 12% 4%, rgba(201, 167, 240, 0.10), transparent 70%),
    radial-gradient(720px 360px at 88% 0%, rgba(245, 166, 35, 0.10), transparent 70%),
    radial-gradient(900px 420px at 50% 110%, rgba(88, 169, 242, 0.10), transparent 72%);
}
body > * { position: relative; z-index: 1; }

/* 数字/价格用渐变字 */
.balance, .stat-num, .model-price em {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* 小标签、pill 更亮一点 */
.pill.done { background: rgba(56, 211, 159, .16); color: #7ef0c4; border-color: rgba(56,211,159,.4); }
.pill.error { background: rgba(255, 107, 107, .14); color: #ffb3b3; border-color: rgba(255,107,107,.38); }

.home-main .hero-title em,
.poster-hero h2 em { color: var(--accent); }
.hero-title { color: #f4f7fc; }


/* ---------- 工作台：左生成 / 右历史 ---------- */
.app-grid {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.app-grid .composer { max-width: 440px; }
.app-grid .jobs { min-width: 0; }

/* 历史列表在右栏可以更紧凑地并排 */
.app-grid .job-list { max-height: none; }

@media (max-width: 1080px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-grid .composer { max-width: none; }
}


/* 顶部栏要压在内容之上，否则账号下拉会被卡片盖住 */
.topbar { position: relative; z-index: 60; }
.user-pop { z-index: 1000; }
.user-menu { position: relative; z-index: 1001; }

/* 极光底层不能抢层级 */
body::before { z-index: 0; }


/* 生成区顶部的保留提醒 */
.composer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.42);
  color: #ffd58a;
  font-size: 12.5px;
  line-height: 1.45;
}
.composer-note::before { content: "⏳"; font-size: 13px; }
.composer-note:empty { display: none; }


/* 两块面板标题对齐 */
.panel > .panel-title:first-child,
.page > .panel > .panel-title { margin-top: 0; }
.jobs-head { margin-bottom: 12px; }

/* 历史区顶部的保留提醒 */
.jobs-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(245, 166, 35, 0.10);
  border: 1px solid rgba(245, 166, 35, 0.36);
  color: #ffd58a;
  font-size: 12.5px;
  line-height: 1.4;
}
.jobs-note::before { content: "⏳"; font-size: 12px; }
.jobs-note:empty { display: none; }


/* 两栏布局里取消 sticky，否则左边会比右边低 18px，标题对不齐 */
.app-grid .composer { position: static; }


/* 标题基线对齐：右侧标题和按钮都从顶部对齐，避免被按钮撑高居中 */
.jobs-head { align-items: flex-start; }
.jobs-head .panel-title { line-height: 20.15px; }
.jobs-head .ghost.tiny { margin-top: -2px; }


/* 首页顶栏铺满宽度，让「云梦绘」靠左上角 */
.topbar { width: 100%; }
.home-topbar {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.home-page { align-items: stretch; }


/* 有侧边栏的页面：顶栏不再居中限宽，品牌与侧边栏左边缘对齐 */
body:has(.shell) .topbar {
  max-width: none;
  margin: 0;
  padding-left: 28px;
  padding-right: 28px;
}
body:has(.shell) .brand { padding-left: 0; }


/* ============================================================
   交互反馈：按下有回弹、悬停有过渡、页面切换有淡入
   ============================================================ */

/* 所有可点元素统一过渡曲线（快按下、慢回弹） */
button,
a.ghost,
a.primary,
.primary,
.hero-btn,
.chip,
.denom,
.model-card,
.sidenav a,
.job button,
.job-video .dl,
.avatar-btn,
.user-pop a,
.user-pop button,
.ref-btn,
.dropzone,
.job,
.pill {
  transition:
    transform .16s cubic-bezier(.22, .9, .3, 1.1),
    background-color .18s ease,
    background-position .35s ease,
    border-color .18s ease,
    box-shadow .22s ease,
    color .18s ease,
    opacity .18s ease;
  will-change: transform;
}

/* 按下：轻微缩小 + 压暗，松手回弹 */
button:active,
a.ghost:active,
.primary:active,
.hero-btn:active,
.chip:active,
.denom:active,
.sidenav a:active,
.user-pop a:active,
.user-pop button:active,
.job button:active,
.avatar-btn:active {
  transform: scale(.965);
}

/* 主按钮按下时把光晕收一点，像是真的按进去 */
.primary:active,
#submit:active,
.hero-btn:active {
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* 侧边栏、卡片这类块的悬停微移 */
.sidenav a:hover { transform: translateX(2px); }
.model-card:hover { transform: translateY(-2px); }
.job:hover { border-color: rgba(120, 170, 230, 0.4); }

/* 面板入场：轻微上浮 + 淡入 */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.panel, .card, .home-main .hero {
  animation: rise-in .3s cubic-bezier(.22, .9, .3, 1) both;
}
.jobs .job { animation: rise-in .26s ease-out both; }

/* 页面间跳转淡入淡出（Chrome 126+ 支持，不支持的浏览器自动忽略） */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .16s ease-in both; }
::view-transition-new(root) { animation: vt-in .22s ease-out both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 尊重系统的「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* 统一按下态：明显一点的回弹（覆盖之前 translateY(1px) scale(.995) 的旧规则） */
.primary:active,
#submit:active,
.hero-btn:active,
#pay-btn:active {
  transform: translateY(1px) scale(.96) !important;
}


/* ============================================================
   更顺滑的淡入淡出（覆盖前面那版偏快的动画）
   ============================================================ */

/* will-change 只留给真正需要合成的元素，别全站挂，否则反而卡 */
button, .primary, .hero-btn, #submit { will-change: transform; }
.panel, .card, .job, .sidenav a, .model-card, .denom, .chip { will-change: auto; }

/* 面板入场：慢一点、走 easeOutExpo，落位更自然 */
@keyframes rise-smooth {
  0%   { opacity: 0; transform: translateY(18px) scale(.994); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.panel, .card, .home-main .hero {
  animation: rise-smooth .62s cubic-bezier(.16, 1, .3, 1) both;
}

/* 两块面板错开 80ms，视觉上有先后，不会整屏一起动 */
.app-grid > .composer { animation-delay: .04s; }
.app-grid > .jobs { animation-delay: .12s; }

/* 列表里新冒出来的任务卡片 */
@keyframes card-in {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.jobs .job { animation: card-in .42s cubic-bezier(.16, 1, .3, 1) both; }
.jobs .job:hover { animation: none; }

/* 页面之间切换：出得慢一点、进得更柔，避免一闪 */
::view-transition-old(root) { animation: vt-out .26s ease-in both; }
::view-transition-new(root) { animation: vt-in .44s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes vt-out {
  to { opacity: 0; transform: scale(.995); }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateY(10px) scale(.997); }
  to   { opacity: 1; transform: none; }
}


/* ============================================================
   首页 hero：主题图改为独立图层 + 左侧羽化，消除硬边"撕裂"
   ============================================================ */
.home-main .hero {
  background: linear-gradient(100deg, #11304f 0%, #12304c 52%, #11304f 100%);
  padding-right: 46%;
}

/* 图片单独一层，左边缘做渐变遮罩，和底色自然融在一起 */
.home-main .hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  min-width: 260px;
  background: url("/poster.jpg") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 14%, #000 30%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 14%, #000 30%);
  pointer-events: none;
  z-index: 0;
}

/* 原有的暗角层保留，但压在图片之上、文字之下 */
.home-main .hero::after {
  background: linear-gradient(90deg, #11304f 0%, rgba(17, 48, 79, .55) 34%, transparent 58%);
  z-index: 1;
}
.home-main .hero > * { position: relative; z-index: 2; }

@media (max-width: 720px) {
  .home-main .hero { padding-right: 20px; }
  .home-main .hero::before {
    width: 100%;
    inset: 0;
    min-width: 0;
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 55%, transparent 100%);
            mask-image: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 55%, transparent 100%);
  }
  .home-main .hero::after {
    background: linear-gradient(180deg, rgba(17,48,79,.80) 0%, rgba(17,48,79,.55) 60%, rgba(17,48,79,.2) 100%);
  }
}


/* ============================================================
   头像菜单的淡入淡出
   ============================================================ */
.user-pop.fade-pop {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(.96);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity .16s ease,
    transform .26s cubic-bezier(.16, 1, .3, 1),
    visibility 0s linear .26s;
}
.user-pop.fade-pop.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition:
    opacity .18s ease,
    transform .3s cubic-bezier(.16, 1, .3, 1),
    visibility 0s;
}

/* 头像按钮展开时高亮一圈 */
.avatar-btn { transition: transform .18s cubic-bezier(.16,1,.3,1), border-color .2s, box-shadow .2s; }
.avatar-btn.active,
.avatar-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,166,35,.16);
}

/* 菜单里的条目逐个淡入，有点层次 */
.user-pop.fade-pop.open > * { animation: pop-item .3s cubic-bezier(.16,1,.3,1) both; }
.user-pop.fade-pop.open > *:nth-child(1) { animation-delay: .03s; }
.user-pop.fade-pop.open > *:nth-child(2) { animation-delay: .06s; }
.user-pop.fade-pop.open > *:nth-child(3) { animation-delay: .09s; }
.user-pop.fade-pop.open > *:nth-child(4) { animation-delay: .12s; }
.user-pop.fade-pop.open > *:nth-child(5) { animation-delay: .15s; }
.user-pop.fade-pop.open > *:nth-child(6) { animation-delay: .18s; }
@keyframes pop-item {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}


/* ============================================================
   悬停微放大（点击类元素）
   ============================================================ */
button:not(:disabled),
.primary,
.ghost,
.chip,
.denom,
.ref-btn,
.sidenav a,
.user-pop a,
.user-pop button,
.avatar-btn,
.job-video .dl {
  transition:
    transform .26s cubic-bezier(.16, 1, .3, 1),
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .24s ease,
    color .2s ease,
    filter .2s ease;
}

button:not(:disabled):hover,
.primary:hover,
.ghost:hover,
.chip:hover,
.denom:hover,
.ref-btn:hover,
.user-pop a:hover,
.user-pop button:hover {
  transform: scale(1.035);
}

/* 侧边栏：往右挪一点 + 轻微放大 */
.sidenav a:hover { transform: translateX(3px) scale(1.02); }

/* 按下时缩回去，优先级要压过 hover */
button:not(:disabled):active,
.primary:active,
.ghost:active,
.chip:active,
.denom:active,
.sidenav a:active,
.user-pop a:active,
.user-pop button:active,
.avatar-btn:active {
  transform: scale(.955);
  transition-duration: .1s;
}

/* ============================================================
   弹层出现时的淡入（display 切换也能过渡，Chrome 117+）
   ============================================================ */
.modal {
  transition: opacity .22s ease;
  opacity: 1;
  @starting-style { opacity: 0; }
}
.modal-card {
  transition: transform .34s cubic-bezier(.16, 1, .3, 1), opacity .24s ease;
  opacity: 1;
  transform: none;
  @starting-style {
    opacity: 0;
    transform: translateY(14px) scale(.94);
  }
}

.toast {
  transition: opacity .22s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
  opacity: 1;
  transform: none;
  @starting-style {
    opacity: 0;
    transform: translateY(10px) scale(.96);
  }
}

.attach-bar,
.refs-extra {
  transition: opacity .22s ease, transform .28s cubic-bezier(.16, 1, .3, 1);
  opacity: 1;
  transform: none;
  @starting-style {
    opacity: 0;
    transform: translateY(-6px);
  }
}


/* 主按钮的旧规则是 translateY(-1px)，优先级更高，这里显式覆盖成放大 */
#submit:hover,
#pay-btn:hover,
.hero-btn:hover,
.primary:hover {
  transform: scale(1.035) !important;
}
#submit:active,
#pay-btn:active,
.hero-btn:active,
.primary:active {
  transform: scale(.96) !important;
}


/* 任务卡片：只有新出现的才播放一次淡入，之后不再重播（否则快速滚动会闪） */
.jobs .job { animation: none; }
.jobs .job.fresh { animation: card-in .42s cubic-bezier(.16, 1, .3, 1) both; }
.jobs .job:hover { animation: none; }

/* 滚动时不要给卡片提升合成层，避免抖动 */
.job-list { contain: content; }


/* ============================================================
   任务卡片：彻底不做淡入淡出，只有悬停放大
   ============================================================ */
.jobs .job,
.jobs .job.fresh {
  animation: none !important;
  opacity: 1 !important;
  transform-origin: center;
}
.job-list { contain: none; }

.jobs .job {
  transition: transform .18s cubic-bezier(.16, 1, .3, 1), border-color .2s ease, box-shadow .2s ease;
}
.jobs .job:hover {
  transform: scale(1.012);
  border-color: rgba(120, 170, 230, 0.5);
}
.jobs .job:active { transform: scale(.999); }


/* ============================================================
   顶栏小工具：首页链接 / 公告 / 主题切换
   ============================================================ */
.topbar-right { display: flex; align-items: center; gap: 10px; }
.top-link { white-space: nowrap; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  position: relative;
  cursor: pointer;
  transition: transform .24s cubic-bezier(.16,1,.3,1), border-color .2s, color .2s, background .2s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { transform: scale(1.06); border-color: rgba(245,166,35,.5); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.active { border-color: var(--accent); color: var(--accent); }

.dot-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--panel-2);
}

/* 公告面板 */
.notice-pop { width: 320px; padding: 0; }
.notice-list { max-height: 340px; overflow-y: auto; padding: 4px 0 10px; }
.notice-empty { margin: 18px 16px; color: var(--muted); font-size: 12.5px; text-align: center; }
.notice-item { padding: 12px 16px; border-top: 1px solid var(--line); }
.notice-item:first-child { border-top: 0; }
.notice-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.notice-time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notice-body { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 6px; }
.notice-menu .user-pop { right: 0; left: auto; }

/* ============================================================
   明亮模式
   ============================================================ */
html[data-theme="light"] {
  --bg: #eef3fa;
  --panel: #ffffff;
  --panel-2: #f4f8fd;
  --line: #d5e0ee;
  --text: #17293f;
  --muted: #5c7392;
  --accent: #e08a00;
  --accent-2: #2f74c9;
}
html[data-theme="light"] body {
  background:
    radial-gradient(720px 380px at 8% -10%, rgba(245, 166, 35, 0.14), transparent 62%),
    radial-gradient(680px 360px at 96% -6%, rgba(63, 134, 221, 0.16), transparent 58%),
    var(--bg);
}
html[data-theme="light"] .topbar { background: transparent; }
html[data-theme="light"] .sidenav,
html[data-theme="light"] .user-pop,
html[data-theme="light"] .panel,
html[data-theme="light"] .card {
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(23, 41, 63, 0.06);
}
html[data-theme="light"] .sidenav a.active {
  background: linear-gradient(100deg, #ffe6bf, #ffd9a1);
  color: #7a4a00;
}
html[data-theme="light"] .sidenav a { color: var(--muted); }
html[data-theme="light"] .sidenav a:hover { color: var(--text); }
html[data-theme="light"] .dropzone { border-color: #c9d7e8; background: #f7fafe; }
html[data-theme="light"] .dropzone:hover { border-color: var(--accent); }
html[data-theme="light"] textarea,
html[data-theme="light"] input,
html[data-theme="light"] select {
  background: #ffffff;
  border-color: #cddaea;
  color: var(--text);
}
html[data-theme="light"] .job { background: #ffffff; }
html[data-theme="light"] .job-error { background: #fff2f2; border-color: #f3c9c9; color: #b3312f; }
html[data-theme="light"] .jobs-note {
  background: #fff7e8;
  border-color: #f2d09a;
  color: #8a5a00;
}
html[data-theme="light"] .ghost {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #33445c;
}
html[data-theme="light"] .pill.done { background: #e5f8ef; color: #0f7a52; }
html[data-theme="light"] .pill.error { background: #ffe9e9; color: #b3312f; }


/* ============================================================
   首页：自动轮播的模糊背景 + 成品展示
   ============================================================ */
.home-page { position: relative; overflow-x: hidden; }
.home-page > header,
.home-page > main,
.home-page > footer { position: relative; z-index: 2; }

.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0c1e33;
}
.bg-layer {
  position: absolute;
  inset: -8%;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  filter: blur(26px) saturate(1.15) brightness(.55);
  transform: scale(1.06);
  will-change: opacity;
}
.bg-layer.on { opacity: .85; }

/* 压一层暗罩，保证文字可读 */
.bg-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(12,30,51,.45), transparent 70%),
    linear-gradient(180deg, rgba(12,30,51,.72) 0%, rgba(12,30,51,.86) 55%, #0c1e33 100%);
}

.home-main { position: relative; z-index: 2; }

/* hero 底部按钮排 */
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hero-ghost {
  padding: 0 22px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px);
  font-weight: 700;
  color: #eef4fb;
}

/* 成品展示 */
.showcase { margin-top: 40px; scroll-margin-top: 20px; }
.showcase-stage {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(120,170,230,.28);
  background: #0f2340;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  aspect-ratio: 16 / 9;
}
.showcase-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transform: scale(1);
  transition: opacity .5s ease, transform .8s cubic-bezier(.16,1,.3,1);
}
.showcase-stage img.fading { opacity: 0; transform: scale(1.03); }
.showcase-caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(8, 20, 34, .62);
  border: 1px solid rgba(255,255,255,.16);
  color: #e8f0fb;
  font-size: 12.5px;
  backdrop-filter: blur(8px);
}

.showcase-thumbs { display: flex; gap: 12px; margin-top: 14px; justify-content: center; }
.showcase-thumbs .thumb {
  width: 132px;
  aspect-ratio: 16 / 9;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #10243d;
  opacity: .55;
  transition: opacity .25s, border-color .25s, transform .26s cubic-bezier(.16,1,.3,1);
}
.showcase-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-thumbs .thumb:hover { opacity: .85; transform: translateY(-2px); }
.showcase-thumbs .thumb.active { opacity: 1; border-color: var(--accent); }

@media (max-width: 720px) {
  .bg-layer { filter: blur(20px) brightness(.5); }
  .showcase-thumbs .thumb { width: 96px; }
  .hero-ghost { height: 42px; }
}


/* ============================================================
   首页改为玻璃卡片，让模糊照片背景透出来
   ============================================================ */
.home-page { background: transparent !important; }
.home-page::before { display: none !important; }

/* 暗罩调薄，照片更明显，但文字仍然清楚 */
.bg-veil {
  background:
    radial-gradient(900px 520px at 18% 0%, rgba(12,30,51,.30), transparent 72%),
    linear-gradient(180deg, rgba(10,24,42,.55) 0%, rgba(10,24,42,.72) 50%, rgba(10,24,42,.9) 100%) !important;
}
.bg-layer { filter: blur(22px) saturate(1.25) brightness(.72) !important; }
.bg-layer.on { opacity: .95 !important; }

/* hero：去掉原来那张插画，改成玻璃板 */
.home-main .hero {
  background: rgba(12, 30, 51, .42) !important;
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, .16) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.home-main .hero::before { display: none !important; }
.home-main .hero::after { display: none !important; }
.hero-title { color: #f7fbff; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.hero-sub { color: #d8e6f5; }

/* 模型卡片、步骤卡也玻璃化 */
.model-card,
.home-steps .step {
  background: rgba(13, 32, 54, .46) !important;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.14) !important;
}
.home-foot { color: rgba(226, 238, 250, .72); }


/* 恢复 hero 右侧的主题图（和之前一样，羽化过渡） */
.home-main .hero {
  padding-right: 44% !important;
  overflow: hidden;
}
.home-main .hero::before {
  display: block !important;
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 44%;
  min-width: 240px;
  background: url("/poster.jpg") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 16%, #000 34%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 16%, #000 34%);
  pointer-events: none;
  z-index: 0;
}
.home-main .hero::after { display: none !important; }
.home-main .hero > * { position: relative; z-index: 2; }

/* 两个按钮对齐：同高、同圆角、同基线 */
.hero-actions { align-items: center !important; justify-content: flex-start !important; }
.hero-actions .hero-btn,
.hero-actions .hero-ghost {
  height: 48px;
  line-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 14px;
}
.hero-actions .hero-ghost {
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.07);
  color: #eef4fb;
}

@media (max-width: 720px) {
  .home-main .hero { padding-right: 20px !important; }
  .home-main .hero::before { width: 100%; inset: 0; opacity: .5; mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 75%); -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 75%); }
  .hero-actions { justify-content: center !important; }
}


/* .primary 自带 margin-top:18px，会把 hero 里的按钮压低，这里清掉 */
.hero-actions .hero-btn { margin-top: 0 !important; }
.hero-actions { margin-top: 18px; }


/* 成品展示的左右切换箭头 */
.showcase-stage { cursor: default; }
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(8, 20, 34, .52);
  color: #eaf2fb;
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: .55;
  transition: opacity .22s ease, transform .26s cubic-bezier(.16,1,.3,1), background .2s, border-color .2s;
  z-index: 3;
}
.nav-arrow svg { width: 22px; height: 22px; }
.nav-arrow.prev { left: 14px; }
.nav-arrow.next { right: 14px; }
.nav-arrow:hover {
  opacity: 1;
  background: rgba(8, 20, 34, .78);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}
.nav-arrow:active { transform: translateY(-50%) scale(.94); }

@media (max-width: 720px) {
  .nav-arrow { width: 38px; height: 38px; }
  .nav-arrow svg { width: 18px; height: 18px; }
  .nav-arrow.prev { left: 8px; }
  .nav-arrow.next { right: 8px; }
}


/* 两个按钮居中 */
.hero-actions { justify-content: center !important; }

/* 箭头只放大，绝对不能位移：
   全局的 button:hover { transform: scale } 会覆盖掉 translateY(-50%)，
   导致按钮瞬间向下跳半格，这里用更高优先级锁死 */
.showcase-stage .nav-arrow:hover {
  transform: translateY(-50%) scale(1.1) !important;
}
.showcase-stage .nav-arrow:active {
  transform: translateY(-50%) scale(.94) !important;
}
/* 缩略图同理，只放大不上浮 */
.showcase-thumbs .thumb:hover {
  transform: scale(1.04) !important;
}


/* hero 内部改成纵向弹性，标题、副标题、按钮统一在文字区居中 */
.home-main .hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.home-main .hero .hero-title,
.home-main .hero .hero-sub { width: 100%; max-width: 100%; }
.home-main .hero .hero-actions { width: auto; margin-top: 18px; justify-content: center; }


/* ============================================================
   性能：去掉页面切换的 View Transition（它会阻塞首帧，点链接发卡）
   面板入场也缩短，感觉更跟手
   ============================================================ */
@view-transition { navigation: none; }
::view-transition-old(root),
::view-transition-new(root) { animation: none !important; }

.panel, .card, .home-main .hero {
  animation-duration: .34s !important;
  animation-delay: 0s !important;
}
.app-grid > .jobs { animation-delay: .04s !important; }

/* 背景图已经预先做过模糊，这里只留一点点，几乎不耗 GPU */
.bg-layer {
  filter: saturate(1.15) brightness(.78) !important;
  transform: none !important;
  inset: 0 !important;
}
.bg-layer.on { opacity: 1 !important; }

/* 卡片背景模糊半径减半 */
.home-main .hero,
.model-card,
.home-steps .step { backdrop-filter: blur(9px) !important; }


/* ============================================================
   减负：去掉一直在跑的高光动画，入场动画再压短
   ============================================================ */
.primary::after,
#submit::after,
.hero-btn::after { animation: none !important; display: none !important; }

.panel, .card { animation-duration: .22s !important; }
.home-main .hero { animation-duration: .4s !important; }

/* 首屏之外的区块延迟渲染，降低首屏开销 */
.home-steps, .showcase, .home-models { content-visibility: auto; contain-intrinsic-size: 320px; }

/* 按钮只在需要时才用合成层 */
button, .primary { will-change: auto !important; }
button:hover, .primary:hover { will-change: transform; }


/* 点击链接时的即时反馈 */
html.nav-out body {
  opacity: .62;
  transition: opacity .1s ease-out;
}
body { transition: opacity .16s ease-out; }


/* ============================================================
   恢复被「减负」去掉的效果 + SPA 切换过渡
   ============================================================ */
.primary::after,
#submit::after,
.hero-btn::after {
  display: block !important;
  animation: sheen 4.5s ease-in-out infinite !important;
}

.panel, .card { animation-duration: .62s !important; }
.home-main .hero { animation-duration: .8s !important; }
.app-grid > .composer { animation-delay: .04s !important; }
.app-grid > .jobs { animation-delay: .12s !important; }

.bg-layer { filter: blur(14px) saturate(1.2) brightness(.72) !important; }
.home-main .hero, .model-card, .home-steps .step { backdrop-filter: blur(18px) saturate(1.1) !important; }

.home-steps, .showcase, .home-models { content-visibility: visible !important; }

/* SPA 换页：真正的交叉淡入，不再整页刷新 */
html.spa-out body {
  opacity: 0;
  transform: translateY(-6px) scale(.996);
  transition: opacity .16s ease-in, transform .18s ease-in;
}
html.spa-in body {
  animation: spa-enter .34s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes spa-enter {
  from { opacity: 0; transform: translateY(10px) scale(.997); }
  to   { opacity: 1; transform: none; }
}
body { transition: opacity .16s ease-out, transform .18s ease-out; }


/* 充值档位下面的「立即支付」 */
.denom {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
}
.denom strong { font-size: 20px; font-weight: 800; }
.denom-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(100deg, #cfa9f2 0%, #f6b26b 40%, #f5a623 60%, #6fb3f5 100%);
  color: #1a1206;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .22s cubic-bezier(.16,1,.3,1), filter .2s;
}
.denom-pay:hover { transform: scale(1.06); filter: brightness(1.05); }
.denom-pay:active { transform: scale(.95); }


/* ============================================================
   充值页新版排版
   ============================================================ */
.rc-page { max-width: 1180px; }

.rc-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.rc-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.rc-sub { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.rc-tabs { display: flex; gap: 10px; justify-self: end; }
.rc-tabs a {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.rc-tabs a:hover { color: var(--text); }
.rc-tabs a.active {
  color: #ffd89a;
  background: rgba(245, 166, 35, .14);
  border-color: rgba(245, 166, 35, .38);
}

/* 余额大卡 */
.rc-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 18px;
  border: 1px solid rgba(120, 170, 230, .28);
  background:
    radial-gradient(600px 200px at 10% 0%, rgba(245, 166, 35, .10), transparent 70%),
    linear-gradient(120deg, rgba(23, 57, 92, .85), rgba(13, 32, 54, .9));
  margin-bottom: 26px;
}
.rc-label { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; letter-spacing: .4px; }
.rc-amount { margin: 0; font-size: 46px; font-weight: 900; line-height: 1.05; letter-spacing: -1px; }
.rc-amount em { font-size: 24px; font-style: normal; margin-right: 6px; color: var(--accent); }
.rc-meta { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
.rc-quote { margin: 14px 0 0; color: #cfe0f2; font-size: 13px; }
.rc-art { color: rgba(245, 166, 35, .5); flex-shrink: 0; }
.rc-art svg { width: 120px; height: 96px; }

/* 面额 */
.rc-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rc-sec-head h2 { margin: 0; font-size: 16px; font-weight: 800; }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tier {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(23, 57, 92, .55), rgba(13, 32, 54, .7));
  transition: transform .24s cubic-bezier(.16,1,.3,1), border-color .2s, box-shadow .24s;
  overflow: hidden;
}
.tier:hover {
  transform: translateY(-3px) scale(1.012);
  border-color: rgba(245, 166, 35, .45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.tier-name { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.tier-price { margin: 0 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -.5px; }
.tier-price em { font-size: 16px; font-style: normal; margin-right: 2px; }
.tier-desc { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }
.tier-action {
  margin: 0 -18px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffd89a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(245, 166, 35, .06);
  transition: background .2s, color .2s;
  margin-top: auto;
}
.tier-action:hover { background: rgba(245, 166, 35, .14); color: #fff0cf; }

/* 三步说明 */
.rc-steps {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 22px 0 34px;
  color: var(--muted);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.rc-steps b { color: var(--accent); font-weight: 800; margin-right: 6px; }

/* 兑换 */
.rc-redeem {
  padding: 24px 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(13, 32, 54, .55);
  margin-bottom: 26px;
}
.rc-redeem h2 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.rc-redeem-row { display: flex; gap: 12px; margin-top: 14px; }
.rc-redeem-row input {
  flex: 1;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 34, .6);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 1px;
}
.rc-redeem-row .primary { width: auto; min-width: 150px; height: 46px; margin: 0; border-radius: 12px; }
.rc-msg { min-height: 18px; }
.rc-msg.ok { color: #7ef0c4; }
.rc-msg.err { color: #ffb3b3; }

/* 账单 */
.rc-ledger { padding-bottom: 10px; }
.tbl td.up { color: #7ef0c4; font-weight: 700; }
.tbl td.down { color: #ffb3b3; font-weight: 700; }

@media (max-width: 980px) {
  .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-head { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .rc-tabs { justify-self: center; }
  .rc-balance { flex-direction: column; align-items: flex-start; }
  .rc-art { display: none; }
}
@media (max-width: 560px) {
  .tier-grid { grid-template-columns: 1fr; }
  .rc-redeem-row { flex-direction: column; }
  .rc-redeem-row .primary { width: 100%; }
  .rc-amount { font-size: 36px; }
}


/* 页签按钮 + 视图切换 */
.rc-tabs button {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.rc-tabs button:hover { color: var(--text); transform: scale(1.03); }
.rc-tabs button.active {
  color: #ffd89a;
  background: rgba(245, 166, 35, .14);
  border-color: rgba(245, 166, 35, .38);
}
.rc-view[hidden] { display: none; }
.rc-view.rc-in { animation: rc-fade .32s cubic-bezier(.16,1,.3,1) both; }
@keyframes rc-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.rc-ledger { border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; background: rgba(13,32,54,.5); }


/* ============================================================
   背景修：去掉条纹纹理，渐变放大、边缘更柔
   ============================================================ */
body {
  background:
    radial-gradient(1400px 900px at 6% -12%, rgba(245, 166, 35, 0.13), transparent 68%),
    radial-gradient(1300px 880px at 98% -8%, rgba(63, 134, 221, 0.18), transparent 66%),
    radial-gradient(1600px 1000px at 50% 115%, rgba(63, 134, 221, 0.10), transparent 70%),
    var(--bg) !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* 背景层本身也不要任何纹理叠加 */
.bg-stage { background: var(--bg) !important; }
.bg-veil {
  background:
    radial-gradient(1200px 700px at 18% -10%, rgba(12, 30, 51, .30), transparent 72%),
    linear-gradient(180deg, rgba(10, 24, 42, .58) 0%, rgba(10, 24, 42, .74) 55%, rgba(10, 24, 42, .92) 100%) !important;
}


/* 背景渐变改用视口单位，边界永远落在屏幕外，不会出现黄边或分层 */
body {
  background:
    radial-gradient(130vw 85vh at 8% -18%, rgba(245, 166, 35, 0.16), transparent 72%),
    radial-gradient(125vw 80vh at 96% -12%, rgba(63, 134, 221, 0.20), transparent 70%),
    radial-gradient(140vw 90vh at 50% 118%, rgba(63, 134, 221, 0.10), transparent 74%),
    var(--bg) !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* 首页背景遮罩同样不出现硬边 */
.bg-veil {
  background:
    radial-gradient(130vw 90vh at 15% -20%, rgba(12, 30, 51, .18), transparent 74%),
    linear-gradient(180deg, rgba(10, 24, 42, .52) 0%, rgba(10, 24, 42, .70) 52%, rgba(10, 24, 42, .93) 100%) !important;
}


/* ============================================================
   修滚动时的背景撕裂
   1) 整屏 fixed 元素上不要用 filter: blur()——会在滚动时按瓦片重采样，出现接缝和色带
      背景图本身已经是预模糊的，这里只留色彩调整
   2) body 不用渐变 + background-attachment: fixed（同样会撕裂），
      改成单独一层 fixed 伪元素，交给合成器处理
   ============================================================ */
.bg-stage {
  background: var(--bg) !important;
  contain: paint;
}
.bg-layer {
  filter: saturate(1.18) brightness(.72) !important;
  transform: none !important;
  inset: 0 !important;
  background-size: cover;
  will-change: opacity;
}
.bg-veil { position: absolute; inset: 0; }

/* 正文页背景：纯色打底 + 固定渐变层 */
body {
  background: var(--bg) !important;
  background-attachment: scroll !important;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(130vw 85vh at 8% -18%, rgba(245, 166, 35, 0.15), transparent 72%),
    radial-gradient(125vw 80vh at 96% -12%, rgba(63, 134, 221, 0.19), transparent 70%),
    radial-gradient(140vw 90vh at 50% 118%, rgba(63, 134, 221, 0.09), transparent 74%);
  background-repeat: no-repeat;
}

/* 首页有照片层，伪元素不重复画 */
.home-page::before { display: none !important; }


/* ============================================================
   无限画布页
   ============================================================ */

      /* ---------- 画布页专用 ---------- */
      body.cv-body { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
      body.cv-body .topbar { flex: 0 0 auto; }

      .cv-wrap {
        flex: 1;
        min-height: 0;
        display: flex;
        gap: 20px;
        padding: 10px 28px 14px;
        box-sizing: border-box;
      }
      .cv-wrap .sidenav {
        flex: 0 0 168px;
        position: static;
        align-self: stretch;
        display: flex;
        flex-direction: column;
        max-height: 100%;
        overflow: auto;
      }
      .cv-page {
        flex: 1;
        min-width: 0;
        min-height: 0;
        display: flex;
        padding: 0;
        margin: 0;
        max-width: none;
        border-radius: 16px;
        overflow: hidden;
      }

      .cv-stage {
        position: relative;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        background: #0a182a;
        border-radius: 16px;
        border: 1px solid var(--line);
        cursor: grab;
        touch-action: none;
        user-select: none;
      }
      .cv-stage.grabbing { cursor: grabbing; }
      .cv-stage::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
        background-size: var(--grid, 28px) var(--grid, 28px);
        background-position: var(--gx, 0) var(--gy, 0);
        opacity: .5;
      }
      .cv-world { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }

      .cv-node {
        position: absolute;
        border-radius: 14px;
        border: 1px solid rgba(120, 170, 230, .3);
        background: rgba(13, 32, 54, .92);
        box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
        overflow: hidden;
        cursor: move;
        transition: border-color .18s, box-shadow .18s;
      }
      .cv-node:hover { border-color: rgba(245, 166, 35, .45); }
      .cv-node.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(245, 166, 35, .35), 0 14px 40px rgba(0, 0, 0, .45); }
      .cv-node img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

      .cv-text {
        padding: 32px 16px 14px;
        font-size: 13.5px;
        line-height: 1.6;
        color: #e8f0fb;
        height: 100%;
        box-sizing: border-box;
        min-height: 0;
        max-height: 100%;
        white-space: pre-wrap;
        word-break: break-word;
        overflow: auto;
        overscroll-behavior: contain;
        /* 深色画布上默认的白色滚动条太扎眼，换成细的暗色滑块 */
        scrollbar-width: thin;
        scrollbar-color: rgba(160, 190, 230, 0.32) transparent;
      }
      .cv-text::-webkit-scrollbar { width: 8px; height: 8px; }
      .cv-text::-webkit-scrollbar-track { background: transparent; }
      .cv-text::-webkit-scrollbar-thumb {
        background: rgba(160, 190, 230, 0.26);
        border-radius: 8px;
        border: 2px solid transparent;
        background-clip: content-box;
      }
      .cv-text::-webkit-scrollbar-thumb:hover { background: rgba(160, 190, 230, 0.45); background-clip: content-box; }
      .cv-text::-webkit-scrollbar-corner { background: transparent; }
      .cv-text[contenteditable="true"]:focus { outline: none; }

      .cv-badge {
        position: absolute;
        left: 8px;
        top: 8px;
        padding: 3px 9px;
        border-radius: 999px;
        background: rgba(8, 20, 34, .72);
        border: 1px solid rgba(255, 255, 255, .16);
        color: #d9e6f5;
        font-size: 11px;
        backdrop-filter: blur(6px);
        pointer-events: none;
      }
      /* 提示词节点：顶部标题条，专门用来拖动（正文不能碰，一碰就是选字） */
      .cv-drag {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 30px;
        cursor: move;
      }
      .cv-tools {
        position: absolute;
        right: 8px;
        top: 8px;
        display: flex;
        gap: 6px;
        opacity: 0;
        transform: translateY(-4px);
        transition: opacity .18s, transform .18s;
      }
      .cv-node:hover .cv-tools, .cv-node.sel .cv-tools { opacity: 1; transform: none; }
      .cv-tools button {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, .2);
        background: rgba(8, 20, 34, .8);
        color: #e6eef8;
        font-size: 13px;
        line-height: 1;
        cursor: pointer;
        display: grid;
        place-items: center;
      }
      .cv-tools button:hover { background: rgba(245, 166, 35, .9); color: #20160a; }

      .cv-bar {
        position: absolute;
        left: 50%;
        bottom: 18px;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px;
        border-radius: 16px;
        border: 1px solid rgba(120, 170, 230, .28);
        background: rgba(9, 22, 38, .86);
        backdrop-filter: blur(14px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
        z-index: 5;
        max-width: calc(100% - 24px);
        overflow-x: auto;
        scrollbar-width: none;
      }
      .cv-bar::-webkit-scrollbar { display: none; }
      .cv-bar button {
        height: 34px;
        padding: 0 14px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, .14);
        background: rgba(255, 255, 255, .05);
        color: #e6eef8;
        font-size: 12.5px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        flex: 0 0 auto;
        transition: background .18s, transform .2s, border-color .18s;
      }
      .cv-bar button:hover { background: rgba(255, 255, 255, .12); transform: scale(1.04); }
      .cv-bar button.primary { background: linear-gradient(100deg, #cfa9f2, #f6b26b 45%, #f5a623 62%, #6fb3f5); color: #1a1206; border: 0; flex: 0 0 auto; min-width: 132px; }
      .cv-bar .sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .14); margin: 0 4px; flex: 0 0 auto; }
      .cv-zoom { min-width: 54px; text-align: center; color: #cfe0f2; font-size: 12.5px; flex: 0 0 auto; }

      .cv-hint {
        position: absolute;
        left: 18px;
        top: 62px;
        max-width: 320px;
        padding: 10px 14px;
        border-radius: 12px;
        background: rgba(9, 22, 38, .78);
        border: 1px solid rgba(120, 170, 230, .22);
        color: #b9cce0;
        font-size: 12px;
        line-height: 1.6;
        backdrop-filter: blur(10px);
        pointer-events: none;
      }
      .cv-hint b { color: #ffd89a; font-weight: 700; }
      .cv-save {
        position: absolute;
        right: 18px;
        top: 16px;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(9, 22, 38, .78);
        border: 1px solid rgba(120, 170, 230, .22);
        color: #9fb6cc;
        font-size: 11.5px;
        backdrop-filter: blur(10px);
      }
      .cv-empty {
        position: absolute;
        left: 50%;
        top: 44%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: #6d8aa6;
        font-size: 13.5px;
        pointer-events: none;
        line-height: 2;
      }
      .cv-empty b { display: block; font-size: 17px; color: #a8c1d8; margin-bottom: 6px; font-weight: 700; }

      /* 画布库 */
      .cv-lib { position: absolute; left: 18px; top: 16px; z-index: 6; }
      .cv-lib-btn {
        display: inline-flex; align-items: center; gap: 8px;
        height: 36px; padding: 0 14px; border-radius: 12px;
        border: 1px solid rgba(120, 170, 230, .28);
        background: rgba(9, 22, 38, .86);
        color: #e6eef8; font-size: 12.5px; font-weight: 700;
        cursor: pointer; backdrop-filter: blur(12px);
        transition: border-color .18s, transform .2s;
      }
      .cv-lib-btn:hover { border-color: var(--accent); transform: scale(1.02); }
      .cv-lib-btn svg:first-child { width: 15px; height: 15px; opacity: .8; }
      .cv-caret { width: 14px; height: 14px; opacity: .6; }
      .cv-lib-pop {
        position: absolute; left: 0; top: 42px; width: 260px;
        border-radius: 14px; border: 1px solid rgba(120, 170, 230, .28);
        background: rgba(9, 22, 38, .96); backdrop-filter: blur(16px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, .45); overflow: hidden;
      }
      .cv-lib-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08);
        color: #9fb6cc; font-size: 11.5px;
      }
      .cv-lib-head button, .cv-lib-foot button {
        border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
        color: #dbe7f4; font-size: 11.5px; padding: 4px 10px; border-radius: 8px; cursor: pointer;
      }
      .cv-lib-head button:hover, .cv-lib-foot button:hover { background: rgba(245,166,35,.2); border-color: rgba(245,166,35,.4); }
      .cv-lib-list { max-height: 240px; overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
      .cv-lib-item {
        text-align: left; padding: 9px 10px; border-radius: 9px;
        border: 1px solid transparent; background: transparent;
        color: #cfe0f2; font-size: 12.5px; cursor: pointer;
      }
      .cv-lib-item:hover { background: rgba(255,255,255,.06); }
      .cv-lib-item.on { background: rgba(245,166,35,.16); border-color: rgba(245,166,35,.4); color: #ffe4b5; }
      .cv-lib-empty { margin: 10px; color: #7c93a9; font-size: 12px; text-align: center; }
      .cv-lib-foot { display: flex; gap: 6px; padding: 8px; border-top: 1px solid rgba(255,255,255,.08); }
      .cv-lib-foot button { flex: 1; }

      .cv-bar button#send, .cv-bar button#del {
        width: auto !important;
        flex: 0 0 auto;
        min-width: 0;
        padding: 0 16px;
      }
      .cv-bar button#send { min-width: 128px; }

      /* 连线层与端口 */
      .cv-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
      .cv-edge { fill: none; stroke: rgba(120, 170, 230, .55); stroke-width: 2; pointer-events: stroke; cursor: pointer; }
      /* 看不见的加宽命中层：线本身只有 2px，右键很难点中；
         这一层 18px 宽、透明、只负责接事件（左键选中 / 右键删连线都走它）。
         non-scaling-stroke 保证缩放后仍是 18 屏幕像素，不随画布放大缩小。 */
      .cv-edge-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
      .cv-edge.sel { stroke: var(--accent); stroke-width: 3; }
      .cv-edge.temp { stroke: var(--accent); stroke-dasharray: 6 5; }
      /* 无效连线：这条线对生成没有任何作用（例如「提示词 → 图片」「图片 → 文本」） */
      .cv-edge.bad { stroke: #ff5c7a; stroke-dasharray: 5 5; stroke-width: 2; }
      .cv-edge.bad.sel { stroke: #ff8aa0; stroke-width: 3; }
      .cv-node.drop-target { border-color: #7ef0c4; box-shadow: 0 0 0 2px rgba(126, 240, 196, .4); }

      .cv-port {
        position: absolute;
        top: 50%;
        width: 14px;
        height: 14px;
        margin-top: -7px;
        border-radius: 50%;
        border: 2px solid rgba(120, 170, 230, .8);
        background: #0a182a;
        cursor: crosshair;
        opacity: 0;
        transition: opacity .15s, transform .2s, border-color .15s;
        z-index: 3;
      }
      .cv-port.out { right: 3px; }
      .cv-port.in { left: 3px; }
      .cv-port { opacity: .45; pointer-events: auto; }
      .cv-node:hover .cv-port, .cv-node.sel .cv-port { opacity: 1; }
      .cv-port:hover { transform: scale(1.25); border-color: var(--accent); background: var(--accent); }

      /* 生成节点 */
      .cv-gen { padding: 32px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
      .gen-body { display: flex; flex-direction: column; gap: 10px; }
      .gen-body video { width: 100%; border-radius: 10px; display: block; background: #000; }
      .gen-state { margin: 0; color: #9fb6cc; font-size: 12.5px; }
      .gen-state.busy { color: #ffd89a; }
      .gen-state.err { color: #ffb3b3; }
      .gen-btn {
        height: 34px;
        border-radius: 10px;
        border: 0;
        background: linear-gradient(100deg, #cfa9f2, #f6b26b 45%, #f5a623 62%, #6fb3f5);
        color: #1a1206;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
      }
      .gen-btn:disabled { filter: grayscale(.5); cursor: default; }

      /* 右侧抽屉 */
      .cv-side {
        position: absolute; right: 18px; top: 58px;
        display: flex; flex-direction: column; gap: 8px; z-index: 6;
      }
      .cv-side-btn {
        width: 46px; height: 40px; border-radius: 12px;
        border: 1px solid rgba(120, 170, 230, .28);
        background: rgba(9, 22, 38, .86); color: #cfe0f2;
        font-size: 11.5px; font-weight: 700; cursor: pointer;
        backdrop-filter: blur(12px);
        transition: border-color .18s, transform .2s, color .2s;
      }
      .cv-side-btn:hover { border-color: var(--accent); color: #ffd89a; transform: scale(1.04); }
      .cv-side-btn.on { border-color: var(--accent); color: #ffd89a; background: rgba(245,166,35,.16); }

      .cv-drawer {
        position: absolute; right: 76px; top: 16px; bottom: 16px; width: 300px;
        display: flex; flex-direction: column;
        border-radius: 16px; border: 1px solid rgba(120, 170, 230, .28);
        background: rgba(9, 22, 38, .96); backdrop-filter: blur(18px);
        box-shadow: 0 24px 60px rgba(0, 0, 0, .45); z-index: 7; overflow: hidden;
      }
      .cv-drawer-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08);
      }
      .cv-drawer-tabs { display: flex; gap: 6px; }
      .cv-drawer-tabs button {
        padding: 5px 12px; border-radius: 8px; font-size: 12px; cursor: pointer;
        border: 1px solid transparent; background: transparent; color: #9fb6cc;
      }
      .cv-drawer-tabs button.on { color: #ffd89a; background: rgba(245,166,35,.16); border-color: rgba(245,166,35,.38); }
      .cv-drawer-close {
        width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
        border: 1px solid rgba(255,255,255,.14); background: transparent; color: #cfe0f2;
      }
      .cv-drawer-body { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
      .dr-empty { color: #7c93a9; font-size: 12px; text-align: center; padding: 24px 0; }
      .dr-asset { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
      .dr-asset:hover { background: rgba(255,255,255,.06); border-color: rgba(120,170,230,.3); }
      .dr-asset img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; background: #0a182a; }
      .dr-asset .dr-meta { min-width: 0; font-size: 12px; color: #cfe0f2; }
      .dr-asset .dr-meta small { display: block; color: #7c93a9; font-size: 11px; }
      .dr-prompt { position: relative; padding: 10px 30px 10px 10px; border-radius: 10px; cursor: pointer; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
      .dr-prompt:hover { border-color: rgba(120,170,230,.4); background: rgba(255,255,255,.07); }
      .dr-prompt p { margin: 0; font-size: 12.5px; color: #dbe7f4; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
      .dr-prompt .dr-del { position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 6px; border: 0; background: transparent; color: #7c93a9; cursor: pointer; }
      .dr-prompt .dr-del:hover { color: #ffb3b3; background: rgba(255,0,0,.1); }

      .cv-marquee {
        position: absolute; border: 1px solid var(--accent);
        background: rgba(245, 166, 35, .12); border-radius: 4px; pointer-events: none; z-index: 4;
      }
      .cv-resize {
        position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px;
        cursor: nwse-resize; opacity: 0; transition: opacity .15s;
        border-right: 3px solid rgba(245,166,35,.9); border-bottom: 3px solid rgba(245,166,35,.9);
        border-bottom-right-radius: 6px;
      }
      .cv-node:hover .cv-resize, .cv-node.sel .cv-resize { opacity: 1; }

      @media (max-width: 900px) {
        .cv-wrap { flex-direction: column; gap: 8px; padding: 8px 12px 10px; }
        .cv-wrap .sidenav { flex: 0 0 auto; flex-direction: row; align-items: center; overflow-x: auto; }
        .cv-hint { display: none; }
        .cv-lib { left: 12px; top: 10px; }
        .cv-lib-pop { width: 220px; }
        .cv-bar { bottom: 10px; }
      }
    


/* 充值页：支付方式说明 + 站长联系方式 */
.rc-pay-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 14px;
  border: 1px solid rgba(63, 160, 245, .28);
  background: rgba(63, 134, 221, .08);
}
.rc-pay-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #d7e6f6; }
.rc-pay-line strong { color: #8ec5ff; }
.rc-pay-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(63, 160, 245, .22);
  border: 1px solid rgba(63, 160, 245, .45);
  color: #9ed0ff;
  font-size: 11.5px;
  font-weight: 700;
}
.rc-contact { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-copy {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: #e6eef8;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.rc-copy:hover { border-color: var(--accent); color: #ffd89a; background: rgba(245, 166, 35, .12); }
.rc-copy.done { border-color: #7ef0c4; color: #7ef0c4; background: rgba(126, 240, 196, .12); }

.tier-note {
  margin: 8px 0 12px;
  font-size: 11.5px;
  color: #8299b0;
  text-align: center;
}


/* 复制按钮：固定「标签 + 号码」，复制成功后只显示对勾，文字不变 */
.rc-copy { display: inline-flex; align-items: center; gap: 8px; }
.rc-copy .rc-k { color: #9fb6cc; font-size: 12px; }
.rc-copy .rc-v { color: #e6eef8; letter-spacing: .3px; user-select: all; }
.rc-copy.done { border-color: #7ef0c4; background: rgba(126, 240, 196, .12); }
.rc-copy.done .rc-v { color: #7ef0c4; }
.rc-copy.done::after {
  content: "已复制";
  font-size: 11px;
  color: #7ef0c4;
  animation: rc-copied .2s ease-out;
}
@keyframes rc-copied {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}


/* 工具条：所有按钮统一基线，避免被全局 .primary 的 margin-top 顶偏 */
.cv-bar { align-items: center; }
.cv-bar > button,
.cv-bar > button.primary,
.cv-bar > .cv-zoom,
.cv-bar > .sep {
  margin: 0 !important;
  align-self: center;
  vertical-align: middle;
}
.cv-bar > button.primary {
  height: 34px;
  line-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 工作台：整页不滚，左右两栏各自滚 ---------- */
/* 目的：任务多了只滚右侧列表，页面本身钉住不动（左下表单也只在栏内滚） */
@media (min-width: 1081px) {
  body.app-page:has(.app-grid) {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.app-page:has(.app-grid) > .shell {
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: 22px;
    align-items: stretch;
  }
  body.app-page:has(.app-grid) .page {
    height: 100%;
    min-height: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  body.app-page:has(.app-grid) .app-grid {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
  }

  /* 右栏：标题 + 提示固定，任务列表是独立滚动区 */
  body.app-page:has(.app-grid) .app-grid > .jobs {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  body.app-page:has(.app-grid) .app-grid > .jobs .job-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    padding-bottom: 4px;
  }

  /* 左栏表单本身也可能比屏幕高，让它自己滚，别把整页撑开 */
  body.app-page:has(.app-grid) .app-grid > .composer {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 10px;
  }

  /* 侧边栏跟着内容区高度走，别被拉长 */
  body.app-page:has(.app-grid) .sidenav {
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100%;
    overflow-y: auto;
  }

  /* 细滚动条，别用系统那种粗的 */
  body.app-page:has(.app-grid) .composer,
  body.app-page:has(.app-grid) .job-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 150, 170, 0.35) transparent;
  }
  body.app-page:has(.app-grid) .composer::-webkit-scrollbar,
  body.app-page:has(.app-grid) .job-list::-webkit-scrollbar { width: 8px; }
  body.app-page:has(.app-grid) .composer::-webkit-scrollbar-thumb,
  body.app-page:has(.app-grid) .job-list::-webkit-scrollbar-thumb {
    background: rgba(140, 150, 170, 0.28);
    border-radius: 99px;
  }
  body.app-page:has(.app-grid) .composer::-webkit-scrollbar-thumb:hover,
  body.app-page:has(.app-grid) .job-list::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 150, 170, 0.45);
  }
  body.app-page:has(.app-grid) .composer::-webkit-scrollbar-track,
  body.app-page:has(.app-grid) .job-list::-webkit-scrollbar-track { background: transparent; }
}

/* ---------- 下载原片：从灰色小链接改成一眼能看见的按钮 ---------- */
.job-video .dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #0a0c11;
  background: linear-gradient(135deg, #a58bff, var(--accent) 45%, var(--accent-2));
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.3);
  text-decoration: none;
  cursor: pointer;
}
.job-video .dl::before {
  content: "⤓";
  font-size: 15px;
  line-height: 1;
}
.job-video .dl:hover {
  text-decoration: none;
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124, 92, 255, 0.42);
}
.job-video .dl:active {
  transform: translateY(0);
  filter: brightness(0.98);
}


/* 资产库抽屉：整行都能拖（光标 + 拖动中的状态） */
.dr-asset { cursor: grab; }
.dr-asset:active { cursor: grabbing; }
.dr-asset.dragging { opacity: .45; }


/* ---------- 历史页：表格定宽，提示词收窄，不用横向滚 ---------- */
.mj-table { table-layout: fixed; }
.mj-table th, .mj-table td { overflow: hidden; }
.mj-table td.cell-clip > span,
.mj-table div.cell-clip > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mj-table .row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mj-table td .pill { display: inline-block; }
@media (max-width: 1100px) { .mj-table .col-time { display: none; } }
/* 操作列塞了「下载 / 重试 / 重新填写」，给窄屏一点余量，别被 overflow 裁掉 */
@media (max-width: 1280px) {
  .mj-table .row-actions .ghost.tiny { padding-left: 7px; padding-right: 7px; }
}

/* 历史页表格宽一点，别把提示词挤没了 */
body.jobs-page .page { max-width: 1300px; }

/* 工作台：shell 默认被 flex 的 auto margin 缩成内容宽，导致侧栏比品牌右移 48px；拉满宽度让侧栏对齐「云梦绘」 */
body.app-page > .shell { width: 100%; }

/* ============================================================
   工作台左栏（对标上游生成器）：模型卡 / 参数卡 / 提示词 / 素材 / 费用
   ============================================================ */

.gen-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.gen-head .panel-title { margin: 0; }
.gen-head-note { font-size: 12px; color: var(--muted); }

.gen-label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.gen-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.gen-label-row .gen-label { margin-bottom: 8px; }
.gen-count { font-style: normal; color: var(--muted); font-size: 11.5px; margin-left: 6px; }

/* 模型 */
.gen-model { margin-bottom: 14px; }
.gen-model-row { display: flex; gap: 8px; align-items: center; }
.gen-model-select {
  flex: 1 1 auto; min-width: 0;
  padding: 11px 12px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  color: var(--text); font-size: 13.5px; font-weight: 650; cursor: pointer;
}
.gen-model-select:focus { outline: none; border-color: var(--accent); }
.gen-badge {
  flex: 0 0 auto; font-size: 11px; padding: 4px 9px; border-radius: 999px;
  color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1);
}
.gen-model-meta { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* 参数卡：三列 */
.gen-params { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.gen-params:empty { display: none; }
.gen-param {
  min-width: 0; padding: 10px 12px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
}
.gen-param-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.gen-param-value { font-size: 19px; font-weight: 750; line-height: 1.25; letter-spacing: 0.01em; }
.gen-param-value span { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.gen-param-note { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.gen-param-select {
  width: 100%; border: 0; background: transparent; color: var(--text);
  font-size: 19px; font-weight: 750; padding: 0; margin-top: 2px; cursor: pointer;
}
.gen-param-select:focus { outline: none; }

/* 参数卡里的滑块 */
.gen-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; outline: none; cursor: pointer;
  margin: 12px 0 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 42%, #22405f 42%, #22405f 100%);
}
.gen-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid #20160a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); cursor: grab;
}
.gen-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid #20160a;
}

/* 提示词 */
.gen-block { margin-bottom: 16px; }
.gen-prompt {
  position: relative; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.gen-prompt textarea {
  display: block; width: 100%; min-height: 118px; padding: 12px 12px 4px;
  border: 0; background: transparent; color: var(--text);
  font: inherit; line-height: 1.6; resize: vertical; outline: none;
  border-radius: 12px 12px 0 0;
}
.gen-prompt-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 8px; }
.gen-mention-btn {
  border: 0; background: transparent; color: var(--accent-2);
  font-size: 12px; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.gen-mention-btn:hover { background: rgba(255, 255, 255, 0.06); }
.gen-mention {
  position: absolute; left: 10px; bottom: 42px; z-index: 20;
  min-width: 190px; max-height: 220px; overflow: auto; padding: 6px;
  border-radius: 12px; background: #101725; border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; gap: 2px;
}
.gen-mention[hidden] { display: none; }
.gen-mention button {
  display: flex; gap: 8px; align-items: center;
  padding: 7px 9px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text); font-size: 12.5px; text-align: left; cursor: pointer;
}
.gen-mention button:hover { background: rgba(255, 255, 255, 0.07); }
.gen-mention button b { color: var(--accent-2); font-weight: 700; }
.gen-mention-empty { margin: 0; padding: 10px; color: var(--muted); font-size: 12px; }

/* 参考素材 */
.gen-refs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start;
  padding: 10px; border-radius: 12px;
  border: 1px dashed var(--line); background: rgba(255, 255, 255, 0.02);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.gen-refs:hover { border-color: rgba(140, 160, 190, 0.5); }
.gen-refs.drag { border-color: var(--accent); background: rgba(124, 92, 255, 0.08); }
.gen-refs-grid { display: contents; }
.gen-ref-add {
  width: 72px; height: 72px; border-radius: 10px;
  border: 1px dashed rgba(140, 160, 190, 0.45); background: rgba(255, 255, 255, 0.03);
  color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.gen-ref-add:hover { border-color: var(--accent); color: var(--accent); }
.gen-hint { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* 音频 / 视频参考 */
.gen-media { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.gen-media[hidden] { display: none; }
.gen-media-box { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.gen-media-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; }
.gen-media-hint { margin: 4px 0 8px; font-size: 11px; color: var(--muted); }
.gen-media-add {
  width: 100%; padding: 7px 10px; border-radius: 9px;
  border: 1px dashed rgba(140, 160, 190, 0.4); background: transparent;
  color: var(--muted); font-size: 12px; cursor: pointer;
}
.gen-media-add:hover { border-color: var(--accent); color: var(--accent); }
.gen-media-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.gen-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text);
  background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 4px 6px;
  overflow: hidden; white-space: nowrap;
}
.gen-chip b { color: var(--accent-2); font-weight: 600; }
.gen-chip button { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.gen-chip button:hover { color: var(--err); }

/* 参考视频：第一帧缩略图 + 上传进度条 */
.gen-chip { position: relative; }
.gen-chip-thumb {
  width: 32px; height: 32px; border-radius: 6px; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08) center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.gen-chip-thumb.empty { background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)); }
.gen-chip-name { overflow: hidden; text-overflow: ellipsis; }
.gen-chip-bar {
  position: absolute; left: 44px; right: 28px; bottom: 3px; height: 3px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden;
}
.gen-chip-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.18s linear; }
.gen-chip.uploading .gen-chip-name { opacity: 0.72; }

/* 费用 + 提交 */
.gen-submit {
  display: flex; align-items: center; gap: 14px; margin-top: 4px;
  position: sticky; bottom: -21px; z-index: 5;
  padding: 12px 0 21px;
  background: var(--panel);
  border-radius: 0 0 13px 13px;
  box-shadow: 0 -14px 18px -14px rgba(0, 0, 0, 0.55);
}
.gen-cost { flex: 0 0 auto; display: flex; flex-direction: column; gap: 1px; }
.gen-cost span { font-size: 11px; color: var(--muted); }
.gen-cost strong { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.gen-cost small { font-size: 10.5px; color: var(--ok); }
.gen-go { flex: 1 1 auto; margin: 0; }

html[data-theme="light"] .gen-param,
html[data-theme="light"] .gen-media-box,
html[data-theme="light"] .gen-prompt,
html[data-theme="light"] .gen-refs { background: rgba(12, 26, 46, 0.03); }
html[data-theme="light"] .gen-model-select { background: #fff; }
html[data-theme="light"] .gen-mention { background: #fff; }

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

html[data-theme="light"] .gen-submit { background: var(--panel); box-shadow: 0 -14px 18px -14px rgba(30, 50, 80, 0.18); }

/* ---------- 画布右键菜单 ---------- */
.cv-menu {
  position: fixed; z-index: 3000; min-width: 132px;
  padding: 6px; border-radius: 12px;
  background: rgba(13, 20, 30, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; gap: 2px;
}
.cv-menu[hidden] { display: none; }
.cv-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text); font-size: 13px; text-align: left; cursor: pointer;
}
.cv-menu button[hidden] { display: none; }
.cv-menu button span { color: var(--muted); font-size: 11px; }
.cv-menu button:hover { background: rgba(255, 255, 255, 0.08); }
html[data-theme="light"] .cv-menu { background: #fff; box-shadow: 0 18px 40px rgba(30, 50, 80, 0.18); }
html[data-theme="light"] .cv-menu button:hover { background: rgba(12, 26, 46, 0.06); }

/* ---------- 充值页：别挤成一根窄柱 ---------- */
/* .page 是 grid item 且带 margin:0 auto，内容不够宽时会 shrink-to-fit（只有 ~770px），
   右边全是空白。这里强制撑满，宽度交给 .rc-page 的 max-width 1180 管。 */
.rc-page { width: 100%; margin-left: 0; margin-right: 0; }

/* ---------- 充值页：宽屏两栏（左余额/说明/兑换，右面额/步骤） ---------- */
@media (min-width: 1200px) {
  .rc-page #view-recharge {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    gap: 18px;
    align-items: start;
  }
  .rc-main,
  .rc-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .rc-main > section,
  .rc-side > section { margin: 0; }

  .rc-page .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rc-page .tier { padding: 14px 14px 0; }
  .rc-page .tier-name { margin-bottom: 6px; }
  .rc-page .tier-price { font-size: 26px; margin-bottom: 4px; }
  .rc-page .tier-desc { margin-bottom: 12px; }
  .rc-page .tier-action { margin: 0 -14px; padding: 10px 14px; }

  .rc-page .rc-balance { padding: 22px 24px; }
  .rc-page .rc-balance .rc-amount { font-size: 40px; }
  .rc-page .rc-balance .rc-quote { margin-top: 10px; }
  .rc-page .rc-redeem { padding: 18px 22px; }
  .rc-page .rc-pay-note { padding: 10px 16px; }
  .rc-page .rc-head { margin-bottom: 14px; padding-bottom: 10px; }
  .rc-page .rc-steps { margin: 14px 0 0; }

  body.app-page:has(.rc-page) > .shell { padding-bottom: 18px; }
  body.app-page:has(.rc-page) .page { padding-bottom: 20px; }
}

/* ---------- 账号页：左「邀请好友 + 邮箱」，右「修改密码」 ---------- */
.acc-page {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.acc-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.acc-col > .card { margin: 0; }

@media (max-width: 900px) {
  .acc-page { grid-template-columns: 1fr; }
}

/* ---------- 工作台宽屏：左表单收窄靠左，右侧任务改成三列 ---------- */
@media (min-width: 1200px) {
  /* 去掉 1100 的限宽，左边不再被居中推右，右边拿到全部剩余宽度 */
  body.app-page:has(.app-grid) .page { max-width: none; }
  body.app-page:has(.app-grid) .app-grid {
    grid-template-columns: minmax(340px, 380px) minmax(0, 1fr);
  }

  body.app-page:has(.app-grid) .app-grid > .jobs .job-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
    align-items: start;
  }

  body.app-page:has(.app-grid) .app-grid > .jobs .job {
    padding: 12px;
    min-width: 0;
  }
  body.app-page:has(.app-grid) .app-grid > .jobs .job-top { gap: 10px; }
  body.app-page:has(.app-grid) .app-grid > .jobs .thumb {
    width: 58px; height: 58px; flex: 0 0 58px;
  }
  body.app-page:has(.app-grid) .app-grid > .jobs .job-prompt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.app-page:has(.app-grid) .job-videos { gap: 8px; }
  body.app-page:has(.app-grid) .job-video { flex: 1 1 auto; min-width: 0; }
  body.app-page:has(.app-grid) .job-video video {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
  }
}

/* 支付说明条置顶：宽屏时横跨两栏，压在最上面 */
@media (min-width: 1200px) {
  .rc-page #view-recharge > .rc-pay-note {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
  }
}

/* ---------- 后台用户表：任务统计（总数 / 成功 / 失败 / 进行中） ---------- */
.job-stat-cell { white-space: nowrap; }
.job-stat { font-variant-numeric: tabular-nums; font-weight: 600; }
.job-stat-sep { color: var(--muted); margin: 0 5px; opacity: 0.7; }
.job-stat-done { color: var(--ok); }
.job-stat-error { color: var(--err); }
.job-stat-running { color: #b9a5ff; }
.job-stat-idle { color: var(--muted); font-weight: 500; }

/* ---------- 画布：生成节点参数（模型 / 画幅 / 时长） ---------- */
.cv-node .gen-controls { display: flex; flex-direction: column; gap: 8px; }
.cv-node .gen-controls select,
.cv-node .gen-dur {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(120, 170, 230, .28);
  background: rgba(9, 22, 38, .9);
  color: #cfe0f2;
  font-size: 12.5px;
  padding: 0 8px;
  outline: none;
}
.cv-node .gen-controls select:focus,
.cv-node .gen-dur:focus { border-color: var(--accent); }
.cv-node .gen-controls select:disabled,
.cv-node .gen-dur:disabled { opacity: .55; }
.cv-node .gen-row { display: flex; gap: 8px; align-items: center; }
.cv-node .gen-row > .gen-ratio { flex: 1 1 0; min-width: 0; }
.cv-node .gen-dur-wrap { display: inline-flex; align-items: center; gap: 4px; color: #9fb6cc; font-size: 12px; flex: 0 0 auto; }
.cv-node .gen-dur { width: 58px; padding: 0 6px; }

/* 音频 / 视频素材节点 */
.cv-node .cv-media { padding: 32px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.cv-node .cv-media video { width: 100%; border-radius: 8px; display: block; background: #000; }
.cv-node .cv-media audio { width: 100%; }
.cv-node .cv-media-icon { font-size: 20px; color: #ffd89a; line-height: 1; }
.cv-node .cv-media-name {
  margin: 0; font-size: 12px; color: #cfe0f2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 原生下拉弹层跟随主题 ---------- */
/* 不写这段的话，Windows 的 <select> 弹层是白底，而 option 文字承了亮色 var(--text)，就白底白字 */
select { color-scheme: dark; }
html[data-theme="light"] select { color-scheme: light; }

select option,
select optgroup {
  background-color: #101a28;
  color: #e7ebf3;
}
html[data-theme="light"] select option,
html[data-theme="light"] select optgroup {
  background-color: #ffffff;
  color: #17293f;
}

/* ---------- @ 引用菜单：每项带缩略图 ---------- */
.gen-mention { min-width: 268px; max-height: 300px; padding: 7px; }
.gen-mention button { padding: 7px 9px; gap: 11px; }
.gen-mention-thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #0a182a;
  border: 1px solid rgba(120, 170, 230, 0.25);
  display: block;
}
.gen-mention-thumb.is-icon {
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #ffd89a;
  border-style: dashed;
}
.gen-mention-label { font-size: 13px; color: var(--text); font-weight: 600; }
html[data-theme="light"] .gen-mention-thumb { background: #eef3fa; }

/* ---------- 顶栏：站长 QQ / 微信 ---------- */
.top-contacts {
  margin-left: 18px;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.tc-line {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tc-k { color: var(--muted); }
.tc-copy {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.tc-copy:hover { color: var(--accent-2); text-decoration: underline; }
.tc-copy[data-copied] { color: var(--ok); }
.tc-copy[data-copied]::after { content: " 已复制"; font-size: 10px; }
.tc-note { margin: 0; font-size: 11.5px; color: #ffd89a; white-space: nowrap; }
html[data-theme="light"] .tc-note { color: #b4741a; }

@media (max-width: 1000px) {
  .top-contacts { display: none; }
}

/* CVTOP: 画布页顶栏铺满，品牌贴左上角 */
body.cv-body .topbar { max-width: none; margin: 0; padding-left: 28px; padding-right: 28px; }

/* 账号页：退出登录（整条红色按钮，撑满右栏、左边缘和上面的卡片对齐） */
.acc-logout {
  width: 100%;
  height: 52px;
  margin: 0;
  border: 1px solid rgba(255, 107, 107, 0.5);
  border-radius: 12px;
  background: linear-gradient(135deg, #e5484d, #b3312f);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(170, 40, 40, 0.26);
  transition: filter 0.18s, transform 0.18s, box-shadow 0.18s;
}
.acc-logout:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(170, 40, 40, 0.34);
}
.acc-logout:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

/* ---------- 后台：站点通告 ---------- */
.notice-textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.notice-textarea:focus { border-color: var(--accent); }
.notice-textarea::placeholder { color: var(--muted); }

.notice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.notice-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}
.notice-admin-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.notice-admin-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.nai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nai-head b { font-size: 13px; }
.nai-head time { margin-left: auto; }
.nai-body { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* ---------- 打开网页时的通告弹窗 ---------- */
.notice-modal { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; }
.notice-modal[hidden] { display: none; }
.nm-mask { position: absolute; inset: 0; background: rgba(3, 8, 16, 0.7); backdrop-filter: blur(3px); }
.nm-card {
  position: relative;
  width: min(520px, calc(100vw - 40px));
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.nm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
.nm-head h3 { margin: 0; flex: 1; font-size: 13px; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.nm-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.nm-close:hover { color: var(--text); }
.nm-title { margin: 16px 18px 8px; font-size: 17px; font-weight: 800; }
.nm-text {
  margin: 0 18px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text);
  overflow: auto;
  white-space: normal;
  word-break: break-word;
}
.nm-foot { padding: 16px 18px 18px; display: flex; justify-content: flex-end; }
html[data-theme="light"] .nm-mask { background: rgba(240, 245, 252, 0.72); }

/* ---------- 资产库：拖文件进来的提示遮罩 ---------- */
.assets-drop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(3, 8, 16, 0.55);
  backdrop-filter: blur(2px);
}
.assets-drop[hidden] { display: none; }
.assets-drop .ad-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 26px 36px;
  border-radius: 16px;
  border: 2px dashed rgba(245, 166, 35, 0.65);
  background: rgba(13, 32, 54, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.assets-drop .ad-card b { font-size: 17px; color: #ffd89a; }
.assets-drop .ad-card span { font-size: 12.5px; color: var(--muted); }
html[data-theme="light"] .assets-drop { background: rgba(240, 245, 252, 0.7); }
html[data-theme="light"] .assets-drop .ad-card { background: #fff; }

/* ---------- 手机端修正 ---------- */
.shell > .page { min-width: 0; width: 100%; }
@media (max-width: 720px) {
  .showcase-thumbs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
}

/* ---------- 发通告弹窗（管理员） ---------- */
.notice-editor { position: fixed; inset: 0; z-index: 4100; display: grid; place-items: center; }
.notice-editor[hidden] { display: none; }
.ne-mask { position: absolute; inset: 0; background: rgba(3, 8, 16, 0.7); backdrop-filter: blur(3px); }
.ne-card {
  position: relative;
  width: min(480px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.ne-card h3 { margin: 0 0 2px; font-size: 15px; }
.ne-input,
.ne-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.ne-textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.ne-input:focus,
.ne-textarea:focus { border-color: var(--accent); }
.ne-toggle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ne-msg { margin: 0; min-height: 16px; font-size: 12.5px; color: #ff9b9b; }
.ne-actions { display: flex; align-items: stretch; gap: 10px; }
.ne-actions .ghost { flex: 0 0 auto; min-width: 92px; padding: 9px 18px; white-space: nowrap; }
.ne-actions .primary { flex: 1; margin-top: 0; padding: 9px 20px; }
html[data-theme="light"] .ne-mask { background: rgba(240, 245, 252, 0.75); }

/* ---------- 图片生成页 ---------- */
.ip-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.ip-head { display: flex; align-items: center; gap: 8px; }
.ip-head b { font-size: 13px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-status {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.ip-status.is-running, .ip-status.is-queued { color: #ffd08a; background: rgba(255, 190, 90, 0.12); }
.ip-status.is-done { color: #8ee0b0; background: rgba(80, 220, 150, 0.12); }
.ip-status.is-error { color: #ff9b9b; background: rgba(255, 107, 107, 0.12); }

.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ip-thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f1c2c;
  aspect-ratio: 1 / 1;
}
.ip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-thumb:hover { border-color: var(--accent); }

/* 每张图右下角的下载按钮 */
.ip-cell { position: relative; }
.ip-cell .ip-dl {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 20, 34, 0.82);
  color: #eaf2ff;
  font-size: 11.5px;
  line-height: 1.5;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}
.ip-cell .ip-dl svg { width: 13px; height: 13px; }
.ip-cell .ip-dl:hover { border-color: var(--accent); background: rgba(12, 30, 48, 0.95); transform: translateY(-1px); }
html[data-theme="light"] .ip-cell .ip-dl { background: rgba(255, 255, 255, 0.92); color: #16324c; border-color: rgba(20, 50, 80, 0.2); }

.ip-ph {
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.ip-err { margin: 0; font-size: 12.5px; color: #ff9b9b; }
.ip-prompt {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ip-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); }

/* ---------- 公告弹窗：出现/消失的过渡 ---------- */
.notice-modal {
  opacity: 0;
  transition: opacity 0.24s ease;
}
.notice-modal[hidden] { display: none; }
.notice-modal.is-open { opacity: 1; }

.notice-modal .nm-mask {
  opacity: 0;
  transition: opacity 0.26s ease;
}
.notice-modal.is-open .nm-mask { opacity: 1; }

.notice-modal .nm-card {
  opacity: 0;
  transform: translateY(14px) scale(0.965);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1),
    opacity 0.24s ease;
  will-change: transform, opacity;
}
.notice-modal.is-open .nm-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 发通告弹窗同样处理 */
.notice-editor {
  opacity: 0;
  transition: opacity 0.24s ease;
}
.notice-editor[hidden] { display: none; }
.notice-editor.is-open { opacity: 1; }
.notice-editor .ne-mask {
  opacity: 0;
  transition: opacity 0.26s ease;
}
.notice-editor.is-open .ne-mask { opacity: 1; }
.notice-editor .ne-card {
  opacity: 0;
  transform: translateY(14px) scale(0.965);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1),
    opacity 0.24s ease;
  will-change: transform, opacity;
}
.notice-editor.is-open .ne-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .notice-modal,
  .notice-editor,
  .notice-modal .nm-card,
  .notice-editor .ne-card,
  .notice-modal .nm-mask,
  .notice-editor .ne-mask {
    transition-duration: 0.01ms;
  }
}

/* 后台账目卡：毛利用绿色强调 */
#money-card .stats { margin: 4px 0 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { #money-card .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#money-card .stat-profit .stat-num {
  background: none;
  -webkit-text-fill-color: #4fd68f;
  color: #4fd68f;
}
html[data-theme="light"] #money-card .stat-profit .stat-num { -webkit-text-fill-color: #12804c; color: #12804c; }

/* 缺货状态 */
.gen-badge.is-out {
  color: #ff9b9b;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.1);
}
#submit.is-out {
  filter: grayscale(0.55);
  opacity: 0.85;
  cursor: not-allowed;
}

/* ---------- 顶栏 QQ 群二维码弹层 ---------- */
.qq-pop {
  width: 268px;
  padding: 12px;
  text-align: center;
}
.qq-pop .qq-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 2px 10px;
}
.qq-pop .qq-head b { font-size: 13.5px; color: var(--text); }
.qq-pop .qq-head span { font-size: 11.5px; color: var(--muted); }
.qq-pop .qq-img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.qq-pop .qq-copy {
  margin-top: 10px;
  padding: 8px 0;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.qq-pop .qq-copy:hover { border-color: var(--accent); color: var(--accent); }
.qq-pop .qq-note { margin: 10px 2px 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
/* 微信二维码是深色底海报，别用白底托 */
#vh-grp-wx-pop .qq-img { background: #10151c; border-color: rgba(255, 255, 255, 0.12); }

/* 首页顶栏压住 hero，QQ 群弹层才不会被盖住 */
body.home-page .topbar.home-topbar { position: relative; z-index: 80; }

/* ---------- 后台：实时生成面板 ---------- */
#live-card .live-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
#live-card .live-head h2 { margin: 0; }
#live-card .live-head #live-meta { margin-left: auto; }
.live-table td { vertical-align: middle; }
.live-bar {
  display: inline-block;
  width: 56px;
  height: 6px;
  margin-right: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  vertical-align: middle;
}
.live-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffa94d, #ff7a45);
  transition: width 0.4s ease;
}
html[data-theme="light"] .live-bar { background: rgba(18, 34, 54, 0.1); }

#money-card .stat-warn .stat-num {
  background: none;
  -webkit-text-fill-color: #ff8a8a;
  color: #ff8a8a;
}

/* ---------- 画布文本节点的 @ 引用列表 ---------- */
.cv-mention {
  position: fixed; z-index: 600; width: 208px; max-height: 240px; overflow: auto;
  background: #0d1522; border: 1px solid var(--line); border-radius: 10px; padding: 4px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
.cv-mention button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px;
  border: 0; background: transparent; color: inherit; border-radius: 6px;
  cursor: pointer; font-size: 12.5px; text-align: left;
}
.cv-mention button:hover, .cv-mention button.is-active { background: rgba(124, 156, 255, 0.16); }
.cv-mention img { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; flex: 0 0 26px; }
.cv-mention .is-icon { width: 26px; flex: 0 0 26px; text-align: center; color: var(--muted); }
.cv-mention-empty { margin: 6px 8px; font-size: 12px; color: var(--muted); }

/* ============================================================
   2026-11-06：从 canvas.html / admin.html 的内联 <style> 搬过来的。
   原因：SPA（spa.js）换页只替换 <body>，不加载目标页 <head> 里的样式，
   内联样式在「点导航进来」时完全不生效（画布左上角两个按钮错位、后台像一堆白按钮）。
   **以后页面专属样式一律写在这里，不要再写 <style> 内联块。**
   ============================================================ */

/* ---- 画布（/canvas） ---- */
      /* 左上角：画布库按钮 + 历史按钮，同一排（放在 stage 外面，历史页也看得到） */
      .cv-page { position: relative; }
      .cv-topbar { position: absolute; left: 18px; top: 16px; z-index: 20; display: flex; align-items: flex-start; gap: 8px; }
      .cv-topbar .cv-lib { position: static; left: auto; top: auto; }
      .cv-history-btn {
        height: 36px; padding: 0 16px; border-radius: 12px;
        border: 1px solid rgba(120, 170, 230, .28);
        background: rgba(9, 22, 38, .86); color: #cfe0f2;
        font-size: 12.5px; font-weight: 700; cursor: pointer;
        backdrop-filter: blur(12px);
        transition: border-color .18s, color .2s, transform .2s;
      }
      .cv-history-btn:hover { border-color: var(--accent); color: #ffd89a; transform: scale(1.02); }
      .cv-history-btn.on { border-color: var(--accent); color: #ffd89a; background: rgba(245, 166, 35, .16); }

      /* 生成历史整页（不再是盖在画布上的弹层） */
      .cv-histpage { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 84px 26px 26px; background: #0a182a; border: 1px solid var(--line); border-radius: 16px; }
      .cv-histpage[hidden] { display: none; }
      .cv-histpage-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
      .cv-histpage-head h2 { margin: 0; font-size: 16px; color: #e6eef8; }
      .cv-hist-meta { color: var(--muted); font-size: 12px; }
      .cv-histpage-body { display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
      .cv-hist-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
      .cv-hist-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
      .cv-hist-pill { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); }
      .cv-hist-pill.done { color: #7ef0c4; border-color: rgba(56, 211, 159, 0.4); }
      .cv-hist-pill.error { color: #ffb3b3; border-color: rgba(255, 107, 107, 0.38); }
      .cv-hist-prompt { margin: 8px 0; font-size: 13px; line-height: 1.6; color: #dfe7f5; }
      .cv-hist-actions { display: flex; gap: 8px; align-items: center; }
      .cv-hist-actions button { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: #cfe0ff; font-size: 12.5px; cursor: pointer; }
      .cv-hist-actions button:hover { border-color: var(--accent); }
      .cv-hist-empty { color: var(--muted); font-size: 13px; padding: 20px 4px; text-align: center; }

/* ---- 管理后台（/admin） ---- */
      .rec-tabs { display: flex; gap: 6px; margin: 4px 0 12px; flex-wrap: wrap; }
      .rec-tab {
        padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line);
        background: transparent; color: var(--muted); font-size: 13px; cursor: pointer;
      }
      .rec-tab:hover { color: #e8eefb; border-color: #334; }
      .rec-tab.is-on { color: #fff; background: rgba(124, 156, 255, 0.16); border-color: rgba(124, 156, 255, 0.4); }

      /* ---------- 左侧导航 + 分页 ----------
         直接用工作台那套 .shell + .sidenav，颜色 / 间距 / 选中态跟左侧导航完全一致 */
      .adm-shell { grid-template-columns: 168px minmax(0, 1fr); }
      .adm-page { max-width: none; margin: 0; padding: 0; min-width: 0; }
      .adm-panel.adm-off { display: none !important; }
      .tasks-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
      .task-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
      .adm-sub { margin: 18px 0 8px; font-size: 13.5px; color: #cfd9ea; }
      .adm-quick { display: flex; gap: 8px; flex-wrap: wrap; }
      @media (max-width: 900px) {
        .adm-shell { grid-template-columns: minmax(0, 1fr); }
      }

/* ---- 后台「生成记录」页顶部的实时条（2026-11-06） ---- */
.rec-live {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 12px; padding: 9px 11px;
  border: 1px solid rgba(124, 156, 255, .32); border-radius: 10px;
  background: rgba(124, 156, 255, .08);
}
.rec-live[hidden] { display: none; }
.rec-live-tag {
  flex: none; font-size: 11.5px; font-weight: 700; color: #cfc4ff;
  padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(124, 156, 255, .4);
}
.rec-live-rows { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rec-live-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; flex-wrap: wrap; }
.rec-live-user { font-weight: 600; }

/* ---- 技能 SKILL 页（2026-11-07） ---- */
.skill-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.skill-search {
  flex: 1 1 260px; min-width: 200px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); color: var(--text); font-size: 13px; outline: none;
}
.skill-search::placeholder { color: var(--muted); }
.skill-search:focus { border-color: rgba(124, 92, 255, .6); box-shadow: 0 0 0 3px rgba(124, 92, 255, .12); }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.skill-card {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 15px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s, transform .15s;
}
.skill-card:hover { border-color: rgba(124, 92, 255, .5); transform: translateY(-1px); }
.skill-card-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.skill-badge {
  flex: none; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 7px; border-radius: 6px; color: #cfc4ff;
  background: rgba(124, 92, 255, .18); border: 1px solid rgba(124, 92, 255, .3);
}
.skill-name { font-size: 13.5px; line-height: 1.35; }
.skill-desc { margin: 0; flex: 1 1 auto; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.skill-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.skill-actions { display: flex; gap: 6px; align-items: center; }

.skill-modal {
  position: fixed; inset: 0; z-index: 70; display: flex;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(4, 7, 12, .72);
}
.skill-modal[hidden] { display: none; }
.skill-modal-card {
  width: min(880px, 100%); max-height: 86vh; display: flex; flex-direction: column;
  padding: 18px 20px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.skill-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skill-modal-head b { font-size: 15px; }
.skill-modal-body { flex: 1 1 auto; overflow: auto; margin: 10px 0 0; min-height: 80px; }
.skill-pre {
  margin: 0; padding: 12px; max-height: 56vh; overflow: auto;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.skill-modal-foot { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* ---- AI 写剧本页（2026-11-07） ---- */
.sc-card { display: flex; flex-direction: column; gap: 12px; }
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sc-head h2 { margin: 0 0 8px; }
.sc-tools { display: flex; gap: 8px; align-items: center; }
.sc-model {
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 12.5px; outline: none;
}
.sc-chat {
  display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
  min-height: 320px; max-height: calc(100vh - 420px);
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .14);
}
.sc-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13px; }
.sc-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.sc-chips button {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 12.5px; cursor: pointer;
}
.sc-chips button:hover { border-color: rgba(124, 92, 255, .55); color: #cfc4ff; }
.sc-msg { display: flex; flex-direction: column; gap: 6px; max-width: 86%; }
.sc-user { align-self: flex-end; align-items: flex-end; }
.sc-assistant { align-self: flex-start; }
.sc-bubble {
  padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
}
.sc-user .sc-bubble { background: rgba(124, 92, 255, .22); border: 1px solid rgba(124, 92, 255, .38); }
.sc-assistant .sc-bubble { background: var(--panel-2); border: 1px solid var(--line); }
.sc-msg-bar { display: flex; gap: 6px; }
.sc-thinking .sc-bubble { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.sc-dot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  display: inline-block; animation: sc-blink 1.2s infinite ease-in-out;
}
.sc-dot:nth-child(2) { animation-delay: .2s; }
.sc-dot:nth-child(3) { animation-delay: .4s; }
@keyframes sc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.sc-compose { display: flex; flex-direction: column; gap: 8px; }
.sc-skillbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.sc-skillbar .sc-model { max-width: 260px; }
.sc-upload { cursor: pointer; }
.sc-compose textarea {
  width: 100%; padding: 12px 13px; border-radius: 12px; resize: vertical;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-size: 13px; line-height: 1.7; outline: none; font-family: inherit;
}
.sc-compose textarea:focus { border-color: rgba(124, 92, 255, .6); box-shadow: 0 0 0 3px rgba(124, 92, 255, .12); }
.sc-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-actions .primary { width: auto; min-width: 150px; padding: 10px 26px; }
.sc-actions .muted { white-space: nowrap; }

/* 参考图上传进度条（app.js renderRefs/paintRefProgress） */
.ref-item.uploading { opacity: 1; }
.ref-prog { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 5px 5px 6px; border-radius: inherit; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.12) 60%, rgba(0,0,0,0)); }
.ref-prog-txt { font-size: 11px; font-weight: 600; color: #fff; text-align: center; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.65); }
.ref-prog-bar { display: block; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.ref-prog-bar i { display: block; height: 100%; width: 0; background: #19c3d6; border-radius: 2px; transition: width .18s linear; }

/* 2026-11-19：只给管理员看的入口（代理中心 / 接单大厅）。默认隐藏，拿到 admin 身份后由页面脚本摘掉类名。 */
.admin-only{display:none !important}
