* { box-sizing: border-box; }
@font-face {
  font-family: "LandingSourceHan";
  src: url("/assets/fonts/SourceHanSansSC-Heavy.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
body { margin: 0; background: #f5f7fb; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1f2937; }
.landing { max-width: 750px; margin: 0 auto 92px; background: #fff; }
.landing img { display: block; width: 100%; height: auto; }
.sticky-pay { position: fixed; left: 12%; right: 12%; bottom: calc(6px + env(safe-area-inset-bottom)); width: min(570px, 76%); min-height: 54px; margin: 0 auto; border: 0; border-radius: 8px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 14px; background: #f70606; color: #fff; font-family: "LandingSourceHan", "Source Han Sans SC", "Noto Sans CJK SC", "思源黑体", "Microsoft YaHei", sans-serif; font-size: 29px; font-weight: 900; z-index: 10; animation: payPulse 1.5s infinite; box-shadow: 0 8px 18px rgba(247, 6, 6, .24); }
.sticky-pay span, .sticky-pay strong { color: #fff; white-space: nowrap; font: inherit; }
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; display: flex; align-items: flex-end; }
.sheet__panel { width: min(750px, 100%); margin: 0 auto; background: #fff; border-radius: 18px 18px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
.sheet__close { border: 0; background: transparent; font-size: 30px; float: right; }
.sheet h1 { margin: 0 0 18px; font-size: 22px; }
label { display: block; font-size: 15px; margin: 12px 0; }
input { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 12px; font-size: 17px; margin-top: 6px; }
.code-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: end; }
.code-row button, .pay-methods button { border: 0; border-radius: 8px; padding: 12px; font-size: 16px; }
.code-row button { background: #eef2ff; color: #1d4ed8; margin-bottom: 12px; }
.privacy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: #4b5563; }
.privacy input { width: auto; margin: 0; }
.privacy label { margin: 0; font-size: inherit; }
.privacy__link { border: 0; padding: 0; background: transparent; color: #1677ff; font-size: 13px; cursor: pointer; }
.privacy__link:hover { color: #0f5fd1; text-decoration: underline; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.pay-methods button:first-child { background: #16a34a; color: #fff; }
.pay-methods button:last-child { background: #1677ff; color: #fff; }
.form-message { min-height: 20px; color: #dc2626; }
.success { min-height: 100vh; padding: 32px 18px; display: grid; place-items: center; background: linear-gradient(180deg, #eef5ff 0%, #f9fbff 52%, #ffffff 100%); }
.success__card { width: min(560px, 100%); padding: 40px 28px; border-radius: 26px; background: rgba(255, 255, 255, .94); text-align: center; box-shadow: 0 24px 60px rgba(15, 23, 42, .12); border: 1px solid rgba(191, 219, 254, .6); }
.success__badge { width: fit-content; min-width: 92px; margin: 0 auto 18px; padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.success h1 { margin: 0 0 14px; font-size: 30px; line-height: 1.25; color: #0f172a; }
.success p { margin: 0; color: #475569; line-height: 1.75; font-size: 16px; }
.success__hint { margin-top: 12px; font-size: 14px; color: #64748b; }
.success img { max-width: 240px; width: min(72%, 240px); margin: 22px auto 0; display: block; border-radius: 18px; box-shadow: 0 12px 28px rgba(15, 23, 42, .12); }
.success a { display: inline-block; margin-top: 18px; background: #1677ff; color: #fff; text-decoration: none; border-radius: 999px; padding: 12px 20px; font-size: 15px; font-weight: 700; box-shadow: 0 10px 24px rgba(22, 119, 255, .22); }
.success--pending .success__badge { background: #dbeafe; color: #1d4ed8; }
.success--paid .success__badge { background: #dcfce7; color: #15803d; }
.success--error .success__badge { background: #fee2e2; color: #b91c1c; }
.abandon-modal[hidden] { display: none; }
.abandon-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 22px; }
.abandon-modal__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.abandon-modal__card { position: relative; width: min(600px, 86vw); overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .24); }
.abandon-modal__hero { display: block; width: 100%; aspect-ratio: 600 / 320; object-fit: cover; }
.abandon-modal__body { margin-top: -1px; padding: 52px 48px 42px; text-align: center; background: #fff; border-radius: 0 0 10px 10px; }
.abandon-modal__body h2 { margin: 0 0 12px; color: #111; font-size: 24px; line-height: 1.35; font-weight: 700; }
.abandon-modal__body p { margin: 0 0 34px; color: #111; font-size: 19px; line-height: 1.4; }
.abandon-modal__primary, .abandon-modal__secondary { display: block; width: 100%; min-height: 62px; border-radius: 999px; font-size: 24px; font-weight: 700; }
.abandon-modal__primary { border: 0; background: #ff503d; color: #fff; box-shadow: 0 6px 12px rgba(255, 80, 61, .18); }
.abandon-modal__secondary { margin-top: 22px; border: 2px solid rgba(184, 83, 60, .45); background: #fff; color: #111; }
.agreement-modal[hidden] { display: none; }
.agreement-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.agreement-modal__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .48); }
.agreement-modal__card { position: relative; width: min(680px, 92vw); max-height: 82vh; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 20px 48px rgba(15, 23, 42, .28); }
.agreement-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #e5e7eb; }
.agreement-modal__header h2 { margin: 0; font-size: 20px; color: #111827; }
.agreement-modal__close { border: 0; background: transparent; color: #6b7280; font-size: 28px; line-height: 1; cursor: pointer; }
.agreement-modal__content { overflow-y: auto; max-height: calc(82vh - 72px); padding: 20px; font-size: 14px; line-height: 1.75; color: #374151; }
.agreement-modal__content p { margin: 0 0 12px; }
.pay-pending[hidden] { display: none; }
.pay-pending { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.pay-pending__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .56); backdrop-filter: blur(2px); }
.pay-pending__card { position: relative; width: min(320px, calc(100vw - 40px)); padding: 28px 24px; border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: 0 20px 48px rgba(15, 23, 42, .24); text-align: center; }
.pay-pending__spinner { width: 42px; height: 42px; margin: 0 auto 16px; border: 4px solid rgba(22, 119, 255, .16); border-top-color: #1677ff; border-radius: 50%; animation: payPendingSpin .8s linear infinite; }
.pay-pending__card p { margin: 0; color: #0f172a; font-size: 18px; font-weight: 700; line-height: 1.5; }

@keyframes payPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(247, 6, 6, .42), 0 8px 18px rgba(247, 6, 6, .24);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(247, 6, 6, 0), 0 10px 22px rgba(247, 6, 6, .2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(247, 6, 6, 0), 0 8px 18px rgba(247, 6, 6, .24);
  }
}

@keyframes payPendingSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 390px) {
  .landing { margin-bottom: 86px; }
  .sticky-pay { left: 10%; right: 10%; width: min(570px, 80%); min-height: 50px; gap: 10px; padding-left: 12px; padding-right: 12px; font-size: 24px; }
  .sheet__panel { padding-left: 14px; padding-right: 14px; }
  .code-row { grid-template-columns: 1fr 104px; gap: 8px; }
  .code-row button, .pay-methods button { font-size: 15px; padding-left: 8px; padding-right: 8px; }
  .abandon-modal { padding: 16px; }
  .abandon-modal__card { width: min(600px, 92vw); }
  .abandon-modal__body { padding: 38px 26px 30px; }
  .abandon-modal__body h2 { font-size: 20px; }
  .abandon-modal__body p { margin-bottom: 26px; font-size: 16px; }
  .abandon-modal__primary, .abandon-modal__secondary { min-height: 52px; font-size: 20px; }
  .abandon-modal__secondary { margin-top: 16px; }
  .agreement-modal { padding: 14px; }
  .agreement-modal__card { width: 100%; max-height: 86vh; }
  .agreement-modal__header { padding: 16px; }
  .agreement-modal__header h2 { font-size: 18px; }
  .agreement-modal__content { max-height: calc(86vh - 64px); padding: 16px; font-size: 13px; }
  .pay-pending__card { padding: 24px 18px; border-radius: 18px; }
  .pay-pending__spinner { width: 38px; height: 38px; margin-bottom: 14px; }
  .pay-pending__card p { font-size: 16px; }
  .success { padding: 20px 14px; }
  .success__card { padding: 28px 18px; border-radius: 22px; }
  .success h1 { font-size: 24px; }
  .success p { font-size: 15px; }
}
