:root { color: #162033; background: #f4f7fb; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-synthesis: none; }
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(circle at 50% -20%, #dce8ff 0, #f4f7fb 36%, #f7f9fc 100%); }
button, input { font: inherit; }
.checkout-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; padding: 34px 22px 56px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; color: #172033; font-size: 16px; font-weight: 720; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(145deg, #3975f4, #2052cf); box-shadow: 0 7px 18px rgba(42, 101, 229, .24); font-size: 13px; letter-spacing: -.5px; }
.brand small { margin-left: auto; color: #77849a; font-size: 12px; font-weight: 500; }
.order-panel, .state-panel { border: 1px solid rgba(216, 224, 236, .9); border-radius: 20px; background: rgba(255, 255, 255, .94); box-shadow: 0 18px 55px rgba(38, 58, 92, .1); }
.order-panel { padding: 28px; }
.state-panel { min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; }
.state-panel h1 { margin: 14px 0 6px; font-size: 22px; }
.state-panel p { max-width: 320px; margin: 8px 0; color: #718096; line-height: 1.7; }
.state-panel button { margin-top: 18px; padding: 9px 18px; border: 1px solid #d2daE7; border-radius: 9px; color: #263750; background: white; cursor: pointer; }
.state-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #c5761a; background: #fff4df; font-size: 24px; font-weight: 700; }
.spinner { width: 34px; height: 34px; border: 3px solid #dce6f8; border-top-color: #3167ed; border-radius: 50%; animation: spin .8s linear infinite; }
.status-summary { padding: 15px 17px; border: 1px solid #f1dfae; border-radius: 13px; color: #7b5811; background: #fff9e9; }
.status-heading { display: flex; align-items: center; gap: 9px; }
.status-heading strong { color: #6f4d08; font-size: 18px; line-height: 1.35; }
.status-summary p { margin: 6px 0 0 16px; color: #8b6c2b; font-size: 13px; line-height: 1.55; }
#status-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #e5a329; box-shadow: 0 0 0 4px rgba(229, 163, 41, .13); }
.order-panel[data-status="REDEEMING"] .status-summary,
.order-panel[data-status="REDEEM_UNKNOWN"] .status-summary { border-color: #cbdcff; color: #285bb9; background: #f2f6ff; }
.order-panel[data-status="REDEEMING"] .status-heading strong,
.order-panel[data-status="REDEEM_UNKNOWN"] .status-heading strong { color: #2455ad; }
.order-panel[data-status="REDEEMING"] .status-summary p,
.order-panel[data-status="REDEEM_UNKNOWN"] .status-summary p { color: #5874a8; }
.order-panel[data-status="REDEEMING"] #status-dot,
.order-panel[data-status="REDEEM_UNKNOWN"] #status-dot { background: #3975ef; box-shadow: 0 0 0 4px rgba(57, 117, 239, .12); }
.order-panel[data-status="REDEEMED"] .status-summary { border-color: #bee9d8; color: #267458; background: #edf9f4; }
.order-panel[data-status="REDEEMED"] .status-heading strong { color: #176b4c; }
.order-panel[data-status="REDEEMED"] .status-summary p { color: #4c806c; }
.order-panel[data-status="REDEEMED"] #status-dot { background: #20a779; }
.order-panel[data-status="REDEEM_FAILED"] .status-summary { border-color: #f1c5c1; color: #b53b34; background: #fff2f0; }
.order-panel[data-status="REDEEM_FAILED"] .status-heading strong { color: #a92f29; }
.order-panel[data-status="REDEEM_FAILED"] .status-summary p { color: #a6514b; }
.order-panel[data-status="REDEEM_FAILED"] #status-dot { background: #dc4b43; box-shadow: 0 0 0 4px rgba(220, 75, 67, .12); }
.order-panel[data-status="EXPIRED"] .status-summary, .order-panel[data-status="CLOSED"] .status-summary { border-color: #dfe3e8; color: #7a8494; background: #f5f6f8; }
.order-panel[data-status="EXPIRED"] .status-heading strong, .order-panel[data-status="CLOSED"] .status-heading strong { color: #606a79; }
.order-panel[data-status="EXPIRED"] .status-summary p, .order-panel[data-status="CLOSED"] .status-summary p { color: #7a8494; }
.order-panel[data-status="EXPIRED"] #status-dot, .order-panel[data-status="CLOSED"] #status-dot { background: #a7afbb; }
.amount-label { margin: 32px 0 8px; color: #7b8798; font-size: 13px; text-align: center; }
.amount { display: flex; align-items: baseline; justify-content: center; gap: 5px; font-variant-numeric: tabular-nums; }
.amount > span { font-size: 25px; font-weight: 650; }
.amount strong { color: #101827; font-size: clamp(42px, 10vw, 58px); letter-spacing: -2px; line-height: 1.1; }
.amount small { margin-left: 4px; color: #7b8798; font-size: 13px; }
.divider { height: 1px; margin: 32px 0; background: #edf0f5; }
h1 { margin: 0 0 24px; font-size: 22px; }
label { display: block; margin-bottom: 8px; color: #34445a; font-size: 13px; font-weight: 600; }
.credential-field + .credential-field { margin-top: 14px; }
.purchase-guide { margin: -10px 0 28px; padding: 16px; border-radius: 12px; background: #f3f7ff; color: #53627a; font-size: 13px; }
.purchase-guide strong { display: block; margin: 6px 0 10px; color: #172033; font-size: 16px; }
.purchase-guide > button { padding: 0; border: 0; color: #3167ed; background: none; cursor: pointer; }
.purchase-guide p { margin: 12px 0; line-height: 1.65; }
.purchase-guide .market-actions { display: flex; gap: 10px; }
.market-button { flex: 1; min-width: 0; height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; color: white; cursor: pointer; font-weight: 650; box-shadow: 0 5px 14px rgba(31, 41, 55, .12); }
.market-button-jd { background: #e1251b; }
.market-button-jd:hover { background: #c91f17; }
.market-button-taobao { background: #ff5000; }
.market-button-taobao:hover { background: #e94700; }
.market-logo { width: 23px; height: 23px; display: inline-grid; place-items: center; flex: 0 0 23px; border-radius: 6px; background: rgba(255, 255, 255, .96); font-size: 11px; font-weight: 850; line-height: 1; }
.market-logo-jd { color: #e1251b; letter-spacing: -.8px; }
.market-logo-taobao { color: #ff5000; font-family: "Songti SC", serif; font-size: 14px; }
input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d7dee9; border-radius: 10px; color: #334155; background: white; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: #4b7cf0; box-shadow: 0 0 0 3px rgba(49, 103, 237, .12); }
input:disabled { color: #8b96a8; background: #f4f6f9; }
.primary { width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 10px; color: white; background: #3167ed; box-shadow: 0 8px 20px rgba(49, 103, 237, .2); cursor: pointer; font-weight: 650; transition: background .15s, opacity .15s; }
.primary:hover:not(:disabled) { background: #285bd9; }
.primary:disabled { color: #8b96a8; background: #e9edf3; box-shadow: none; cursor: not-allowed; }
.submit-message { min-height: 18px; margin: 8px 0 0; color: #c2413b; font-size: 12px; line-height: 1.5; }
.help { margin: 12px 0 0; color: #7a879a; font-size: 12px; line-height: 1.65; }
.order-meta { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid #edf0f5; }
.order-meta > div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; font-size: 12px; }
.order-meta dt { color: #8994a5; }
.order-meta dd { display: flex; align-items: center; gap: 8px; margin: 0; color: #475569; font-variant-numeric: tabular-nums; text-align: right; }
.order-meta dd button { padding: 0; border: 0; color: #3167ed; background: none; cursor: pointer; font-size: 12px; }
.security-note { margin: 22px 0 0; padding: 12px; border-radius: 9px; color: #6c7788; background: #f7f9fc; font-size: 11px; line-height: 1.6; text-align: center; }
.is-hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
  body { background: #f4f7fb; }
  .checkout-shell { min-height: 100svh; padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
  .brand { height: 34px; margin-bottom: 8px; gap: 8px; font-size: 15px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand small { font-size: 11px; }
  .order-panel { padding: 14px 16px 12px; border-radius: 15px; box-shadow: 0 8px 26px rgba(38, 58, 92, .08); }
  .status-summary { padding: 9px 11px; border-radius: 10px; }
  .status-heading { gap: 7px; }
  .status-heading strong { font-size: 15px; }
  .status-summary p { margin: 3px 0 0 14px; font-size: 10px; line-height: 1.4; }
  #status-dot { width: 7px; height: 7px; flex-basis: 7px; box-shadow: 0 0 0 3px rgba(229, 163, 41, .13); }
  .amount-label { margin: 10px 0 1px; font-size: 11px; }
  .amount > span { font-size: 18px; }
  .amount strong { font-size: 35px; letter-spacing: -1px; }
  .amount small { font-size: 11px; }
  .divider { margin: 12px 0; }
  .purchase-guide { position: relative; margin: 0 0 12px; padding: 10px 11px; font-size: 11px; }
  .purchase-guide > span { color: #8490a2; }
  .purchase-guide strong { max-width: calc(100% - 76px); margin: 3px 0 7px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .purchase-guide > button { position: absolute; top: 11px; right: 11px; font-size: 11px; }
  .purchase-guide p { margin: 5px 0 8px; line-height: 1.45; }
  .purchase-guide .market-actions { gap: 8px; }
  .market-button { height: 36px; gap: 6px; border-radius: 8px; font-size: 12px; }
  .market-logo { width: 20px; height: 20px; flex-basis: 20px; border-radius: 5px; font-size: 10px; }
  .market-logo-taobao { font-size: 13px; }
  h1 { margin-bottom: 10px; font-size: 17px; line-height: 1.35; }
  label { margin-bottom: 4px; font-size: 11px; }
  .credential-field + .credential-field { margin-top: 8px; }
  input { height: 39px; padding: 0 11px; border-radius: 8px; font-size: 14px; }
  .primary { height: 40px; margin-top: 10px; border-radius: 8px; font-size: 14px; }
  .submit-message { min-height: 0; margin-top: 5px; }
  .submit-message:empty { display: none; }
  .help { margin-top: 6px; font-size: 10px; line-height: 1.4; }
  .order-meta { margin-top: 9px; padding-top: 6px; }
  .order-meta > div { padding: 3px 0; font-size: 10px; }
  .security-note { margin-top: 7px; padding: 6px 8px; font-size: 9px; line-height: 1.35; }
}

@media (max-width: 360px), (max-height: 700px) {
  .checkout-shell { padding-top: 6px; }
  .brand { height: 30px; margin-bottom: 5px; }
  .brand-mark { width: 29px; height: 29px; }
  .order-panel { padding-top: 10px; }
  .purchase-guide p { display: none; }
  .security-note { display: none; }
}
