/* 工作水印相机样式：严格按舰队 DESIGN-TOKENS 母版（强调色唯一 #2563eb、版心 1120px、字阶/间距/圆角/阴影两档）。 */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #efefec;
  --text: #1a1d21;
  --text-2: #5c6470;
  --text-3: #8a919c;
  --border: #e3e3de;
  --border-2: #cfcfc8;
  --accent: #2563eb;
  --accent-hover: #1d4fd0;
  --accent-soft: #eaf0fe;
  --on-accent: #ffffff;
  --success: #177245;
  --warning: #9a6a00;
  --warning-bg: #fdf3e0;
  --danger: #c62f3b;
  --danger-bg: #fdeeee;
  --focus: #2563eb;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-num: ui-monospace, "SF Mono", "Roboto Mono", monospace;
  --fs-display: 40px;
  --fs-h1: 30px;
  --fs-h2: 22px;
  --fs-h3: 17px;
  --fs-body: 15.5px;
  --fs-small: 13.5px;
  --fs-cap: 12px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --wrap: 1120px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(26,29,33,.05), 0 1px 6px rgba(26,29,33,.04);
  --shadow-2: 0 8px 28px rgba(26,29,33,.10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
button { font-family: var(--font); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* 页头 */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; flex: none; border-radius: var(--r-md);
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700;
}
.brand h1 { font-size: 17px; line-height: 1.3; white-space: nowrap; }
.tagline { font-size: var(--fs-small); color: var(--text-2); line-height: 1.4; }
.header-right { display: flex; align-items: center; gap: 12px; }
.local-badge {
  font-size: var(--fs-cap); color: var(--text-2);
  border: 1px solid var(--border-2); border-radius: var(--r-pill);
  padding: 4px 10px; white-space: nowrap;
}
.lang-btn {
  min-height: 34px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.lang-btn:hover { border-color: var(--text-3); }
@media (max-width: 640px) {
  .header-inner { min-height: 54px; }
  .tagline, .local-badge { display: none; }
}

/* 按钮（一站一套） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: background .15s cubic-bezier(.2,.7,.3,1), transform .15s cubic-bezier(.2,.7,.3,1);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-danger { background: var(--surface); border-color: var(--border-2); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-lg { min-height: 46px; padding: 0 22px; }
.btn-block { width: 100%; }
@media (max-width: 640px) { .btn { min-height: 44px; } }

/* 首屏 */
.hero { padding: var(--sp-7) 0 var(--sp-6); }
.hero h2 { font-size: var(--fs-display); line-height: 1.15; max-width: 760px; }
.hero .sub { margin-top: var(--sp-3); font-size: 16.5px; color: var(--text-2); max-width: 760px; }
.hero .stats { margin-top: var(--sp-4); font-size: var(--fs-small); color: var(--text-2); }
.hero-cta { display: flex; gap: 12px; margin-top: var(--sp-5); flex-wrap: wrap; }
@media (max-width: 640px) {
  .hero { padding: var(--sp-6) 0 var(--sp-5); }
  .hero h2 { font-size: 30px; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* 步骤条 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: var(--sp-6); }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px; display: flex; gap: 12px; align-items: flex-start;
}
.step-num {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; font-family: var(--font-num);
}
.step p { font-size: 14px; line-height: 1.55; padding-top: 3px; }
@media (max-width: 1024px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; gap: 12px; } }

/* 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; margin-bottom: var(--sp-5);
}
.card h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
.card .hint { font-size: var(--fs-small); color: var(--text-2); }
@media (max-width: 640px) { .card { padding: 16px; } }

/* 工作区：左右两栏 */
.work-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 1024px) { .work-grid { grid-template-columns: 1fr; } }
.photo-stage {
  position: relative; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); min-height: 320px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.photo-stage canvas { display: block; max-width: 100%; max-height: 70vh; touch-action: none; cursor: grab; }
.photo-stage canvas:active { cursor: grabbing; }
.stage-empty { text-align: center; padding: 48px 24px; color: var(--text-2); }
.stage-empty svg { margin-bottom: 12px; color: var(--text-3); }
.stage-empty p { font-size: 15px; }
.demo-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(26,29,33,.78); color: #fff; font-size: var(--fs-cap);
  padding: 4px 10px; border-radius: var(--r-pill);
}
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.thumb {
  width: 64px; height: 64px; border-radius: var(--r-md); border: 2px solid var(--border-2);
  background-size: cover; background-position: center; cursor: pointer; padding: 0;
}
.thumb.active { border-color: var(--accent); }
.thumb-add {
  width: 64px; height: 64px; border-radius: var(--r-md); border: 1px dashed var(--border-2);
  background: var(--surface); color: var(--text-2); font-size: 22px; cursor: pointer;
}
.photo-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.photo-meta { margin-top: 12px; font-size: var(--fs-small); color: var(--text-2); line-height: 1.7; }
.photo-meta b { color: var(--text); font-weight: 600; }
.photo-meta .mono { font-family: var(--font-num); font-size: 13px; }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: var(--fs-small); font-weight: 600; margin-bottom: 6px; }
.field label .opt { color: var(--text-3); font-weight: 400; }
.field input[type="text"], .field input[type="number"] {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--border-2); background: var(--surface);
  font-size: 15px; font-family: var(--font); color: var(--text);
}
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.field .help { font-size: var(--fs-cap); color: var(--text-2); margin-top: 4px; }
.field input[readonly] { background: var(--surface-2); color: var(--text-2); }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 32px; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; min-height: 40px; border-radius: var(--r-md); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
}
.seg button.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tpl-list { display: grid; gap: 10px; }
.tpl {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 14px; border: 1px solid var(--border-2); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; width: 100%;
}
.tpl:hover { border-color: var(--text-3); }
.tpl.active { border-color: var(--accent); background: var(--accent-soft); }
.tpl .tpl-radio {
  width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--border-2); background: var(--surface);
}
.tpl.active .tpl-radio { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 10px var(--accent); }
.tpl b { display: block; font-size: 15px; }
.tpl span { font-size: var(--fs-small); color: var(--text-2); }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.export-row { display: flex; gap: 12px; flex-wrap: wrap; }
.export-row .btn { flex: 1 1 160px; }
.quota { margin-top: 12px; font-size: var(--fs-small); color: var(--text-2); }
.quota.warn { color: var(--warning); }

/* 定价 */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 20px;
  background: var(--surface);
}
.price-card.featured { border-color: var(--accent); }
.price-card h4 { margin: 0 0 4px; font-size: var(--fs-h3); }
.price { font-size: 30px; font-weight: 700; font-family: var(--font-num); margin: 4px 0 12px; }
.price small { font-size: 13px; color: var(--text-2); font-weight: 400; font-family: var(--font); }
.price-card ul { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.9; color: var(--text-2); }
.buy-box { margin-top: 16px; background: var(--surface-2); border-radius: var(--r-md); padding: 16px; font-size: 14.5px; line-height: 1.7; }
.code-row { display: flex; gap: 8px; margin-top: 12px; }
.code-row input {
  flex: 1; height: 42px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--border-2); font-family: var(--font-num); font-size: 14px;
  text-transform: uppercase; min-width: 0;
}
.code-msg { margin-top: 8px; font-size: var(--fs-small); }
.code-msg.ok { color: var(--success); }
.code-msg.err { color: var(--danger); }

/* 信任点 / 使用说明 */
.trust-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 640px) { .trust-list { grid-template-columns: 1fr; } }
.trust-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; }
.trust-item svg { flex: none; margin-top: 3px; color: var(--success); }
.how-list { counter-reset: how; margin: 12px 0 0; padding: 0; list-style: none; }
.how-list li {
  counter-increment: how; padding: 10px 0 10px 36px; position: relative;
  border-bottom: 1px solid var(--border); font-size: 15px; line-height: 1.65;
}
.how-list li:last-child { border-bottom: none; }
.how-list li::before {
  content: counter(how); position: absolute; left: 0; top: 12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num);
}
.history-list { list-style: none; margin: 8px 0 0; padding: 0; }
.history-list li {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-2); display: flex; justify-content: space-between; gap: 12px;
}
.history-list li:last-child { border-bottom: none; }
.history-list .mono { font-family: var(--font-num); font-size: 13px; color: var(--text); }

/* 弹窗（相机） */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(26,29,33,.55); z-index: 50;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-2);
  width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; padding: 20px;
}
.modal h3 { font-size: var(--fs-h3); margin-bottom: 12px; }
.modal video { width: 100%; border-radius: var(--r-md); background: #000; display: block; }
.modal-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 140px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: var(--r-md);
  font-size: 14.5px; z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .2s cubic-bezier(.2,.7,.3,1), transform .2s cubic-bezier(.2,.7,.3,1);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer { border-top: 1px solid var(--border); padding: var(--sp-5) 0 var(--sp-7); }
footer p { font-size: var(--fs-small); color: var(--text-2); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
