/* ===== H5 移动端样式（手机优先，max-width 480 居中） ===== */
:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #06b6d4;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --page-bg: #e2e8f0;
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
  --page-bg: #020617;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  line-height: 1.6;
  transition: background .3s, color .3s;
}
.h5-app {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  transition: background .3s, color .3s;
}

/* 分页容器与页面 */
.pages { flex: 1 1 auto; position: relative; overflow: hidden; }
.page {
  position: absolute; inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  padding-bottom: 24px;
}
.page.active { display: block; }

/* 底部标签栏 */
.tabbar {
  flex: 0 0 auto;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab {
  flex: 1; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 7px; color: var(--text-muted); position: relative;
  font-family: inherit;
}
.tab-ico { font-size: 1.25rem; line-height: 1; }
.tab-label { font-size: .68rem; }
.tab.active { color: var(--primary); }
.tab.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 3px; background: var(--primary);
}

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 9px; background: linear-gradient(135deg, #0b2437, #0e3350); padding: 3px; flex: 0 0 auto; }
.brand { font-size: .95rem; font-weight: 800; color: var(--text); letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-dot { color: var(--primary); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-btn {
  border: none; background: transparent; color: var(--text-muted);
  font-size: .72rem; padding: 4px 9px; cursor: pointer; transition: .2s;
}
.lang-btn.active { background: var(--primary); color: #fff; }
.theme-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 34px; height: 30px; border-radius: 999px; cursor: pointer; font-size: 1rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 46px 24px 36px;
  text-align: center;
  background: linear-gradient(150deg, var(--primary) 0%, #0b2437 100%);
  color: #fff;
}
.hero-eyebrow { font-size: .72rem; letter-spacing: 2px; opacity: .85; margin-bottom: 12px; }
.hero-title { font-size: 1.55rem; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero-subtitle { font-size: .92rem; opacity: .95; margin-bottom: 10px; }
.hero-intro { font-size: .82rem; opacity: .85; margin-bottom: 22px; }
.btn-primary {
  display: inline-block;
  background: var(--accent); color: #fff; font-weight: 700;
  padding: 12px 30px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 20px rgba(16, 185, 129, .35);
  transition: transform .15s;
}
.btn-primary:active { transform: scale(.96); }
.scroll-hint { margin-top: 26px; font-size: 1.3rem; animation: bob 1.6s ease-in-out infinite; }
.scroll-hint span { display: none; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(7px);} }

/* 区块 */
.block { padding: 30px 20px 8px; }
.block-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 14px; position: relative; padding-left: 12px; }
.block-title::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 4px; background: var(--primary); }
.block-text { font-size: .9rem; color: var(--text-muted); }
.group-title {
  font-size: 1rem; font-weight: 700; color: var(--primary);
  margin: 26px 0 14px; padding: 6px 12px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 8px; display: inline-block;
}

/* 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.shot {
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
  margin-bottom: 12px; background: #fff;
}
[data-theme="dark"] .shot { background: #0b1220; }
.shot-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 10px; background: #f1f5f9; font-size: .7rem; color: #475569;
}
[data-theme="dark"] .shot-bar { background: #0b1220; color: #94a3b8; }
.shot-bar-dark { background: #1f2937; color: #cbd5e1; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.r { background: #ef4444; } .dot.y { background: #f59e0b; } .dot.g { background: #10b981; }
.shot-url { margin-left: 6px; font-family: monospace; }
.shot-body { position: relative; padding: 26px 14px; background: linear-gradient(135deg,#eff6ff,#f8fafc); min-height: 96px; }
[data-theme="dark"] .shot-body { background: linear-gradient(135deg,#15233b,#0f172a); }
.shot-body-dark { background: linear-gradient(135deg,#1f2937,#111827); }
.shot-name { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.shot-name.glow { color: #38bdf8; text-shadow: 0 0 10px rgba(56,189,248,.6); }
.shot-sub { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.demo-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: .62rem; padding: 2px 8px; border-radius: 999px;
  background: rgba(16,185,129,.15); color: var(--accent); font-weight: 600;
}
.card-name { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.card-cn { font-size: .82rem; color: var(--text-muted); font-weight: 400; }
.card-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 10px; }
.card-features { list-style: none; margin-bottom: 10px; }
.card-features li {
  font-size: .82rem; color: var(--text); padding: 5px 0 5px 20px; position: relative;
  border-bottom: 1px dashed var(--border);
}
.card-features li:last-child { border-bottom: none; }
.card-features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card-tags span {
  font-size: .68rem; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary);
}
.card-notes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.note-brazil, .note-backend, .note-local { font-size: .76rem; color: var(--text-muted); padding-left: 14px; position: relative; }
.note-brazil::before, .note-backend::before, .note-local::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; }
.note-brazil::before { background: var(--primary); }
.note-backend::before { background: var(--accent); }
.note-local { padding-left: 14px; }
.note-local::before { background: var(--accent); }
.note-pay { font-size: .76rem; color: var(--accent); border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 0 6px 6px 0; }
.btn-outline {
  display: block; text-align: center; text-decoration: none;
  border: 1.5px solid var(--primary); color: var(--primary);
  font-weight: 700; font-size: .88rem; padding: 11px; border-radius: 10px; transition: .2s;
}
.btn-outline:active { background: var(--primary); color: #fff; }

.more-template {
  text-align: center; padding: 26px 16px; margin: 8px 0 20px;
  border: 2px dashed var(--border); border-radius: 16px;
  color: var(--text-muted); font-size: .9rem;
}

/* 联系我 */
.contact { text-align: center; }
.contact .block-text { margin-bottom: 18px; }
.qr-wrap {
  width: 180px; height: 180px; margin: 0 auto 14px;
  background: #fff; border-radius: 16px; padding: 10px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.qr-img { width: 100%; height: 100%; display: block; border-radius: 8px; }
.contact-cta { font-size: .82rem; color: var(--text-muted); margin-bottom: 6px; }
.wechat-id { font-size: .92rem; font-weight: 700; color: var(--text); }
.wechat-id span { color: var(--accent); }

.h5-footer { text-align: center; padding: 22px 16px; font-size: .72rem; color: var(--text-muted); }

/* 复制微信号 */
.copy-btn {
  display: block; width: 100%; max-width: 220px; margin: 12px auto 0;
  font-family: inherit; cursor: pointer;
  border: none; background: var(--primary); color: #fff;
  font-weight: 700; font-size: .92rem; padding: 12px 18px; border-radius: 10px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28); transition: .15s;
}
.copy-btn:active { transform: scale(.97); }
.copy-btn.done { background: var(--accent); box-shadow: 0 6px 16px rgba(16, 185, 129, .3); }

/* 服务流程 */
.process-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; }
.process-list { list-style: none; counter-reset: step; }
.process-list li {
  position: relative; counter-increment: step;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 14px 14px 54px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.process-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 14px; top: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 800; display: grid; place-items: center;
}
.step-t { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 3px; }
.step-d { display: block; font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.process-time {
  margin-top: 14px; font-size: .82rem; font-weight: 700;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0;
  padding: 10px 12px; line-height: 1.5;
}

/* 联系我·工期提示 */
.contact-time { font-size: .8rem; color: var(--primary); font-weight: 600; margin-bottom: 14px; }

/* 滚动渐入（仅在 JS 正常运行时隐藏，避免脚本出错导致整页空白） */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
}
