/* 购买平台公开页（/buy 与模拟收银台）样式；配合 site.css 使用。 */
.store-login-main { max-width: 440px; margin-inline: auto; padding-top: 40px; }
.store-login-main h1 { font-size: 26px; letter-spacing: 0; }
.store-login-form { display: grid; gap: 18px; }
.store-login-form label { display: grid; gap: 8px; }
.store-login-form input { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 16px; }
.store-login-field { display: grid; gap: 8px; }
.store-login-form input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.store-login-form input[aria-invalid="true"] { border-color: #b4432b; }
.store-login-form input[aria-invalid="true"]:focus-visible { outline-color: #b4432b; }
.store-field-error { margin: 0; color: #b4432b; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.store-field-error[hidden] { display: none; }
.store-captcha-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.store-captcha-row .text-link { font-size: 13px; }
.store-login-form .store-buy-button { min-height: 46px; border-radius: 6px; }
.store-login-form .store-remember { display: flex; align-items: center; gap: 8px; }
.store-login-form .store-remember input { width: 18px; height: 18px; padding: 0; }
.store-captcha { display: block; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.store-login-error { color: #b4432b; overflow-wrap: anywhere; }
.store-channel-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; border-bottom: 1px solid var(--line); }
.store-channel-nav { display: flex; align-self: stretch; gap: 24px; }
.store-channel-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 60px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; }
.store-channel-nav a:hover, .store-channel-nav a.is-active { color: var(--green); }
.store-channel-nav a.is-active { border-bottom-color: var(--green); font-weight: 600; }
.store-channel-toolbar svg { width: 18px; height: 18px; flex-shrink: 0; }
.store-channel-main .admin-icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.store-channel-account { display: flex; align-items: center; gap: 20px; min-width: 0; max-width: 100%; padding-block: 10px; }
.store-channel-identity { display: grid; gap: 2px; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.store-channel-identity strong { font-weight: 600; }
.store-channel-identity span { color: var(--muted); font-size: 12px; }
.store-channel-logout { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.store-channel-logout:hover { border-color: #8fb2a4; background: var(--soft); }
.store-channel-nav a:focus-visible, .store-channel-logout:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.store-main.store-channel-main { gap: 24px; }
.store-channel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block: 8px; }
.store-channel-heading h1 { font-size: 28px; line-height: 1.3; letter-spacing: 0; margin: 0; }
.store-channel-heading p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.store-channel-main .store-plan,
.store-channel-main .store-plan.has-discount,
.store-channel-main .store-plan.is-permanent { gap: 14px; border-radius: 8px; border-color: var(--line); padding: 20px 18px; box-shadow: none; }
.store-channel-main .store-plan:hover { border-color: #8fb2a4; }
.store-channel-main .store-plan.has-discount { border-color: #d8a24a; padding-top: 26px; }
.store-channel-main .store-plans { row-gap: 30px; }
.store-plan-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.store-channel-main .store-plan h2 { font-size: 18px; }
.store-plan-permanent { color: var(--muted); font-size: 11px; white-space: nowrap; }
.store-channel-main .store-plan-price { font-size: 28px; }
.store-channel-main .store-buy-button { margin-top: 0; border-radius: 6px; font-weight: 600; }
.store-channel-main .store-buyer-email-hint { display: none; }
.store-channel-main .store-plan-specs { gap: 10px; font-size: 13px; }
.store-channel-main .store-plan-specs svg { width: 18px; height: 18px; }
.store-channel-main .store-order-panel { border-radius: 8px; }
.store-channel-main .store-guide { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.store-channel-main .store-guide article { border: 0; background: transparent; border-radius: 0; padding: 0; }
@media (max-width: 560px) {
  .store-channel-toolbar { gap: 0; }
  .store-channel-account { width: 100%; padding-block: 12px; justify-content: space-between; border-top: 1px solid var(--line); }
  .store-channel-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
  .store-channel-nav a { min-height: 48px; }
}
.store-history-head, .store-history-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(80px, .7fr) minmax(100px, 1fr) minmax(130px, 1fr) 95px; align-items: center; gap: 18px; }
.store-history-head { padding: 12px 0; color: var(--muted); font-size: 13px; }
.store-history-row { padding: 18px 0; border-top: 1px solid var(--line); font-size: 14px; }
.store-history-row > * { min-width: 0; overflow-wrap: anywhere; }
.store-history-plan { display: grid; gap: 6px; }
.store-history-plan code, .store-history-plan small, .store-history-row time { color: var(--muted); font-size: 12px; }
.store-history-amount { font-weight: 700; }
.store-history-row .text-link { display: inline-flex; align-items: center; gap: 4px; }
.store-history-empty { padding-block: 32px; color: var(--muted); }
.store-history-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; font-size: 14px; }
@media (max-width: 800px) {
  .store-history-head { display: none; }
  .store-history-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .store-history-plan { grid-column: 1 / -1; }
}
.store-main { display: grid; gap: 30px; padding-block: 20px 72px; }
.store-banner {
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 20px;
  color: var(--green);
  font-weight: 600;
}
.store-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.store-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px 20px;
}
.store-plan.is-permanent { border-color: #7fb79b; box-shadow: 0 12px 32px rgba(36, 99, 77, .14); }
.store-plan.has-discount { border-color: #d8a24a; }
.store-plan-discount {
  position: absolute;
  top: -12px;
  left: 16px;
  background: #b4432b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 4px 12px;
  border-radius: 999px;
}
.store-plan-original { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.store-plan-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 12px;
  border-radius: 999px;
}
.store-plan h2 { font-size: 20px; }
.store-plan-price { font-family: "Qiqi Display", -apple-system, "PingFang SC", sans-serif; font-size: 30px; line-height: 1.1; color: var(--green); }
.store-plan-price span { font-size: 14px; font-weight: 400; color: var(--muted); }
.store-plan-specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.store-plan-specs li { display: flex; align-items: center; gap: 8px; }
.store-plan-specs strong { color: var(--ink); }
.store-buy-button {
  margin-top: auto;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.store-buy-button:hover:not(:disabled) { background: #1d5340; }
.store-buy-button:disabled { opacity: .55; cursor: not-allowed; }
.store-order-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  display: grid;
  gap: 10px;
}
.store-order-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.store-order-head h2 { font-size: 18px; }
.store-order-meta { color: var(--muted); font-size: 13px; word-break: break-all; }
.store-order-message { color: var(--ink); }
.store-order-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.store-order-actions .store-buy-button { margin-top: 0; }
.store-order-result { border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 10px; justify-items: stretch; }
.store-order-result h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.store-license-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 1px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  word-break: break-all;
  width: 100%;
}
.store-copy-button {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  justify-content: center;
  max-width: 100%;
  min-height: 40px;
  gap: 8px;
  background: var(--mint);
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
}
.store-copy-button span { min-width: 0; overflow-wrap: anywhere; }
.store-order-hint { color: var(--muted); font-size: 13px; }
.store-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.store-guide article { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.store-guide h2 { font-size: 17px; margin-bottom: 10px; }
.store-guide ol, .store-guide ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; font-size: 14px; }
.store-cashier {
  max-width: 480px;
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.store-cashier-summary { display: grid; gap: 8px; }
.store-cashier-summary h2 { font-size: 20px; }
.store-cashier-facts { margin: 0; display: grid; gap: 8px; font-size: 14px; }
.store-cashier-facts div { display: flex; justify-content: space-between; gap: 16px; }
.store-cashier-facts dt { color: var(--muted); }
.store-cashier-facts dd { margin: 0; word-break: break-all; }
.store-cashier-form { display: grid; gap: 14px; justify-items: start; }
.store-cashier-form .store-buy-button { margin-top: 0; width: 100%; }
.store-cashier-note { color: var(--muted); font-size: 13px; }
@media (max-width: 560px) {
  .store-plans { grid-template-columns: 1fr; }
  .store-license-key { font-size: 15px; }
}

/* 续费：已有卡密延长有效期。 */
.store-renewal { margin-top: auto; display: grid; gap: 8px; }
.store-renewal-toggle {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  justify-self: start;
}
.store-renewal-toggle:hover { color: var(--green); }
.store-renewal-toggle:disabled { cursor: default; opacity: .55; }
.store-renewal-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--mint);
}
.store-renewal-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}
.store-renewal-input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.store-renewal-submit {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  justify-self: start;
}
.store-renewal-submit:disabled { opacity: .55; cursor: default; }
.store-renewal-hint { margin: 0; color: var(--muted); font-size: 12px; }

/* ===== 买家邮箱（选填，卡密自动送达） ===== */
.store-buyer-email { display: grid; gap: 4px; }
.store-buyer-email-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.store-buyer-email-input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.store-buyer-email-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* ===== 桌面端扫码支付弹层 ===== */
.store-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 32, 24, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.store-qr-card {
  background: #fff;
  border-radius: 18px;
  padding: 26px 26px 22px;
  max-width: 340px;
  width: 100%;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  box-shadow: 0 24px 64px rgba(20, 40, 28, .25);
}
.store-qr-title { margin: 0; font-size: 19px; color: #1a2b1e; }
.store-qr-sub { margin: 0; font-size: 13px; color: #5a6b5e; line-height: 1.6; }
.store-qr-image {
  width: 300px;
  height: 300px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-qr-svg { width: 100%; height: 100%; display: block; }
.store-qr-fallback { margin: 0; font-size: 13px; color: #b4432b; }
.store-qr-order { margin: 0; font-size: 12px; color: #8a9a8e; font-family: Menlo, Consolas, monospace; word-break: break-all; }
.store-qr-note { margin: 0; font-size: 12px; color: #8a9a8e; line-height: 1.6; }
.store-qr-actions { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.store-qr-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #33443a;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.store-qr-button-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.store-qr-button:hover { opacity: .92; }
