/* Patchpix 原型 v2 — 全站样式（移动端优先）。设计 token 见 tokens.css（Studio 主题）。
 * 断点：<768 手机 · 768–1099 平板/窄桌面 · ≥1100 桌面。营销页浅色，编辑器深色舞台。 */
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --pp-gutter: 16px;
  --pp-head-h: 60px;
  --pp-review: #7a3fd1;
  --pp-review-soft: #f3ecff;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 768px) { :root { --pp-gutter: 24px; } }
@media (min-width: 1100px) { :root { --pp-gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--pp-font-sans); font-size: var(--pp-font-body-size); line-height: var(--pp-font-body-line); color: var(--pp-color-ink); background: var(--pp-color-paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pp-color-primary-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--pp-color-focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic .fill { fill: currentColor; stroke: none; }
.muted { color: var(--pp-color-ink-2); }
.small { font-size: var(--pp-font-body-sm-size); line-height: var(--pp-font-body-sm-line); }
.xsmall { font-size: var(--pp-font-caption-size); line-height: var(--pp-font-caption-line); }
.center { text-align: center; }
.block { display: block; }
.danger { color: var(--pp-color-danger); }
.ok-text { color: var(--pp-color-success); }
.warn-text { color: var(--pp-color-warning); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--pp-gutter); }
.wrap-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 var(--pp-gutter); }
.phone-only { display: initial; }
.desk-only { display: none !important; }
@media (min-width: 768px) { .phone-only { display: none !important; } .desk-only { display: revert !important; } .btn.desk-only { display: inline-flex !important; } }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--pp-font-caption-size); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pp-color-ink-2); }
.eyebrow .ic { width: 16px; height: 16px; color: var(--pp-color-primary); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--pp-control-h); padding: 10px 18px; border-radius: var(--pp-radius-md); border: 1px solid transparent; font-weight: 600; font-size: var(--pp-font-label-size); line-height: 1.2; text-align: center; text-decoration: none; white-space: normal; transition: background var(--pp-duration) var(--pp-ease), border-color var(--pp-duration), transform 80ms; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn-primary { background: var(--pp-color-primary); color: var(--pp-color-on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--pp-color-primary-hover); }
.btn-secondary { background: var(--pp-color-surface); color: var(--pp-color-ink); border-color: var(--pp-color-line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--pp-color-ink-3); }
.btn-danger { background: var(--pp-color-danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--pp-color-danger); border-color: color-mix(in srgb, var(--pp-color-danger) 40%, transparent); }
.btn-lg { min-height: 56px; font-size: 1.0625rem; border-radius: 14px; width: 100%; }
.btn-sm { min-height: var(--pp-touch-min); padding: 8px 14px; font-size: .9rem; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; min-height: var(--pp-touch-min); padding: 0 12px; border: 0; background: transparent; border-radius: 999px; font-weight: 600; color: inherit; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn-ghost.sm { font-size: .875rem; padding: 0 10px; }
.btn-ghost.icon-only { width: 44px; justify-content: center; padding: 0; }
.btn-ghost.danger { color: var(--pp-color-danger); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 0; background: transparent; border-radius: 999px; color: inherit; text-decoration: none; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.icon-btn.sm { width: 36px; height: 36px; }
.link-btn { display: inline-flex; align-items: center; min-height: var(--pp-touch-min); padding: 0; border: 0; background: none; color: var(--pp-color-primary-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { color: var(--pp-color-ink-3); text-decoration: none; cursor: default; }
.center-block { display: flex; margin: 0 auto; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-gap.end { justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; min-height: var(--pp-touch-min); padding: 0 14px; border-radius: 999px; border: 1px solid var(--pp-color-line-strong); background: var(--pp-color-surface); color: var(--pp-color-ink); text-decoration: none; font-weight: 500; font-size: .9rem; }
.chip:hover { border-color: var(--pp-color-ink-3); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips-row.tight { margin-top: 8px; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--pp-color-primary); color: #fff; font-size: .75rem; font-weight: 600; }
.badge.sm { padding: 1px 8px; margin-left: 6px; font-size: .7rem; vertical-align: 2px; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 18%, transparent); border-top-color: var(--pp-color-primary); animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.ok-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--pp-color-success); font-weight: 600; font-size: .85rem; }
.ok-chip .ic { width: 16px; height: 16px; }

/* ---------- 提示 ---------- */
.note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--pp-radius-sm); font-size: var(--pp-font-body-sm-size); line-height: 1.45; }
.note .ic { width: 18px; height: 18px; margin-top: 1px; }
.note.info { background: var(--pp-color-primary-soft); color: var(--pp-color-primary-ink); }
.note.warn { background: var(--pp-color-warning-soft); color: #7a3c0b; }
.note.error { background: var(--pp-color-danger-soft); color: #8f241c; }
.note.ok { background: var(--pp-color-success-soft); color: #12583a; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--pp-radius-md); margin: 0 0 16px; }
.banner > div { display: grid; gap: 10px; justify-items: start; }
.banner.warn { background: var(--pp-color-warning-soft); color: #6b3409; }
.banner.info { background: var(--pp-color-primary-soft); color: var(--pp-color-primary-ink); }
.banner.ok { background: var(--pp-color-success-soft); color: #12583a; }
.banner.error { background: var(--pp-color-danger-soft); color: #8f241c; }
.review-note { margin: 12px 0 0; padding: 8px 10px; border: 1px dashed var(--pp-review); border-radius: 8px; background: var(--pp-review-soft); color: #4b1f8f; font-size: 12px; line-height: 1.5; }
.review-note::before { content: "评审注 "; font-weight: 700; }

/* ---------- 页头 ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--pp-color-paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--pp-color-line); }
.head-row { display: flex; align-items: center; gap: 8px; min-height: var(--pp-head-h); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.03em; color: var(--pp-color-ink); text-decoration: none; min-height: 44px; }
.logo-mark { width: 24px; height: 24px; border-radius: 7px; background: conic-gradient(from 210deg, var(--pp-color-primary) 0 50%, #ff7a45 50% 75%, var(--pp-color-primary-soft) 75%); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 3px; background: var(--pp-color-paper); }
.desk-nav { display: none; gap: 4px; margin-left: 12px; }
@media (min-width: 900px) { .desk-nav { display: flex; } }
.nav-a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: var(--pp-color-ink-2); text-decoration: none; font-weight: 500; }
.nav-a:hover, .nav-a.on, .nav-a[aria-expanded="true"] { color: var(--pp-color-ink); background: var(--pp-color-paper-2); }
.nav-a .ic { width: 16px; height: 16px; }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.lang-btn .lang-long { display: none; }
@media (min-width: 1100px) { .lang-btn .lang-long { display: inline; } .lang-btn .lang-short { display: none; } }
.lang-btn { padding: 0 10px; }
.lang-btn .ic { width: 18px; height: 18px; }
.signin-btn { white-space: nowrap; }
.credit-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: var(--pp-color-primary-soft); color: var(--pp-color-primary-ink); font-weight: 600; font-size: .875rem; text-decoration: none; white-space: nowrap; }
.credit-chip .ic { width: 16px; height: 16px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pp-color-ink); color: var(--pp-color-paper); font-weight: 700; text-decoration: none; flex: none; }
.avatar.sm { width: 36px; height: 36px; font-size: .9rem; background: var(--pp-color-primary-soft); color: var(--pp-color-primary-ink); }
.avatar.sm .ic { width: 18px; height: 18px; }
.chip-warn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--pp-color-warning-soft); color: #7a3c0b; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.chip-warn .ic { width: 16px; height: 16px; }
.pop-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 220px; padding: 6px; background: var(--pp-color-surface); border: 1px solid var(--pp-color-line); border-radius: var(--pp-radius-md); box-shadow: var(--pp-shadow-md); color: var(--pp-color-ink); }
.desk-nav .pop { left: 0; right: auto; }
.site-foot .pop { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.pop-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: none; text-align: left; text-decoration: none; color: inherit; font-weight: 500; }
.pop-item:hover, .pop-item.on { background: var(--pp-color-paper); }
.pop-item .ic { color: var(--pp-color-primary); width: 18px; height: 18px; }
.pop-note { padding: 6px 12px 8px; font-size: 12px; color: var(--pp-color-ink-2); max-width: 260px; }
.pop-tools { min-width: 320px; }
.tool-item { flex-direction: column; align-items: flex-start; gap: 0; }
.tool-item span { font-size: .8rem; color: var(--pp-color-ink-2); font-weight: 400; }
.phone-menu { border-top: 1px solid var(--pp-color-line); background: var(--pp-color-paper); padding: 8px 0 20px; max-height: calc(100dvh - var(--pp-head-h)); overflow: auto; }
.phone-menu .eyebrow { margin: 14px 0 4px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--pp-color-line); color: var(--pp-color-ink); text-decoration: none; font-weight: 500; }

/* ---------- 分段控件 ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--pp-color-paper-2); max-width: 100%; }
.seg-b { flex: 1 1 auto; min-height: 44px; padding: 6px 14px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; font-size: .9rem; color: var(--pp-color-ink-2); line-height: 1.2; }
.seg-b.on { background: var(--pp-color-surface); color: var(--pp-color-ink); box-shadow: 0 1px 3px rgba(20, 19, 17, .12); }
.seg-b:disabled { opacity: .5; }

/* ---------- 首页 / 工具页 ---------- */
main { display: block; }
.hero { display: grid; gap: 24px; padding-top: 28px; padding-bottom: 32px; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; } }
.hero-copy { display: grid; gap: 14px; align-content: start; }
.hero h1 { font-size: var(--pp-font-display-size); line-height: var(--pp-font-display-line); letter-spacing: var(--pp-font-display-tracking); font-weight: var(--pp-font-display-weight); }
.tool-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.lede { font-size: 1.0625rem; line-height: 1.55; color: var(--pp-color-ink-2); max-width: 60ch; }
.cost-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 600; }
.cost-line .ic { color: var(--pp-color-primary); }
.cost-line .xsmall { flex-basis: 100%; font-weight: 400; }
.rights-notice { max-width: 60ch; }
.trust { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.trust li { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--pp-color-ink-2); }
.trust .ic { color: var(--pp-color-primary); width: 18px; height: 18px; margin-top: 2px; }

.upload-card { display: grid; gap: 12px; padding: 20px; border-radius: var(--pp-radius-xl); background: var(--pp-color-surface); border: 1px solid var(--pp-color-line); box-shadow: var(--pp-shadow-sm); color: var(--pp-color-ink); }
.upload-card.drop { border: 2px dashed var(--pp-color-line-strong); justify-items: stretch; text-align: center; padding: 24px 20px; }
.up-icon { justify-self: center; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--pp-color-primary-soft); color: var(--pp-color-primary); }
.up-icon .ic { width: 28px; height: 28px; }
.up-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.up-row:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; }
.upload-card.is-busy { justify-items: center; text-align: center; padding: 48px 20px; }
.up-title { font-weight: 600; }
.up-preview { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.up-thumb { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--pp-color-paper-2); }
.up-thumb.sm { width: 56px; height: 56px; border-radius: 10px; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-name { font-weight: 600; overflow-wrap: anywhere; }
.up-meta .link-btn { min-height: 36px; }
.rights { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 12px; border: 1px solid var(--pp-color-line-strong); background: var(--pp-color-paper); cursor: pointer; font-size: .9rem; line-height: 1.45; min-height: 44px; }
.rights.on { border-color: var(--pp-color-primary); background: var(--pp-color-primary-soft); }
.rights input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rights .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--pp-color-ink-3); display: grid; place-items: center; background: var(--pp-color-surface); color: transparent; }
.rights input:checked + .box { background: var(--pp-color-primary); border-color: var(--pp-color-primary); color: #fff; }
.rights input:focus-visible + .box { outline: 3px solid var(--pp-color-focus); outline-offset: 2px; }
.rights .box .ic { width: 16px; height: 16px; stroke-width: 2.6; }

.examples { padding-top: 24px; padding-bottom: 24px; display: grid; gap: 14px; justify-items: center; }
.sec-head { display: grid; gap: 4px; text-align: center; }
.examples h2, .tiles h2, .steps h2, .faq h2, .related h2, .sub-h { font-size: var(--pp-font-h2-size); line-height: var(--pp-font-h2-line); letter-spacing: var(--pp-font-h2-tracking); font-weight: var(--pp-font-h2-weight); }
.ex-tabs { width: 100%; max-width: 520px; }
.ex-stage { width: 100%; max-width: 880px; }

.compare { position: relative; width: 100%; aspect-ratio: var(--ar); border-radius: var(--pp-radius-lg); overflow: hidden; background: var(--pp-color-paper-2); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.compare.big { box-shadow: var(--pp-shadow-md); }
.cmp-layer { position: absolute; inset: 0; }
.cmp-layer img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cmp-after { clip-path: inset(0 0 0 var(--pos)); }
.checker { background-color: #fff; background-image: linear-gradient(45deg, var(--pp-color-checker-a) 25%, transparent 25%), linear-gradient(-45deg, var(--pp-color-checker-a) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--pp-color-checker-a) 75%), linear-gradient(-45deg, transparent 75%, var(--pp-color-checker-a) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.cmp-tag { position: absolute; top: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(20, 19, 17, .68); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.cmp-tag.l { left: 10px; } .cmp-tag.r { right: 10px; background: var(--pp-color-primary); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); pointer-events: none; }
.cmp-handle span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: var(--pp-color-ink); display: flex; align-items: center; justify-content: center; box-shadow: var(--pp-shadow-md); }
.cmp-handle .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.compare:focus-visible { outline-offset: 4px; }

.tiles { padding-top: 32px; padding-bottom: 24px; }
.tile-grid { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 768px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
.tile { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: var(--pp-radius-lg); background: var(--pp-color-surface); border: 1px solid var(--pp-color-line); color: var(--pp-color-ink); text-decoration: none; transition: border-color var(--pp-duration), transform var(--pp-duration); }
.tile:hover { border-color: var(--pp-color-primary); transform: translateY(-2px); }
.tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--pp-color-primary-soft); color: var(--pp-color-primary); }
.tile p { color: var(--pp-color-ink-2); font-size: .95rem; }
.tile-more { display: inline-flex; align-items: center; gap: 4px; color: var(--pp-color-primary-ink); font-weight: 600; font-size: .9rem; margin-top: 4px; }
.tile-more .ic { width: 16px; height: 16px; }
.steps { padding-top: 32px; padding-bottom: 24px; }
.steps ol { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .steps ol { grid-template-columns: repeat(3, 1fr); } }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 16px; border-radius: var(--pp-radius-lg); background: var(--pp-color-paper-2); }
.steps .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--pp-color-ink); color: var(--pp-color-paper); font-weight: 700; }
.steps h3 { font-size: var(--pp-font-h3-size); font-weight: 600; margin-bottom: 4px; }
.steps p { color: var(--pp-color-ink-2); font-size: .92rem; }
.bonus-band { margin-top: 32px; background: var(--pp-color-ink); color: var(--pp-color-paper); padding: 32px 0; }
.band-row { display: grid; gap: 16px; }
@media (min-width: 900px) { .band-row { grid-template-columns: 1fr auto; align-items: center; } }
.bonus-band h2 { font-size: var(--pp-font-h2-size); letter-spacing: -.02em; }
.bonus-band p { color: #cfc8bb; margin-top: 6px; }
.band-actions { display: grid; gap: 8px; }
@media (min-width: 560px) { .band-actions { grid-template-columns: auto auto; } .band-actions .btn-lg { width: auto; } }
.faq { padding-top: 32px; padding-bottom: 16px; }
.faq h2 { margin-bottom: 8px; }
.faq-item { border-bottom: 1px solid var(--pp-color-line); }
.faq-q { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 0; border: 0; background: none; text-align: left; font-weight: 600; font-size: 1rem; }
.faq-q .ic { transition: transform var(--pp-duration); flex: none; }
.faq-item.open .faq-q .ic { transform: rotate(180deg); }
.faq-a { padding: 0 0 16px; color: var(--pp-color-ink-2); }
.related { padding-top: 24px; padding-bottom: 40px; }

/* ---------- 定价 ---------- */
.pricing-head { padding-top: 32px; padding-bottom: 8px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.pricing-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -.035em; line-height: 1.08; }
.billing { width: 100%; max-width: 480px; }
.billing.sm { max-width: none; }
.price-grid { display: grid; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
@media (min-width: 768px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .price-grid.packs { grid-template-columns: repeat(3, 1fr); padding: 12px 0 0; } }
.price-card { position: relative; display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--pp-radius-lg); background: var(--pp-color-surface); border: 1px solid var(--pp-color-line); min-width: 0; }
.price-card.featured { border: 2px solid var(--pp-color-primary); }
.price-card .badge { justify-self: start; }
.price-card h3 { font-size: 1.2rem; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.price strong { font-size: 2rem; letter-spacing: -.03em; }
.price span { color: var(--pp-color-ink-2); font-size: .9rem; }
.ticks { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; font-size: .92rem; }
.ticks li { display: flex; gap: 6px; align-items: flex-start; }
.ticks .ic { width: 18px; height: 18px; color: var(--pp-color-success); margin-top: 2px; }
.price-card .btn { margin-top: auto; }
.cost-table { padding-top: 24px; }
.cost-table table { width: 100%; border-collapse: collapse; margin: 12px 0; background: var(--pp-color-surface); border-radius: var(--pp-radius-md); overflow: hidden; }
.cost-table th, .cost-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--pp-color-line); font-size: .95rem; }
.cost-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pp-color-ink-2); background: var(--pp-color-paper-2); }
.cost-table td:last-child, .cost-table th:last-child { text-align: right; white-space: nowrap; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 16px; padding-bottom: 40px; }
.secure .ic { width: 16px; height: 16px; }

/* ---------- 账户 ---------- */
.acct { padding-top: 24px; padding-bottom: 40px; }
.acct-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.acct-head h1 { font-size: var(--pp-font-h1-size); letter-spacing: var(--pp-font-h1-tracking); }
.acct-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .acct-grid { grid-template-columns: 1fr 1.2fr 1fr; } }
.card { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: var(--pp-radius-lg); background: var(--pp-color-surface); border: 1px solid var(--pp-color-line); min-width: 0; }
.card .btn { justify-self: start; }
.big-id { font-weight: 600; font-size: 1.1rem; overflow-wrap: anywhere; }
.big-n { font-weight: 700; font-size: 1.9rem; letter-spacing: -.03em; line-height: 1.1; }
.lots { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 8px; }
.lots li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; font-size: .9rem; padding-bottom: 8px; border-bottom: 1px solid var(--pp-color-line); }
.lots li > span:nth-child(2) { font-weight: 600; text-align: right; }
.lots li > span:nth-child(3) { grid-column: 1 / -1; }
.lots .paused { color: var(--pp-color-ink-3); text-decoration: line-through; }
.recent { margin-top: 32px; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.recent h2 { font-size: var(--pp-font-h2-size); letter-spacing: -.02em; }
.recent > .muted { margin: 4px 0 12px; }
.work { border-radius: var(--pp-radius-lg); background: var(--pp-color-surface); border: 1px solid var(--pp-color-line); margin-bottom: 12px; overflow: hidden; }
.work-main { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; }
@media (min-width: 768px) { .work-main { grid-template-columns: 160px 1fr; } }
.work-thumb { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--pp-color-paper-2); display: grid; place-items: center; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-thumb .exp { display: grid; justify-items: center; gap: 4px; color: var(--pp-color-ink-3); font-size: 12px; text-align: center; padding: 6px; }
.work-meta { display: grid; gap: 4px; align-content: start; min-width: 0; }
.work-meta h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.work-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.processing-chip { display: inline-flex; gap: 4px; align-items: center; color: var(--pp-color-primary-ink); font-weight: 600; }
.processing-chip .ic { width: 16px; height: 16px; animation: spin 2s linear infinite; }
.versions { list-style: none; margin: 0; padding: 0 14px 14px; border-top: 1px solid var(--pp-color-line); }
.ver { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--pp-color-line); }
.ver:last-child { border-bottom: 0; }
.ver-thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--pp-color-paper-2); display: grid; place-items: center; color: var(--pp-color-ink-3); }
.ver-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ver-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
@media (min-width: 768px) { .ver { grid-template-columns: 56px 1fr auto; } .ver-act { grid-column: auto; } }
.ver.latest .ver-meta strong::after { content: " ●"; color: var(--pp-color-primary); font-size: .7em; vertical-align: 2px; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 16px; border-radius: var(--pp-radius-lg); border: 2px dashed var(--pp-color-line-strong); }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--pp-color-paper-2); color: var(--pp-color-ink-3); }
.danger-zone { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--pp-color-line); display: grid; gap: 8px; justify-items: start; }
.locked { display: grid; gap: 14px; justify-items: center; text-align: center; padding-top: 64px; padding-bottom: 64px; }
.locked h1 { font-size: var(--pp-font-h1-size); }
.lock-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--pp-color-primary-soft); color: var(--pp-color-primary); }

/* ---------- 法务 / 表单 ---------- */
.legal { padding-top: 32px; padding-bottom: 48px; display: grid; gap: 14px; }
.legal h1 { font-size: var(--pp-font-h1-size); }
.legal h2 { font-size: var(--pp-font-h3-size); margin-top: 8px; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--pp-color-line-strong); background: var(--pp-color-surface); font-weight: 400; font-size: 1rem; }
.field textarea { resize: vertical; min-height: 72px; line-height: 1.4; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pp-color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pp-color-primary) 25%, transparent); }
.field-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: -6px; }
.counter.over { color: var(--pp-color-danger); font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-foot { margin-top: 24px; border-top: 1px solid var(--pp-color-line); background: var(--pp-color-paper-2); padding: 32px 0 calc(24px + var(--safe-b)); font-size: .92rem; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.foot-grid > div:first-child { grid-column: 1 / -1; display: grid; gap: 8px; justify-items: start; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } .foot-grid > div:first-child { grid-column: auto; } }
.foot-grid a:not(.brand) { display: flex; align-items: center; min-height: 40px; color: var(--pp-color-ink-2); text-decoration: none; }
.foot-grid a:not(.brand):hover { color: var(--pp-color-ink); text-decoration: underline; }
.foot-h { font-weight: 700; margin-bottom: 4px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 24px; color: var(--pp-color-ink-3); font-size: 12px; }

/* ---------- 弹层（手机底部弹层 / 桌面对话框） ---------- */
#sheet-host .scrim { position: fixed; inset: 0; z-index: 60; background: rgba(20, 19, 17, .5); animation: fade .15s; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--pp-color-surface); color: var(--pp-color-ink); border-radius: 20px 20px 0 0; box-shadow: var(--pp-shadow-lg); padding: 8px 16px calc(16px + var(--safe-b)); animation: up .22s var(--pp-ease); }
@media (min-width: 768px) { .sheet { left: 50%; top: 50%; bottom: auto; right: auto; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 48px)); max-height: min(88dvh, 820px); border-radius: 20px; padding: 16px 24px 24px; animation: pop .18s var(--pp-ease); } .sheet.wide { width: min(580px, calc(100vw - 48px)); } .grab { display: none; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet, #sheet-host .scrim { animation: none; } }
body.sheet-open { overflow: hidden; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--pp-color-line-strong); margin: 0 auto 8px; }
.sh-head { display: flex; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
.sh-titles { flex: 1; display: grid; gap: 4px; padding-top: 8px; min-width: 0; }
.sh-titles h2 { font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.25; }
.sh-titles p { font-size: .95rem; }
.sh-titles b { color: var(--pp-color-ink); overflow-wrap: anywhere; }
.sh-body { display: grid; gap: 12px; }
.sh-body > .btn-lg { margin-top: 4px; }
.sh-preview { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--pp-color-paper); }
.btn-provider { justify-content: flex-start; width: 100%; min-height: 52px; background: var(--pp-color-surface); border: 1px solid var(--pp-color-line-strong); color: var(--pp-color-ink); padding-left: 14px; }
.btn-provider:hover { border-color: var(--pp-color-ink-3); }
.prov-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; flex: none; }
.prov-mark.g { background: #fff; border: 1px solid var(--pp-color-line-strong); color: #3c4043; font-family: Arial, sans-serif; }
.prov-mark.a { background: #000; position: relative; }
.prov-mark.a::after { content: ""; width: 10px; height: 12px; border-radius: 50% 50% 45% 45%; background: #fff; }
.prov-mark.e { background: var(--pp-color-primary-soft); color: var(--pp-color-primary); }
.prov-mark .ic { width: 16px; height: 16px; }
.prov-card { display: grid; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid var(--pp-color-line); background: #fafafa; }
.prov-brand { font-weight: 700; color: #5f6368; font-size: .9rem; padding: 0 4px 4px; }
.acct-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.acct-row:hover { background: #f0f0f0; }
.otp { position: relative; }
.otp-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.01; font-size: 16px; letter-spacing: 2em; border: 0; z-index: 2; caret-color: transparent; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-boxes span { height: 56px; border-radius: 12px; border: 1.5px solid var(--pp-color-line-strong); display: grid; place-items: center; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--pp-color-surface); }
.otp:focus-within .otp-boxes span.cur { border-color: var(--pp-color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pp-color-primary) 25%, transparent); }
.otp.bad .otp-boxes span { border-color: var(--pp-color-danger); }
.otp.off .otp-boxes span { background: var(--pp-color-paper-2); color: var(--pp-color-ink-3); }
.code-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--pp-color-line-strong); background: var(--pp-color-surface); text-align: left; }
.opt.on { border-color: var(--pp-color-primary); background: var(--pp-color-primary-soft); }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--pp-color-ink-3); flex: none; }
.opt.on .radio { border: 6px solid var(--pp-color-primary); }
.opt-main { flex: 1; min-width: 0; }
.opt-price { text-align: right; display: grid; justify-items: end; flex: none; }
.opt-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--pp-color-paper-2); color: var(--pp-color-primary); flex: none; }
.need-line { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--pp-color-paper); font-weight: 600; font-size: .92rem; }
.need-line .ic { color: var(--pp-color-primary); }
.disclose { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; background: none; color: var(--pp-color-primary-ink); font-weight: 600; }
.disclose[aria-expanded="true"] .ic { transform: rotate(180deg); }
.summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 14px; background: var(--pp-color-paper); }
.sum-name { font-weight: 700; font-size: 1.1rem; }
.sum-price { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.share-sim { padding-top: 4px; }
.share-file { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--pp-color-paper); }
.share-file img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-b { display: grid; justify-items: center; gap: 6px; padding: 14px 4px; min-height: 76px; border-radius: 14px; border: 0; background: var(--pp-color-paper); font-size: .85rem; }
.fallback-img { width: 100%; border-radius: 12px; -webkit-touch-callout: default; user-select: auto; }

/* ---------- toast / 拖拽 ---------- */
#toasts { position: fixed; z-index: 90; left: 50%; top: 64px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--pp-color-ink); color: var(--pp-color-paper); box-shadow: var(--pp-shadow-lg); font-size: .92rem; pointer-events: auto; animation: up .2s var(--pp-ease); }
.toast.error { background: #8f241c; }
.toast.info .ic { color: #b8c3ff; } .toast.ok .ic { color: #7ee2a8; }
.toast span { flex: 1; }
.toast-act { min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: #fff; color: var(--pp-color-ink); font-weight: 600; }
.drop-overlay { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; background: color-mix(in srgb, var(--pp-color-primary) 18%, transparent); border: 4px dashed var(--pp-color-primary); pointer-events: none; }
.drop-overlay div { display: grid; justify-items: center; gap: 8px; padding: 24px 32px; border-radius: 20px; background: var(--pp-color-surface); font-weight: 700; color: var(--pp-color-primary-ink); box-shadow: var(--pp-shadow-lg); }
.drop-overlay .ic { width: 36px; height: 36px; }
body.dragging .drop-overlay { display: grid; }

/* ================= 编辑器（深色舞台） ================= */
body[data-route="editor"] { background: var(--pp-color-stage); }
.editor { position: fixed; left: 0; right: 0; top: var(--vvtop, 0px); height: var(--vvh, 100dvh); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto; background: var(--pp-color-stage); color: var(--pp-color-stage-ink); overflow: hidden; }
.editor.empty { position: static; height: auto; min-height: 100dvh; grid-template-rows: 56px auto; }
.ed-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--pp-color-stage-line); min-width: 0; }
.ed-top .brand { color: var(--pp-color-stage-ink); margin-right: 8px; }
.ed-top .logo-mark::after { background: var(--pp-color-stage); }
.ed-title { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.ed-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.ed-title .muted { color: var(--pp-color-stage-muted); }
.editor .credit-chip { background: var(--pp-color-stage-raised); color: var(--pp-color-stage-ink); border: 1px solid var(--pp-color-stage-line); }
.editor .avatar { background: var(--pp-color-stage-ink); color: var(--pp-color-stage); }
.editor .signin-btn { color: var(--pp-color-stage-ink); }
.editor .pop { color: var(--pp-color-ink); }
.ed-rail { display: none; }
.ed-stage-col { position: relative; min-height: 0; display: flex; flex-direction: column; }
.ed-stage { position: relative; flex: 1; min-height: 120px; container-type: size; overflow: hidden; }
.stage-wrap { position: absolute; inset: 0; touch-action: none; }
.stage-wrap[hidden] { display: none; }
.stage-canvas { display: block; touch-action: none; cursor: crosshair; }
.stage-wrap.no-paint .stage-canvas, .stage-wrap[data-tool="hand"] .stage-canvas, .stage-wrap.space .stage-canvas { cursor: grab; }
.stage-wrap.panning .stage-canvas { cursor: grabbing; }
.stage-compare { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; }
.stage-compare .compare { width: min(calc(100cqw - 24px), calc((100cqh - 24px) * var(--arn))); height: auto; border-radius: 12px; }
.stage-proc { position: absolute; inset: 0; pointer-events: none; overflow: hidden; background: rgba(26, 25, 22, .25); }
.stage-proc .scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--pp-color-primary) 35%, transparent), transparent); animation: scan 1.8s ease-in-out infinite; }
@keyframes scan { from { top: -30%; } to { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .stage-proc .scan { animation: none; top: 35%; } }
.stage-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 999px; background: rgba(20, 19, 17, .8); color: #fff; font-size: 12px; white-space: nowrap; z-index: 2; }
.stage-hint .ic { width: 16px; height: 16px; }
.ed-toolbar { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(36, 34, 30, .92); border: 1px solid var(--pp-color-stage-line); backdrop-filter: blur(8px); }
.tb-group { display: flex; gap: 2px; }
.tb { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--pp-color-stage-ink); }
.tb:hover:not(:disabled) { background: var(--pp-color-stage-line); }
.tb.on { background: var(--pp-color-primary); color: #fff; }
.tb:disabled { opacity: .35; }
.tb-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tb-size { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; max-width: 220px; padding: 0 4px; }
.tb-size input { flex: 1; min-width: 60px; accent-color: var(--pp-color-primary); height: 44px; }
.size-dot { width: var(--d); height: var(--d); border-radius: 50%; background: var(--pp-color-mask); opacity: .75; flex: none; }
.tb-n { width: 38px; color: var(--pp-color-stage-muted); }
.zoom { align-items: center; }
.zoom .xsmall { width: 44px; text-align: center; color: var(--pp-color-stage-muted); }
.kbd-help { position: absolute; top: 10px; left: 12px; right: 12px; margin: 0; text-align: center; font-size: 12px; color: var(--pp-color-stage-muted); pointer-events: none; }
.ed-side { display: flex; flex-direction: column; min-height: 0; max-height: calc(var(--vvh, 100dvh) * .56); background: var(--pp-color-stage-raised); border-top: 1px solid var(--pp-color-stage-line); border-radius: 18px 18px 0 0; }
.phase-result .ed-side { max-height: calc(var(--vvh, 100dvh) * .6); }
.ed-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px 12px 0; }
.tool-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px; border: 0; border-radius: 12px; background: transparent; color: var(--pp-color-stage-muted); font-size: .75rem; font-weight: 600; line-height: 1.15; text-align: center; }
.tool-tab .ic { width: 20px; height: 20px; }
.tool-tab.on { background: var(--pp-color-stage); color: var(--pp-color-stage-ink); box-shadow: inset 0 0 0 1px var(--pp-color-stage-line); }
.tool-tab.on .ic { color: #8fa0ff; }
.tool-tab:disabled { opacity: .5; }
.ed-panel { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px 16px; display: grid; gap: 12px; align-content: start; }
.ed-h { font-size: 1.15rem; letter-spacing: -.015em; }
.editor .seg { background: var(--pp-color-stage); width: 100%; }
.editor .seg-b { color: var(--pp-color-stage-muted); font-size: .85rem; padding: 6px 8px; }
.editor .seg-b.on { background: var(--pp-color-stage-line); color: var(--pp-color-stage-ink); box-shadow: none; }
.mode-seg.m4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.mode-seg.m2 { display: grid; grid-template-columns: 1fr 1fr; }
.hint { color: var(--pp-color-stage-ink); font-size: .95rem; }
.label { font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pp-color-stage-muted); }
.editor .muted { color: var(--pp-color-stage-muted); }
.corners { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.corner-b { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--pp-color-stage-line); background: var(--pp-color-stage); color: var(--pp-color-stage-ink); text-align: left; font-size: .85rem; font-weight: 500; line-height: 1.2; }
.corner-b:hover { border-color: #8fa0ff; }
.corner-b .ic { width: 24px; height: 24px; color: #8fa0ff; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.sw { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--pp-color-stage-line); background: var(--pp-color-stage); color: var(--pp-color-stage-ink); font-size: .8rem; text-align: left; cursor: pointer; }
.sw.on { border-color: #8fa0ff; box-shadow: 0 0 0 1px #8fa0ff; }
.sw .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 1px solid rgba(255, 255, 255, .35); flex: none; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scene { display: grid; gap: 6px; padding: 6px; border-radius: 12px; border: 1px solid var(--pp-color-stage-line); background: var(--pp-color-stage); color: var(--pp-color-stage-ink); font-size: .85rem; font-weight: 600; text-align: left; min-height: 44px; }
.scene.on { border-color: #8fa0ff; box-shadow: 0 0 0 1px #8fa0ff; }
.scene-sw { height: 52px; border-radius: 8px; }
.sc-studio { background: radial-gradient(circle at 50% 35%, #fff, #d5d9e1); }
.sc-outdoor { background: linear-gradient(#a9d3ee, #f4eedc 55%, #8aa660 56%, #6e7c5c); }
.sc-tabletop { background: linear-gradient(#e8dfd2 60%, #f7f5f2 60%); }
.sc-lifestyle { background: linear-gradient(90deg, #dfe9ea 0 30%, #e9dac4 30%), #cfb596; filter: blur(.4px); }
.editor .field span { color: var(--pp-color-stage-muted); font-weight: 600; }
.editor .field textarea, .editor .field input { background: var(--pp-color-stage); border-color: var(--pp-color-stage-line); color: var(--pp-color-stage-ink); font-size: 16px; }
.editor .chip { background: var(--pp-color-stage); border-color: var(--pp-color-stage-line); color: var(--pp-color-stage-ink); font-size: .8rem; min-height: 40px; }
.editor .note.info { background: #232a52; color: #cfd6ff; }
.editor .note.warn { background: #3d2a14; color: #ffd8a8; }
.editor .note.error { background: #45201c; color: #ffc4bd; }
.editor .note.ok { background: #173826; color: #b4f0cd; }
.editor .counter.over { color: #ff9a90; }
.editor .link-btn { color: #aab6ff; }
.editor .btn-secondary { background: transparent; color: var(--pp-color-stage-ink); border-color: var(--pp-color-stage-line); }
.editor .btn-ghost { color: var(--pp-color-stage-ink); }
.ed-run { display: grid; gap: 6px; padding: 10px 16px calc(10px + var(--safe-b)); border-top: 1px solid var(--pp-color-stage-line); background: var(--pp-color-stage-raised); }
.run-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .85rem; font-weight: 600; }
.run-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.run-meta .ic { width: 16px; height: 16px; color: #8fa0ff; }
.ed-run .btn-lg { min-height: 54px; }
.ed-run .xsmall .ic { width: 14px; height: 14px; vertical-align: -2px; }
.proc-panel { display: grid; gap: 10px; justify-items: start; }
.bar { width: 100%; height: 6px; border-radius: 3px; background: var(--pp-color-stage); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 3px; background: var(--pp-color-primary); transition: width .3s linear; }
.state-card { display: grid; gap: 10px; justify-items: start; }
.state-card > .ic { width: 28px; height: 28px; color: #ff9a90; }
.state-card .btn { width: 100%; }
.result-panel { display: grid; gap: 10px; }
.refund { justify-self: start; font-weight: 500; font-size: .9rem; color: var(--pp-color-stage-muted) !important; }
.next-list { display: grid; gap: 8px; }
.next-b { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--pp-color-stage-line); background: var(--pp-color-stage); color: var(--pp-color-stage-ink); text-align: left; }
.next-b:hover { border-color: #8fa0ff; }
.next-b > span { flex: 1; display: grid; }
.next-b > .ic:first-child { color: #8fa0ff; }
.result-panel .btn-ghost { justify-self: start; }
.fake-kb { position: fixed; left: 0; right: 0; bottom: 0; height: 290px; z-index: 80; display: grid; place-items: center; align-content: center; gap: 6px; background: repeating-linear-gradient(90deg, #d1d4db 0 10%, #c3c7cf 10% 10.4%); color: #333; font-size: 13px; font-weight: 600; }
.ed-empty { padding: 32px 0 48px; }
.ed-empty h1 { font-size: var(--pp-font-h1-size); margin-bottom: 8px; }
.ed-empty .lede { color: var(--pp-color-stage-muted); margin-bottom: 20px; }
.ed-empty .upload-card { max-width: 520px; }

/* 手机软键盘弹出：压缩画布，保留输入框和运行按钮 */
html.kb-open .ed-side { max-height: none; }
html.kb-open .ed-stage { min-height: 96px; }
html.kb-open .ed-stage-col { flex: 0 0 28%; }
html.kb-open .editor { grid-template-rows: 48px minmax(96px, 28%) minmax(0, 1fr); }
html.kb-open .ed-tabs, html.kb-open .mode-seg, html.kb-open .ed-h, html.kb-open .ed-toolbar, html.kb-open .stage-hint, html.kb-open .ed-panel .hint ~ .muted { display: none; }
html.kb-open .ed-panel { padding-top: 8px; gap: 8px; }
html.kb-open .ed-run { padding-bottom: 8px; }
html.kb-open .ed-run .xsmall { display: none; }

@media (min-width: 768px) {
  .editor { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: 56px minmax(0, 1fr); }
  .ed-stage-col { grid-column: 1; grid-row: 2; }
  .ed-side { grid-column: 2; grid-row: 2; max-height: none; border-top: 0; border-left: 1px solid var(--pp-color-stage-line); border-radius: 0; }
  .phase-result .ed-side { max-height: none; }
  .ed-toolbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 14px; width: max-content; max-width: calc(100% - 24px); }
  .tb-size { width: 180px; flex: none; }
  .ed-run { padding-bottom: 14px; }
}
@media (min-width: 1100px) {
  .editor { grid-template-columns: 88px minmax(0, 1fr) 380px; }
  .ed-rail { display: grid; grid-column: 1; grid-row: 2; align-content: start; gap: 6px; padding: 12px 8px; border-right: 1px solid var(--pp-color-stage-line); }
  .ed-rail .tool-tab { min-height: 72px; font-size: .72rem; }
  .ed-stage-col { grid-column: 2; }
  .ed-side { grid-column: 3; }
  .ed-tabs { display: none; }
  .ed-panel { padding: 20px; gap: 14px; }
  .ed-run { padding: 14px 20px 18px; }
}

/* ================= 演示面板 ================= */
.demo-tab { position: fixed; z-index: 85; left: 0; top: 46%; width: 30px; min-height: 64px; padding: 6px 0; border: 0; border-radius: 0 10px 10px 0; background: #7a3fd1; color: #fff; font: 600 12px/1.2 system-ui, sans-serif; writing-mode: vertical-rl; letter-spacing: .15em; box-shadow: var(--pp-shadow-md); opacity: .9; }
.demo-tab:hover { opacity: 1; width: 36px; }
.demo { position: fixed; z-index: 86; left: 8px; top: 8px; bottom: 8px; width: min(320px, calc(100vw - 16px)); overflow: auto; padding: 0 12px 12px; border-radius: 14px; background: #1f1730; color: #efe9fb; font: 13px/1.4 system-ui, -apple-system, "PingFang SC", sans-serif; box-shadow: var(--pp-shadow-lg); }
.demo header { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 12px 0 8px; background: #1f1730; z-index: 1; }
.demo header strong { font-size: 14px; }
.demo-path { flex: 1; font: 11px ui-monospace, monospace; color: #b7a6d9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo header button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #33284a; color: #fff; font-size: 18px; }
.demo details { border-top: 1px solid #3a2e55; padding: 8px 0; }
.demo summary { cursor: pointer; font-weight: 700; padding: 4px 0; color: #d8c9ff; }
.demo label { display: grid; gap: 3px; margin-top: 8px; color: #cbbfe6; }
.demo label.chk { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.demo select, .demo input[type="number"] { width: 100%; min-height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid #4a3b6b; background: #2a203d; color: #fff; }
.demo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.demo-row label { margin-top: 6px; }
.demo-note { margin-top: 6px; color: #9d8fbd; font-size: 12px; }
.demo-btn { width: 100%; min-height: 36px; margin-top: 8px; border: 0; border-radius: 8px; background: #7a3fd1; color: #fff; font-weight: 600; }
.demo-btn.danger { background: #5a2430; margin-top: 12px; }
.demo-link { display: block; margin-top: 8px; color: #c9b3ff; }
.demo-log { padding-left: 16px; margin: 6px 0 0; color: #cbbfe6; font-size: 12px; }
.demo-log code { color: #ffd6a0; }

/* ---------- 修正：desk-only 不能把 flex/grid 容器变成 block ---------- */
@media (min-width: 768px) { .tb-group.desk-only, .head-right .desk-only { display: flex !important; } .tb.desk-only { display: grid !important; } }
/* 手机上传卡片的次要按钮 */
.up-row .btn { padding: 8px 10px; gap: 6px; font-size: .9rem; }
/* 演示标签收窄，减少遮挡 */
.demo-tab { top: auto; bottom: 30%; width: 14px; min-height: 52px; padding: 4px 0; font-size: 9px; letter-spacing: 0; opacity: .7; }
.demo-tab:hover, .demo-tab:focus-visible { width: 30px; font-size: 11px; opacity: 1; }
/* 手机编辑器：面板更紧凑，保证选区工具、输入框和运行按钮同屏 */
@media (max-width: 767px) {
  .ed-side { max-height: calc(var(--vvh, 100dvh) * .6); }
  .ed-tabs { padding: 6px 10px 0; }
  .ed-tabs .tool-tab { flex-direction: row; gap: 6px; min-height: 44px; font-size: .78rem; }
  .ed-tabs .tool-tab .ic { width: 18px; height: 18px; }
  .ed-panel { padding: 10px 16px; gap: 10px; }
  .ed-panel > .ed-h:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .editor .seg-b { min-height: 40px; }
  .hint { font-size: .9rem; }
  .run-meta { font-size: .8rem; }
  .ed-run { gap: 4px; padding-top: 8px; }
  .ed-run .btn-lg { min-height: 50px; }
  .ed-toolbar { bottom: 6px; }
}

.sheet.still, #sheet-host .scrim.still { animation: none; }
@media (max-width: 1099px) { .tb-group.zoom { display: none !important; } .tb-size { width: 120px !important; } }
