:root {
  /* App 配色方案 (from lib/core/app_theme.dart) */
  --primary: #a5e635;
  --primary-light: #cbf36a;
  --primary-dark: #84cc16;
  --primary-deep: #4d7c0f;
  --on-primary: #161a0b;
  --crown: #f2b60f;

  --bg: #f6f7f3;
  --surface: #ffffff;
  --surface-alt: #f1f3ec;
  --outline: #e8eae3;
  --header-top: #eff7d2;
  --header-bottom: #f6f7f3;

  --text: #1a1d1f;
  --muted: #79818a;
  --hint: #aab1b8;

  --ok: #35c759;
  --warn: #f5a623;
  --err: #e5484d;
  --info: #3b82f6;

  --shadow-soft: 0 6px 20px rgba(34, 51, 10, 0.06);
  --shadow-hover: 0 14px 36px rgba(34, 51, 10, 0.11);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-deep);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}
a:hover {
  color: var(--text);
}

/* ============ 顶部毛玻璃导航栏 (Apple 风格) ============ */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 243, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(232, 234, 227, 0.9);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
}

.nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav .brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(34, 51, 10, 0.12);
}

.nav .links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav .links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav .links a:hover,
.nav .links a.active {
  color: var(--text);
  background: var(--surface-alt);
}

.nav .spacer {
  flex: 1;
}

.nav .who {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--on-primary) !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(132, 204, 22, 0.28);
}
.nav-cta:hover {
  background: var(--primary-dark);
  color: var(--on-primary) !important;
}

/* ============ 容器与排版 ============ */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.container-narrow {
  max-width: 920px;
  margin: 0 auto;
}

h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 8px 0 16px;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

/* ============ Apple 风格 Hero & 区块 ============ */
.hero-band {
  background: radial-gradient(
    1200px 520px at 50% -80px,
    var(--header-top) 0%,
    var(--header-bottom) 72%
  );
  border-bottom: 1px solid var(--outline);
  padding: 64px 24px 72px;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--outline);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(34, 51, 10, 0.04);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-dark);
}

.hero-title {
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 18px 0 18px;
  color: var(--text);
}

.hero-title .highlight {
  background: linear-gradient(120deg, var(--primary-deep) 0%, #65a30d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 28px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn-pill:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 6px 20px rgba(132, 204, 22, 0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--on-primary);
  box-shadow: 0 10px 26px rgba(132, 204, 22, 0.36);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-soft);
}
.btn-outline:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.hero-device {
  background: var(--surface);
  border-radius: 32px;
  padding: 28px;
  border: 1px solid var(--outline);
  box-shadow: 0 24px 60px rgba(34, 51, 10, 0.1);
  position: relative;
}

.device-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.device-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(53, 199, 89, 0.12);
  color: #1b8a3b;
}

.app-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.app-chip {
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-chip-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--header-top);
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.app-chip-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.app-chip-desc {
  font-size: 12px;
  color: var(--muted);
}

/* ============ Apple 章节排版 ============ */
.section {
  padding: 68px 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px;
}

.section-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-deep);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.section-desc {
  font-size: 17px;
  color: var(--muted);
  margin: 0;
}

/* ============ Bento Grid & Duo 对比卡片 ============ */
.duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.bento-card.accent {
  background: linear-gradient(155deg, #eff7d2 0%, #ffffff 65%);
  border-color: #dce9a6;
}

.bento-card.dark-feature {
  background: #161a0b;
  color: #f6f7f3;
  border-color: #2a3217;
}
.bento-card.dark-feature .muted {
  color: #b4bc9c;
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface-alt);
  color: var(--primary-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* ============ 通用软卡片与面板组件 ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 6px 0;
  color: var(--text);
}

.banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}
.banner.ok {
  background: rgba(53, 199, 89, 0.12);
  color: #167933;
  border: 1px solid rgba(53, 199, 89, 0.35);
}
.banner.err {
  background: rgba(229, 72, 77, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(229, 72, 77, 0.32);
}

/* ============ 表格 ============ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--outline);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.table-scroll {
  overflow-x: auto;
}

/* ============ 表单与按钮 ============ */
form.inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
form.stack > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 14px;
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
}

input,
select,
textarea {
  background: var(--surface-alt);
  border: 1px solid var(--outline);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.16s ease, background 0.16s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-dark);
  background: var(--surface);
}
input.w-sm {
  width: 96px;
}

button,
.btn {
  background: var(--primary);
  border: none;
  color: var(--on-primary);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.16s ease, transform 0.12s ease;
}
button:hover,
.btn:hover {
  background: var(--primary-dark);
}
button.secondary,
.btn.secondary {
  background: var(--surface);
  border: 1px solid var(--outline);
  color: var(--text);
}
button.secondary:hover,
.btn.secondary:hover {
  background: var(--surface-alt);
}
button.danger {
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.35);
  color: var(--err);
}
button.danger:hover {
  background: rgba(229, 72, 77, 0.15);
}

/* ============ 状态徽章 ============ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.ok {
  background: rgba(53, 199, 89, 0.14);
  color: #167933;
}
.badge.warn {
  background: rgba(245, 166, 35, 0.16);
  color: #b45309;
}
.badge.err {
  background: rgba(229, 72, 77, 0.14);
  color: #b91c1c;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.auth-card {
  max-width: 440px;
  margin: 48px auto;
  padding: 32px;
}

.progress {
  height: 10px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--outline);
  margin: 10px 0;
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  border-radius: 999px;
}

code.token {
  word-break: break-all;
  background: var(--surface-alt);
  border: 1px solid var(--outline);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: block;
  font-size: 13px;
  color: var(--primary-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ============ 套餐与 Stripe 二维码支付 ============ */
.plans {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-dark);
}
.plan-card.featured {
  background: linear-gradient(170deg, #eff7d2 0%, #ffffff 55%);
  border: 2px solid var(--primary-dark);
}

.price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 10px 0;
  color: var(--text);
}

.qr-box {
  background: #ffffff;
  border: 1px solid var(--outline);
  border-radius: 20px;
  padding: 20px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}
.qr-box svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.pay-methods {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

/* ============ 下载中心 ============ */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

/* ============ FAQ 折叠手风琴 (Apple 风格) ============ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: 0 2px 10px rgba(34, 51, 10, 0.03);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  content: "−";
  color: var(--primary-deep);
}
.faq-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--outline);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ============ 页脚 ============ */
.footer {
  border-top: 1px solid var(--outline);
  background: var(--surface);
  padding: 36px 24px;
  color: var(--muted);
  font-size: 13px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--text);
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .hero-inner,
  .duo-grid,
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .hero-band {
    padding: 40px 20px 48px;
  }
  .section {
    padding: 44px 20px;
  }
  .nav {
    padding: 10px 16px;
    gap: 10px;
  }
  .nav .links {
    display: none;
  }
}
