/* 购买页。设计口径跟官网 arklab.top 对齐 —— 同一个品牌下的两个页面不该长成两套东西。
   token、字体栈、按钮形状都照搬 arklab-site/styles.css：

     --bg #fbfbfd / --bg-alt #f5f5f7 / --ink #1d1d1f / --muted #86868b
     --line rgba(0,0,0,.08) / --blue #0071e3 / --blue-dark #0058b0
     按钮是 100px 圆角胶囊、min-height 48px，主按钮 ink 底白字。

   以前这页是自成一套的奶油底 + 绿色系（#FAF8F3 / #6BBC8C），logo 还是 CSS 画的
   圆角方块写「长流」。买家从官网点「解锁 Pro」跳进来，会以为换了个站。 */

:root {
  color-scheme: light;
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: #fff;
  --ink: #1d1d1f;
  --muted: #86868b;
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .14);
  --blue: #0071e3;
  --blue-dark: #0058b0;
  --danger: #b5534f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 90px rgba(0, 0, 0, .14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04);
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, ui-sans-serif, system-ui, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { width: min(100% - 32px, 640px); margin: 0 auto; padding: 40px 0 56px; }

/* ── 页头 ───────────────────────────────────────────────────────── */

.hero { text-align: center; padding: 8px 4px 24px; }

/* 官网页头的品牌块：24px 圆角 logo + 产品名，gap 8px，600 字重。这里放大到 28px，
   因为购买页没有导航条，它是页面上唯一的品牌锚点。 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand:hover { opacity: .82; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}
.hero h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 650;
}
.lead { max-width: 480px; margin: 16px auto 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* ── 卡片 ───────────────────────────────────────────────────────── */

.card {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.card h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; font-weight: 650; }

.checkout-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.checkout-head .eyebrow { margin-bottom: 4px; }
.price { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ── 方案列表 ───────────────────────────────────────────────────── */

.plans { display: grid; gap: 10px; margin: 20px 0 14px; }
.plan {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.plan:hover { border-color: var(--line-strong); }
/* 选中态用官网蓝，而不是原来那套绿。1px 边框 + 内阴影模拟 2px，避免选中时元素
   尺寸变化把下面的方案顶动。 */
.plan.selected {
  border-color: var(--blue);
  background: #f5f9ff;
  box-shadow: inset 0 0 0 1px var(--blue);
}
.plan input { accent-color: var(--blue); width: 17px; height: 17px; flex: none; }
.plan span { display: grid; gap: 3px; flex: 1; min-width: 0; }
.plan strong { font-size: 15px; font-weight: 600; }
.plan small { color: var(--muted); font-size: 13px; }
.plan b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* 月费/年费只发 Android，直接在方案卡片上写清楚，不是等选完了才告诉买家。 */
.plan-platform-tag {
  /* 父级 .plan span 是 grid，align-self 管的是纵向，横向仍会被拉满整行 ——
     这个胶囊标签必须用 justify-self 才会收缩到文字宽度。 */
  justify-self: start;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ── 付款方式 ───────────────────────────────────────────────────── */

.channels { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; border: 0; }
.channels legend { width: 100%; margin-bottom: 9px; padding: 0; color: var(--muted); font-size: 13px; }
.channels label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.channels input { accent-color: var(--blue); }

/* ── 按钮：官网的胶囊形 ─────────────────────────────────────────── */

button, .button-link {
  min-height: 48px;
  border-radius: 100px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .22s var(--ease), background .22s var(--ease);
}
button:hover, .button-link:hover { opacity: .86; }

.primary {
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 22px;
  padding: 0 24px;
  border: 0;
  background: var(--ink);
  color: #fff;
}
.secondary {
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 10px;
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.secondary:hover { opacity: 1; background: var(--bg-alt); border-color: rgba(0, 0, 0, .22); }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(0, 113, 227, .28); outline-offset: 2px; }

.status { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; text-align: center; }
.status.error { color: var(--danger); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.notice { margin-bottom: 0; }

/* ── 二维码面板 ─────────────────────────────────────────────────── */

.qr-panel {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: block;
  overflow: auto;
  margin: 0;
  padding: max(32px, env(safe-area-inset-top)) 18px max(32px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: rgba(251, 251, 253, .96);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  text-align: center;
}
.qr-panel .checkout-head,
.qr-panel > p,
.qr-panel > .qr-box,
.qr-panel > .button-link,
.qr-panel > .order-number,
.qr-panel > .status,
.qr-panel > .notice,
.qr-panel > #new-order { width: min(100%, 460px); margin-left: auto; margin-right: auto; }
.qr-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  width: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
}
.qr-close:hover { color: var(--ink); }
.qr-box {
  display: grid;
  place-items: center;
  min-height: 240px;
  margin: 24px auto 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.qr-box img { display: block; width: min(78vw, 300px); max-height: 52vh; height: auto; aspect-ratio: 1; object-fit: contain; }

.button-link { display: grid; place-items: center; padding: 0 24px; text-decoration: none; }

/* ── 订单号 ─────────────────────────────────────────────────────── */

.order-number {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  text-align: left;
}
.order-number span { color: var(--muted); font-size: 12px; }
.order-number code { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.compact { width: auto; min-height: 36px; margin: 0; padding: 0 14px; font-size: 13px; }

/* ── 结果页 ─────────────────────────────────────────────────────── */

.result { text-align: center; }
.success-dot {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 24px;
  font-weight: 650;
}
.result code {
  display: block;
  margin: 20px 0;
  padding: 17px;
  border: 1px dashed var(--blue);
  border-radius: var(--radius-sm);
  background: #f5f9ff;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .06em;
  word-break: break-all;
}

/* ── 登录步骤 ───────────────────────────────────────────────────── */

/* 每张卡片第一段说明文字。.muted 本身在 .plans 之类的块里也用，所以标题下面
   这一段单独给个 class，避免为了调间距去动通用的 .muted。 */
.step-lead { margin: 14px 0 0; }

.auth-form { display: grid; gap: 8px; margin-top: 18px; }
.auth-form label { color: var(--muted); font-size: 13px; }
.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 小于 16px 时 iOS Safari 会在聚焦时放大整页 */
}
.auth-form input:focus-visible { outline: 3px solid rgba(0, 113, 227, .28); outline-offset: 1px; border-color: var(--blue); }
.auth-form #code { letter-spacing: .28em; font-variant-numeric: tabular-nums; }
.auth-form .primary { margin-top: 10px; }

/* ── 已登录横条 ─────────────────────────────────────────────────── */

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.account-bar .eyebrow { margin-bottom: 2px; }
.account-bar strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.text-button {
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  flex: none;
}
.text-button:hover { color: var(--blue-dark); }

/* ── 买不了的方案 ───────────────────────────────────────────────── */

/* 已拥有 / 有更便宜的升级 —— 这些方案不该直接从页面上消失，否则「我记得有双平台
   终身，怎么没了」会变成一条客服消息。 */
.unavailable {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.unavailable p { margin: 0; }

/* ── 页脚 ───────────────────────────────────────────────────────── */

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  padding: 28px 8px 0;
  color: var(--muted);
  font-size: 13px;
}
.legal a { color: inherit; text-decoration: none; }
.legal a:hover { color: var(--ink); }

.hidden { display: none !important; }

@media (max-width: 480px) {
  main { padding-top: 28px; }
  .card { padding: 19px; border-radius: 15px; }
  .checkout-head { align-items: flex-end; }
  .price { font-size: 22px; }
  .order-number { grid-template-columns: 1fr auto; }
  .order-number span { grid-column: 1 / -1; }
  .order-number code { grid-column: 1; }
}
