/* ══════════════════════════════════════════════════════════════
   Minipay — 下载落地页样式（参考 download.fissionpay.com）
   独立轻色主题，不复用站点 styles.css
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:      #38E5B1;
  --accent-deep: #0BC88E;
  --text-dark:   #030415;
  --text-mid:    #5B5C67;
  --text-muted:  #8B9CC4;
  --text-teal:   #32C99C;
  --bg:          #F5F5FD;
  --card:        #FFFFFF;
  --font:        'PingFang SC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-en:     'JDZhengHT-EN', 'SF Pro Display', -apple-system, sans-serif;
  --dl-block-gap: 24px;
}

html, body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* ── Page wrapper ── */
.page-wrap {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
.page-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 670px;
  background: linear-gradient(180deg, #b7ffe9 0%, #f5f5fd 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── Language toggle ── */
.lang-nav {
  position: absolute;
  top: 24px;
  right: 12px;
  z-index: 100;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(56,229,177,0.2);
  border: 1px solid #38e5b1;
  border-radius: 100px;
  padding: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.lang-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-mid);
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
  width: 44px;
  height: 21px;
}
.lang-opt.active {
  background: var(--accent);
  color: #013d2a;
  font-weight: 500;
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
}
.hero-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

/* ── Hero Left (text column) ── */
.hero-left {
  flex: 1;
  min-width: 0;
  padding: 72px 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  flex-shrink: 0;
  line-height: 0;
}
.logo-icon img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
}
.logo-name {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-dark);
  line-height: 1;
}

/* Hero title */
.hero-title {
  margin-top: 16px;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}
.hero-title .teal { color: var(--text-teal); }

/* Hero subtitle */
.hero-sub {
  margin-top: 16px;
  color: var(--text-mid);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  max-width: clamp(150px, 54.9vw, 206px);
}

/* Feature tags */
.tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  gap: 4px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 100px;
  background: rgba(52,211,153,0.12);
  border: 0.5px solid rgba(52,211,153,0.2);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-teal);
}
.tag img { width: 13px; height: 13px; flex-shrink: 0; display: block; }

/* ── Hero Right (phone mockup) ── */
.hero-right {
  flex-shrink: 0;
  align-self: stretch;
  width: clamp(110px, 41.3vw, 155px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.display-diagram {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-left: 6px;
  margin-right: 6px;
}

/* ── Content Section ── */
.content-section {
  position: relative;
  z-index: 1;
  padding: 16px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Download Card ── */
.dl-card {
  background: var(--card);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  padding: 16px 12px;
  gap: 0;
}
.dl-card-title {
  text-align: center;
  color: var(--text-dark);
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
}
.dl-card-sub {
  text-align: center;
  color: var(--text-mid);
  font-weight: 400;
  margin-top: 8px;
  font-size: 14px;
  line-height: 20px;
}
.dl-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  margin-top: var(--dl-block-gap);
}
.dl-btn:active { opacity: 0.85; }
.dl-btn-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dl-btn-icon img { width: 30px; height: 30px; object-fit: contain; display: block; }
.dl-gplay img { width: 30px; height: 30px; }
.dl-btn-text { display: flex; flex-direction: column; }
.dl-btn-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 11px;
}
.dl-btn-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 19.2px;
}
.dl-btn-title + .dl-btn-label { margin-top: 4px; }
.dl-divider-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: var(--dl-block-gap) 0;
}
.dl-store-group .dl-divider-text + .dl-btn { margin-top: 0; }
.dl-store-group .dl-btn + .dl-btn { margin-top: var(--dl-block-gap); }
.dl-divider-text + .dl-apk-group .dl-btn:first-child { margin-top: 0; }

/* ── chevron ── */
.dl-btn-chevron {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-mid);
}
#btn-testflight-toggle.dl-btn {
  box-sizing: border-box;
  border: 1.5px solid transparent;
}
.dl-store-btn.tf-open .dl-btn-chevron {
  transform: rotate(180deg);
  color: var(--text-teal);
}
#btn-testflight-toggle.dl-btn.tf-open {
  background: #e8fdf5;
  border-color: rgba(50,201,156,0.4);
}

/* ── TestFlight accordion ── */
.tf-card-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
  overflow: hidden;
  width: 100%;
}
.tf-card-wrap.tf-open { grid-template-rows: 1fr; }
.tf-inner { min-height: 0; overflow: hidden; }

.tf-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tf-apple-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf8;
  border: 0.5px solid rgba(50,201,156,0.3);
  border-radius: 100px;
  padding: 4px 10px 4px 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-teal);
  flex-shrink: 0;
}
.tf-apple-badge-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: block;
}
.tf-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: normal;
}
.tf-divider {
  height: 1px;
  background: #f0f0f8;
  margin: 0 0 16px;
}
.tf-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tf-step {
  display: flex;
  gap: 12px;
  padding-bottom: 20px;
  position: relative;
}
.tf-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #38e5b1 0%, rgba(56,229,177,0.15) 100%);
  border-radius: 2px;
}
.tf-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.tf-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #013d2a;
  flex-shrink: 0;
  z-index: 1;
}
.tf-step-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.tf-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: normal;
}
.tf-step-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 18px;
}
.tf-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf8;
  border: 1px solid rgba(50,201,156,0.35);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  margin-top: 8px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  align-self: flex-start;
}
.tf-step-btn:active { background: #d8fdf0; }
.tf-step-btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.tf-beta-icon { border-radius: 50%; }
.tf-step-btn-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tf-step-btn-label {
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 400;
  line-height: normal;
}
.tf-step-btn-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-teal);
  line-height: normal;
}
.tf-tip {
  background: #fffbeb;
  border: 0.5px solid #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #92400e;
  line-height: 17px;
  margin-top: 4px;
}
.tf-tip-icon { display: inline; margin-right: 4px; }

/* ── Feature Cards ── */
.feat-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feat-card {
  background: var(--card);
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 14px;
  padding: 22px 20px;
  min-height: 165px;
}
.feat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
}
.feat-icon-wrap img { width: 40px; height: 40px; object-fit: contain; display: block; }
.feat-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: normal;
}
.feat-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 20.15px;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 25px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 24px;
  line-height: normal;
}
.footer a { color: var(--accent-deep); text-decoration: none; }

/* ════════════════════════════════════════════
   PC LAYOUT  ≥ 960px
════════════════════════════════════════════ */
@media (min-width: 960px) {
  .lang-nav { top: 36px; right: 72px; }
  .lang-opt { width: 48px; height: 23px; font-size: 14px; }

  .hero-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 90px;
    align-items: center;
    gap: 70px;
  }
  .hero-left {
    width: 480px;
    flex: 0 0 480px;
    padding: 0;
    gap: 24px;
  }
  .logo { gap: 12px; }
  .logo-icon img { width: 54px; height: 54px; border-radius: 14px; }
  .logo-name { font-size: 40px; }

  .hero-title { margin-top: 0; font-size: 52px; line-height: 62.4px; }
  .hero-sub { margin-top: 0; font-size: 18px; line-height: 28.8px; max-width: 100%; }
  .tags { margin-top: 0; gap: 10px; }
  .tag {
    padding: 7px 15px;
    height: 32px;
    border: 1px solid rgba(56,229,177,0.25);
    font-size: 13px;
    gap: 6px;
  }

  .hero-right {
    flex: 1;
    width: auto;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: stretch;
  }
  .display-diagram { width: 450px; max-width: 100%; }

  .content-section {
    max-width: 1000px;
    margin: 24px auto 0;
    padding: 0 0 48px;
    gap: 16px;
  }

  .dl-card {
    border-radius: 20px;
    padding: 44px 24px;
    gap: 0;
    align-items: center;
    box-shadow: 0 0 8px rgba(0,0,0,0.05);
  }
  .dl-card-title { font-size: 18px; }
  .dl-card-sub { font-size: 14px; margin-top: 8px; }

  .dl-apk-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
  }
  .dl-store-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
  }
  .dl-btn { width: 500px; margin-top: var(--dl-block-gap); }
  .dl-store-group .dl-btn:first-child { margin-top: 36px; }
  .tf-card-title { font-size: 18px; }
  .tf-steps { max-width: 560px; margin: 0 auto; width: 100%; }
  .dl-divider-text {
    font-size: 14px;
    padding: 0;
    margin: 36px 0;
    width: 500px;
    text-align: center;
  }

  .feat-cards { flex-direction: row; gap: 16px; }
  .feat-card { flex: 1; border-radius: 20px; min-height: 165px; }
  .feat-title { font-size: 16px; }

  .footer { margin-top: 0; }
}

@media (min-width: 1440px) {
  .lang-nav { right: clamp(72px, calc((100vw - 1000px) / 2 - 88px), 200px); }
}
@media (min-width: 1800px) {
  .lang-nav { right: calc((100vw - 1000px) / 2 - 105px); }
}

/* 下载链接未配置提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(120%);
  max-width: min(340px, 92vw);
  padding: 10px 16px;
  background: rgba(3, 4, 21, 0.88);
  color: #fff;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
