:root {
  --bg: #f7f6fb;
  --panel: #ffffff;
  --ink: #16161d;
  --body: #4b4b5a;
  --muted: #8e8d9c;
  --line: #e7e5ef;
  --primary: #16161d;
  --em: #6c5ce7;
  --accent: #7b6cf6;
  --soft: #f1eff8;
  --green: #22a06b;
  --radius: 14px;
  --serif: 'Noto Serif SC', 'Songti SC', STSong, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; scroll-behavior: smooth; }
body { font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg.i { width: 1em; height: 1em; vertical-align: -0.15em; flex: none; }

/* 顶栏 */
.topbar { height: 68px; display: flex; align-items: center; gap: 28px; padding: 0 clamp(16px, 4vw, 60px); position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .82); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(231, 229, 239, .8); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .3px; white-space: nowrap; }
.logo-img { width: 34px; height: 34px; flex: none; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: 0 4px 12px rgba(22, 22, 29, .22); }
.nav { display: flex; align-items: center; gap: 6px; padding-left: 24px; border-left: 1px solid var(--line); height: 24px; }
.nav a { font-size: 15px; color: var(--ink); padding: 6px 14px; border-radius: 8px; white-space: nowrap; }
.nav a:hover, .nav a.on { background: var(--soft); }
.nav a.on { font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.chip { font-size: 12px; padding: 6px 12px; border-radius: 99px; background: var(--soft); color: var(--body); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.chip.ok { background: #e8f6ee; color: #18804f; }
.chip.warn { background: #fdf0de; color: #94571a; }

button { cursor: pointer; border: 0; border-radius: 10px; padding: 9px 16px; background: var(--soft); transition: background .15s, box-shadow .15s, transform .15s; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .btn-like.primary { background: var(--ink); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: #000; box-shadow: 0 6px 18px rgba(22, 22, 29, .25); }
button.ghost { background: #fff; border: 1px solid var(--line); }
button.ghost:hover:not(:disabled) { border-color: #cfcbe0; }
button.link { background: none; color: var(--body); padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
button.small { font-size: 12px; font-weight: 400; margin-left: auto; }
button.block { width: 100%; margin-top: 10px; padding: 11px; }
button.pill { border-radius: 99px; padding: 10px 22px; }
.btn-like { display: inline-block; padding: 9px 16px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123, 108, 246, .12); }
textarea { resize: vertical; line-height: 1.6; }

/* 首页 */
.home { position: relative; overflow: hidden; padding: clamp(40px, 7vh, 72px) 20px 56px; }
.hero-bg { position: absolute; left: 0; right: 0; top: -40px; height: 720px; pointer-events: none; z-index: 0; }
.hero-bg svg { position: absolute; width: 100%; height: 100%; }
.home-inner { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; text-align: center; }
.home h1 { font-size: clamp(30px, 4.6vw, 58px); font-weight: 900; letter-spacing: 1px; margin: 0 0 16px; line-height: 1.15; }
.home .sub { color: var(--body); font-size: clamp(14px, 1.4vw, 17px); margin: 0 0 40px; }
.ask { display: flex; align-items: flex-end; gap: 12px; max-width: 1040px; margin: 0 auto; background: rgba(255, 255, 255, .92); border: 1px solid #e4e0f6; border-radius: 22px; padding: 12px 12px 12px 26px; box-shadow: 0 18px 50px rgba(108, 92, 231, .14), 0 2px 6px rgba(22, 22, 29, .04); transition: box-shadow .2s, border-color .2s; }
.ask:focus-within { border-color: #c9c1f7; box-shadow: 0 18px 54px rgba(108, 92, 231, .22), 0 0 0 4px rgba(123, 108, 246, .08); }
.ask .spark { font-size: 26px; color: var(--accent); align-self: flex-start; margin-top: 17px; }
.ask-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.ask-main .mat-list { margin: 0 0 8px 6px; }
.attach { width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: var(--muted); cursor: pointer; flex: none; }
.attach:hover { background: var(--soft); color: var(--accent); }
.ask .sep { margin-bottom: 14px; }
.ask textarea { border: 0; resize: none; font-size: 18px; line-height: 1.6; padding: 14px 6px; min-height: 56px; max-height: 260px; overflow-y: auto; background: transparent; box-shadow: none !important; }
.ask .sep { width: 1px; height: 28px; background: var(--line); }
.ask button { display: flex; align-items: center; gap: 8px; padding: 16px 28px; font-size: 17px; border-radius: 14px; white-space: nowrap; }
.examples { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin: 26px auto 0; max-width: 1080px; }
.examples .lab { color: var(--body); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.examples .lab svg { color: var(--accent); font-size: 18px; }
.examples button { background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 99px; padding: 8px 18px; font-size: 14px; color: var(--body); }
.examples button:hover { border-color: var(--accent); color: var(--ink); background: #fff; }
.home-tools { display: flex; justify-content: center; gap: 22px; margin-top: 18px; font-size: 13px; }
.home-tools button { background: none; padding: 4px 2px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.home-tools button:hover { color: var(--ink); }
.home-tools .on { color: var(--em); }
.pages-pick { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.pages-pick b { color: var(--body); min-width: 18px; text-align: center; }
.pages-pick input { width: 120px; padding: 0; margin-left: 8px; border: 0; accent-color: var(--accent); box-shadow: none !important; cursor: pointer; }

/* 补充说明面板 */
.more-panel { max-width: 760px; margin: 18px auto 0; text-align: left; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 8px 30px rgba(22, 22, 29, .05); }
.more-panel label.t { font-size: 13px; color: var(--body); display: block; margin-bottom: 6px; }
.pages { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--body); margin-top: 12px; }
.pages input { flex: 1; padding: 0; border: 0; accent-color: var(--accent); box-shadow: none !important; }

/* 模板风格 */
.sec-head { margin: 64px 0 22px; }
.sec-head h2 { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 22px; margin: 0 0 8px; font-weight: 800; }
.sec-head h2::before, .sec-head h2::after { content: ""; width: 44px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent)); }
.sec-head h2::after { transform: scaleX(-1); }
.sec-head p { margin: 0; color: var(--muted); font-size: 14px; }
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1040px; margin: 0 auto; }
.tpl { position: relative; padding: 0; text-align: left; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(22, 22, 29, .05); }
.tpl:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(22, 22, 29, .09); }
.tpl.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123, 108, 246, .22), 0 12px 28px rgba(108, 92, 231, .15); }
.tpl.on::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; display: grid; place-items: center; }
.tpl .art { display: block; width: 100%; aspect-ratio: 16 / 5.4; }
.tpl .foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 13px; }
.tpl .nm { font-size: 15px; font-weight: 700; }
.tpl .dots { display: flex; gap: 4px; align-items: center; }
.tpl .dots i { width: 9px; height: 9px; border-radius: 2px; display: block; }
.tpl .dots .spark { color: var(--accent); font-size: 12px; margin-right: 2px; }
.tpl-more { margin-top: 18px; }
.tpl-more button { background: none; color: var(--body); font-size: 13px; }
.tpl-more button:hover { color: var(--ink); }

/* 案例库 */
.case-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1160px; margin: 0 auto; }
.case { padding: 0; text-align: left; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(22, 22, 29, .05); display: flex; flex-direction: column; }
.case:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(22, 22, 29, .12); }
.case .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.case .thumb .go { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; background: rgba(22, 22, 29, .45); opacity: 0; transition: opacity .2s; }
.case:hover .thumb .go { opacity: 1; }
.case .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.case .tags { display: flex; gap: 6px; }
.case .tags span { font-size: 11px; color: var(--em); background: #f0eeff; border-radius: 99px; padding: 2px 8px; }
.case .tags span + span { color: #18804f; background: #e8f6ee; }
.case b { font-size: 16px; margin-top: 4px; }
.case p { margin: 0; font-size: 12px; color: var(--body); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.case .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.style-panel .swatches { justify-content: flex-start; max-height: 260px; overflow-y: auto; }

/* 能力条 */
.features { display: grid; grid-template-columns: 1.15fr 1px repeat(3, 1fr); gap: 28px; align-items: center; max-width: 1280px; margin: 56px auto 0; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 20px; padding: 30px 36px; text-align: left; box-shadow: 0 10px 40px rgba(22, 22, 29, .05); }
.features h3 { font-size: 21px; line-height: 1.5; margin: 0; font-weight: 800; position: relative; padding-bottom: 12px; }
.features h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 110px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), transparent); }
.features .div { width: 1px; height: 64px; background: var(--line); }
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex: none; }
.feat b { display: block; font-size: 16px; margin: 2px 0 6px; }
.feat p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; max-width: 230px; }

/* 帮助 */
.help-dlg { width: min(620px, 92vw); }
.help-dlg ol { padding-left: 20px; line-height: 1.9; color: var(--body); font-size: 14px; }
.help-dlg ol b { color: var(--ink); }

@media (max-width: 1000px) {
  .nav { display: none; }
  .tpl-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .features .div { display: none; }
}
@media (max-width: 640px) {
  .ask { flex-direction: column; align-items: stretch; padding: 12px; }
  .ask .spark, .ask .sep { display: none; }
  .ask button { justify-content: center; }
  #llmChip { display: none; }
}

/* 风格小样（结果页换风格用） */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sw { width: 96px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #fff; padding: 0; text-align: left; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.sw.on { border-color: var(--accent); }
.sw .art { height: 54px; position: relative; }
.sw .art i { position: absolute; display: block; }
.sw .nm { font-size: 12px; padding: 5px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw.auto .art { display: grid; place-items: center; background: linear-gradient(135deg, #b9aefc, #7b6cf6 55%, #9fe0c8); color: #fff; font-size: 20px; }
.swatches.small { justify-content: flex-start; gap: 8px; margin-top: 12px; }
.swatches.small .sw { width: 80px; }
.swatches.small .sw .art { height: 40px; }

/* 生成中：AI 工作过程 */
.pg { max-width: 1280px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 40px) 48px; }
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.pg-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--em); font-weight: 600; margin-bottom: 6px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(123, 108, 246, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(123, 108, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(123, 108, 246, 0); } }
.pg-head h2 { margin: 0; font-size: 26px; font-weight: 800; }
.pg-time { text-align: right; }
.pg-time b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.pg-time span { font-size: 12px; color: var(--muted); }
.pg-bar { height: 4px; border-radius: 4px; background: #e9e6f6; margin: 16px 0 22px; overflow: hidden; }
.pg-bar i { display: block; height: 100%; width: 2%; border-radius: 4px; background: linear-gradient(90deg, #7b6cf6, #9db6ff, #6fd3a8); transition: width .6s ease; }
.pg-body { display: grid; grid-template-columns: 330px 1fr; gap: 22px; align-items: start; }

/* 左：时间线 */
.pg-steps { position: sticky; top: 88px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 8px; box-shadow: 0 8px 26px rgba(22, 22, 29, .04); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 18px 30px; }
.tl li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #d9d5ea; background: #fff; box-sizing: border-box; }
.tl li::after { content: ""; position: absolute; left: 11px; top: 20px; bottom: 0; width: 2px; background: #eeebf7; }
.tl li:last-child::after { display: none; }
.tl li.doing::before { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
.tl li.done::before { background: var(--accent); border-color: var(--accent); }
.tl li.done::after { background: #cfc8fb; }
.tl-h { display: flex; justify-content: space-between; align-items: baseline; }
.tl-h b { font-size: 14px; color: var(--muted); font-weight: 600; }
.tl li.doing .tl-h b, .tl li.done .tl-h b { color: var(--ink); }
.tl-t { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-d { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.tl li.done .tl-d, .tl li.doing .tl-d { color: var(--body); }
.tl-d .kv2 { display: block; }
.tl-d .kv2 i { font-style: normal; color: var(--muted); }
.tl-d .pal { display: flex; height: 16px; border-radius: 4px; overflow: hidden; margin: 6px 0 4px; }
.tl-d .pal span { flex: 1; }
.tl-d ol { margin: 4px 0 0; padding-left: 18px; }
.tl-d ol li { padding: 0; }
.tl-d ol li::before, .tl-d ol li::after { display: none; }
.tl-d .ok { color: #18804f; }

/* 右：实时内容 */
.pg-live { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pg-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: 0 8px 26px rgba(22, 22, 29, .04); }
.pg-card-h { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.pg-card-h .muted { margin-left: auto; font-weight: 400; }
.think-t { height: 168px; overflow: hidden; font-size: 13px; line-height: 1.75; color: var(--body); white-space: pre-wrap; word-break: break-word;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 36%); mask-image: linear-gradient(180deg, transparent 0, #000 36%); display: flex; flex-direction: column; justify-content: flex-end; }
.think.collapsed .think-t { height: 60px; }
.caret { display: inline-block; width: 7px; height: 15px; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.facts { list-style: none; margin: 0; padding: 0; max-height: 236px; overflow-y: auto; }
.facts li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; line-height: 1.55; animation: rise .4s ease both; }
.facts li:last-child { border-bottom: 0; }
.facts .tag { font-size: 11px; color: var(--em); background: #f0eeff; border-radius: 6px; padding: 2px 6px; white-space: nowrap; height: fit-content; }
.facts .src { display: block; font-size: 11.5px; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pg-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pg-slide { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #f3f1fa; box-shadow: 0 1px 4px rgba(22, 22, 29, .08); animation: rise .45s ease both; }
.pg-slide .no { position: absolute; left: 5px; top: 5px; z-index: 2; font-size: 10px; background: rgba(0, 0, 0, .5); color: #fff; border-radius: 3px; padding: 0 5px; }
.pg-slide.wait { background: linear-gradient(100deg, #f1eff8 30%, #faf9fd 50%, #f1eff8 70%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (max-width: 900px) {
  .pg-body { grid-template-columns: 1fr; }
  .pg-steps { position: static; }
}

/* 通用小卡片 */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: 13px; line-height: 1.7; }
.palette { display: flex; gap: 0; height: 26px; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.palette span { flex: 1; }
.muted { color: var(--muted); font-size: 12px; }

/* 结果 */
.workspace { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 68px); }
.panel { background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 22px; }
.panel h2 { font-size: 20px; font-weight: 800; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.hint { color: var(--muted); font-size: 12px; margin: 0 0 16px; line-height: 1.6; }
.block { border-top: 1px solid var(--line); padding: 16px 0; }
.block-title { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-bottom: 10px; }
.style-now { font-size: 13px; line-height: 1.7; color: var(--body); }
.style-now b { color: var(--ink); font-size: 15px; }
.kv { font-size: 13px; line-height: 1.7; color: var(--body); margin-bottom: 6px; }
.kv span { color: var(--muted); }
.stage { overflow-y: auto; padding: 24px; }
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.slide { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 1px 4px rgba(30, 20, 0, .1); cursor: pointer; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .15s; }
.slide:hover { outline-color: #cbc5b8; }
.slide.sel { outline-color: var(--accent); }
.slide .no { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 11px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 4px; padding: 1px 6px; }
.slide-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.slide-canvas .ph { display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .85); font-size: 15px; text-align: center; padding: 10px; }

/* 编辑表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--body); margin-bottom: 5px; }
.ef-group { border-left: 2px solid var(--line); padding-left: 10px; margin: 8px 0 12px; }
.ef-group > .ef-title { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ef-img { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: start; margin-bottom: 6px; }
.ef-img img, .ef-img .noimg { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; background: var(--soft); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; max-height: 150px; overflow-y: auto; }
.pick img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; cursor: pointer; outline: 2px solid transparent; }
.pick img:hover { outline-color: var(--ink); }

/* 资料上传 */
.mat { margin-top: 14px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.mat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.ghost-like { background: var(--soft); font-size: 12px; padding: 6px 12px; color: var(--ink); }
.mat-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.mat-list:empty { display: none; }
.mat-item { font-size: 12px; background: var(--soft); border-radius: 99px; padding: 3px 6px 3px 10px; display: inline-flex; align-items: center; gap: 6px; }
.mat-item button { padding: 0 6px; background: none; font-size: 14px; line-height: 1; }
.mat textarea { margin-top: 8px; }

/* 单页操作 */
.ops { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.op-row { display: flex; gap: 6px; align-items: center; }
.op-row select { flex: 1; min-width: 0; }
.op-row button { padding: 8px 10px; white-space: nowrap; }
.ops textarea { margin-top: 10px; font-size: 13px; }
.ops .primary.block { margin-top: 8px; }
.op-small { margin-top: 10px; flex-wrap: wrap; }
.op-small button { flex: 1; font-size: 12px; padding: 7px 4px; }
button.danger { color: #b3261e; }
.op-tip { margin: 8px 0 0; }
.op-tip:empty { display: none; }
.small-dlg { width: min(460px, 92vw); }
.small-dlg .field { margin-top: 12px; }
.ai-gen { margin-top: 8px; }
.ai-gen summary { cursor: pointer; font-size: 12px; color: var(--ink); }
.ai-gen textarea { margin-top: 6px; font-size: 13px; }
.ai-gen button { margin-top: 6px; }
.slide.drag-over { outline-color: var(--ink); outline-style: dashed; }
.slide.dragging { opacity: .4; }

/* 质检 */
.slide .qa-badge { position: absolute; right: 8px; top: 8px; z-index: 2; font-size: 11px; border-radius: 99px; padding: 1px 8px; color: #fff; background: #c77700; }
.slide .qa-badge.error { background: #b3261e; }
.qa-sum { font-size: 13px; color: var(--body); line-height: 1.7; }
.qa-sum.ok { color: #2c6b40; }
.qa-list { margin: 6px 0 0; padding: 0; list-style: none; max-height: 180px; overflow-y: auto; }
.qa-list li { font-size: 12px; color: var(--body); padding: 4px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.qa-list li:hover { color: var(--ink); }
.qa-list b { color: var(--ink); margin-right: 4px; }
.qa-edit { border: 1px solid #f0c48a; background: #fff8ee; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 12px; color: #6b4a14; line-height: 1.6; }
.qa-edit.error { border-color: #e8a29c; background: #fff2f1; color: #7a1f19; }
.qa-edit ul { margin: 4px 0 0; padding-left: 16px; }
.qa-edit button { margin-top: 8px; }

/* 参考来源 */
.src-list { margin: 0; padding: 0; list-style: none; max-height: 240px; overflow-y: auto; }
.src-list li { font-size: 12px; line-height: 1.5; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.src-list a { color: var(--ink); text-decoration: none; }
.src-list a:hover { text-decoration: underline; }
.src-list span { color: var(--muted); display: block; }

/* 配图进行中 */
.img-chip { background: #f0eeff; color: var(--em); }
.img-chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .9s linear infinite; }
body.imgs-loading .slide-canvas .ph::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.32) 50%, rgba(255,255,255,0) 70%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; }
body.imgs-loading .slide-canvas .ph span { display: none; }
body.imgs-loading .slide-canvas .ph::after { content: "正在找图…"; font-size: 15px; color: rgba(255, 255, 255, .9); }

/* 放大查看 */
.slide .zoom { position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 30px; height: 30px; padding: 0; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 16px; opacity: 0; transition: opacity .15s; }
.slide:hover .zoom { opacity: 1; }
.slide .zoom:hover { background: rgba(0, 0, 0, .8); }
.viewer { position: fixed; inset: 0; z-index: 40; background: rgba(12, 12, 18, .88); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }
.vw-stage { position: relative; box-shadow: 0 20px 70px rgba(0, 0, 0, .5); border-radius: 6px; overflow: hidden; background: #fff; }
.vw-stage .slide-canvas { transform-origin: 0 0; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 34px; line-height: 1; padding: 0 0 4px; }
.vw-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .25); }
.vw-nav.prev { left: 20px; } .vw-nav.next { right: 20px; }
.vw-close { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; padding: 0; }
.vw-close:hover { background: rgba(255, 255, 255, .25); }
.vw-bar button { color: var(--ink); padding: 8px 16px; }
.vw-bar { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; color: #fff; font-size: 14px; }

/* 账号 */
.user-box { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px 5px 5px; }
.user-btn .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #b9aefc, #7b6cf6); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; overflow: hidden; }
.user-btn .av img { width: 100%; height: 100%; object-fit: cover; }
.user-btn .cr { font-size: 13px; color: var(--em); font-weight: 700; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(22, 22, 29, .14); padding: 8px; z-index: 20; }
.user-menu .um-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; color: var(--body); line-height: 1.7; }
.user-menu .um-head b { color: var(--ink); font-size: 15px; display: block; }
.user-menu button { display: flex; width: 100%; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.user-menu button:hover { background: var(--soft); }
.user-menu .um-out { color: var(--muted); }
.acct-dlg .field { margin-top: 12px; }
.acct-dlg .hint { margin: 8px 0 0; }
.acct-dlg .hint.tiny { font-size: 11px; text-align: center; margin-top: 12px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button { white-space: nowrap; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wx-btn { color: #07a35a; border-color: #bfe6cf !important; }
.wide-dlg { width: min(1040px, 94vw); }
.my-decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; max-height: 70vh; overflow-y: auto; padding: 4px; margin-top: 12px; }
.my-deck { padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: left; position: relative; }
.my-deck:hover { box-shadow: 0 10px 26px rgba(22, 22, 29, .1); }
.my-deck .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.my-deck .info { padding: 10px 12px; }
.my-deck b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-deck span { font-size: 12px; color: var(--muted); }
.my-deck .lk { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 11px; border-radius: 99px; padding: 1px 8px; background: rgba(0, 0, 0, .55); color: #fff; }
.my-deck .del { position: absolute; right: 8px; top: 8px; z-index: 2; padding: 2px 8px; font-size: 12px; background: rgba(255, 255, 255, .9); color: #b3261e; border-radius: 6px; opacity: 0; }
.my-deck:hover .del { opacity: 1; }
.empty-tip { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }
.credit-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.credit-top div { background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.credit-top span { font-size: 12px; color: var(--muted); display: block; }
.credit-top b { font-size: 26px; color: var(--em); }
.price-tbl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; color: var(--body); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.price-tbl b { color: var(--ink); text-align: right; }
.recharge-soon { font-size: 13px; color: var(--body); background: #f0eeff; border-radius: 10px; padding: 10px 12px; margin: 12px 0 16px; }
.recharge-soon .link { color: var(--em); padding: 0 2px; }
.ledger { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.ledger li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.ledger li i { font-style: normal; font-size: 11px; color: var(--muted); grid-column: 1; }
.ledger .pos { color: #18804f; font-weight: 700; } .ledger .neg { color: #b3261e; font-weight: 700; }
.invite-rule { font-size: 14px; line-height: 1.7; background: #f0eeff; border-radius: 10px; padding: 12px 14px; margin: 12px 0 0; }
.invite-rule b { color: var(--em); }
.invite-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; text-align: center; }
.invite-stats div { background: var(--soft); border-radius: 10px; padding: 10px 4px; font-size: 12px; color: var(--muted); }
.invite-stats b { display: block; font-size: 20px; color: var(--ink); }
.quota { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.quota b { color: var(--em); }

.redeem { margin-top: 14px; }
.redeem input { text-transform: uppercase; letter-spacing: 1px; }

.topup { margin-top: 14px; }
.pkgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pkg { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; }
.pkg b { display: block; font-size: 20px; color: var(--ink); }
.pkg span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pkg em { display: block; font-style: normal; font-size: 15px; font-weight: 700; color: var(--em); margin-top: 6px; }
.pkg.on { border-color: var(--accent); background: #f5f2ff; }
.pkg .hot { position: absolute; top: -8px; right: -4px; font-size: 10px; background: #ff6b4a; color: #fff; border-radius: 99px; padding: 1px 7px; }
.pay-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pay-row .hint { flex: 1; margin: 0; }
.pay-btn { color: #fff; font-weight: 700; padding: 9px 16px; }
.pay-btn.wx { background: #07c160; } .pay-btn.ali { background: #1677ff; }
.pay-btn:disabled { opacity: .5; }
.pay-box { text-align: center; padding: 8px 0 4px; }
.pay-amt { font-size: 15px; margin: 6px 0 12px; } .pay-amt b { font-size: 28px; color: var(--ink); }
#payQr { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }

/* 锁定 / 只读 */
.lock-bar { border: 1px solid #d9d2fb; background: linear-gradient(135deg, #f5f2ff, #eef6ff); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; }
.lock-bar > b { font-size: 15px; display: block; margin-bottom: 4px; }
.lock-bar p b { color: var(--em); }
.lock-bar p { margin: 0 0 10px; font-size: 13px; color: var(--body); line-height: 1.6; }
.lock-bar .primary { width: 100%; }
.ro-bar { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; font-size: 13px; color: var(--body); line-height: 1.6; }
.ro-bar .primary { width: 100%; margin-top: 10px; }
.slide.locked .slide-canvas { filter: blur(1.5px); }
body.readonly #btnUndo, body.readonly #btnExport, body.readonly #imgBlock { display: none !important; }

/* 素材库 */
dialog { border: 0; border-radius: 14px; padding: 20px; width: min(860px, 92vw); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(15, 15, 15, .45); }
.dlg-head, .dlg-foot { display: flex; justify-content: space-between; align-items: center; }
.dlg-foot { margin-top: 14px; justify-content: flex-end; }
.upload { display: flex; gap: 8px; margin-bottom: 14px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 52vh; overflow-y: auto; }
.lib-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; display: block; }
.lib-item p { margin: 4px 0 0; font-size: 11px; color: var(--muted); line-height: 1.4; height: 30px; overflow: hidden; }

.loading { position: fixed; inset: 0; background: rgba(244, 242, 238, .8); backdrop-filter: blur(2px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 20; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--body); margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #17181c; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 30; max-width: 80vw; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; height: auto; }
  .panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .slides { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
  .ask { flex-direction: column; }
  .ask button { padding: 12px; }
}

/* ---------- 会员与价格 ---------- */
.pricing { max-width: 1120px; margin: 0 auto; padding: 48px 20px 80px; }
.pr-head { text-align: center; margin-bottom: 8px; }
.pr-head h1 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 900; margin: 0 0 12px; letter-spacing: 1px; }
.pr-head p { color: var(--body); margin: 0; font-size: 15px; }
.pr-head p b { color: var(--em); }
.pr-me { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-top: 18px; padding: 10px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; color: var(--body); }
.pr-me b { color: var(--ink); }
.vip-on { color: #b7791f; font-weight: 700; }
.pr-sec { margin-top: 44px; }
.pr-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.pr-title h2 { font-size: 22px; margin: 0; font-weight: 800; }
.pr-title span { color: var(--muted); font-size: 13px; }

.vip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.vip-card { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 26px 24px 22px; display: flex; flex-direction: column; }
.vip-card.hot { border-color: #e2b25c; box-shadow: 0 14px 40px rgba(183, 121, 31, .12); background: linear-gradient(180deg, #fffaf0, #fff 46%); }
.vip-card .badge { position: absolute; top: -11px; left: 24px; background: linear-gradient(90deg, #e2a03f, #c9771a); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.vip-card h3 { margin: 0; font-size: 18px; font-weight: 800; }
.vip-card .per { color: var(--muted); font-size: 13px; margin-top: 4px; min-height: 18px; }
.vip-card .price { margin: 14px 0 4px; font-size: 40px; font-weight: 900; letter-spacing: -.5px; }
.vip-card .price small { font-size: 18px; font-weight: 700; margin-right: 2px; }
.vip-card .price i { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.vip-card ul { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 9px; font-size: 14px; color: var(--body); flex: 1; }
.vip-card li { display: flex; gap: 8px; line-height: 1.5; }
.vip-card li::before { content: "✓"; color: var(--green); font-weight: 800; flex: none; }
.vip-card li.dim { color: var(--muted); font-size: 12.5px; }
.vip-card li.dim::before { content: "·"; color: var(--muted); }
.buy-row { display: flex; gap: 8px; }
.buy-row .pay-btn { flex: 1; padding: 11px 10px; border-radius: 10px; }
.buy-row .pay-btn:disabled { background: #d9d7e3; cursor: not-allowed; opacity: 1; }

.pack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pack { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 20px 18px 16px; text-align: center; display: flex; flex-direction: column; }
.pack.hot { border-color: var(--accent); }
.pack .hot-tag { position: absolute; top: -10px; right: 14px; font-size: 11px; background: #ff6b4a; color: #fff; border-radius: 99px; padding: 2px 9px; }
.pack b { font-size: 28px; font-weight: 900; }
.pack b small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.pack .note { color: var(--muted); font-size: 12.5px; margin: 4px 0 12px; flex: 1; }
.pack .price { font-size: 20px; font-weight: 800; color: var(--em); margin-bottom: 12px; }
.pack .buy-row .pay-btn { padding: 8px 6px; font-size: 13px; }

.pr-off { margin: 18px 0 0; text-align: center; color: var(--body); background: var(--soft); border-radius: 12px; padding: 10px; font-size: 13px; }
.pr-tbl { display: grid; grid-template-columns: 1fr auto auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 14px; }
.pr-tbl > * { padding: 12px 20px; border-top: 1px solid var(--line); }
.pr-tbl > .h { border-top: 0; background: #faf9fd; color: var(--muted); font-size: 12.5px; }
.pr-tbl .n { text-align: right; font-weight: 700; white-space: nowrap; }
.pr-tbl .v { color: #b7791f; }
.pr-faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.pr-faq summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.pr-faq p { margin: 10px 0 0; color: var(--body); line-height: 1.8; font-size: 14px; }

.cr-vip { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, #fff6e6, #fffaf2); border: 1px solid #f0d9ae; border-radius: 12px; padding: 10px 14px; font-size: 13px; color: #7a5a1e; margin-bottom: 12px; }
.cr-vip span { flex: 1; }
.cr-vip .link { color: #b7791f; font-weight: 700; }
.user-btn .crown { color: #d59a2c; margin-right: 2px; }
@media (max-width: 900px) {
  .vip-grid { grid-template-columns: 1fr; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
  .pr-tbl > * { padding: 10px 12px; }
}
