:root {
  color-scheme: light;
  --page: #f2f6f3;
  --surface: #fff;
  --ink: #152820;
  --muted: #456154;
  --accent: #006344;
  --line: #cbdcd2;
  --tint: #e5f2e9;
  font: 16px/1.65 "Inter", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  overflow-wrap: anywhere;
}

a { color: inherit; }
button, input { font: inherit; }
h1, h2, p { margin: 0 0 0.8rem; }
h1, h2 { line-height: 1.2; }
h1 { font-size: clamp(2rem, 6vw, 3.65rem); }
h2 { font-size: 1.3rem; }
li + li { margin-top: 0.6rem; }
:focus-visible { outline: 3px solid #087750; outline-offset: 4px; }

.header, main, .footer {
  width: min(100% - 2rem, 1040px);
  margin-inline: auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
}

.brand, nav a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 760; }

.brand-mark {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: var(--accent);
}

.brand-mark::before, .brand-mark::after {
  position: absolute;
  width: 0.86rem;
  height: 0.7rem;
  border-radius: 0.2rem;
  border: 1px solid white;
  content: "";
}

.brand-mark::before { top: 0.51rem; left: 0.4rem; }
.brand-mark::after { right: 0.4rem; bottom: 0.51rem; background: var(--accent); }

nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; }
nav a { color: var(--muted); font-size: 0.94rem; }
nav a:hover, nav a[aria-current] { color: var(--accent); text-decoration: underline; }

main { padding-block: clamp(2rem, 8vw, 5rem) 3.5rem; }
.footer { border-top: 1px solid var(--line); padding-block: 1.4rem 2rem; color: var(--muted); font-size: 0.9rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
  align-items: center;
  gap: clamp(1rem, 5vw, 4rem);
  margin-bottom: 2.5rem;
}

.eyebrow { color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.lede { max-width: 42rem; font-size: 1.1rem; color: var(--muted); }
.note { color: var(--muted); font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block: 1.5rem 1rem; }

.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.primary { background: var(--accent); color: white; }
.primary:hover { background: #004d34; }
.secondary { background: var(--surface); color: var(--accent); border-color: var(--line); }
.secondary:hover { background: var(--tint); }
.text-link { color: var(--accent); text-underline-offset: 0.18em; font-weight: 650; }

.hero-card, .panel, dialog {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  padding: clamp(1.15rem, 4vw, 2rem);
}

.hero-card { background: var(--tint); }
.panel + .panel { margin-top: 1rem; }
.panel ol, .hero-card ol { padding-inline-start: 1.4rem; }
.panel p:last-child, .hero-card ol:last-child { margin-bottom: 0; }

details { padding-block: 0.8rem; border-bottom: 1px solid var(--line); }
details:last-child { border-bottom: 0; padding-bottom: 0; }
summary { cursor: pointer; font-weight: 650; }
details p { margin-top: 0.45rem; }

.term { font-weight: 750; color: var(--accent); }
.detail { margin-top: 1.4rem; }

.shop-page {
  --shop-bg: #f5f7fb;
  --shop-surface: #fff;
  --shop-blue: #1955c7;
  --shop-blue-hover: #13449f;
  --shop-border: #dce3ee;
  --shop-muted: #526177;
  min-height: 100vh;
  color: #162337;
  background: var(--shop-bg);
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.shop-page :focus-visible { outline-color: var(--shop-blue); }

.shop-header, .shop-page main {
  width: min(100% - 2rem, 58rem);
  margin-inline: auto;
}

.shop-header { padding-block: 0.375rem; border-bottom: 1px solid var(--shop-border); }

.shop-header a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
}

.shop-header img { filter: brightness(0); }

.shop-page main { padding-block: clamp(1.5rem, 5vw, 3.25rem) 2rem; }

.shop-intro { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.shop-intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 750;
  text-wrap: balance;
}

.shop-intro p { margin: 0; color: var(--shop-muted); }

.shop-page h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.shop-plans {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.shop-plan, .shop-help {
  border: 1px solid var(--shop-border);
  border-radius: 1rem;
  background: var(--shop-surface);
}

.shop-plan {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem;
  box-shadow: 0 2px 4px #16233708;
}

.shop-plan-icon {
  display: block;
  width: clamp(2.5rem, 14vw, 4rem);
  height: auto;
  border-radius: 21%;
}

.shop-plan h3 {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}

.shop-price {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.shop-price span { margin-inline-end: 0.15em; font-size: 0.625em; }

.shop-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem clamp(0.625rem, 3vw, 1rem);
  border-radius: 0.625rem;
  background: var(--shop-blue);
  color: var(--shop-surface);
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.shop-buy:hover { background: var(--shop-blue-hover); }
.shop-buy:active { background: #103780; }

.shop-help { margin-top: 1.25rem; }

.shop-help-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.375rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-decoration: none;
}

.shop-help-link + .shop-help-link { border-top: 1px solid var(--shop-border); }
.shop-help-action { color: var(--shop-blue); font-size: 0.9375rem; }
.shop-help-link img { transform: rotate(180deg); filter: grayscale(1); }
.shop-help-link:hover .shop-help-action { text-decoration: underline; }

@media (min-width: 48rem) {
  .shop-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .shop-plan { grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem; }
  .shop-plan h3 { font-size: 1.125rem; }
  .shop-price { font-size: 2.125rem; }
  .shop-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.5rem; }
  .shop-help-link + .shop-help-link { border-top: 0; border-inline-start: 1px solid var(--shop-border); }
}

.shop-checkout {
  width: min(100% - 2rem, 27rem);
  max-height: calc(100% - 2rem);
  padding: clamp(1rem, 5vw, 1.5rem);
  overflow: auto;
  border-color: var(--shop-border);
  border-radius: 1.125rem;
  color: inherit;
  background: var(--shop-surface);
}

.shop-checkout::backdrop { background: rgb(16 28 49 / 52%); }

.shop-checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.shop-checkout-header h2 { margin: 0; font-size: 1.25rem; }

.shop-checkout-close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 0.625rem;
  background: var(--shop-bg);
  color: inherit;
  font-size: 1.375rem;
  cursor: pointer;
}

.shop-checkout-summary {
  margin: 0.75rem 0 1rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: var(--shop-bg);
  font-weight: 650;
}

.shop-checkout label { display: block; margin-bottom: 0.375rem; font-weight: 650; }

.shop-checkout input:not([type="hidden"]) {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--shop-border);
  border-radius: 0.625rem;
  color: inherit;
  background: var(--shop-surface);
}

.shop-checkout input:not([type="hidden"]):focus { border-color: var(--shop-blue); }
.shop-checkout input + p { margin-block: 0.375rem 0.75rem; color: var(--shop-muted); font-size: 0.875rem; }
.shop-checkout-feedback { color: #a03724; }
.shop-checkout-feedback:empty { margin: 0; }
.shop-checkout .shop-buy { width: 100%; border: 0; cursor: pointer; }
.shop-checkout .shop-buy:disabled { background: #e1e7f1; color: var(--shop-muted); cursor: default; }

.detail h2 { margin-top: 1.4rem; }

/* 激活码页 /login?code=1：沿用微信 App 表单页排版（按 iOS 430×932 截图实测值还原） */
.app-body {
  background: #f2f2f2;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.app-body main { width: 100%; padding: 0; }

.app-screen {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  background: #fff;
}

.app-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) - 6px);
  left: 6px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #1c1c1c;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.app-close-icon { display: block; }

.app-title {
  margin: 94px 0 0;
  color: #000;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.app-form { margin-top: 46px; }

.app-form-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.app-row {
  position: relative;
  display: flex;
  height: 56.5px;
  align-items: center;
  padding-left: 32px;
}

.app-row::after,
.app-row::before {
  position: absolute;
  right: 32px;
  left: 32px;
  height: 0.5px;
  background: #e4e4e4;
  content: "";
}

.app-row::after { bottom: 0; }
.app-row::before { top: 0; display: none; }

.app-form-wrap .app-row:first-child::before,
.app-form > .app-row:first-child::before { display: block; }

.app-label {
  flex: none;
  width: 104px;
  color: #000;
  font-size: 17px;
  font-weight: 400;
}

.app-value { color: #000; font-size: 17px; }
.app-chevron-wrap { display: flex; margin-left: auto; margin-right: 34px; color: #b0b0b0; }
.app-chevron { display: block; }
.app-prefix { flex: none; margin-right: 14px; color: #000; font-size: 17px; }

.app-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font: inherit;
  font-size: 17px;
  line-height: 1.2;
}

.app-input::placeholder { color: #a8a8a8; opacity: 1; }
.app-input:focus { outline: none; }

.app-error {
  margin: 8px 0 0;
  padding-left: 32px;
  color: #fa5151;
  font-size: 14px;
}

.app-error[hidden] { display: none; }

.app-alt {
  display: block;
  margin: 19px 0 0 32px;
  color: #576b95;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
}

.app-alt-note { margin: 8px 0 0 32px; color: #a6a6a6; font-size: 14px; }

.app-actions { margin-top: auto; text-align: center; }

.app-hint {
  margin: 0;
  color: #a6a6a6;
  font-size: 14px;
  line-height: 1;
}

.app-primary {
  display: flex;
  width: 184px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin: 26px auto 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #07c160;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-primary:active { background: #06ad56; }

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 55px;
  color: #576b95;
  font-size: 14px;
}

.app-spacer { flex: 1 1 auto; }
.app-footer-text { color: #576b95; }
.app-footer-link { color: #576b95; text-decoration: none; }
.app-footer-note { color: #a6a6a6; font-size: 12px; }
.app-footer-end { margin-top: 0; }
.app-sep { color: #576b95; font-size: 12px; opacity: 0.8; }

.app-result { padding: 8px 32px 0; text-align: center; }
.app-success-icon { display: block; margin: 0 auto 18px; }
.app-license { display: grid; gap: 12px; margin: 0; }
.app-license dt { color: #a6a6a6; font-size: 14px; }
.app-license dd { margin: 2px 0 0; color: #000; font-size: 17px; }
.app-result .app-alt-note { margin: 16px 0 0; }

/* 启动页：微信启动图（地球 + 剪影）+ 底部「登录 / 注册」双按钮 */
.splash-body {
  background: #04070e;
  color: #fff;
}

.splash-body main { display: block; }

.splash {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  margin: 0 auto;
  overflow: hidden;
  background: #04070e;
}

.splash-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.splash-lang {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 46px);
  right: 22px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 15px;
  line-height: 1;
}

.splash-actions {
  position: relative;
  margin-top: auto;
  padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + 34px);
}

.splash-buttons { display: flex; gap: 20px; }

.splash-button {
  display: flex;
  flex: 1 1 0;
  height: 48px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.splash-login { background: #23282e; color: #f2f2f2; }
.splash-login:active { background: #2d333a; }
.splash-register { background: #07c160; color: #fff; }
.splash-register:active { background: #06ad56; }

/* 激活弹窗：微信风格对话卡片 */
.wx-dialog {
  width: min(88vw, 320px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.wx-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }

.wx-dialog[open] { animation: wx-dialog-in 0.18s ease-out; }

@keyframes wx-dialog-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.wx-dialog-step[hidden] { display: none; }
.wx-dialog-form { margin: 0; }

.wx-dialog-title {
  margin: 0;
  padding: 26px 24px 0;
  color: #000;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.wx-dialog-body {
  margin: 10px 24px 0;
  color: #7c7c7c;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
}

.wx-dialog-field { margin: 18px 24px 0; }

.wx-dialog-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f5f5f5;
  color: #000;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.03em;
}

.wx-dialog-input::placeholder { color: #a8a8a8; opacity: 1; }
.wx-dialog-input:focus { outline: none; border-color: #07c160; background: #fff; }

.wx-dialog-error {
  margin: 8px 24px 0;
  color: #fa5151;
  font-size: 13px;
  line-height: 1.4;
}

.wx-dialog-error[hidden] { display: none; }

.wx-dialog-link {
  display: block;
  margin: 14px 24px 0;
  color: #576b95;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.wx-dialog-actions {
  display: flex;
  margin-top: 22px;
  border-top: 0.5px solid #e5e5e5;
}

.wx-dialog-button {
  flex: 1 1 0;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wx-dialog-cancel { border-right: 0.5px solid #e5e5e5; }
.wx-dialog-submit { color: #07c160; font-weight: 600; }
.wx-dialog-button:active { background: #f2f2f2; }
.wx-dialog-button:focus-visible { outline: 2px solid rgba(7, 193, 96, 0.55); outline-offset: -3px; }
.wx-dialog:focus { outline: none; }

@media (max-width: 430px) {
  .app-body { background: #fff; }
}

@media (max-height: 640px) {
  .splash-actions { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); }
}

@media (max-height: 700px) {
  .app-title { margin-top: 64px; }
  .app-form { margin-top: 32px; }
  .app-footer { margin-top: 32px; }
}

@media (max-width: 650px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero { margin-bottom: 1rem; }
  .header { padding-block: 0.65rem; }
}
