/* 会员与检索次数：页头的会员标识、首页的定价、个人主页的订单、收银台、检索按钮旁的剩余次数（config.yaml 中 site.membership 开启时加载） */

.member-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--text-2); background: var(--surface-2);
}
.member-tag.tier-plus { color: var(--free); background: var(--free-bg); }
.member-tag.tier-pro { color: var(--freemium); background: var(--freemium-bg); }
.member-tag.tier-pack { color: var(--paid); background: var(--paid-bg); }

/* 页头：会员的头像右下角显示档位，代替登录后的小绿点 */
.account-link.is-member::after { display: none; }
.account-link .member-tag {
  position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); height: 14px; padding: 0 4px; border-radius: 4px;
  font-size: 8.5px; line-height: 1; letter-spacing: 0.02em; color: var(--surface-solid);
  box-shadow: 0 0 0 2px var(--header-bg);
}
.account-link .member-tag.tier-plus { background: var(--free); }
.account-link .member-tag.tier-pro { background: var(--freemium); }
.mobile-nav .member-tag { height: 18px; margin-left: 6px; padding: 0 6px; font-size: 10.5px; vertical-align: 1px; }

/* ---------- 首页的定价（#pricing）：这一节的标题和间距是 style.css 里通用的 .lp-sec，卡片和其他几节一样是毛玻璃 ---------- */
.pricing-mock { max-width: 640px; margin: 24px auto 0; text-align: left; }

/* 付款方式：登录后有两种以上可选时显示在卡片上方 */
.pay-method { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 24px; }
.pay-method-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.pay-method-options { display: inline-flex; gap: 8px; }
.pay-method-option { position: relative; cursor: pointer; }
.pay-method-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method-option span {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pay-method-option input:checked + span { color: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring); }
.pay-method-option input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.pay-method-hint { flex-basis: 100%; font-size: 12.5px; text-align: center; color: var(--muted); }

/* 每张卡片：档位、价格、次数和一句说明，按钮压在底部，几张卡片的按钮对齐 */
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; text-align: left; }
.plan-card {
  position: relative; display: flex; flex-direction: column; padding: 24px 22px 22px;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.plan-card.is-current { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring), inset 0 1px 0 var(--glass-hi), var(--shadow-lg); }
.plan-card.is-current::before { content: "当前方案"; position: absolute; top: 24px; right: 22px; font-size: 12px; line-height: 24px; color: var(--accent-2); }
.plan-name { font-size: 16px; line-height: 24px; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin-top: 20px; color: var(--ink); }
.plan-price b { font-family: var(--mono); font-size: 36px; font-weight: 600; line-height: 1.15; letter-spacing: -0.03em; }
.plan-price small { font-size: 14px; color: var(--muted); }
.plan-quota { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.plan-quota b { font-family: var(--mono); }
.plan-desc { margin: 4px 0 24px; font-size: 13px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.plan-btn { width: 100%; margin-top: auto; }
.plan-btn:disabled { opacity: 0.5; cursor: default; filter: none; }
.pricing-terms { max-width: 760px; margin: 24px auto 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); text-wrap: balance; }
.pricing-terms a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.pricing-terms a:hover { color: var(--ink); }

/* ---------- 个人主页的“我的订单” ---------- */
.order-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px 64px 56px; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.order-row:first-child { padding-top: 2px; }
.order-row:last-child { padding-bottom: 0; border-bottom: 0; }
.order-main { display: flex; flex-direction: column; min-width: 0; }
.order-main b { font-weight: 600; color: var(--text); }
.order-main small { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-amount { font-family: var(--mono); text-align: right; color: var(--ink); }
.order-status {
  justify-self: start; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; color: var(--muted); background: var(--surface-2);
}
.order-status.status-paid { color: var(--free); background: var(--free-bg); }
.order-status.status-pending { color: var(--paid); background: var(--paid-bg); }
.order-action { text-align: right; font-size: 13.5px; color: var(--accent-2); }
button.order-action { padding: 0; font: inherit; font-size: 13.5px; background: none; border: 0; cursor: pointer; }
button.order-action:disabled { opacity: 0.5; cursor: default; }

/* ---------- 收银台 ---------- */
.pay-page { display: flex; justify-content: center; }
.pay-card { width: 100%; max-width: 480px; }
.pay-loading { padding: 24px 0; text-align: center; color: var(--muted); }
.pay-title { display: flex; align-items: center; gap: 10px; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); }
.pay-title .icon { color: var(--accent-2); }
.pay-amount { display: flex; align-items: baseline; gap: 4px; margin: 18px 0 10px; color: var(--ink); }
.pay-amount small { font-size: 20px; font-weight: 600; }
.pay-amount b { font-family: var(--mono); font-size: 44px; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.pay-info { margin-bottom: 16px; }
.pay-info dd { white-space: normal; }
.pay-no { font-family: var(--mono); font-size: 13px; }
.pay-mock { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; }
.pay-actions { display: flex; gap: 10px; }
.pay-actions .btn { flex: 1; }
.pay-actions .btn:disabled { opacity: 0.6; cursor: default; }
.pay-deadline { margin-top: 12px; text-align: center; }
.pay-card .form-status { margin-top: 12px; }
.pay-done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 4px; text-align: center; }
.pay-done .pay-title { justify-content: center; }
.pay-done-text { margin-bottom: 10px; color: var(--text-2); }
.pay-done .pay-actions { width: 100%; }
.pay-done-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
  font-size: 26px; color: var(--muted); background: var(--surface-2);
}
.pay-done-icon > span { display: none; }
.pay-card[data-state="paid"] .when-paid, .pay-card[data-state="closed"] .when-closed, .pay-card[data-state="error"] .when-error { display: inline-flex; }
.pay-card[data-state="paid"] .pay-done-icon { color: var(--free); background: var(--free-bg); }

/* ---------- 检索次数（discover.js）：开始检索的按钮旁边还剩几次 ---------- */
.quota-note { font-size: 12.5px; color: var(--muted); }
.quota-note a { color: var(--accent-2); }
.quota-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1024px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 手机上还是两列，卡片里收紧一些；按钮两边的留白收小，“有效期内不能降级”也放得下 */
@media (max-width: 600px) {
  .plan-grid { gap: 10px; margin-top: 24px; }
  .plan-card { padding: 16px 14px 14px; border-radius: 16px; }
  .plan-card.is-current::before { top: 16px; right: 14px; font-size: 11.5px; }
  .plan-price { margin-top: 14px; }
  .plan-price b { font-size: 28px; }
  .plan-price small { font-size: 12.5px; }
  .plan-quota { margin-top: 8px; font-size: 14px; }
  .plan-desc { margin-bottom: 16px; font-size: 12px; }
  .plan-btn { padding: 0 8px; font-size: 13.5px; }
  .pricing-terms { margin-top: 18px; padding: 0 6px; font-size: 12px; }
  .order-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .order-main small { white-space: normal; overflow-wrap: anywhere; }
  .order-amount { grid-column: 2; grid-row: 1; }
  .order-status { grid-column: 1; grid-row: 2; }
  .order-action { grid-column: 2; grid-row: 2; }
  .pay-amount b { font-size: 38px; }
  .pay-actions { flex-direction: column; }
}
