.purchase-page { background: var(--bg-light); }
.purchase-page button, .purchase-page input { font: inherit; }
.purchase-page button { cursor: pointer; }
.purchase-page [hidden] { display: none !important; }
.purchase-page :focus-visible { outline: 3px solid #86a5ff; outline-offset: 4px; }
.purchase-hero { padding: 114px 0 50px; text-align: left; }
.purchase-hero-inner { display: flex; justify-content: space-between; align-items: center; }
.purchase-eyebrow { display: block; color: #8caaff; font-size: 11px; letter-spacing: 2.5px; margin-bottom: 12px; }
.purchase-hero h1 { font-size: 36px; letter-spacing: 2px; }
.purchase-hero-mark { width: 112px; margin-right: 56px; transform: rotate(8deg); }
.purchase-hero-mark svg { display: block; width: 100%; }
.purchase-content { padding: 30px 0 68px; background: var(--bg-light); }
.purchase-steps { display: flex; align-items: center; list-style: none; gap: 26px; margin-bottom: 28px; font-size: 13px; color: var(--text-light); }
.purchase-steps li { display: flex; align-items: center; gap: 9px; }
.purchase-steps li + li::before { content: ''; width: 44px; height: 1px; background: #dce2ee; margin-right: 17px; }
.purchase-steps span { font-size: 12px; font-weight: 600; }
.purchase-steps .current { color: var(--blue); }
.purchase-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.purchase-fields { min-width: 0; }
.purchase-panel { padding: 28px; background: #fff; border: 1px solid #e5e9f0; border-radius: 8px; margin-bottom: 20px; }
.panel-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 25px; }
.panel-number { width: 32px; height: 32px; display: grid; place-items: center; background: var(--bg-blue); color: var(--blue); border-radius: 6px; font-size: 13px; font-weight: 600; }
.panel-heading h2, .summary-heading h2 { font-size: 18px; font-weight: 600; }
.panel-heading p { font-size: 13px; color: var(--text-light); margin-top: 3px; }
.plan-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-option, .payment-option { position: relative; cursor: pointer; min-width: 0; }
.plan-option input, .payment-option input, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.plan-card { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 165px; border: 1px solid #dfe4ed; border-radius: 6px; padding: 21px 15px 17px; transition: border-color .2s, background .2s, box-shadow .2s; }
.plan-card:hover, .payment-card:hover { border-color: #8ba7ff; }
.plan-name { font-size: 16px; font-weight: 600; padding-right: 18px; overflow-wrap: anywhere; }
.plan-price { margin-top: 17px; color: var(--text-dark); font-size: 24px; font-weight: 650; letter-spacing: -.5px; overflow-wrap: anywhere; }
.plan-price small { font-size: 12px; font-weight: 400; color: var(--text-gray); letter-spacing: 0; }
.plan-quota { margin-top: 6px; font-size: 12px; color: var(--text-gray); }
.selection-dot { width: 16px; height: 16px; border: 1px solid #cbd3e1; border-radius: 50%; flex-shrink: 0; }
.plan-card > .selection-dot { position: absolute; right: 12px; top: 25px; }
input:checked + .plan-card, input:checked + .payment-card { border-color: var(--blue); background: #f5f8ff; box-shadow: inset 0 0 0 1px var(--blue); }
input:checked + .plan-card .plan-name, input:checked + .plan-card .plan-price { color: var(--blue); }
input:checked + .plan-card .selection-dot, input:checked + .payment-card .selection-dot { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
input:focus-visible + .plan-card, input:focus-visible + .payment-card { outline: 3px solid #86a5ff; outline-offset: 3px; }
.quantity-section { border-top: 1px solid #edf0f5; margin-top: 26px; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.quantity-label { font-weight: 500; font-size: 14px; }
#quantity-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.quantity-control { display: flex; align-items: center; flex-shrink: 0; }
.quantity-control button, .quantity-control input { height: 38px; border: 1px solid #dfe4ed; background: #fff; text-align: center; }
.quantity-control button { width: 34px; font-size: 20px; color: var(--text-gray); }
.quantity-control button:first-child { border-radius: 4px 0 0 4px; }
.quantity-control button:nth-child(3) { border-radius: 0 4px 4px 0; }
.quantity-control input { width: 80px; border-left: 0; border-right: 0; appearance: textfield; -moz-appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button, .quantity-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.quantity-control > span { font-size: 13px; margin-left: 10px; color: var(--text-gray); }
.quantity-error { margin-top: 12px; color: #c73737; font-size: 12px; }
.payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border: 0; }
.payment-card { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid #dfe4ed; border-radius: 6px; }
.payment-card strong { display: block; font-size: 15px; font-weight: 500; }
.payment-card small { display: block; color: var(--text-light); font-size: 11px; margin-top: 2px; }
.payment-card .selection-dot { margin-left: auto; }
.payment-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: #fff; flex-shrink: 0; }
.alipay { background: #1677ff; font-size: 26px; font-weight: 600; }
.wechat { background: #07a95b; }
.wechat svg { width: 28px; height: 28px; }
.purchase-help { color: var(--text-light); font-size: 13px; margin: 23px 0 0; }
.purchase-help a { color: var(--blue); margin-left: 8px; }
.order-summary { position: sticky; top: 88px; border: 1px solid #dce4f5; border-radius: 8px; background: #fff; padding: 25px; box-shadow: 0 8px 28px rgba(18, 47, 104, .05); overflow: hidden; }
.order-summary::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--blue); }
.summary-heading { display: flex; align-items: center; justify-content: space-between; }
.summary-heading > span { color: var(--blue); background: var(--bg-blue); border-radius: 3px; padding: 3px 8px; font-size: 11px; }
.summary-product { display: flex; gap: 13px; margin-top: 26px; padding-bottom: 23px; border-bottom: 1px solid #edf0f5; }
.summary-product-icon { flex-shrink: 0; width: 40px; height: 44px; display: grid; place-items: center; background: var(--bg-blue); color: var(--blue); font-size: 29px; border-radius: 5px; }
.summary-product h3 { font-size: 16px; font-weight: 600; margin: 2px 0; overflow-wrap: anywhere; }
.summary-product p { font-size: 12px; color: var(--text-light); }
.summary-product .summary-caption { font-size: 11px; }
.summary-details { padding: 21px 0; display: grid; gap: 15px; font-size: 13px; }
.summary-details > div { display: flex; justify-content: space-between; gap: 12px; }
.summary-details dt { color: var(--text-gray); flex-shrink: 0; }
.summary-details dd { text-align: right; overflow-wrap: anywhere; }
.summary-total { border-top: 1px dashed #dfe4ed; padding-top: 23px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.summary-total > span { font-size: 14px; }
.summary-total strong { font-size: 29px; color: var(--blue); letter-spacing: -.8px; overflow-wrap: anywhere; }
.summary-formula { color: var(--text-light); font-size: 11px; text-align: right; margin-top: 4px; overflow-wrap: anywhere; }
.purchase-submit { width: 100%; border: 0; justify-content: space-between; padding: 13px 17px; margin-top: 26px; font-size: 14px; }
.purchase-page button:disabled { cursor: not-allowed; opacity: .45; }
.summary-note { margin-top: 12px; text-align: center; color: var(--text-light); font-size: 11px; }
.plans-state { text-align: center; padding: 32px 16px; background: var(--bg-light); border-radius: 6px; color: var(--text-gray); font-size: 14px; }
.retry-button { border: 1px solid #cad6fa; border-radius: 4px; background: #fff; padding: 7px 18px; color: var(--blue); margin-top: 14px; }
.payment-dialog { border: 0; border-radius: 12px; padding: 36px; margin: auto; width: min(460px, calc(100% - 32px)); color: var(--text-dark); text-align: center; box-shadow: 0 24px 80px #0003; }
.payment-dialog::backdrop { background: rgba(0, 8, 33, .55); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 9px; right: 15px; background: none; border: 0; font-size: 26px !important; color: var(--text-light); }
.payment-dialog h2 { font-size: 21px; }
.payment-dialog p { font-size: 14px; color: var(--text-gray); margin-top: 12px; line-height: 1.8; }
.dialog-confirm { border: 0; margin-top: 26px; justify-content: center; min-width: 150px; }
.created-order-info { overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 1050px) {
  .purchase-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
  .purchase-panel { padding: 22px; }
  .plan-options { grid-template-columns: 1fr; }
  .plan-card { min-height: auto; padding: 16px; }
  .plan-price { margin-top: 6px; }
  .payment-card { padding: 12px; gap: 8px; }
  .quantity-section { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 768px) {
  .purchase-hero { padding-top: 143px; }
  .purchase-hero-mark { width: 75px; margin-right: 0; margin-left: 20px; flex-shrink: 0; }
  .purchase-eyebrow { font-size: 9px; letter-spacing: 1px; }
  .purchase-hero h1 { font-size: 28px; }
  .purchase-hero p { font-size: 13px; }
  .purchase-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .plan-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-card { padding: 20px 12px; }
  .plan-card > .selection-dot { top: 12px; right: 8px; width: 12px; height: 12px; }
  .plan-name { font-size: 14px; padding-right: 5px; }
  .plan-price { font-size: 22px; }
  .quantity-section { flex-direction: row; align-items: center; }
  .purchase-steps { gap: 12px; font-size: 12px; }
  .purchase-steps li + li::before { width: 18px; margin-right: 0; }
  .purchase-help { margin-bottom: 8px; }
}
@media (max-width: 480px) {
  .purchase-content .container { padding: 0 16px; }
  .purchase-panel { padding: 20px 16px; }
  .plan-options { grid-template-columns: 1fr; }
  .plan-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; padding: 16px 30px 16px 14px; }
  .plan-price { margin: 0; grid-row: span 2; }
  .plan-quota { margin: 0; }
  .quantity-section { flex-direction: column; align-items: flex-start; }
  .payment-card { padding: 12px 9px; gap: 8px; }
  .payment-icon { width: 30px; height: 32px; }
  .payment-card .selection-dot { width: 13px; height: 13px; }
  .purchase-hero-mark { display: none; }
  .payment-dialog { padding: 32px 22px; }
}
