/* 生图助手 · 界面样式（浅色主题） */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #fbfbfd;
  --line: #e5e7eb;
  --line-2: #eef0f3;
  --txt: #14171f;
  --txt-2: #4b5563;
  --dim: #8a919e;
  --primary: #4f46e5;
  --primary-d: #4338ca;
  --primary-s: #eef0fe;
  --ok: #0f9d58;
  --ok-s: #e8f7ef;
  --warn: #c2750a;
  --warn-s: #fdf3e2;
  --bad: #d8362a;
  --bad-s: #fdeceb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .16);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.dim { color: var(--dim); }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.bad-txt { color: var(--bad); }
.nowrap { white-space: nowrap; }
.ta-r { text-align: right; }
.req { color: var(--bad); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--txt); font-weight: 700; font-size: 16px; }
.brand:hover { color: var(--txt); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(99, 102, 241, .35);
}
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--txt-2); font-weight: 500;
}
.nav a:hover { background: var(--line-2); color: var(--txt); }
.nav a.on { background: var(--primary-s); color: var(--primary-d); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who { color: var(--txt-2); font-weight: 500; }

/* ---------- 进行中任务监控 ---------- */
.task-monitor { position: relative; display: flex; align-items: center; }
.task-fab {
  position: relative; width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--dim);
  transition: .16s;
}
.task-fab svg { width: 17px; height: 17px; }
.task-fab:hover { border-color: #f0b8b3; color: var(--bad); background: var(--bad-s); }
.task-fab.has-task {
  color: var(--bad); background: var(--bad-s); border-color: #f3c3bf;
  box-shadow: 0 0 0 3px rgba(216, 54, 42, .07);
}
.task-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 10px; border: 2px solid var(--panel);
  background: var(--bad); color: #fff; font-size: 9.5px; font-weight: 800;
  line-height: 13px; text-align: center;
}
.task-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 120;
  width: min(360px, calc(100vw - 24px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 16px 44px rgba(16, 24, 40, .18); overflow: hidden;
}
.task-pop-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  font-size: 13px; font-weight: 650;
}
.task-total {
  min-width: 20px; padding: 1px 7px; border-radius: 12px;
  background: var(--bad-s); color: var(--bad); text-align: center; font-size: 11px;
}
.task-list { max-height: 330px; overflow-y: auto; }
.task-item { display: flex; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.task-item:hover { background: var(--panel-2); }
.task-dot {
  width: 7px; height: 7px; flex: 0 0 auto; margin-top: 6px; border-radius: 50%;
  background: var(--bad); animation: livePulse 1.4s ease-in-out infinite;
}
.task-main { flex: 1; min-width: 0; }
.task-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.task-status {
  flex: 0 0 auto; border-radius: 20px; padding: 1px 7px; font-size: 10px; font-weight: 600;
}
.task-status.running { color: var(--bad); background: var(--bad-s); }
.task-status.queued { color: var(--warn); background: var(--warn-s); }
.task-item p {
  margin: 3px 0 2px; color: var(--txt-2); font-size: 11.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-meta { color: var(--dim); font-size: 10.5px; }
.task-cancel {
  flex: 0 0 auto; align-self: center; padding: 5px 9px; cursor: pointer;
  border: 1px solid #efc4c0; border-radius: 7px;
  background: #fff; color: var(--bad); font-size: 11px; font-weight: 600;
}
.task-cancel:hover { background: var(--bad-s); }
.task-cancel:disabled { opacity: .55; cursor: default; }
.task-empty { padding: 24px 14px; text-align: center; color: var(--dim); font-size: 12.5px; }

/* 侧边栏任务计数 */
[data-task-count] {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-grid; place-items: center; border-radius: 10px;
  background: var(--bad); color: #fff; font-size: 10px; font-weight: 800;
  font-style: normal; line-height: 1;
}
[data-task-count][hidden] { display: none !important; }
.side-nav a em.side-task-count,
.fside-nav a > em.task-side-count {
  flex: 0 0 auto; background: var(--bad); color: #fff; border-radius: 10px;
  padding: 2px 7px; font-style: normal; font-size: 10px; font-weight: 800;
}
.fsid-nav a em.task-side-count {
  margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px;
  padding: 2px 7px; font-style: normal; font-size: 10px; font-weight: 800;
}

/* 进行中任务页面 */
.task-page { display: flex; flex-direction: column; gap: 10px; }
.task-page-list { display: flex; flex-direction: column; gap: 10px; }
.task-page-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.task-page-main { flex: 1; min-width: 0; }
.task-page-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-page-line b { font-size: 14px; }
.task-page-item p {
  margin: 4px 0 3px; color: var(--txt-2); font-size: 12.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-page-meta { color: var(--dim); font-size: 11.5px; }
.task-mini-ring {
  position: relative; width: 58px; height: 58px; flex: 0 0 auto;
}
.task-mini-ring svg { width: 58px; height: 58px; transform: rotate(-90deg); }
.task-mini-ring circle { fill: none; stroke-width: 5; }
.task-mini-ring circle.bg { stroke: var(--line-2); }
.task-mini-ring circle.fg {
  stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 100;
  transition: stroke-dashoffset .5s ease;
}
.task-mini-ring[data-state="queued"] circle.fg { stroke: var(--warn); }
.task-mini-ring span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 11px var(--mono); color: var(--txt-2);
}
.admin-mini-progress {
  width: 72px; height: 4px; margin-top: 4px; border-radius: 4px;
  background: var(--line-2); overflow: hidden;
}
.admin-mini-progress i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
}
.task-pop-ft { padding: 9px 14px; border-top: 1px solid var(--line-2); text-align: right; font-size: 12px; }
.chip {
  background: var(--primary-s); color: var(--primary-d);
  padding: 4px 10px; border-radius: 20px; font-size: 12.5px;
}
.chip b { font-weight: 700; }

.main { padding: 28px 24px 64px; min-height: calc(100vh - 160px); }

/* 前台工具侧边栏 */
.front-shell {
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: flex-start; gap: 22px;
}
.front-shell.has-side { max-width: 1440px; }
.front-main { flex: 1; min-width: 0; padding: 28px 0 64px; }
.front-side { display: none; }
@media (min-width: 761px) {
  .front-side {
    display: flex; flex-direction: column; gap: 8px;
    width: 208px; flex: 0 0 208px; position: sticky; top: 84px;
    margin: 28px 0 40px; padding: 14px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow);
  }
}
.fside-label {
  padding: 2px 8px 6px; color: var(--dim);
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
}
.fside-nav { display: flex; flex-direction: column; gap: 3px; }
.fside-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px;
  border-radius: 9px; color: var(--txt-2); line-height: 1.25;
}
.fside-nav a > i {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 9px; background: var(--line-2); color: var(--dim);
  font-style: normal; font-size: 13px;
}
.fside-nav a > span { flex: 1; min-width: 0; }
.fside-nav a b { display: block; font-size: 13.5px; color: var(--txt); font-weight: 650; }
.fside-nav a small { display: block; margin-top: 1px; font-size: 11px; color: var(--dim); }
.fside-nav a > em {
  flex: 0 0 auto; font-style: normal; font-size: 10px; color: var(--warn);
  background: var(--warn-s); border-radius: 20px; padding: 1px 6px;
}
.fside-nav a:hover { background: var(--panel-2); }
.fside-nav a.on { background: var(--primary-s); }
.fside-nav a.on b, .fside-nav a.on > i { color: var(--primary-d); }
.fside-nav a.on > i { background: #fff; }
.fside-sep { display: block; height: 1px; margin: 8px 6px; background: var(--line-2); }
.fside-note {
  margin-top: 6px; padding: 10px 8px 2px; border-top: 1px solid var(--line-2);
  color: var(--dim); font-size: 11.5px; line-height: 1.6;
}

.footer { background: transparent; border: 0; }
.footer-in {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 22px 24px 26px; font-size: 13px; color: var(--dim); text-align: center;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; font-weight: 550; cursor: pointer; transition: .15s;
  font-family: inherit; background: var(--panel); color: var(--txt);
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(79, 70, 229, .3); }
.btn-primary:hover:not(:disabled) { background: var(--primary-d); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--txt-2); }
.btn-ghost:hover:not(:disabled) { background: var(--line-2); color: var(--txt); }
.btn-danger { background: var(--bad-s); color: var(--bad); border-color: transparent; }
.btn-danger:hover:not(:disabled) { background: #fbdad7; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 3px 9px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.link { color: var(--primary); font-size: 13.5px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card + .card, .card + .two-col, .two-col + .card, .section { margin-top: 20px; }
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap;
}
.card-hd h2 { font-size: 15.5px; }
.card-bd { padding: 20px; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.mini-hd { font-size: 13px; color: var(--dim); margin-bottom: 8px; font-weight: 600; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; flex: 1; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--txt-2); }
.field-foot { display: flex; justify-content: space-between; font-size: 12px; }
.field-row { display: flex; gap: 16px; }
.field-btn { flex: 0 0 auto; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; font-family: inherit; color: var(--txt); background: var(--panel);
  transition: .15s; outline: none;
}
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
input::placeholder, textarea::placeholder { color: #b3b9c4; }
.hint { font-size: 12px; color: var(--dim); }
.tip { font-size: 12.5px; color: var(--dim); margin: 4px 0 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--txt-2); }
.switch input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- 首页 ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.hero-title { font-size: 30px; letter-spacing: -.02em; }
.hero-sub { color: var(--txt-2); margin: 8px 0 0; max-width: 640px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stats div { text-align: right; }
.hero-stats b { display: block; font-size: 24px; font-weight: 700; }
.hero-stats span { font-size: 12.5px; color: var(--dim); }

.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(90deg, #f2f0ff, #f7f5ff);
  border: 1px solid #e3defb; border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 20px; font-size: 13.5px; color: var(--txt-2);
  flex-wrap: wrap;
}
.notice > div { display: flex; gap: 8px; }

.studio { display: grid; grid-template-columns: 1fr 460px; gap: 20px; align-items: start; }
.result-panel { position: sticky; top: 82px; }

.video-soon {
  max-width: 860px; margin: 34px auto; padding: 46px 28px; text-align: center;
}
.video-soon-ico {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center; background: var(--primary-s); color: var(--primary);
  font-size: 24px;
}
.video-soon h2 { margin: 12px 0 8px; font-size: 23px; }
.video-soon p { max-width: 560px; margin: 0 auto; color: var(--txt-2); font-size: 13.5px; }
.video-soon-points {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px;
}
.video-soon-points span {
  padding: 4px 12px; border-radius: 20px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--dim); font-size: 12px;
}
.video-soon-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.speed-toggle {
  display: flex; align-items: center; gap: 6px; margin-top: 7px;
  color: var(--dim); font-size: 11.5px; cursor: pointer;
}
.speed-toggle input { width: 14px; height: 14px; accent-color: var(--primary); }

/* 修改视频：时长固定为原视频时长 */
.dur-fixed {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 9px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--dim); font-size: 12.5px;
}
.dur-fixed b { color: var(--txt); font-weight: 600; }
.model-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px;
}
.model-opt {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 9px 10px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2);
  color: var(--txt-2); font-size: 12.5px; transition: .15s;
}
.model-opt:hover { border-color: #c7c9f5; }
.model-opt.on { border-color: var(--primary); background: var(--primary-s); box-shadow: 0 0 0 2px rgba(79, 70, 229, .08); }
.model-opt b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); font-weight: 650; }
.model-opt em { flex: 0 0 auto; font-style: normal; font-size: 10.5px; font-weight: 650; }
.model-opt.available em { color: var(--ok); }
.model-opt.unavailable em { color: var(--bad); }
.model-avail-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.model-opt.available .model-avail-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-s); }
.model-opt.unavailable .model-avail-dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-s); }
.model-opt-cost { flex: 0 0 auto; color: var(--dim); font-size: 10.5px; font-family: var(--mono); }

.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.model-card { position: relative; cursor: pointer; }
.model-card input { position: absolute; opacity: 0; pointer-events: none; }
.model-in {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  transition: .15s; background: var(--panel-2); height: 100%;
}
.model-card:hover .model-in { border-color: #c7c9f5; }
.model-card input:checked + .model-in {
  border-color: var(--primary); background: var(--primary-s);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}
.model-name { font-weight: 650; font-size: 14px; margin-bottom: 2px; }
.model-meta { font-size: 11.5px; color: var(--dim); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-cost { font-size: 12px; color: var(--primary-d); margin-top: 6px; font-weight: 600; }

.result-bd { display: flex; flex-direction: column; gap: 14px; }
.result-stage {
  background: var(--panel-2); border: 1px dashed var(--line); border-radius: 10px;
  aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; position: relative;
}
.result-stage img { width: 100%; height: 100%; object-fit: contain; }
.placeholder { text-align: center; color: var(--dim); padding: 24px; }
.placeholder p { margin: 4px 0; }
.ph-icon { font-size: 30px; color: #c3c8d4; margin-bottom: 6px; }
.result-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; }
.kv { display: flex; justify-content: space-between; gap: 12px; }
.kv span { color: var(--dim); }
.kv b { font-weight: 600; }
.result-actions { grid-column: 1 / -1; }

/* 生图进度：右下角悬浮任务球（JS 会把节点挪到 body 下） */
.gen-progress-circle {
  position: fixed; right: 24px; bottom: 28px; z-index: 75;
  display: flex; align-items: center; gap: 0;
  height: 72px; padding: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .96); border: 1px solid #e3e0ff;
  box-shadow: 0 18px 40px -14px rgba(48, 36, 160, .45), 0 2px 6px rgba(17, 24, 39, .06);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  cursor: pointer; user-select: none; text-align: left;
  transition: gap .25s ease, padding .25s ease, box-shadow .2s;
}
.gen-progress-circle[hidden] { display: none; }
.gen-progress-circle.is-arriving { visibility: hidden; }
.gen-progress-circle.is-pop { animation: orbPop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes orbPop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.gen-progress-circle::before {
  content: ""; position: absolute; left: 6px; top: 6px; width: 60px; height: 60px; border-radius: 50%;
  pointer-events: none;
}
.gen-progress-circle:is([data-state="submitting"], [data-state="queued"], [data-state="running"])::before {
  animation: orbPulse 1.8s ease-out infinite;
}
@keyframes orbPulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 92, 255, .45); }
  100% { box-shadow: 0 0 0 18px rgba(109, 92, 255, 0); }
}
.gen-ring-wrap { position: relative; width: 60px; height: 60px; flex: 0 0 auto; border-radius: 50%; background: #fff; }
.gen-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gen-ring-bg, .gen-ring-fg { fill: none; stroke-width: 10; }
.gen-ring-bg { stroke: var(--line-2); }
.gen-ring-fg {
  stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 100;
  stroke-dashoffset: 100; transition: stroke-dashoffset .45s ease;
}
.gen-ring-label { position: absolute; inset: 0; display: grid; place-items: center; }
#genProgressPct, #vProgressPct { color: var(--primary-d); font: 800 14px var(--mono); letter-spacing: -.03em; white-space: nowrap; }
.gen-progress-info {
  width: 0; overflow: hidden; opacity: 0; white-space: nowrap;
  display: flex; flex-direction: column; gap: 2px;
  transition: width .28s ease, opacity .2s ease;
}
.gen-progress-info strong { font-size: 13.5px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; }
#genProgressNote, #vProgressNote { color: var(--dim); font-size: 11.5px; line-height: 1.45; white-space: normal; }
.gen-progress-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
#genProgressTime, #vProgressTime { color: var(--dim); font: 11.5px var(--mono); }
.gen-progress-circle:hover, .gen-progress-circle.is-open { gap: 12px; padding: 6px 18px 6px 6px; border-radius: 40px; height: auto; min-height: 72px; }
.gen-progress-circle:hover .gen-progress-info, .gen-progress-circle.is-open .gen-progress-info { width: 230px; opacity: 1; }
.gen-cancel-btn {
  padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid #efc4c0; background: #fff; color: var(--bad);
  font-size: 11.5px; font-weight: 650; font-family: inherit;
}
.gen-cancel-btn:hover { background: var(--bad-s); }
.gen-cancel-btn:disabled { opacity: .55; cursor: default; }
.gen-progress[data-state="success"] .gen-ring-fg { stroke: var(--ok); }
.gen-progress[data-state="success"] #genProgressPct, .gen-progress[data-state="success"] #vProgressPct { color: var(--ok); }
.gen-progress[data-state="queued"] .gen-ring-fg { stroke: var(--warn); }
.gen-progress[data-state="queued"] #genProgressPct, .gen-progress[data-state="queued"] #vProgressPct { color: var(--warn); }
.gen-progress[data-state="failed"] .gen-ring-fg,
.gen-progress[data-state="blocked"] .gen-ring-fg { stroke: var(--bad); }
.gen-progress[data-state="failed"] #genProgressPct, .gen-progress[data-state="failed"] #vProgressPct,
.gen-progress[data-state="blocked"] #genProgressPct, .gen-progress[data-state="blocked"] #vProgressPct { color: var(--bad); font-size: 11.5px; }
.gen-progress[data-state="timeout"] .gen-ring-fg { stroke: var(--warn); }
.gen-progress[data-state="timeout"] #genProgressPct, .gen-progress[data-state="timeout"] #vProgressPct { color: var(--warn); font-size: 11.5px; }

/* 点击生成后飞向任务球的小光点 */
.fly-dot {
  position: fixed; left: 0; top: 0; z-index: 90; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; pointer-events: none; background: var(--grad);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .25), 0 0 22px 6px rgba(109, 92, 255, .55);
}
.btn.is-launch { animation: btnLaunch .45s ease; }
@keyframes btnLaunch { 0% { transform: scale(1); } 35% { transform: scale(.94); } 100% { transform: scale(1); } }

/* 等待中：结果区显示流光占位，不放任何文字在图片上 */
.result-stage.is-waiting { border-style: solid; border-color: #e3e0ff; }
.result-stage.is-waiting::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(139, 92, 246, .14) 50%, transparent 70%) 0 0 / 220% 100%, #f7f6ff;
  animation: stageShimmer 1.6s linear infinite;
}
.result-stage.is-waiting::after {
  content: attr(data-wait); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 80%; text-align: center; color: var(--primary-d); font-size: 13px; font-weight: 600;
}
@keyframes stageShimmer { from { background-position: 120% 0, 0 0; } to { background-position: -120% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .gen-ring-fg { transition: none; }
  .gen-progress-circle::before, .result-stage.is-waiting::before, .gen-progress-circle.is-pop { animation: none; }
}

.badge {
  font-size: 12px; padding: 3px 10px; border-radius: 20px;
  background: var(--line-2); color: var(--txt-2); font-weight: 600;
}
.badge.ok { background: var(--ok-s); color: var(--ok); }
.badge.warn { background: var(--warn-s); color: var(--warn); }
.badge.bad { background: var(--bad-s); color: var(--bad); }
.badge.run { background: var(--primary-s); color: var(--primary-d); }

.alert {
  white-space: pre-wrap;
  background: var(--bad-s); color: var(--bad); border-radius: 9px;
  padding: 10px 14px; font-size: 13px; border: 1px solid #f7d5d2;
}
.alert.ok { background: var(--ok-s); color: var(--ok); border-color: #c9ecda; }
.alert.warn { background: var(--warn-s); color: var(--warn); border-color: #f5e3c2; }

/* ---------- 网格与缩略图 ---------- */
.section-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-hd h2 { font-size: 17px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.grid-lg { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.thumb {
  margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; cursor: pointer; transition: .18s; position: relative;
}
.thumb:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d6d9e0; }
.thumb img, .thumb video { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--line-2); }
.thumb figcaption {
  padding: 9px 11px; font-size: 12.5px; display: flex; justify-content: space-between; gap: 8px;
  color: var(--txt-2);
}
.thumb figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb figcaption em { font-style: normal; color: var(--dim); font-size: 11.5px; flex: 0 0 auto; }
.thumb-ph {
  aspect-ratio: 1; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center;
  background: var(--line-2); color: var(--dim); font-size: 12px; padding: 12px; text-align: center;
}
.thumb-ph b { font-size: 12.5px; font-weight: 700; }
.thumb-ph.blocked, .thumb-ph.failed { background: #fdf0ef; color: var(--bad); }
.thumb-flag {
  position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 8px;
  border-radius: 20px; background: rgba(20, 23, 31, .72); color: #fff; backdrop-filter: blur(4px);
}
.thumb-flag.bad { background: rgba(216, 54, 42, .9); }
.thumb-flag.warn { background: rgba(194, 117, 10, .92); }
.thumb-flag.live::before {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px;
  border-radius: 50%; background: #fff; vertical-align: 1px;
  animation: livePulse 1.3s ease-in-out infinite;
}
.live-dot {
  display: inline-block; width: 6px; height: 6px; margin-left: 5px;
  border-radius: 50%; background: var(--ok); vertical-align: 3px;
  animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .thumb-flag.live::before, .live-dot { animation: none; opacity: 1; }
}

.empty { text-align: center; color: var(--dim); padding: 28px 12px; font-size: 13.5px; }
.empty-card { text-align: center; padding: 56px 24px; }
.empty-card h3 { margin-bottom: 6px; }

/* ---------- 筛选 ---------- */
.filter { display: flex; gap: 8px; align-items: center; }
.filter input, .filter select { padding: 7px 10px; font-size: 13px; width: auto; min-width: 130px; }
.filter-wrap { flex-wrap: wrap; padding: 16px 20px; }
.page-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-hd h1 { font-size: 24px; }
.page-hd p { margin: 4px 0 0; font-size: 13px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 600; color: var(--dim); font-size: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2);
  white-space: nowrap; letter-spacing: .02em;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfc; }
.mini { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: var(--line-2); }
.mini-ph {
  width: 44px; height: 44px; border-radius: 7px; background: var(--line-2);
  display: grid; place-items: center; color: var(--dim); font-size: 14px;
}
.mini-ph.big { width: 100%; height: 100%; border-radius: 0; }
.cell-prompt { max-width: 300px; }
.prompt-txt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag {
  display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 20px;
  background: var(--line-2); color: var(--txt-2); font-weight: 600; white-space: nowrap;
}
.tag.ok { background: var(--ok-s); color: var(--ok); }
.tag.warn { background: var(--warn-s); color: var(--warn); }
.tag.bad { background: var(--bad-s); color: var(--bad); }
.tag.info { background: var(--primary-s); color: var(--primary-d); }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pager a {
  min-width: 34px; height: 34px; padding: 0 10px; display: grid; place-items: center;
  border-radius: 8px; background: var(--panel); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 13px;
}
.pager a:hover { border-color: #c9cce0; }
.pager a.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 18, 25, .45); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; background: var(--panel); border-radius: 14px; width: 100%; max-width: 560px;
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: pop .16s ease-out;
}
.modal-lg { max-width: 860px; }
.modal-sm { max-width: 420px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.modal-hd h3 { font-size: 16px; }
.modal-x {
  border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--dim);
  cursor: pointer; padding: 0 4px;
}
.modal-x:hover { color: var(--txt); }
.modal-bd { padding: 20px; overflow-y: auto; }
.modal-ft {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--line-2);
}
.detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-img {
  border-radius: 10px; overflow: hidden; background: var(--panel-2);
  border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center;
}
.detail-img img, .detail-img video { width: 100%; height: 100%; object-fit: contain; }
.detail-meta { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.detail-download { margin-top: 9px; }
.detail-prompt label { font-size: 12px; color: var(--dim); font-weight: 600; display: block; margin-bottom: 3px; }
.detail-prompt p {
  margin: 0; background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 9px 11px; font-size: 13px; word-break: break-word;
  max-height: 120px; overflow-y: auto;
}

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px);
  background: #14171f; color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: .22s;
  z-index: 100; box-shadow: var(--shadow-lg); max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #0d7a47; }
.toast.bad { background: #bd2b21; }

/* ---------- 认证页 ---------- */
.auth { display: grid; place-items: center; min-height: calc(100vh - 210px); padding: 24px 0; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; }
.auth-hd { text-align: center; margin-bottom: 24px; }
.auth-hd .brand-mark { margin: 0 auto 14px; width: 42px; height: 42px; font-size: 15px; border-radius: 12px; }
.auth-hd h2 { font-size: 20px; }
.auth-hd p { margin: 6px 0 0; font-size: 13px; }
.auth-form { display: flex; flex-direction: column; }
.auth-ft { text-align: center; margin-top: 18px; font-size: 13px; color: var(--dim); }
.auth-dark { background: radial-gradient(1200px 400px at 50% 0%, #1e1b4b, transparent); }

/* ---------- 检测页 ---------- */
.check-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.drop {
  border: 2px dashed var(--line); border-radius: 12px; background: var(--panel-2);
  min-height: 300px; display: grid; place-items: center; cursor: pointer; transition: .15s;
  overflow: hidden; position: relative;
}
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-s); }
.drop-in { text-align: center; color: var(--dim); padding: 30px; }
.drop-in p { margin: 4px 0; }
.drop img { width: 100%; max-height: 420px; object-fit: contain; }
.check-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.score-row { display: flex; gap: 24px; align-items: center; }
.score-ring {
  width: 120px; height: 120px; border-radius: 50%; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--ok) 0deg, var(--line-2) 0deg);
  position: relative;
}
.score-ring::before {
  content: ""; position: absolute; inset: 9px; background: var(--panel); border-radius: 50%;
}
.score-ring span { position: relative; font-size: 26px; font-weight: 700; font-family: var(--mono); }
.score-ring em { position: relative; font-style: normal; font-size: 11px; color: var(--dim); }
.score-meta { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bar-row { display: grid; grid-template-columns: 86px 1fr 62px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-row label { color: var(--dim); }
.bar-row span { text-align: right; font-family: var(--mono); }
.bar { height: 7px; background: var(--line-2); border-radius: 20px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 20px; transition: .5s; }
#rDetail { word-break: break-word; white-space: normal; }

/* ---------- 后台 ---------- */
body.admin { background: var(--bg); }
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: 224px;
  background: var(--panel); color: var(--txt-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 50;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid var(--line-2); }
.side-title { color: var(--txt); font-weight: 650; font-size: 14.5px; }
.side-sub { font-size: 11.5px; color: var(--dim); }
.side-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: #a8aeba; font-size: 13.5px; transition: .12s;
}
.side-nav a i { font-style: normal; width: 17px; display: grid; place-items: center; opacity: .85; flex: 0 0 auto; }
.side-nav a i svg { width: 17px; height: 17px; display: block; }
.side-nav a.on i { opacity: 1; }
.side-nav a:hover { background: var(--line-2); color: var(--txt); }
.side-nav a.on { background: var(--primary-s); color: var(--primary-d); font-weight: 600; }
.side-foot { padding: 14px 18px; border-top: 1px solid var(--line-2); }
.side-user { color: var(--txt); font-size: 13px; font-weight: 600; }
.side-links { display: flex; gap: 14px; margin-top: 4px; }
.side-links a { color: var(--dim); font-size: 12px; }
.side-links a:hover { color: var(--primary-d); }

.content { margin-left: 224px; min-height: 100vh; display: flex; flex-direction: column; background: #f5f6f8; }
.chead {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px; background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30; flex-wrap: wrap;
}
.chead h1 { font-size: 18px; }
.chead-right { display: flex; align-items: center; gap: 10px; }
.cbody { padding: 22px 28px 56px; flex: 1; }
.admin .card { box-shadow: 0 1px 2px rgba(16, 24, 40, .03); border-radius: 14px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-row-3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; transition: .16s; }
.stat:hover { border-color: #dcd9f7; box-shadow: 0 6px 18px rgba(16, 24, 40, .05); }
.stat-k { font-size: 12.5px; color: var(--dim); }
.stat-v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; }
.stat-v.sm { font-size: 20px; }
.stat-v .sep { color: var(--line); font-weight: 300; margin: 0 3px; }
.stat-f { font-size: 12px; color: var(--dim); }

.two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-top: 20px; }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.chart-bar { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.chart-bar i {
  display: block; width: 100%; background: linear-gradient(180deg, #818cf8, #4f46e5);
  border-radius: 6px 6px 3px 3px; min-height: 3px; transition: .5s;
}
.chart-x { font-size: 11.5px; color: var(--dim); }

.rank-row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; margin-bottom: 9px; font-size: 13px; }
.rank-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row b { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.rank-row .bar i { background: #a5b4fc; }

.log-list { max-height: 340px; overflow-y: auto; }
.log-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  padding: 7px 0; border-bottom: 1px dashed var(--line-2);
}
.log-row:last-child { border-bottom: 0; }
.log-row b { color: var(--txt); }
.log-row span { color: var(--txt-2); }
.log-row em { font-style: normal; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.log-row i { font-style: normal; color: var(--dim); font-size: 11.5px; flex: 0 0 auto; }

.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.info-grid > div { display: flex; flex-direction: column; gap: 2px; }
.info-grid span { font-size: 12px; color: var(--dim); }
.info-grid b { font-size: 14px; font-weight: 600; }
.info-grid .wide { grid-column: span 2; }
.settings { display: flex; flex-direction: column; gap: 0; }
.settings .card + .card { margin-top: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .studio { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .two-col, .check-wrap { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
}

/* 移动端专用元素：桌面上不显示 */
.mob-bar { display: none; }
.side-x { display: none; }
.side-mask { display: none; }

/* ============================================================
   移动端（≤760px）—— 按手机原生交互重做，不是把桌面压扁
   要点：底部 Tab 导航 / 表格转卡片 / 生成按钮吸底 / 筛选折叠
   ============================================================ */
@media (max-width: 760px) {
  /* ---------- 前台顶栏 ---------- */
  .topbar { position: static; }
  .topbar-in {
    height: auto; min-height: 50px;
    padding: 9px 12px 0; gap: 8px;
    flex-wrap: wrap; align-content: center;
    align-items: center;
  }
  .brand { font-size: 15px; }
  .brand-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
  .nav { order: 3; width: 100%; gap: 2px; margin: 0 0 6px; }
  .nav a { padding: 6px 10px; font-size: 13.5px; white-space: nowrap; flex: 0 0 auto; }
  .nav-right { gap: 6px; }
  .who { display: none; }
  .chip { font-size: 12px; padding: 3px 9px; }
  .wrap { padding: 0 12px; }
  .main { padding: 16px 12px 40px; }
  .front-shell { padding: 0 12px; }
  .front-main { padding: 16px 0 40px; }
  .task-page-item { padding: 12px; gap: 10px; align-items: flex-start; }
  .task-mini-ring, .task-mini-ring svg { width: 50px; height: 50px; }
  .task-page-item .task-cancel { margin-top: 4px; }
  .fsid-nav a em.soon {
    margin-left: auto; font-style: normal; font-size: 10px;
    color: var(--warn); background: var(--warn-s); border-radius: 20px; padding: 1px 6px;
  }
  .fsid-sep { display: block; height: 1px; margin: 7px 12px; background: var(--line-2); }

  /* ---------- 工作台 ---------- */
  .hero { margin-bottom: 14px; gap: 10px; }
  .hero-title { font-size: 21px; }
  .hero-sub { display: none; }
  .hero-stats { display: none; }
  .notice { padding: 11px 14px; font-size: 13px; margin-bottom: 14px; }

  /* 模型选择：横向滑动的胶囊，不再竖向堆大卡片 */
  .model-grid {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 2px 2px 6px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .model-grid::-webkit-scrollbar { display: none; }
  .model-card { flex: 0 0 auto; }
  .model-in {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 13px; border-radius: 22px; white-space: nowrap;
  }
  .model-name { font-size: 13px; margin: 0; }
  .model-meta { display: none; }
  .model-cost { font-size: 11.5px; margin: 0; color: var(--primary-d); }

  .field { margin-bottom: 13px; gap: 5px; }
  .field label { font-size: 12.5px; }
  .model-picker { grid-template-columns: 1fr 1fr; gap: 6px; }
  .model-opt { padding: 8px; font-size: 11.5px; }
  .model-opt-cost { display: none; }
  .model-opt em { font-size: 9.5px; }
  #prompt { min-height: 108px; font-size: 14px; }
  .card-hd { padding: 13px 15px; }
  .card-bd { padding: 15px; }
  .field-row { gap: 10px; }

  /* 生成按钮吸底：一屏内随时可点 */
  body[data-page="home"] { padding-bottom: 86px; }
  .field-btn {
    position: fixed; left: 0; right: 0; bottom: 0;
    margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .95);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    z-index: 55;
  }
  .field-btn label { display: none; }
  .field-btn .btn { width: 100%; padding: 13px; font-size: 15px; }
  .tip { display: none; }

  /* 结果区取消粘顶，跟随文档流 */
  .result-panel { position: static; }
  .result-stage { aspect-ratio: 4 / 3; }
  .gen-progress-circle { right: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); }
  .gen-progress-circle:hover .gen-progress-info, .gen-progress-circle.is-open .gen-progress-info { width: min(220px, calc(100vw - 130px)); }

  /* ---------- 列表与检测 ---------- */
  .grid, .grid-lg { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .thumb figcaption em { display: none; }
  .page-hd { gap: 12px; margin-bottom: 14px; }
  .page-hd h1 { font-size: 20px; }

  .drop { min-height: 190px; }
  .check-actions { flex-wrap: wrap; gap: 8px; }
  .score-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .score-ring { margin: 0 auto; width: 104px; height: 104px; }
  .score-ring span { font-size: 23px; }
  .bar-row { grid-template-columns: 74px 1fr 60px; gap: 8px; }
  #rDetail { word-break: break-word; white-space: normal; }

  /* ---------- 后台：抽屉式侧边栏 ---------- */
  .mob-bar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 58;
    height: 52px; padding: 0 12px;
    background: #14161d; color: #fff;
  }
  .mob-menu {
    width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
    background: rgba(255, 255, 255, .08); cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; flex: 0 0 auto;
  }
  .mob-menu span {
    display: block; width: 15px; height: 1.5px;
    background: #e6e8ee; border-radius: 2px;
  }
  .mob-title { font-size: 14.5px; font-weight: 600; }
  .mob-link { margin-left: auto; color: #9aa1ae; font-size: 12.5px; flex: 0 0 auto; }

  .side {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 236px; height: 100%; padding: 0;
    flex-direction: column; align-items: stretch;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 70;
    box-shadow: 2px 0 18px rgba(0, 0, 0, .22);
  }
  .side.open { transform: translateX(0); }
  .side-brand { display: flex; padding: 18px 16px; }
  .side-x {
    display: block; margin-left: auto; padding: 0 2px;
    background: transparent; border: 0; color: #7b8291;
    font-size: 20px; line-height: 1; cursor: pointer;
  }
  .side-foot { display: block; }
  .side-nav {
    flex-direction: column; width: auto; padding: 10px;
    gap: 2px; overflow-y: auto;
  }
  .side-nav a {
    flex: 0 0 auto; flex-direction: row; justify-content: flex-start;
    gap: 10px; padding: 10px 12px; font-size: 13.5px; text-align: left;
  }
  .side-nav a i { display: inline-block; font-size: 14px; width: 16px; text-align: center; }
  .side-mask {
    display: block; position: fixed; inset: 0;
    background: rgba(12, 14, 18, .45); z-index: 65;
    opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  .side-mask.on { opacity: 1; pointer-events: auto; }

  .content { margin-left: 0; padding-bottom: 20px; }
  .chead { padding: 7px 14px 8px; position: static; min-height: 0; }
  .chead h1 { display: none; }
  .chead-right { width: auto; margin-left: auto; }
  .cbody { padding: 14px; }

  .stat-row, .stat-row-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat-v { font-size: 22px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-grid .wide { grid-column: span 2; }
  .two-col, .check-wrap { grid-template-columns: 1fr; }
  .chart { height: 132px; }
  .rank-row { grid-template-columns: 88px 1fr 32px; font-size: 12.5px; }

  /* ---------- 后台：表格转卡片 ---------- */
  .table-wrap { overflow: visible; }
  .table { min-width: 0; display: block; }
  .table thead { display: none; }
  .table tbody { display: block; }
  .table tr {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px 14px; padding: 13px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; margin-bottom: 10px;
  }
  .table tr:hover { background: var(--panel); }
  .table td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 0; border: 0; font-size: 13px;
    min-width: 0; overflow: hidden; white-space: normal;
  }
  .table td::before {
    content: attr(data-label);
    color: var(--dim); font-size: 11.5px; flex: 0 0 auto; font-weight: 400;
  }
  .table td[data-label=""]::before { display: none; }

  /* 缩略图列单独占一格 */
  .table td.td-thumb { justify-content: flex-start; }
  .table td.td-thumb::before { display: none; }
  .table td.td-thumb .mini { width: 52px; height: 52px; }

  /* 带副标题/备注的单元格通栏，避免被挤成竖排 */
  .table td.td-stack { display: block; grid-column: 1 / -1; }
  .table td.td-stack::before { display: block; margin-bottom: 2px; }

  /* 描述列通栏，两行截断 */
  .table td.cell-prompt { grid-column: 1 / -1; display: block; }
  .table td.cell-prompt::before { display: block; margin-bottom: 3px; }
  .table td.cell-prompt .prompt-txt {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    white-space: normal; line-height: 1.5;
  }

  /* 操作列通栏靠右 */
  .table td.ta-r {
    grid-column: 1 / -1; justify-content: flex-end;
    padding-top: 9px; margin-top: 2px;
    border-top: 1px dashed var(--line-2);
  }
  .table td.ta-r::before { display: none; }
  .table td.ta-r .btn { flex: 0 0 auto; padding: 5px 11px; }

  /* 空状态行 */
  .table tr.row-empty { display: block; padding: 20px 12px; text-align: center; }
  .table tr.row-empty td { justify-content: center; }
  .table tr.row-empty td::before { display: none; }

  /* ---------- 筛选折叠 ---------- */
  .filter-toggle {
    display: inline-flex; width: 100%; justify-content: center;
    margin-bottom: 10px;
  }
  .has-filter-toggle { padding: 9px 12px 10px; }
  form.filter.collapsed { display: none; }
  form.filter {
    width: 100%; flex-wrap: wrap; gap: 8px;
    padding: 0; margin-bottom: 12px;
  }
  form.filter input, form.filter select {
    flex: 1 1 calc(50% - 4px); min-width: 0; width: auto;
    padding: 9px 11px; font-size: 13.5px;
  }
  form.filter .btn { flex: 0 0 auto; }
  .card-hd form.filter { margin-bottom: 0; }

  /* 提示条抬高，避开吸底按钮与底部 Tab */
  .toast { bottom: 92px; }

  /* ---------- 弹窗 ---------- */
  .modal { padding: 12px; align-items: flex-end; }
  .modal-box { max-height: 92vh; border-radius: 16px 16px 8px 8px; }
  .modal-bd { padding: 16px; }
  .modal-ft { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .detail-body { grid-template-columns: 1fr; }
}

/* 超小屏（≤380）再收一档 */
@media (max-width: 380px) {
  .side-nav a { font-size: 9px; }
  .side-nav a i { font-size: 14px; }
  .table tr { gap: 6px 10px; padding: 11px; }
  .table td { font-size: 12.5px; }
}

/* ============================================================
   参考图上传 / 未登录引导 / 前台侧边栏
   ============================================================ */

/* 参考图 */
.ref-box {
  position: relative; border: 1px dashed var(--line); border-radius: 10px;
  min-height: 112px; display: grid; place-items: center; cursor: pointer;
  background: var(--panel-2); overflow: hidden; transition: .15s;
}
.ref-box:hover { border-color: #c7c9f5; background: var(--primary-s); }
.ref-box img { width: 100%; max-height: 220px; object-fit: contain; }
.ref-empty { text-align: center; color: var(--dim); font-size: 13px; padding: 14px; }
.ref-empty p { margin: 2px 0; }
.ref-plus { font-size: 20px; color: #c3c8d4; line-height: 1; margin-bottom: 4px; }
.ref-del {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border: 0; border-radius: 50%; background: rgba(20, 23, 31, .62); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.ref-del:hover { background: rgba(216, 54, 42, .9); }
.video-ref-box { min-height: 100px; }
.video-file-name {
  width: 100%; padding: 16px; text-align: center; color: var(--primary-d);
  font-size: 13px; font-weight: 600; word-break: break-all;
}
.result-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* 未登录引导 */
.guest-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 32px;
  text-align: center;
}
.guest-badge {
  display: inline-block; font-size: 12px; padding: 3px 12px; border-radius: 20px;
  background: var(--warn-s); color: var(--warn); font-weight: 600; margin-bottom: 10px;
}
.guest-hd h2 { font-size: 22px; letter-spacing: -.02em; }
.guest-hd p { color: var(--txt-2); margin: 8px 0 20px; font-size: 14px; }
.guest-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.guest-feats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 30px auto 0; max-width: 820px; text-align: left;
}
.guest-feats > div {
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 14px;
}
.guest-feats b { display: block; font-size: 14px; margin-bottom: 3px; }
.guest-feats span { font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.guest-models { margin-top: 24px; }
.guest-models-k { font-size: 12.5px; color: var(--dim); margin-bottom: 8px; }
.guest-models-list { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* 前台侧边栏：桌面隐藏 */
.fs-menu { display: none; }
.fsid, .fsid-mask { display: none; }

@media (max-width: 760px) {
  .fs-menu {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
    background: var(--line-2); cursor: pointer; flex: 0 0 auto;
  }
  .fs-menu span { display: block; width: 15px; height: 1.5px; background: var(--txt-2); border-radius: 2px; }
  .fs-menu .fs-menu-dot {
    position: absolute; top: -5px; right: -5px; margin: 0;
    border: 2px solid var(--panel); pointer-events: none;
  }
  .nav { display: none !important; }
  .brand-txt { font-size: 15px; }

  .fsid {
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 272px; max-width: 84vw;
    background: var(--panel); z-index: 70;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, .18);
  }
  .fsid.open { transform: translateX(0); }
  .fsid-mask {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(12, 14, 18, .45);
    opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  .fsid-mask.on { opacity: 1; pointer-events: auto; }

  .fsid-hd {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 16px 14px; border-bottom: 1px solid var(--line-2);
  }
  .fsid-title { font-size: 14.5px; font-weight: 650; color: var(--txt); }
  .fsid-sub { font-size: 11.5px; color: var(--dim); }
  .fsid-x {
    margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 8px;
    background: var(--line-2); color: var(--dim); font-size: 18px; line-height: 1;
    cursor: pointer;
  }

  .fsid-user {
    display: flex; align-items: center; gap: 11px;
    padding: 16px; border-bottom: 1px solid var(--line-2);
  }
  .fsid-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
    display: grid; place-items: center;
    background: var(--primary-s); color: var(--primary-d);
    font-size: 17px; font-weight: 650;
  }
  .fsid-avatar.guest { background: var(--line-2); color: var(--dim); }
  .fsid-name { font-size: 14px; font-weight: 600; }
  .fsid-credits { font-size: 12px; color: var(--dim); margin-top: 2px; }

  .fsid-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
  .fsid-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 13px; border-radius: 9px;
    color: var(--txt-2); font-size: 14px;
  }
  .fsid-nav a i {
    font-style: normal; width: 18px; text-align: center;
    font-size: 14px; color: var(--dim);
  }
  .fsid-nav a.on { background: var(--primary-s); color: var(--primary-d); font-weight: 600; }
  .fsid-nav a.on i { color: var(--primary); }
  .fsid-nav a:active { background: var(--line-2); }

  .fsid-ft { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
  .fsid-icp { text-align: center; font-size: 11px; color: var(--dim); margin-top: 10px; }

  .guest-panel { padding: 28px 18px; }
  .guest-feats { grid-template-columns: 1fr 1fr; }
  .guest-hd h2 { font-size: 19px; }
  .guest-actions .btn { flex: 1 1 auto; }
  .ref-box { min-height: 96px; }
}

/* ---------- 安装向导 ---------- */
.inst-body {
  margin: 0; min-height: 100vh; padding: 40px 20px;
  background: #f4f5f8; position: relative; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.inst-glow {
  position: fixed; left: 50%; top: -340px; width: 920px; height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(99, 102, 241, .16), rgba(99, 102, 241, 0) 70%);
  pointer-events: none; z-index: 0;
}
.inst-shell { position: relative; z-index: 1; width: 100%; max-width: 980px; }

.inst-card {
  display: grid; grid-template-columns: 318px 1fr;
  background: #fff; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(16, 24, 40, .12), 0 2px 8px rgba(16, 24, 40, .04);
}

.inst-brand {
  position: relative; overflow: hidden;
  padding: 38px 30px; display: flex; flex-direction: column;
  background: linear-gradient(165deg, #4f46e5 0%, #6a4fe8 55%, #7d5ce8 100%);
  color: #fff;
}
.inst-brand-glow {
  position: absolute; right: -90px; top: -90px; width: 300px; height: 300px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .26), transparent 70%);
}
.inst-deco {
  position: absolute; left: 50%; bottom: 64px; width: 260px; height: 260px;
  transform: translateX(-50%); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .10);
  pointer-events: none;
}
.inst-deco::after {
  content: ""; position: absolute; inset: 46px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .07);
}
.inst-logo {
  position: relative; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
  font-weight: 800; font-size: 15px; letter-spacing: .02em;
}
.inst-brand h1 { position: relative; font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.inst-tagline { position: relative; font-size: 13px; opacity: .82; margin: 6px 0 26px; }
.inst-points { position: relative; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.inst-points li { display: flex; align-items: center; gap: 9px; font-size: 13px; opacity: .95; }
.inst-points i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .7); flex: 0 0 auto; }
.inst-ver { margin-top: auto; padding-top: 30px; font-size: 11.5px; opacity: .6; }

.inst-main { padding: 34px 38px 30px; }
.inst-hd h2 { font-size: 21px; letter-spacing: -.02em; margin: 0; }
.inst-hd p { font-size: 13px; color: var(--dim); margin: 6px 0 0; }

.inst-steps { display: flex; align-items: center; list-style: none; padding: 0; margin: 22px 0 26px; }
.inst-steps li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--dim); flex: 1; }
.inst-steps li::after { content: ""; height: 1px; flex: 1; background: var(--line); margin: 0 10px; }
.inst-steps li:last-child { flex: 0 0 auto; }
.inst-steps li:last-child::after { display: none; }
.inst-steps i {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; font-style: normal;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  background: var(--line-2); color: var(--dim);
}
.inst-steps li.on { color: var(--primary-d); font-weight: 600; }
.inst-steps li.on i { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }

.inst-sec { margin-bottom: 22px; }
.inst-sec h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding-bottom: 9px; border-bottom: 1px solid var(--line-2);
  font-size: 14px; font-weight: 650;
}
.inst-num {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--primary); background: var(--primary-s);
  padding: 2px 6px; border-radius: 5px;
}
.inst-hint { font-size: 12.5px; color: var(--dim); margin: -6px 0 12px; line-height: 1.6; }
.inst-hint-tip { margin-top: -4px; padding: 8px 11px; background: #f8f8fc; border-radius: 8px; border: 1px solid var(--line-2); }
.inst-hint code { background: #edeef5; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

.inst-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.inst-field label { font-size: 12.5px; font-weight: 500; color: var(--txt-2); }
.inst-field input {
  height: 42px; padding: 0 13px; border-radius: 9px;
  border: 1px solid var(--line); background: #fbfbfd;
  font-size: 14px; transition: .15s;
}
.inst-field input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.inst-field input::placeholder { color: #b8bdc7; }

.inst-dbloc {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 11px 13px; margin-bottom: 15px;
  background: #f7f8fc; border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 12.5px; color: var(--txt-2);
}
.inst-dbloc svg { width: 16px; height: 16px; color: var(--primary); flex: 0 0 auto; }
.inst-dbloc b { color: var(--txt); font-weight: 600; font-family: var(--mono); font-size: 12.5px; }
.inst-dbloc em { font-style: normal; color: var(--dim); font-size: 11.5px; margin-left: auto; }

.inst-grid { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
.inst-grid.two { grid-template-columns: 1fr 1fr; }

/* 测试连接按钮居中 */
.inst-test-row { display: flex; justify-content: center; margin-top: 6px; }
.inst-test {
  display: inline-flex; align-items: center; gap: 7px;
  padding-left: 18px; padding-right: 18px;
}
.inst-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.inst-actions { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.inst-note { font-size: 11.5px; color: var(--dim); text-align: center; margin: 12px 0 0; }
.inst-form .alert { margin-top: 14px; }
.inst-foot { text-align: center; font-size: 12px; color: var(--dim); margin: 20px 0 0; }

/* 连接结果弹窗 */
.inst-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.inst-modal-mask { position: absolute; inset: 0; background: rgba(15, 18, 25, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.inst-modal-box {
  position: relative; width: 100%; max-width: 372px; background: #fff;
  border-radius: 16px; padding: 28px 24px 22px; text-align: center;
  box-shadow: 0 20px 50px rgba(16, 24, 40, .22);
  animation: instPop .18s ease-out;
}
@keyframes instPop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.inst-ok {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: #e8f7ef; color: #0f9d58;
  box-shadow: 0 0 0 8px rgba(15, 157, 88, .07);
}
.inst-ok.bad { background: #fdeceb; color: #d8362a; box-shadow: 0 0 0 8px rgba(216, 54, 42, .07); }
.inst-ok svg { width: 24px; height: 24px; }
.inst-modal-box h3 { font-size: 16.5px; margin: 0 0 7px; letter-spacing: -.01em; }
.inst-modal-box p { font-size: 13px; color: var(--dim); margin: 0 0 20px; line-height: 1.65; word-break: break-word; }

@media (max-width: 900px) {
  .inst-card { grid-template-columns: 1fr; }
  .inst-brand { padding: 22px 22px 20px; flex-direction: row; align-items: center; gap: 12px; }
  .inst-brand h1 { font-size: 18px; }
  .inst-tagline { font-size: 12px; margin: 2px 0 0; }
  .inst-logo { width: 36px; height: 36px; border-radius: 11px; font-size: 12px; margin-bottom: 0; }
  .inst-deco { display: none; }
  .inst-points, .inst-ver { display: none; }
  .inst-main { padding: 24px 20px 26px; }
}
@media (max-width: 760px) {
  .inst-body { padding: 16px 10px 30px; }
  .inst-hd h2 { font-size: 19px; }
  .inst-steps li span { display: none; }
  .inst-steps li.on span { display: inline; }
  .inst-grid { grid-template-columns: 1fr 96px; }
  .inst-grid.two { grid-template-columns: 1fr; }
  .inst-field input { height: 44px; font-size: 15px; }
}

/* ---------- 首页落地页 ---------- */
.landing { max-width: 1080px; margin: 0 auto; }

.lp-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 70px 32px 56px; border-radius: 20px;
  background: linear-gradient(180deg, #fbfaff, #f6f6fa);
  border: 1px solid var(--line);
}
.lp-glow {
  position: absolute; left: 50%; top: -280px; width: 760px; height: 540px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(99, 102, 241, .18), rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
}
.lp-hero-in { position: relative; }
.lp-badge {
  display: inline-block; font-size: 12px; padding: 4px 14px; border-radius: 20px;
  background: #fff; border: 1px solid #e3e1fa; color: var(--primary-d);
  font-weight: 600; margin-bottom: 18px;
}
.lp-title { font-size: 46px; line-height: 1.14; letter-spacing: -.035em; font-weight: 700; }
.lp-sub {
  margin: 18px auto 0; max-width: 520px; color: var(--txt-2);
  font-size: 15px; line-height: 1.7;
}
.lp-cta { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.lp-metrics {
  display: flex; justify-content: center; gap: 48px; margin-top: 42px;
  padding-top: 26px; border-top: 1px solid rgba(20, 23, 31, .06);
}
.lp-metrics b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.lp-metrics span { font-size: 12.5px; color: var(--dim); }

.lp-sec { margin-top: 56px; }
.lp-sec-hd { text-align: center; margin-bottom: 22px; }
.lp-sec-hd h2 { font-size: 24px; letter-spacing: -.02em; }
.lp-sec-hd p { color: var(--dim); font-size: 13.5px; margin: 6px 0 0; }

.lp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lp-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; transition: .2s;
}
.lp-card:hover { border-color: #d9d7f5; box-shadow: 0 6px 20px rgba(16, 24, 40, .06); transform: translateY(-2px); }
.lp-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary-s); color: var(--primary-d); margin-bottom: 14px;
}
.lp-ico svg { width: 19px; height: 19px; display: block; }
.lp-card h3 { font-size: 15px; margin-bottom: 6px; }
.lp-card p { font-size: 13px; color: var(--txt-2); line-height: 1.65; margin: 0; }

.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lp-steps li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.lp-steps b {
  display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--primary);
  background: var(--primary-s); padding: 2px 8px; border-radius: 6px; margin-bottom: 10px;
}
.lp-steps h4 { font-size: 15px; margin: 0 0 5px; }
.lp-steps p { font-size: 13px; color: var(--txt-2); margin: 0; line-height: 1.6; }

.lp-end {
  position: relative; overflow: hidden; text-align: center;
  margin-top: 56px; padding: 50px 32px; border-radius: 20px;
  background: linear-gradient(135deg, #4f46e5, #6d5ce8); color: #fff;
}
.lp-end-glow {
  position: absolute; inset: -54% -20% auto -20%; height: 380px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent 70%);
}
.lp-end h2 { position: relative; font-size: 26px; letter-spacing: -.02em; }
.lp-end p { position: relative; opacity: .86; font-size: 14px; margin: 8px 0 22px; }
.lp-end .btn { position: relative; background: #fff; color: var(--primary-d); }
.lp-end .btn:hover { background: #f2f1ff; }

@media (max-width: 760px) {
  .lp-hero { padding: 42px 20px 34px; border-radius: 16px; }
  .lp-title { font-size: 30px; }
  .lp-sub { font-size: 13.5px; margin-top: 14px; }
  .lp-cta { margin-top: 22px; }
  .lp-cta .btn { flex: 1 1 auto; }
  .lp-metrics { gap: 22px; margin-top: 28px; padding-top: 20px; }
  .lp-metrics b { font-size: 20px; }
  .lp-metrics span { font-size: 11.5px; }
  .lp-grid, .lp-steps { grid-template-columns: 1fr; }
  .lp-card, .lp-steps li { padding: 18px; }
  .lp-sec { margin-top: 38px; }
  .lp-sec-hd h2 { font-size: 20px; }
  .lp-end { padding: 36px 20px; margin-top: 38px; border-radius: 16px; }
  .lp-end h2 { font-size: 20px; }
}

/* ---------- 模型管理卡片 ---------- */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; }

.mcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; gap: 13px;
  transition: .18s;
}
.mcard:hover { border-color: #d9d7f5; box-shadow: 0 8px 24px rgba(16, 24, 40, .06); transform: translateY(-2px); }
.mcard.off { opacity: .74; }

.mcard-hd { display: flex; align-items: flex-start; gap: 11px; }
.mcard-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #6366f1, #8b5cf6); color: #fff;
  font-size: 15px; font-weight: 700;
}
.mcard.off .mcard-ico { background: var(--line); color: var(--dim); }
.mcard-title { flex: 1; min-width: 0; }
.mcard-title h3 { font-size: 15px; margin: 0 0 2px; }
.mcard-model {
  font-size: 11.5px; color: var(--dim); font-family: var(--mono);
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcard-badge { font-size: 11px; padding: 2px 9px; border-radius: 20px; font-weight: 600; flex: 0 0 auto; }
.mcard-badge.on { background: var(--ok-s); color: var(--ok); }
.mcard-badge.off { background: var(--line-2); color: var(--dim); }
.mcard-cat {
  flex: 0 0 auto; margin-top: 1px; padding: 2px 8px; border-radius: 20px;
  background: var(--primary-s); color: var(--primary-d); font-size: 10.5px; font-weight: 600;
}

.mcard-meta {
  display: flex; flex-direction: column; gap: 7px; padding: 12px 0;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.mmeta { display: flex; justify-content: space-between; font-size: 12.5px; }
.mmeta span { color: var(--dim); }
.mmeta b { font-weight: 600; }
.mmeta b.muted { color: var(--warn); font-weight: 500; }

.mcard-remark {
  font-size: 12px; color: var(--dim); margin: 0; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mcard-ft { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.mcard-id { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.mcard-acts { display: flex; gap: 6px; }

.mcard-empty {
  grid-column: 1 / -1; text-align: center; padding: 46px 24px;
  border-style: dashed; align-items: center;
}
.mcard-empty h3 { margin: 4px 0 6px; font-size: 15px; }
.mcard-empty p { color: var(--dim); font-size: 13px; margin: 0; line-height: 1.6; }

.mform-sec { margin-bottom: 20px; }
.mform-hd {
  font-size: 11.5px; font-weight: 600; color: var(--dim);
  letter-spacing: .05em; margin-bottom: 12px; padding-bottom: 7px;
  border-bottom: 1px solid var(--line-2);
}

@media (max-width: 760px) {
  .mgrid { grid-template-columns: 1fr; }
  .mcard { padding: 15px; }
}

/* ---------- 弹窗内联输入 + 模型候选 ---------- */
.field-inline { display: flex; gap: 8px; align-items: stretch; }
.field-inline input { flex: 1; min-width: 0; }
.field-inline .btn { flex: 0 0 auto; white-space: nowrap; }
.field input, .field select { height: 40px; }

.model-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px;
  max-height: 150px; overflow-y: auto; padding: 9px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px;
}
.mchip {
  border: 1px solid var(--line); background: #fff; color: var(--txt-2);
  font-size: 12px; padding: 4px 10px; border-radius: 7px;
  cursor: pointer; font-family: var(--mono); transition: .13s;
}
.mchip:hover { border-color: #c7c9f5; color: var(--primary-d); }
.mchip.on { background: var(--primary-s); border-color: var(--primary); color: var(--primary-d); font-weight: 600; }

/* 模型可用性状态 */
.mstate { font-size: 12px; font-weight: 600; }
.mstate.ok { color: var(--ok); }
.mstate.bad { color: var(--bad); }
.mstate.none { color: var(--dim); font-weight: 500; }
.mcard.bad { border-color: #f2c8c4; }
.mcard.bad:hover { border-color: #e8aca6; box-shadow: 0 8px 24px rgba(216, 54, 42, .08); }

.fetch-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding: 9px 12px;
  background: var(--primary-s); border: 1px solid #dcd9f8; border-radius: 9px;
  font-size: 12.5px; color: var(--primary-d); font-weight: 500;
}

/* 后台模型分类筛选 */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cat-chip {
  padding: 6px 13px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--dim);
  transition: .15s;
}
.cat-chip b { font-weight: 600; margin-left: 5px; color: var(--txt-2); }
.cat-chip:hover { border-color: var(--txt-2); color: var(--txt); }
.cat-chip.on {
  border-color: var(--primary); color: var(--txt);
  background: rgba(99, 132, 255, .14);
}

/* ============================================================
   视觉刷新（前台 + 后台）：覆盖上方基础样式
   ============================================================ */
:root {
  --bg: #f4f5fa;
  --panel-2: #f8f9fc;
  --line: #e4e6ef;
  --line-2: #eef0f6;
  --txt: #111827;
  --txt-2: #475467;
  --dim: #8b93a7;
  --primary: #5b4cf0;
  --primary-d: #4836d6;
  --primary-s: #efedff;
  --grad: linear-gradient(135deg, #6d5cff 0%, #5b4cf0 45%, #8b5cf6 100%);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px -12px rgba(17, 24, 39, .10);
  --shadow-lg: 0 24px 60px -16px rgba(17, 24, 39, .28);
  --ring: 0 0 0 4px rgba(91, 76, 240, .14);
}
body {
  background:
    radial-gradient(1200px 520px at 85% -160px, rgba(139, 92, 246, .10), transparent 70%),
    radial-gradient(900px 480px at -10% -120px, rgba(91, 76, 240, .08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
::selection { background: rgba(91, 76, 240, .18); }

/* 按钮 */
.btn {
  height: 40px; padding: 0 18px; border-radius: 11px; font-weight: 600; letter-spacing: .01em;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .12s;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--grad); color: #fff; border: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 16px -6px rgba(91, 76, 240, .55);
}
.btn-primary:hover:not(:disabled) {
  background: var(--grad); color: #fff; filter: brightness(1.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 22px -8px rgba(91, 76, 240, .65);
}
.btn-ghost { background: #fff; border-color: var(--line); color: var(--txt-2); }
.btn-ghost:hover:not(:disabled) { background: #fff; border-color: #cfd3e1; color: var(--txt); box-shadow: 0 2px 8px -4px rgba(17, 24, 39, .15); }
.btn-soft { background: var(--primary-s); color: var(--primary-d); border: 1px solid #ddd8ff; }
.btn-soft:hover:not(:disabled) { background: #e5e1ff; color: var(--primary-d); border-color: #cbc3ff; }
.btn-danger:hover:not(:disabled) { background: #fbdad7; color: var(--bad); }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 13px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 7px; }

/* 卡片 / 表单 */
.card { border-color: rgba(228, 230, 239, .9); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-hd { padding: 16px 22px; }
.card-hd h2 { font-size: 15.5px; font-weight: 700; }
.card-bd { padding: 22px; }
.two-col > .card, .two-col > section { margin-top: 0; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=date], select, textarea {
  border-radius: 11px; background: #fff; border-color: var(--line);
}
input:hover, select:hover, textarea:hover { border-color: #d3d7e4; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.field label { font-weight: 650; color: var(--txt); }

/* 顶栏 */
.topbar { background: rgba(255, 255, 255, .78); border-bottom-color: rgba(228, 230, 239, .8); }
.brand-mark { background: var(--grad); border-radius: 10px; box-shadow: 0 4px 12px -2px rgba(91, 76, 240, .45); }
.nav a { border-radius: 10px; }
.nav a.on { background: var(--primary-s); color: var(--primary-d); }
.chip { background: var(--primary-s); color: var(--primary-d); border: 1px solid #ddd8ff; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }

/* 前台侧栏 */
.front-side { border-radius: 18px; border-color: rgba(228, 230, 239, .9); }
.fside-nav a { padding: 9px 9px; border-radius: 11px; transition: background .15s; }
.fside-nav a > i { border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); }
.fside-nav a.on { background: var(--primary-s); }
.fside-nav a.on > i { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 10px -4px rgba(91, 76, 240, .6); }

/* 标题区 */
.hero-title { font-size: 32px; font-weight: 750; letter-spacing: -.025em; }
.hero-stats div { padding: 10px 16px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: 14px; min-width: 96px; }
.hero-stats b { font-size: 22px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 模型选择 */
.model-opt { border-radius: 11px; background: #fff; }
.model-opt.on { background: var(--primary-s); box-shadow: 0 0 0 3px rgba(91, 76, 240, .10); }

/* 结果区 */
.result-bd { gap: 16px; }
.result-stage {
  border: 1px dashed #d8dbe8; border-radius: 14px;
  background:
    linear-gradient(45deg, #f1f2f7 25%, transparent 25%, transparent 75%, #f1f2f7 75%) 0 0 / 20px 20px,
    linear-gradient(45deg, #f1f2f7 25%, transparent 25%, transparent 75%, #f1f2f7 75%) 10px 10px / 20px 20px,
    #fafbfd;
}
/* 出图后按图片原比例显示，不再压进正方形 */
.result-stage.has-media { aspect-ratio: auto; display: block; border-style: solid; border-color: var(--line); background: #f1f2f7; }
.result-stage.has-media > img, .result-stage.has-media > video {
  display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; margin: 0 auto;
}
.result-stage.has-media > img { cursor: zoom-in; animation: mediaIn .45s ease; }
@keyframes mediaIn { from { opacity: 0; transform: scale(.985); } }

/* 原图查看 */
.lightbox {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px;
  background: rgba(10, 11, 18, .86); cursor: zoom-out; animation: pop .16s ease-out;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: var(--shadow-lg); }
.toast { z-index: 100; }
.lightbox-tip { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); color: rgba(255, 255, 255, .7); font-size: 12px; }
.result-info { display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.result-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.result-meta .kv {
  flex-direction: column; justify-content: flex-start; gap: 1px; min-width: 0;
  padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2);
}
.result-meta .kv span { font-size: 11.5px; }
.result-meta .kv b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-actions .btn { height: 44px; border-radius: 12px; font-size: 14px; }
.result-actions .btn:only-child { grid-column: 1 / -1; }

/* 结果区「不满意继续改」 */
.inline-edit {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 14px;
  background: linear-gradient(180deg, #f7f6ff, #fbfbff);
  border: 1px solid #e4e0ff;
}
.inline-edit-hd { display: flex; flex-direction: column; gap: 2px; }
.inline-edit-hd label { font-size: 14px; font-weight: 700; color: var(--txt); }
.inline-edit-hd span { font-size: 12px; color: var(--dim); }
.inline-edit textarea {
  min-height: 92px; padding: 11px 13px; font-size: 14px; line-height: 1.6;
  border-radius: 12px; background: #fff; resize: vertical;
}
.inline-edit-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inline-edit-ft .btn { height: 42px; padding: 0 22px; border-radius: 12px; }

/* 缩略图：文字放在图片下方，标记缩进角落 */
.thumb { border-radius: 14px; border-color: var(--line); }
.thumb:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(17, 24, 39, .3); }
.thumb figcaption { padding: 10px 12px; line-height: 1.45; }
.thumb-flag { font-weight: 600; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { border-radius: 999px; }

/* 弹窗 */
.modal-box { border-radius: 18px; }
.detail-img { aspect-ratio: auto; min-height: 240px; align-self: start; background: #f1f2f7; }
.detail-img img, .detail-img video { height: auto; max-height: 70vh; }
.detail-img img { cursor: zoom-in; }
.detail-download { height: 44px; }

/* 落地页 */
.lp-card { border-radius: 18px; transition: transform .18s, box-shadow .18s; }
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -18px rgba(17, 24, 39, .28); }
.lp-ico { background: var(--primary-s); color: var(--primary); }

/* 后台：深色侧栏 */
.side { background: #12131c; border-right: 0; color: #c5c9d6; }
.side-brand { border-bottom-color: rgba(255, 255, 255, .07); }
.side-title { color: #fff; }
.side-sub { color: #7f8599; }
.side-nav { gap: 3px; }
.side-nav a { color: #b3b8c7; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on {
  background: linear-gradient(135deg, rgba(109, 92, 255, .9), rgba(139, 92, 246, .8));
  color: #fff; box-shadow: 0 8px 18px -8px rgba(109, 92, 255, .8);
}
.side-foot { border-top-color: rgba(255, 255, 255, .07); }
.side-user { color: #fff; }
.side-links a { color: #8d93a6; }
.side-links a:hover { color: #fff; }
.side-x { background: rgba(255, 255, 255, .08); color: #c5c9d6; }
.content { background: transparent; }
.chead { background: rgba(255, 255, 255, .8); border-bottom-color: rgba(228, 230, 239, .8); }
.chead h1 { font-size: 19px; font-weight: 750; }
.admin .card { border-radius: 16px; box-shadow: var(--shadow); }
.stat { position: relative; overflow: hidden; border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px; }
.stat::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(109, 92, 255, .14), transparent);
}
.stat-v { font-size: 28px; }
.chart-bar i { background: linear-gradient(180deg, #8b7dff, #5b4cf0); border-radius: 8px 8px 4px 4px; }
.rank-row .bar i { background: linear-gradient(90deg, #a99fff, #6d5cff); }
.table thead th { background: var(--panel-2); color: var(--dim); font-weight: 600; }
.table tbody tr:hover td { background: #fafaff; }
.tag { border-radius: 999px; }

@media (max-width: 760px) {
  .hero-title { font-size: 24px; }
  .result-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-edit-ft .dim { display: none; }
  .inline-edit-ft .btn { width: 100%; }
}
