#modalCard[data-kind] {
  width: 100%;
  max-width: 440px;
  max-height: calc(100svh - 32px);
  padding: 28px;
  border: 0;
  border-radius: 24px;
  color: #1d1d1f;
  font-size: 14px;
}
#modalCard[data-kind="checkout"] { max-width: 830px; }
#modalCard[data-kind="profile"] { max-width: 620px; }
#modalCard[data-kind] h2 { font-size: 25px; line-height: 1.4; font-weight: 700; margin: 8px 25px 6px 0; }
.account-eyebrow { display: flex; align-items: center; gap: 8px; color: #76767d; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.account-eyebrow img { width: 18px; height: 18px; }
.account-lead { color: #7b7b82; font-size: 13px; line-height: 1.65; margin-bottom: 26px; overflow-wrap: anywhere; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f4f4f6; border-radius: 11px; margin: 30px 0; }
.account-tabs button { padding: 9px; border-radius: 8px; color: #55555c; }
.account-tabs button[aria-pressed="true"] { background: white; color: #222; box-shadow: 0 1px 4px #121c351a; }
.account-form { display: flex; flex-direction: column; gap: 8px; }
.account-form label,.checkout-form > label { font-size: 12px; font-weight: 600; margin-top: 7px; }
.account-form input,.checkout-form > input { width: 100%; height: 47px; border: 1px solid #d4d5dd; border-radius: 11px; padding: 10px 13px; font-size: 14px; background: #fff; color: #222; outline: none; }
.account-form input:focus,.checkout-form > input:focus { border-color: #0071e3; box-shadow: 0 0 0 3px #0071e312; }
.password-control { position: relative; }
.password-control input { padding-right: 48px; }
.password-control button { position: absolute; right: 6px; top: 4px; width: 40px; height: 39px; display: grid; place-items: center; }
.account-primary { display: block; text-align: center; width: 100%; padding: 13px 15px; border-radius: 11px; background: #1d1d1f; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5; margin-top: 8px; }
.account-primary:hover { background: #343439; }
.account-primary:disabled { opacity: .55; cursor: wait; }
.account-secondary { display: block; width: 100%; padding: 10px 12px; margin-top: 5px; color: #6d6d74; font-size: 13px; text-align: center; border-radius: 10px; }
.account-secondary:hover { background: #f5f5f7; color: #222; }
.account-error { color: #c43045; background: #fff1f2; border-radius: 8px; padding: 9px 10px; font-size: 12px; line-height: 1.5; }
.account-tabs button:focus-visible,.account-primary:focus-visible,.account-secondary:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; }
.profile-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid #ececf0; }
.profile-heading h3 { font-weight: 650; font-size: 16px; }
.profile-heading button { color: #777; font-size: 12px; }
.account-orders { display: grid; gap: 10px; margin-top: 14px; }
.account-order { display: flex; justify-content: space-between; gap: 12px; padding: 15px; border-radius: 12px; border: 1px solid #e8e8ed; text-align: left; }
.account-order:hover { background: #f6f7fa; }
.account-order span:last-child { text-align: right; min-width: 80px; }
.account-order strong { display: block; font-size: 13px; font-weight: 600; }
.account-order small { display: block; color: #8a8a92; font-size: 11px; margin-top: 5px; overflow-wrap: anywhere; }
.account-empty { padding: 30px 10px; text-align: center; color: #888; font-size: 13px; }
.checkout-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.checkout-information { min-width: 0; }
.checkout-price { font-size: 36px; font-weight: 700; margin: 6px 0 20px; }
.checkout-price small { font-size: 13px; color: #888; margin-left: 5px; font-weight: 400; }
.checkout-product-image { width: 100%; aspect-ratio: 252/156; object-fit: cover; border-radius: 14px; margin-bottom: 20px; }
.checkout-specifications { font-size: 12px; line-height: 1.6; }
.checkout-specifications > div { display: grid; grid-template-columns: 65px 1fr; gap: 10px; margin: 9px 0; }
.checkout-specifications dt { color: #929299; }
.checkout-specifications dd { color: #4b4b52; overflow-wrap: anywhere; }
.checkout-note { color: #898991; background: #f5f5f7; font-size: 11px; line-height: 1.7; border-radius: 10px; padding: 12px; margin-top: 15px; }
.checkout-form { min-width: 0; background: #f8f8fa; padding: 22px; border: 1px solid #ececf1; border-radius: 17px; display: flex; flex-direction: column; gap: 10px; align-self: start; margin-top: 28px; }
.checkout-form h3 { font-size: 18px; font-weight: 650; margin-bottom: 6px; }
.checkout-quantity { display: flex; width: fit-content; border: 1px solid #dddde3; border-radius: 9px; overflow: hidden; background: #fff; }
.checkout-quantity button { width: 36px; height: 36px; }
.checkout-quantity button:disabled { color: #ccc; }
.checkout-quantity output { min-width: 40px; text-align: center; padding: 7px; border-left: 1px solid #e9e9ed; border-right: 1px solid #e9e9ed; }
.checkout-form legend { font-size: 12px; font-weight: 600; margin: 10px 0; }
.checkout-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.checkout-methods label { display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #dedee5; border-radius: 9px; min-height: 45px; background: #fff; cursor: pointer; font-size: 12px; }
.checkout-methods label:has(input:checked) { border-color: #167be4; background: #f1f7ff; }
.checkout-methods input { width: 12px; height: 12px; accent-color: #0071e3; }
.wechat-symbol,.alipay-symbol { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 5px; background: #0bbd63; color: #fff; font-size: 12px; }
.alipay-symbol { background: #1688fa; }
.checkout-total { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 5px; padding-top: 16px; border-top: 1px solid #e2e2e8; }
.checkout-total span { color: #85858d; font-size: 12px; }
.checkout-total strong { font-size: 25px; font-weight: 650; }
.payment-amount { font-size: 37px; font-weight: 700; text-align: center; margin: 10px 0; }
.payment-order-number { display: flex; gap: 10px; align-items: center; justify-content: center; color: #888; font-size: 10px; }
.payment-order-number button { color: #0071e3; white-space: nowrap; }
.payment-instruction { text-align: center; font-size: 12px; color: #666; margin: 16px 0 10px; }
.payment-code-link { display: block; width: fit-content; margin: auto; }
.payment-code { display: block; max-height: 410px; width: auto; max-width: 100%; border-radius: 14px; }
.payment-hint { font-size: 11px; color: #929299; line-height: 1.6; margin: 10px 0; text-align: center; }
.payment-query-code { font-size: 12px; color: #777; text-align: center; margin: 12px 0 20px; }
.payment-query-code strong { font-weight: 600; color: #333; font-family: monospace; }
.payment-support { margin-top: 14px; background: #f5f5f7; border-radius: 10px; padding: 12px; font-size: 12px; color: #777; line-height: 1.65; }
.payment-support button { color: #0071e3; }
.lookup-order-title { font-weight: 650; margin-bottom: 8px; }
.lookup-order-summary { display: flex; justify-content: space-between; margin: 15px 0; }
@media(max-width:640px) {
  #modalCard[data-kind] { padding: 25px 20px; border-radius: 21px; }
  .checkout-layout { grid-template-columns: 1fr; gap: 15px; }
  .checkout-form { margin: 0; padding: 18px; }
  .checkout-product-image { max-height: 150px; width: auto; }
  .account-order { padding: 11px; gap: 8px; }
}

#modalCard[data-kind] { background: #fff; }
#modalOverlay:has(#modalCard[data-kind]) { backdrop-filter: none; }

#modalCard[data-kind] { animation-duration: 180ms; }
.order-deliveries{margin:24px 0;text-align:left}.order-deliveries h3{font-size:18px}.delivered-card{padding:16px;background:#f4f6fa;border:1px solid #dfe5ef;border-radius:12px;margin:12px 0}.delivered-card pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;user-select:all;font-size:15px;color:#172235}.delivered-card button{color:#0071e3;font-size:14px}
