:root {
  --paper: #F3F7F4;
  --card: #FFFFFF;
  --ink: #17251B;
  --muted: #64796C;
  --brand: #2B9939;
  --brand-deep: #217A2E;
  --brand-tint: #E7F3E9;
  --line: #DFE9E1;
  --gray-btn-bg: #EAEFEB;
  --gray-btn-line: #D2DCD4;
  --gray-btn-text: #75857A;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "JetBrains Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  background-image: radial-gradient(ellipse 90% 55% at 50% -8%, rgba(43, 153, 57, 0.07), transparent 70%);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.mono { font-family: var(--font-mono); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 0;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-logo { width: 34px; height: 34px; display: block; object-fit: contain; }

.brand-name { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }

.topbar-domain {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.hero {
  text-align: center;
  padding: 52px 24px 0;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--brand);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(38px, 8vw, 62px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.hero h1 .hero-app {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand);
}

.hero-sub {
  margin-top: 14px;
  font-size: clamp(14px, 2.5vw, 16px);
  color: var(--muted);
}

.wechat-notice {
  margin: 22px auto 0;
  max-width: 760px;
  background: #FFF7E8;
  border: 1px solid #F1D39A;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(95, 70, 21, 0.08);
}

.wechat-notice strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: #7A5314;
}

.wechat-notice p {
  font-size: 13px;
  line-height: 1.7;
  color: #8A6A33;
}

.wechat-notice .btn {
  width: auto;
  min-width: 124px;
  height: 42px;
  flex-shrink: 0;
  padding: 0 18px;
}

.ecg { margin: 8px auto -6px; max-width: 720px; }

.ecg img { width: 100%; height: auto; display: block; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 880px;
  width: 100%;
  margin: 30px auto 0;
  padding: 0 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(23, 37, 27, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(23, 37, 27, 0.09);
}

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }

.card-head .os-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-head .os-icon img { width: 26px; height: 26px; display: block; }

.card-ios .os-icon { background: #EEF2EF; }

.card-android .os-icon { background: var(--brand-tint); }

.card-head h2 { font-size: 19px; font-weight: 700; line-height: 1.3; }

.card-head .os-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 2px;
}

.qr-frame {
  position: relative;
  align-self: center;
  padding: 14px;
  margin-bottom: 16px;
}

.qr-corner { position: absolute; width: 22px; height: 22px; border: 0 solid var(--brand); opacity: 0.55; }
.qr-corner.tl { top: 0; left: 0; border-top-width: 2.5px; border-left-width: 2.5px; border-top-left-radius: 8px; }
.qr-corner.tr { top: 0; right: 0; border-top-width: 2.5px; border-right-width: 2.5px; border-top-right-radius: 8px; }
.qr-corner.bl { bottom: 0; left: 0; border-bottom-width: 2.5px; border-left-width: 2.5px; border-bottom-left-radius: 8px; }
.qr-corner.br { bottom: 0; right: 0; border-bottom-width: 2.5px; border-right-width: 2.5px; border-bottom-right-radius: 8px; }

.qr-box {
  width: 186px;
  height: 186px;
  border-radius: 8px;
  overflow: hidden;
  background: #FBFDFB;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img, .qr-box canvas { width: 100% !important; height: 100% !important; display: block; }

.qr-placeholder {
  width: 100%;
  height: 100%;
  border: 1.5px dashed var(--gray-btn-line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.qr-placeholder strong { font-size: 13px; color: var(--gray-btn-text); }

.card-note {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 18px;
  min-height: 44px;
}

.btn {
  font-family: var(--font-sans);
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-gray {
  background: var(--gray-btn-bg);
  border: 1px solid var(--gray-btn-line);
  color: var(--gray-btn-text);
}

.btn-gray:hover { background: #E1E8E2; }

.btn-tag {
  font-size: 11px;
  font-weight: 500;
  background: #DAE2DC;
  color: #6B7A70;
  border-radius: 99px;
  padding: 2px 9px;
}

.btn-green {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(43, 153, 57, 0.28);
}

.btn-green:hover { background: var(--brand-deep); }

.btn-icon {
  width: 17px;
  height: 17px;
  display: block;
  flex-shrink: 0;
}

.card-tip {
  font-size: 12px;
  color: #93A398;
  text-align: center;
  margin-top: 12px;
}

footer {
  margin-top: auto;
  text-align: center;
  padding: 44px 24px 28px;
  color: #93A398;
  font-size: 12px;
}

footer .mono { letter-spacing: 0.08em; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 37, 27, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.modal-backdrop.show { opacity: 1; }

.modal {
  background: var(--card);
  border-radius: 20px;
  max-width: 360px;
  width: 100%;
  padding: 32px 28px 26px;
  text-align: center;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.22s ease;
  box-shadow: 0 24px 64px rgba(23, 37, 27, 0.22);
}

.modal-backdrop.show .modal { transform: none; }

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #EEF2EF;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon img { width: 24px; height: 28px; display: block; }

.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }

.modal p { font-size: 14px; color: var(--muted); margin-bottom: 22px; text-align: left; }

.modal .btn { height: 46px; }

.wx-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 12, 0.88);
  z-index: 200;
  color: #fff;
  padding: 20px 24px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.wx-mask.show { opacity: 1; }

.wx-arrow {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 74px;
  height: 102px;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.28));
  animation: wx-bounce 1.2s ease-in-out infinite;
}

@keyframes wx-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.wx-steps {
  margin-top: 130px;
  max-width: 300px;
  margin-left: auto;
  margin-right: 8vw;
}

.wx-steps h3 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }

.wx-step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: 15px; line-height: 1.55; }

.wx-step-num {
  font-family: var(--font-mono);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--brand);
  color: #7ED28A;
  border-radius: 50%;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.wx-step em { font-style: normal; color: #7ED28A; font-weight: 600; }

.wx-close {
  margin-top: 26px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 99px;
  padding: 9px 26px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-sans);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(23, 37, 27, 0.92);
  color: #fff;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 99px;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: calc(100vw - 48px);
  text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-backdrop[hidden], .wx-mask[hidden], .toast[hidden] { display: none !important; }

@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; max-width: 440px; }
  .hero { padding-top: 36px; }
  .card-note { min-height: 0; }
  .wechat-notice { flex-direction: column; align-items: flex-start; }
  .wechat-notice .btn { width: 100%; }
  body.ua-android .card-android { order: -1; }
  body.ua-ios .card-ios { order: -1; }
  .wx-steps { margin-right: 4vw; }
}

@media (prefers-reduced-motion: reduce) {
  .wx-arrow { animation: none; }
  .card, .card:hover { transform: none; transition: none; }
  .modal-backdrop, .modal, .toast { transition: none; }
}
