: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(28px, 4vw, 50px); 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; --inv: 2.4; }
/* 页面上直接改字：悬停虚线框，编辑中实线框（线宽按缩放比例补偿，缩略图上也看得清） */
.slide-canvas .tx-edit { cursor: text; border-radius: calc(3px * var(--inv)); }
.slide:hover .slide-canvas .tx-edit:hover { outline: calc(1.5px * var(--inv)) dashed rgba(124, 92, 255, .85); outline-offset: calc(2px * var(--inv)); }
.slide-canvas .tx-edit.editing, .slide:hover .slide-canvas .tx-edit.editing:hover { outline: calc(2px * var(--inv)) solid #7c5cff; outline-offset: calc(2px * var(--inv)); background: rgba(124, 92, 255, .08); z-index: 5; }
.slide-canvas .tx-edit.editing > div { outline: none; caret-color: #7c5cff; cursor: text; }
#editForm .hot { animation: fieldHot 1.4s ease; }
@keyframes fieldHot { 0%, 40% { box-shadow: 0 0 0 3px rgba(124, 92, 255, .35); border-color: #7c5cff; } 100% { box-shadow: none; } }
.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; }
.sub-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiny-left { font-size: 12px; }
.sub-btn { white-space: nowrap; }
.sub-btn.pending, .sub-btn.done { color: var(--muted); }
.sub-btn b { color: var(--em); }
@media (min-width: 641px) { .top-actions > button, .view-sw button { white-space: nowrap; } }
@media (max-width: 1180px) { #llmChip { display: none; } .sub-btn .sub-long { display: none; } }
@media (max-width: 640px) { .sub-btn { display: none; } } /* 手机网页顶栏本来就挤；手机上投稿走小程序 */
.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-auto-flow: column; grid-auto-columns: 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; }
.lock-glass { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .08) 55%, rgba(255, 255, 255, .16));
  -webkit-backdrop-filter: blur(9px) saturate(150%); backdrop-filter: blur(9px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .5); }
.lock-glass span { padding: 7px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; letter-spacing: .04em; color: #fff;
  background: rgba(20, 20, 30, .42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 6px 20px rgba(0, 0, 0, .18); }
#vwStage .lock-glass { -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); }
#vwStage .lock-glass span { padding: 10px 24px; font-size: 18px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .slide.locked .slide-canvas, #vwStage.locked .slide-canvas { filter: blur(14px); }
}
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-btn { flex: 1; width: 100%; padding: 11px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; transition: transform .12s, box-shadow .12s; }
.buy-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22, 22, 29, .18); }
.buy-btn:disabled { background: #d9d7e3; cursor: not-allowed; }
.vip-card.hot .buy-btn:not(:disabled) { background: linear-gradient(90deg, #e2a03f, #c9771a); }
.pack.hot .buy-btn:not(:disabled) { background: var(--em); }
.pack .buy-btn { padding: 9px 8px; font-size: 14px; }
.pay-row .buy-btn { flex: none; width: auto; padding: 9px 26px; }
.pp-item { background: var(--soft); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-size: 14px; }
.pp-item b { font-size: 20px; color: var(--ink); }
.pp-opts { display: grid; gap: 10px; }
.pp-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; text-align: left; transition: border-color .12s, background .12s; }
.pp-opt:hover { border-color: var(--accent); background: #faf9ff; }
.pp-opt[hidden] { display: none; }
.pp-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: 18px; }
.pp-ic svg { width: 24px; height: 24px; }
.pp-ic.wx { background: #07c160; } .pp-ic.ali { background: #1677ff; }
.pp-t { flex: 1; } .pp-t b { display: block; font-size: 15px; } .pp-t small { color: var(--muted); font-size: 12px; }
.pp-opt i { font-style: normal; font-size: 22px; color: var(--muted); }

.pack-grid { display: grid; grid-template-columns: repeat(3, 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; }
}

/* ---------- 右侧悬浮栏 ---------- */
.side-bar { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; gap: 6px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 16px; padding: 8px 6px; box-shadow: 0 10px 34px rgba(22, 22, 29, .1); backdrop-filter: blur(10px); }
.side-bar.off { display: none; }
#sbItems { display: flex; flex-direction: column; gap: 6px; }
.sb-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 60px; padding: 9px 0 7px; border-radius: 12px; background: none; color: var(--ink); cursor: pointer; font-size: 12px; }
.sb-item .i { width: 22px; height: 22px; color: var(--em); }
.sb-item:hover, .sb-item.open { background: var(--soft); }
.sb-top { border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; margin-top: 2px; padding-top: 10px; }
.sb-top[hidden] { display: none; }
.sb-pop { position: absolute; right: calc(100% + 14px); top: 50%; transform: translateY(-50%) translateX(6px); width: 196px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 12px; box-shadow: 0 14px 40px rgba(22, 22, 29, .14); text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; cursor: default; }
.sb-pop::after { content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: #fff; border-right: 1px solid var(--line); border-top: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.sb-item:hover .sb-pop, .sb-item.open .sb-pop { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.sb-pop img { width: 166px; height: 166px; object-fit: contain; display: block; margin: 0 auto 8px; border-radius: 8px; }
.sb-pop b { display: block; font-size: 14px; margin-bottom: 4px; }
.sb-pop p { margin: 0; color: var(--body); font-size: 12px; line-height: 1.6; white-space: pre-line; }
.kefu-box { text-align: center; padding: 6px 0 4px; }
.kefu-box img { width: 220px; height: 220px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.kefu-box p { color: var(--body); font-size: 13px; line-height: 1.7; white-space: pre-line; margin: 10px 0 0; }
@media (max-width: 640px) {
  .side-bar { top: auto; bottom: 16px; right: 10px; transform: none; padding: 5px 4px; }
  .sb-item { width: 46px; padding: 7px 0 5px; font-size: 11px; }
  .sb-item .i { width: 19px; height: 19px; }
  .sb-pop { top: auto; bottom: 0; transform: translateX(6px); }
  .sb-item:hover .sb-pop, .sb-item.open .sb-pop { transform: none; }
  .sb-pop::after { top: auto; bottom: 18px; transform: rotate(45deg); }
}

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 34px auto 0; flex-wrap: wrap; }
.pager button, .pager span { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 16px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(22, 22, 29, .04); }
.pager button:hover:not(:disabled):not(.on) { border-color: var(--accent); color: var(--em); }
.pager button.on { background: var(--em); border-color: var(--em); color: #fff; font-weight: 700; cursor: default; box-shadow: 0 6px 16px rgba(108, 92, 231, .3); }
.pager button:disabled { color: #c8c6d4; cursor: not-allowed; }
.pager span { border: 0; background: none; box-shadow: none; color: var(--muted); min-width: 20px; padding: 0; }
.pager svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .pager { gap: 6px; } .pager button { min-width: 38px; height: 38px; font-size: 14px; padding: 0 8px; } }

/* ================= 编辑体验 ================= */
.stage { position: relative; }
.slides { row-gap: 58px; padding-top: 38px; }
/* 保存状态 */
.save-state { background: none; padding: 6px 8px; font-size: 12px; color: var(--muted); cursor: default; white-space: nowrap; }
.save-state.saved { color: var(--green); }
.save-state.saving, .save-state.pending { color: var(--muted); }
.save-state.error { color: #b3261e; cursor: pointer; text-decoration: underline; }
/* 首次提示 */
.tip-bar { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: linear-gradient(90deg, #f3f0ff, #eef6ff); border: 1px solid #ddd6fe; border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--body); line-height: 1.6; margin-bottom: -16px; }
.tip-bar b { color: var(--ink); }
.tip-bar .link { white-space: nowrap; }
/* 选中页上方的浮动操作栏 */
.slide-bar { position: absolute; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(30, 20, 60, .14); white-space: nowrap; }
.slide-bar button { padding: 6px 10px; border-radius: 8px; background: none; font-size: 13px; color: var(--ink); }
.slide-bar button:hover:not(:disabled) { background: var(--soft); }
.slide-bar button[data-act="rewrite"] { color: var(--em); font-weight: 600; }
.slide-bar button.warn { color: #a85d00; background: #fff4e2; }
.slide-bar .bar-cta { background: var(--ink); color: #fff; font-weight: 600; }
.slide-bar .bar-cta:hover:not(:disabled) { background: #000; }
.slide-bar .bar-no { font-size: 12px; color: var(--muted); padding: 0 8px 0 6px; }
.slide-bar .bar-note { font-size: 12px; color: var(--muted); padding: 0 6px; }
.slide-bar .sep, .tx-bar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
/* 弹出层 */
.pop { position: absolute; z-index: 25; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(30, 20, 60, .18); padding: 14px; }
.pop[hidden] { display: none; }
.pop-wide { width: 540px; }
.pop-img { width: 380px; max-height: 70vh; overflow-y: auto; }
.pop-img .pick { max-height: 200px; overflow-y: auto; }
.pop-img .up-img { display: block; text-align: center; margin: 4px 0 10px; padding: 9px; border-radius: 10px; border: 1px dashed #cfcbe0; cursor: pointer; background: #fff; }
.pop-img .up-img:hover { border-color: var(--accent); }
.pop-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.pop-h .muted { font-size: 12px; color: var(--muted); }
.pop textarea { width: 100%; margin: 8px 0; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chips button { padding: 5px 10px; font-size: 12px; border-radius: 99px; background: var(--soft); color: var(--body); }
.chips button.on { background: #ece8ff; color: var(--em); box-shadow: inset 0 0 0 1px #c9bfff; }
/* 版式缩略图 */
.lay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 420px; overflow-y: auto; padding: 2px; }
.lay-grid.small { grid-template-columns: repeat(3, 1fr); max-height: 320px; }
.lay-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; background: #fff; border: 1.5px solid transparent; border-radius: 10px; font-size: 12px; color: var(--body); }
.lay-item:hover { border-color: #d9d3ff; background: #faf9ff; }
.lay-item.on { border-color: var(--accent); background: #f6f3ff; color: var(--em); font-weight: 600; }
.lay-th { position: relative; overflow: hidden; border-radius: 6px; background: #eee; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); pointer-events: none; }
.lay-th .slide-canvas { position: absolute; left: 0; top: 0; }
.auto-th { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(135deg, #f3f0ff, #e9f3ff); color: var(--em); font-size: 22px; }
.auto-th small { font-size: 11px; color: var(--body); }
/* 点图换图 */
.slide-canvas .img-edit { cursor: pointer; }
.slide:hover .slide-canvas .img-edit:hover { outline: calc(2px * var(--inv)) dashed rgba(124, 92, 255, .9); outline-offset: calc(-3px * var(--inv)); filter: brightness(1.04); }
/* 改字时的 AI 小工具条 */
.tx-bar { width: auto; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; white-space: nowrap; z-index: 30; }
.tx-bar button { padding: 5px 9px; font-size: 12.5px; border-radius: 8px; background: none; }
.tx-bar button:hover { background: var(--soft); }
.tx-bar .tb-t { font-size: 12px; color: var(--em); font-weight: 600; padding: 0 6px; cursor: help; }
.tx-bar .tb-cost { font-size: 11px; color: var(--muted); padding: 0 4px; }
.tx-bar.busy { opacity: .75; pointer-events: none; }
.tx-bar [data-hl] { color: var(--em); font-weight: 600; }
/* 左侧：方案 / 大纲 */
.ptabs { display: flex; gap: 4px; background: var(--soft); border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.ptabs button { flex: 1; padding: 7px; border-radius: 8px; background: none; font-size: 13px; color: var(--body); }
.ptabs button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.deck-tools { display: flex; gap: 8px; margin: 4px 0 14px; }
.deck-tools button { flex: 1; padding: 9px 8px; font-size: 13px; }
.ol-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.ol-item.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .12); }
.ol-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; margin-bottom: 6px; }
.ol-h b { min-width: 24px; height: 20px; border-radius: 6px; background: var(--soft); color: var(--ink); display: grid; place-items: center; font-size: 12px; }
.ol-h:hover b { background: #ece8ff; color: var(--em); }
.ol-item label { display: block; font-size: 11px; color: var(--muted); margin: 6px 0 3px; }
.ol-item textarea { width: 100%; font-size: 13px; line-height: 1.55; resize: vertical; field-sizing: content; min-height: 34px; padding: 6px 8px; }
.ol-note { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
@media (max-width: 900px) { .pop-wide { width: min(540px, 92vw); } .lay-grid { grid-template-columns: repeat(2, 1fr); } }

/* ================= 大图浏览：左 页面导航 / 中 大图 / 右 工具栏 ================= */
.workspace.ws3 { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "nav stage side"; }
.ws3 > .pagenav { grid-area: nav; } .ws3 > .stage { grid-area: stage; } .ws3 > .side { grid-area: side; }
/* 顶栏：大图 / 网格 */
.view-sw { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; }
.view-sw[hidden] { display: none; }
.view-sw button { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; background: none; color: var(--body); }
.view-sw button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
/* 左侧页面导航 */
.pagenav { position: relative; width: 168px; overflow-y: auto; overflow-x: hidden; background: var(--panel); border-right: 1px solid var(--line); padding: 16px 10px 60px 6px; }
body.view-grid .pagenav { display: none; }
.nv-item { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 12px; cursor: pointer; }
.nv-no { width: 18px; text-align: right; font-size: 11px; color: var(--muted); padding-top: 2px; flex: none; }
.nv-th { position: relative; width: 120px; height: 67.5px; border-radius: 5px; overflow: hidden; background: #eee; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; flex: none; }
.nv-th .slide-canvas { pointer-events: none; }
.nv-item:hover .nv-th { outline-color: #d9d4ee; }
.nv-item.cur .nv-no { color: var(--ink); font-weight: 700; }
.nv-item.cur .nv-th { outline-color: #cfc7f5; }
.nv-item.sel .nv-th { outline-color: var(--accent); }
.nv-item.locked .nv-th .slide-canvas { filter: blur(3px); }
.nv-lock { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 16px; background: rgba(255, 255, 255, .25); }
.nv-item.dragging { opacity: .4; }
.nv-item.drag-over .nv-th { outline: 2px dashed var(--ink); }
/* 中间：大图 */
#stage.big .slides { grid-template-columns: minmax(0, 1fr); width: min(100%, calc((100vh - 150px) * 16 / 9)); margin: 0 auto; row-gap: 64px; padding-bottom: 120px; }
#stage.big #lockBar, #stage.big .tip-bar { width: min(100%, calc((100vh - 150px) * 16 / 9)); margin-left: auto; margin-right: auto; }
#stage.big .slide { border-radius: 8px; box-shadow: 0 8px 30px rgba(30, 20, 60, .12); }
#stage.big .slide .no { font-size: 12px; padding: 2px 8px; left: 12px; top: 12px; }
#stage.big .lock-glass span { padding: 10px 24px; font-size: 18px; }
/* 解锁横条（挪到大图上方） */
#stage #lockBar .lock-bar { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; margin: 0 0 14px; padding: 14px 20px; }
#stage #lockBar .lock-bar > b { margin-bottom: 2px; }
#stage #lockBar .lock-bar p { margin: 0; grid-column: 1; }
#stage #lockBar .lock-bar .primary { grid-column: 2; grid-row: 1 / span 2; width: auto; padding: 12px 30px; }
#stage #lockBar .ro-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 14px; }
#stage #lockBar .ro-bar .primary { width: auto; margin: 0; white-space: nowrap; }
/* 右侧：工具栏 + 可收起面板 */
.side { display: flex; background: var(--panel); border-left: 1px solid var(--line); min-height: 0; }
.side-body { width: 340px; display: none; border-right: 1px solid var(--line); }
.side.open .side-body { display: block; }
.side-head { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.side-head b { font-size: 15px; }
.rail { width: 64px; display: flex; flex-direction: column; gap: 4px; padding: 14px 6px; }
.rail button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 7px; font-size: 11.5px; border-radius: 10px; background: none; color: var(--body); }
.rail button span { font-size: 18px; line-height: 1; }
.rail button:hover { background: var(--soft); }
.rail button.on { background: #f1edff; color: var(--em); font-weight: 600; }
body.readonly .rail [data-rail="outline"], body.readonly .rail [data-rail="page"], body.readonly .rail [data-rail="find"], body.readonly .rail [data-rail="adjust"] { display: none; }
@media (max-width: 1100px) { .pagenav { display: none; } .side-body { width: 300px; } }
#slides > #lockBar { grid-column: 1 / -1; width: auto; margin: 0; }
#slides > #lockBar .lock-bar { margin: 0; }

/* ================= 新手引导 ================= */
.tour { position: fixed; inset: 0; z-index: 900; animation: tourFade .35s ease; }
.tour[hidden] { display: none; }
.tour.out { animation: tourFadeOut .26s ease forwards; }
@keyframes tourFade { from { opacity: 0; } }
@keyframes tourFadeOut { to { opacity: 0; } }
.tour-block { position: absolute; inset: 0; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(12, 10, 26, .7); pointer-events: none;
  transition: left .55s cubic-bezier(.22, .9, .24, 1), top .55s cubic-bezier(.22, .9, .24, 1), width .55s cubic-bezier(.22, .9, .24, 1), height .55s cubic-bezier(.22, .9, .24, 1); }
.tour-spot::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px rgba(168, 150, 255, .95), 0 0 28px 6px rgba(140, 120, 255, .45); }
.tour-spot::after { content: ''; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid rgba(190, 175, 255, .9); animation: tourPulse 1.9s cubic-bezier(.2, .7, .3, 1) infinite; }
@keyframes tourPulse { 0% { opacity: .9; inset: -2px; } 100% { opacity: 0; inset: -16px; border-radius: 22px; } }
.tour-card { position: fixed; width: 330px; padding: 20px 20px 16px; border-radius: 18px; background: rgba(255, 255, 255, .97);
  box-shadow: 0 30px 80px rgba(10, 8, 30, .38), 0 2px 0 rgba(255, 255, 255, .8) inset; transition: left .55s cubic-bezier(.22, .9, .24, 1), top .55s cubic-bezier(.22, .9, .24, 1); }
.tour-card.in .tour-step, .tour-card.in h4, .tour-card.in p { animation: tourRise .5s cubic-bezier(.2, .9, .3, 1) both; }
.tour-card.in h4 { animation-delay: .05s; } .tour-card.in p { animation-delay: .1s; }
@keyframes tourRise { from { opacity: 0; transform: translateY(8px); } }
.tour-step { font-size: 11px; letter-spacing: 2px; font-weight: 700; background: linear-gradient(90deg, #7b6cf6, #c06cf0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tour-card h4 { margin: 6px 0 6px; font-size: 18px; color: var(--ink); }
.tour-card p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.75; color: var(--body); }
.tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-dots { flex: 1; display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: #ddd8f0; transition: width .35s cubic-bezier(.22, .9, .24, 1), background .35s; }
.tour-dots i.on { width: 20px; background: linear-gradient(90deg, #7b6cf6, #c06cf0); }
.tour-foot button { padding: 7px 14px; font-size: 13px; }
.tour-foot .link { color: var(--muted); padding: 7px 4px; }
.tour-cursor { position: fixed; z-index: 2; width: 26px; height: 26px; pointer-events: none; opacity: 0; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35));
  transition: left .95s cubic-bezier(.3, .9, .25, 1), top .95s cubic-bezier(.3, .9, .25, 1), opacity .3s; }
.tour-cursor svg { display: block; transform-origin: 4px 3px; }
.tour-cursor.click svg { animation: tourPress .45s ease; }
@keyframes tourPress { 45% { transform: scale(.8); } }
.tour-ripple { position: absolute; left: -15px; top: -15px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 14px rgba(255, 255, 255, .7); opacity: 0; }
.tour-cursor.click .tour-ripple { animation: tourRipple .75s ease-out; }
@keyframes tourRipple { from { opacity: .95; transform: scale(.25); } to { opacity: 0; transform: scale(2.3); } }
.rail .rail-tour { margin-top: auto; }
.rail .rail-tour span { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .tour, .tour-spot, .tour-card, .tour-cursor { transition: none; animation: none; } .tour-spot::after { animation: none; } }

/* ================= 独立页面：我的方案 / 素材库 / 帮助中心 ================= */
.page { max-width: 1200px; margin: 0 auto; padding: 40px 24px 90px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 900; margin: 0 0 8px; }
.page-head p { margin: 0; color: var(--body); font-size: 14px; line-height: 1.7; max-width: 720px; }
.page-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-search { width: 220px; }
.page .empty-tip { padding: 70px 0; }
.page .empty-tip p { font-size: 16px; color: var(--body); margin: 0 0 14px; }
.page .empty-tip small { display: block; color: var(--muted); }
/* 我的方案 */
.page .my-decks { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 0; }
.page .my-deck { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.page .my-deck:hover { transform: translateY(-2px); }
.page .my-deck .info { padding: 12px 14px 14px; }
.page .my-deck b { font-size: 15px; }
.page .my-deck small { display: block; font-size: 12px; color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0 6px; min-height: 16px; }
.my-deck .lk.ok { background: rgba(34, 160, 107, .85); }
/* 素材库 */
.lib-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; border: 2px dashed #d6d0ee; border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; text-align: center; }
.lib-drop:hover, .lib-drop.over { border-color: var(--accent); background: #faf8ff; }
.lib-drop .ld-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #f1edff; color: var(--em); font-size: 20px; }
.lib-drop b { font-size: 15px; }
.lib-drop small { color: var(--muted); }
.lib-bar { display: flex; gap: 10px; align-items: center; margin: 16px 0 18px; flex-wrap: wrap; }
.lib-bar #libTags { flex: 1; min-width: 280px; }
.page-lib { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.page-lib .lib-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.page-lib .li-img { position: relative; }
.page-lib .li-img img { border-radius: 0; aspect-ratio: 16 / 10; }
.page-lib .li-del { position: absolute; right: 8px; top: 8px; padding: 3px 9px; font-size: 12px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #b3261e; opacity: 0; transition: opacity .15s; }
.page-lib .lib-item:hover .li-del { opacity: 1; }
.page-lib .li-tags { height: auto; min-height: 22px; margin: 0; padding: 8px 10px 10px; display: flex; flex-wrap: wrap; gap: 4px; cursor: pointer; }
.page-lib .li-tags span { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--soft); color: var(--body); }
.page-lib .li-tags em { font-size: 11px; color: var(--muted); font-style: normal; }
.page-lib .li-tags:hover span { background: #ece8ff; color: var(--em); }
/* 帮助中心 */
.help-page { max-width: 1040px; }
.hp-sec { margin-top: 36px; }
.hp-sec h2 { font-size: 20px; font-weight: 800; margin: 0 0 16px; }
.hp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.hp-steps > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.hp-steps i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #7b6cf6, #c06cf0); color: #fff; font-style: normal; font-weight: 800; margin-bottom: 10px; }
.hp-steps b, .hp-tip b { font-size: 15px; display: block; margin-bottom: 6px; }
.hp-steps p, .hp-tip p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--body); }
.hp-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.hp-tip { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.hp-keys { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: 14px; padding: 12px 16px; background: var(--soft); border-radius: 12px; font-size: 13px; color: var(--body); }
.hp-keys b { color: var(--ink); }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; margin: 0 2px; border: 1px solid #d4d0e2; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 12px/18px system-ui, sans-serif; text-align: center; color: var(--ink); }
.hp-price { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 14px; }
.hp-price td { padding: 11px 16px; border-bottom: 1px solid var(--line); }
.hp-price tr:last-child td { border-bottom: 0; }
.hp-price td:first-child { color: var(--body); width: 42%; }
.hp-price b { color: var(--em); }
.hp-faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
.hp-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.hp-faq summary::after { content: '+'; color: var(--muted); font-size: 18px; transition: transform .2s; }
.hp-faq[open] summary::after { transform: rotate(45deg); }
.hp-faq p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.8; color: var(--body); }
.pr-faq details .pr-tbl { margin-top: 12px; font-size: 13.5px; }
.pr-faq details .pr-tbl > * { padding: 10px 16px; }

/* 购买须知 / 充值服务协议 / 会员积分到期 */
.pp-terms { margin: 14px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.pp-terms a { color: var(--em); }
.pr-terms { text-align: center; margin-top: 14px; }
.agreement .hp-sec p { margin: 0 0 8px; font-size: 14px; line-height: 1.9; color: var(--body); }
.agreement .hp-sec { margin-top: 26px; }
.vip-left { font-size: 12px; color: var(--muted); }
.vip-left.soon { color: #c2410c; font-weight: 600; }

/* ================= 全站底部 ================= */
.site-foot { margin-top: 72px; padding: 46px 20px 34px; background: #fff; border-top: 1px solid var(--line); text-align: center; }
.site-foot[hidden] { display: none; }
.sf-slogan { display: inline-block; position: relative; margin: 0 0 26px; padding-bottom: 12px; font-size: 21px; line-height: 1.5; font-weight: 800; color: var(--ink); }
.sf-slogan::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 110px; height: 3px; border-radius: 3px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.sf-copy { margin: 0 0 12px; font-size: 14px; color: var(--body); }
.sf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; font-size: 14px; }
.sf-links a, .sf-icp a { color: var(--muted); text-decoration: none; transition: color .15s; }
.sf-links a:hover, .sf-icp a:hover { color: var(--em); }
.sf-icp { margin: 14px 0 0; font-size: 12.5px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.legal-nav a { color: var(--em); }
.legal-nav b { color: var(--ink); }
.slide-bar button.off { opacity: .4; }

/* 页面导航拖动排序：插入位置画一条紫线 */
.nv-item { position: relative; }
.nv-item.drop-before::before, .nv-item.drop-after::after { content: ''; position: absolute; left: 20px; right: 6px; height: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .18); pointer-events: none; }
.nv-item.drop-before::before { top: -8px; }
.nv-item.drop-after::after { bottom: -8px; }
.nv-item[draggable="true"] { cursor: grab; }

/* 品牌套件：logo + 品牌主色 */
.brand-box { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.brand-logo-slot { width: 150px; height: 64px; border: 1.5px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: var(--muted); background: repeating-conic-gradient(#f3f3f6 0 25%, #fff 0 50%) 0 0 / 14px 14px; position: relative; overflow: hidden; }
.brand-logo-slot:hover { border-color: var(--accent); color: var(--accent); }
.brand-logo-slot img { max-width: 86%; max-height: 74%; object-fit: contain; }
.brand-logo-slot.empty { background: #fafafc; }
.brand-logo-slot .x { position: absolute; top: 3px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 20px; text-align: center; }
.brand-color { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-color .sw-pick { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; position: relative; cursor: pointer; background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); }
.brand-color .sw-pick input { position: absolute; inset: -6px; width: 46px; height: 46px; opacity: 0; cursor: pointer; }
.brand-color .hex { width: 92px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; font: 13px/1.2 ui-monospace, Consolas, monospace; text-transform: uppercase; }
.brand-color .chip { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.brand-color .chip.on { box-shadow: 0 0 0 2px var(--accent); }
.brand-color .lab { font-size: 12px; color: var(--muted); }
.brand-box .link { font-size: 12px; }
.side .brand-box { gap: 10px; }
.side .brand-logo-slot { width: 100%; height: 72px; }

/* 删除章节页的两个选项 */
.del-sec-foot, .lack-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.del-sec-foot .danger { color: #d33; border-color: rgba(221, 51, 51, .35); }

/* 弹窗右上角的关闭叉号 */
.x-btn { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; transition: background .15s, color .15s; }
.x-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.x-btn:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.x-btn.sm { width: 26px; height: 26px; }
.x-btn.sm svg { width: 15px; height: 15px; }
.dlg-head .x-btn { margin: -4px -6px -4px 8px; }
.pop-h .x-btn { align-self: center; margin-right: -4px; }

/* 加一页：宽弹窗，版式按类别分组、只竖向滚动 */
.wide-dlg { width: min(1060px, 94vw); }
.wide-dlg .field { margin-top: 12px; }
.lay-grid { overflow-x: hidden; }
.lay-grid.big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-height: min(58vh, 600px); gap: 8px 10px; }
.lay-group { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; padding: 8px 2px 0; border-top: 1px solid var(--line); margin-top: 4px; }
.lay-grid > .lay-group:first-child, .lay-grid > .lay-item + .lay-group:nth-child(2) { border-top: 0; margin-top: 0; }
@media (max-width: 900px) { .lay-grid.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* 首页：调整页数面板 */
.pages-row { display: flex; align-items: center; gap: 12px; padding: 6px 2px 2px; }
.pages-row input[type=range] { flex: 1; padding: 0; border: 0; accent-color: var(--accent); box-shadow: none !important; cursor: pointer; }
.pages-end { font-size: 12px; color: var(--muted); }
.pages-now { min-width: 120px; text-align: right; color: var(--body); font-size: 14px; }
.pages-now b { font-size: 22px; color: var(--em); margin-right: 2px; }
.pages-now small { display: block; font-size: 12px; color: var(--muted); }

/* 页数按钮：以全角“）”结尾时，括号右侧自带半字空白，▾ 往左收 */
#btnPages.tight .dd-arrow { margin-left: -7px; }

/* 手机端适配（2026-11-27） */
/* 缩略图用 padding 撑出 16:9：iPhone 微信里，按钮卡片内的 aspect-ratio 算不出高度，会变成 0 高看不到图 */
.case .thumb, .my-deck .thumb { aspect-ratio: auto; width: 100%; height: 0; padding-top: 56.25%; }
@media (max-width: 640px) {
  /* 首页工具条：固定两列两行（风格 | 品牌、免费次数 | 页数），每格放得下，不会伸到右下角浮条底下 */
  .home-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 0; padding: 0 4px; font-size: 13px; }
  /* 宽度把内边距算在里面（iPhone 上按钮默认不算，两个 50% 加内边距会超宽而各占一行），再留 1px 余量 */
  .home-tools > * { box-sizing: border-box; flex: 0 0 calc(50% - 1px); max-width: calc(50% - 1px); justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .home-tools > :empty, .home-tools > [hidden] { display: none; }
  .m-hide { display: none; }
  #btnPages.tight .dd-arrow { margin-left: 0; }
  /* 右下角浮条：只留图标，少挡内容 */
  .sb-item { width: 36px; padding: 8px 0; }
  .sb-item > span { display: none; }
  .sb-top { padding-top: 9px; }
  .side-bar { padding: 3px; border-radius: 12px; right: 6px; }
  /* 案例卡片：手机上一行两个，字小一点 */
  .case-grid { gap: 12px; padding: 0 2px; }
  .case .info { padding: 10px 10px 12px; }
  .case b { font-size: 14.5px; }
  .case .meta { font-size: 11px; }
}
.case .tags { flex-wrap: wrap; }
.case .tags span { white-space: nowrap; }
@media (max-width: 640px) {
  /* 首页主题框：手机上提示文字折成两行，最小高度放得下两行（16px 起步，iPhone 点进去不会自动放大页面） */
  .ask textarea { font-size: 16px; line-height: 1.55; padding: 12px 6px; min-height: 76px; }
}

/* 登录：微信（默认）/ 手机号 */
.wx-qr { display: flex; justify-content: center; min-height: 120px; margin: 6px 0 2px; }
.wx-qr iframe { width: 300px; height: 300px; border: 0; }
.wx-go { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 6px; padding: 12px; border-radius: 12px; background: #07c160; color: #fff; font-size: 16px; font-weight: 700; }
.wx-go:hover { background: #06ad56; }
.wx-ico { width: 20px; height: 20px; flex: none; }
.wx-link { display: inline-flex; align-items: center; gap: 6px; color: #07a35a; }
.wx-link .wx-ico { width: 18px; height: 18px; }
.wx-mock { margin: 30px 0; }
.lg-switch { text-align: center; margin-top: 10px; }
.lg-switch .link { font-size: 13px; }
.hint.center { text-align: center; }

/* 任务中心：赚积分 */
.task-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.task { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.task.wide { grid-column: 1 / -1; }
.task-top { display: flex; align-items: flex-start; gap: 14px; }
.task-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; font-size: 22px; }
.task-t { flex: 1; min-width: 0; }
.task-t b { font-size: 17px; font-weight: 800; }
.task-t p { margin: 6px 0 0; font-size: 13px; color: var(--body); line-height: 1.7; }
.task-rw { flex: none; font-size: 24px; font-weight: 900; color: var(--em); line-height: 1; text-align: right; }
.task-rw small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.task-body { margin-top: auto; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.task-body .code-row { width: 100%; }
.task-body .hint { margin: 0; }
.tk-done { color: #18804f; font-weight: 700; font-size: 14px; }
.tk-stat { margin: 0; font-size: 13px; color: var(--body); }
.tk-stat b { color: var(--ink); }
.tk-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: tk; width: 100%; }
.tk-steps li { counter-increment: tk; background: var(--soft); border-radius: 14px; padding: 14px 14px 14px 46px; position: relative; }
.tk-steps li::before { content: counter(tk); position: absolute; left: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.tk-steps b { display: block; font-size: 14px; margin-bottom: 4px; }
.tk-steps span { font-size: 12px; color: var(--body); line-height: 1.6; }
.tk-form { display: grid; grid-template-columns: 130px 1fr 200px auto; gap: 10px; width: 100%; }
.tk-list { width: 100%; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.tk-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tk-row a { flex: 1; min-width: 0; color: var(--em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row i { font-style: normal; color: var(--muted); font-size: 12px; }
.tk-row em { font-style: normal; color: #c0392b; font-size: 12px; width: 100%; }
.tk-st { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--body); }
.tk-st.ok { background: #e8f6ee; color: #18804f; }
.tk-st.no { background: #fdecec; color: #c0392b; }
.tk-rule { font-size: 12px; }
@media (max-width: 960px) {
  .task-grid { grid-template-columns: 1fr; }
  .tk-steps { grid-template-columns: 1fr 1fr; }
  .tk-form { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .tk-steps { grid-template-columns: 1fr; } }

/* 案例库行业筛选 */
.case-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -6px 0 22px; }
.case-filter[hidden] { display: none; }
.case-filter button { padding: 6px 16px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--body); font-size: 13px; }
.case-filter button:hover { border-color: var(--accent); color: var(--ink); }
.case-filter button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* 电脑上扫服务号二维码登录 */
.wx-qr .mp-qr { display: block; width: 200px; height: 200px; margin: 6px auto; border-radius: 8px; }
.wx-qr .mp-qr-expired { display: block; width: 200px; height: 200px; margin: 6px auto; border: 1px dashed var(--line); border-radius: 8px; background: #fafafa; color: var(--muted); font-size: 14px; line-height: 1.8; cursor: pointer; }
.wx-qr .mp-qr-expired b { color: var(--ink); }

/* 案例页：下载 PPT（会员） */
.ro-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ro-bar .ro-acts .primary, .ro-bar .ro-acts .ghost { width: auto; margin: 0; white-space: nowrap; }
.ro-bar .ro-acts { margin-top: 10px; }
#stage #lockBar .ro-bar .ro-acts { margin-top: 0; flex-wrap: nowrap; }
.vip-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: #fff3d6; color: #a86a00; font-size: 11px; line-height: 18px; font-weight: 600; vertical-align: 1px; }

/* 推广佣金 */
.cm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.cm-stats div { background: var(--soft, #f6f5fb); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.cm-stats b { font-size: 20px; color: var(--ink); }
.cm-stats span { font-size: 12px; color: var(--muted); }
.cm-stats .hi b { color: #c2410c; }
.row-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-plus { color: #c2410c; font-weight: 700; }
#cmList { width: 100%; display: flex; flex-direction: column; gap: 12px; }
#cmList:empty { display: none; }
@media (max-width: 640px) { .cm-stats { grid-template-columns: repeat(2, 1fr); } }
