@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

.npmc-checkout-shell {
  box-sizing: border-box;
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  padding-bottom: 48px;
  overflow-x: clip;
  background: #f9fafb;
  color: #1f2937;
  font-family: 'Noto Sans TC', sans-serif;
}
.npmc-checkout-shell,
.npmc-checkout-shell * { box-sizing: border-box; }
.npmc-checkout-shell h1,
.npmc-checkout-shell h2,
.npmc-checkout-shell p { margin-top: 0; }
.npmc-checkout-container { width: 100%; max-width: 1152px; margin: 0 auto; padding-right: 16px; padding-left: 16px; }
.npmc-checkout-header { margin-bottom: 24px; padding: 22px 0; background: #000; color: #fff; }
.npmc-checkout-header-inner { display: flex; align-items: center; }
.npmc-brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: #fff; line-height: 1; }
.npmc-brand-name,
.npmc-brand-subbrand { display: block; margin: 0; padding: 0; color: #fff; font-size: 22px; font-weight: 900; line-height: 1; }
.npmc-brand-name { letter-spacing: 0.1em; }
.npmc-brand-divider { flex: 0 0 auto; width: 1px; height: 24px; background: #4b5563; }
.npmc-checkout-form { display: block; }
.npmc-checkout-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1fr); gap: 24px; align-items: start; }
.npmc-product-list { overflow: hidden; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.npmc-product-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; padding: 22px; border-bottom: 1px solid #e5e7eb; }
.npmc-product-row:last-child { border-bottom: 0; }
.npmc-product-image { display: grid; width: 190px; height: auto; aspect-ratio: 1423 / 916; place-items: center; overflow: hidden; border: 1px solid #f3f4f6; border-radius: 10px; background: #f3f4f6; color: #6b7280; font-weight: 700; line-height: 1; }
.npmc-product-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.npmc-product-info { min-width: 0; }
.npmc-product-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.npmc-product-heading h2 { margin: 0; color: #111827; font-size: 21px; font-weight: 900; line-height: 1.45; }
.npmc-product-info > p { margin: 12px 0 0; color: #4b5563; font-size: 15px; line-height: 1.75; }
.npmc-product-price { flex: 0 0 auto; text-align: right; white-space: nowrap; }
.npmc-product-price del { display: block; margin-bottom: 3px; color: #6b7280; font-size: 13px; }
.npmc-product-price strong { display: block; color: #2563eb; font-size: 19px; font-weight: 900; }
.npmc-checkout-sidebar { position: sticky; top: 24px; }
.npmc-checkout-panel { padding: 24px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.npmc-panel-title { margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid #f3f4f6; color: #111827; font-size: 23px; font-weight: 700; }
.npmc-panel-summary-row { display: flex; justify-content: space-between; gap: 16px; color: #4b5563; font-size: 15px; }
.npmc-panel-summary-row strong { color: #374151; white-space: nowrap; }
.npmc-panel-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e5e7eb; color: #111827; font-size: 17px; font-weight: 700; }
.npmc-panel-total strong { color: #2563eb; font-size: 25px; font-weight: 900; white-space: nowrap; }
.npmc-methods-heading { display: flex; align-items: center; gap: 12px; margin: 24px 0 12px; color: #52606d; font-size: .86rem; font-weight: 700; letter-spacing: .08em; line-height: 1.4; }
.npmc-methods-heading::after { content: ''; flex: 1 1 auto; height: 1px; background: #ded9cf; }
.npmc-methods { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 24px; }
.npmc-methods .npmc-method { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; border-radius: 99px; background: #e3f1ee; color: #075e56; font-size: 0.8rem; font-weight: 700; }
.npmc-method-icon { display: block; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #fff; object-fit: contain; }
.npmc-method-label { white-space: nowrap; }
.npmc-checkout-panel label { display: grid; gap: 7px; margin-top: 14px; color: #111827; font-size: 15px; font-weight: 700; }
.npmc-checkout-panel input[type="text"],
.npmc-checkout-panel input[type="tel"],
.npmc-checkout-panel input[type="email"] { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 9px; background: #fff; color: #111827; font: inherit; }
.npmc-checkout-panel input:focus { border-color: #2563eb; outline: 3px solid rgba(37,99,235,.13); }
.npmc-checkout-panel input:invalid:not(:placeholder-shown) { border-color: #b43a25; }
.npmc-checkout-panel .npmc-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; color: #475569; font-size: 13px; font-weight: 500; line-height: 1.75; cursor: pointer; }
.npmc-consent-checkbox { flex: 0 0 auto; width: 18px; height: 18px; margin: 3px 0 0; accent-color: #111827; cursor: pointer; }
.npmc-consent span { min-width: 0; }
.npmc-consent a { color: #1d4ed8; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.npmc-consent a:hover,
.npmc-consent a:focus-visible { color: #1e40af; }
.npmc-submit-button { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: center; margin-top: 18px; padding: 12px 18px; border: 0; border-radius: 8px; background: #000; color: #fff; font: inherit; font-size: 17px; font-weight: 800; line-height: 1.35; cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.npmc-submit-button:hover,
.npmc-submit-button:focus-visible { background: #1f2937; color: #fff; transform: translateY(-1px); }
.npmc-submit-button:focus-visible { outline: 3px solid rgba(37,99,235,.35); outline-offset: 3px; }
.npmc-mobile-checkout-bar { display: none; }
.npmc-notice { padding: 16px 18px; border-radius: 12px; background: #f2efe8; }
.npmc-error { color: #8f2e19; background: #fde5dd; }

.npmc-thankyou {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 760px;
  margin: clamp(24px, 5vw, 64px) auto;
  padding: clamp(24px, 6vw, 48px);
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.08);
  color: #17212b;
  text-align: center;
}
.npmc-thankyou * { box-sizing: border-box; }
.npmc-thankyou h2 { margin: 12px 0 8px; font-size: clamp(1.7rem, 4vw, 2.35rem); }
.npmc-result-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: 2.5rem; font-weight: 900; }
.npmc-thankyou-pending .npmc-result-icon { background: #fef3c7; color: #a16207; }
.npmc-thankyou-failed .npmc-result-icon,
.npmc-thankyou-cancelled .npmc-result-icon { background: #fee2e2; color: #b91c1c; }
.npmc-thankyou-message { margin: 0 0 28px; color: #64748b; line-height: 1.7; }
.npmc-order-details { overflow: hidden; margin: 0 0 24px; border: 1px solid #e5e7eb; border-radius: 14px; text-align: left; }
.npmc-order-details > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding: 14px 18px; border-bottom: 1px solid #e5e7eb; }
.npmc-order-details > div:last-child { border-bottom: 0; }
.npmc-order-details span { color: #64748b; }
.npmc-order-details strong { overflow-wrap: anywhere; text-align: right; }
.npmc-transfer-details { margin-bottom: 24px; padding: 20px; border: 1px solid #fde68a; border-radius: 14px; background: #fffbeb; text-align: left; }
.npmc-transfer-details h3 { margin: 0 0 12px; }
.npmc-transfer-details p { margin: 8px 0; }
.npmc-login-guide { margin: 0 0 24px; padding: clamp(20px, 4vw, 28px); border: 1px solid #cbd5e1; border-radius: 16px; background: #f8fafc; text-align: left; }
.npmc-login-guide h3 { margin: 0 0 12px; font-size: 1.35rem; }
.npmc-login-guide h4 { margin: 22px 0 8px; font-size: 1.05rem; }
.npmc-activation-ready,
.npmc-activation-working { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; line-height: 1.7; }
.npmc-activation-ready { background: #dcfce7; color: #166534; }
.npmc-activation-working { background: #fef3c7; color: #854d0e; }
.npmc-login-credentials { overflow: hidden; border: 1px solid #dbe2ea; border-radius: 12px; background: #fff; }
.npmc-login-credentials > div { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 16px; padding: 13px 16px; border-bottom: 1px solid #e5e7eb; }
.npmc-login-credentials > div:last-child { border-bottom: 0; }
.npmc-login-credentials span { color: #64748b; }
.npmc-login-credentials strong { overflow-wrap: anywhere; text-align: right; }
.npmc-login-credentials a { color: #1d4ed8; }
.npmc-login-button { display: block; margin-top: 16px; padding: 14px 20px; border-radius: 10px; background: #000; color: #fff !important; font-weight: 800; text-align: center; text-decoration: none !important; }
.npmc-login-button:hover,
.npmc-login-button:focus-visible { background: #1f2937; color: #fff !important; }
.npmc-login-steps { margin-top: 28px; padding-top: 24px; border-top: 1px solid #dbe2ea; }
.npmc-login-steps h4 { margin: 0 0 10px; }
.npmc-login-steps ol { margin: 8px 0 12px; padding-left: 24px; }
.npmc-login-steps li { margin: 6px 0; }
.npmc-login-steps p { margin: 12px 0 0; color: #475569; line-height: 1.7; }
.npmc-digital-notice { margin-bottom: 24px; padding: 20px; border-radius: 14px; background: #eff6ff; color: #1e3a8a; text-align: left; }
.npmc-digital-notice p { margin: 8px 0 0; line-height: 1.7; }
.npmc-home-button { display: inline-block; padding: 14px 28px; border-radius: 12px; background: #111827; color: #fff !important; font-weight: 800; text-decoration: none !important; }

@media (max-width: 1023px) {
  .npmc-checkout-shell { padding-bottom: 112px; }
  .npmc-checkout-layout { display: block; }
  .npmc-checkout-sidebar { position: static; margin-top: 18px; }
  .npmc-panel-total,
  .npmc-submit-desktop { display: none; }
  .npmc-mobile-checkout-bar { position: fixed; z-index: 1000; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #e5e7eb; background: #fff; box-shadow: 0 -8px 20px rgba(0,0,0,.08); }
  .npmc-mobile-checkout-bar > div { flex: 0 0 auto; }
  .npmc-mobile-checkout-bar span { display: block; color: #6b7280; font-size: 12px; font-weight: 500; }
  .npmc-mobile-checkout-bar strong { display: block; color: #2563eb; font-size: 21px; font-weight: 900; white-space: nowrap; }
  .npmc-mobile-checkout-bar .npmc-submit-button { flex: 1 1 auto; width: auto; max-width: 360px; min-height: 48px; margin: 0; padding: 10px 16px; font-size: 16px; }
}

@media (max-width: 600px) {
  .npmc-checkout-header { padding: 18px 0; }
  .npmc-brand-name,
  .npmc-brand-subbrand { font-size: 18px; }
  .npmc-product-row { grid-template-columns: 108px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .npmc-product-image { width: 108px; height: auto; aspect-ratio: 1423 / 916; }
  .npmc-product-heading { display: block; }
  .npmc-product-heading h2 { font-size: 17px; }
  .npmc-product-price { margin-top: 6px; text-align: left; }
  .npmc-product-price del { display: inline; margin-right: 6px; }
  .npmc-product-price strong { display: inline; font-size: 17px; }
  .npmc-product-info > p { margin-top: 7px; font-size: 13px; line-height: 1.55; }
  .npmc-checkout-panel { padding: 18px; }
  .npmc-panel-title { font-size: 20px; }
  .npmc-methods { gap: 7px; }
  .npmc-methods .npmc-method { gap: 5px; padding: 5px 9px 5px 6px; }
  .npmc-method-icon { width: 25px; height: 25px; }
  .npmc-mobile-checkout-bar .npmc-submit-button { font-size: 14px; }
  .npmc-order-details > div { grid-template-columns: 1fr; gap: 4px; }
  .npmc-order-details strong { text-align: left; }
  .npmc-login-credentials > div { grid-template-columns: 1fr; gap: 4px; }
  .npmc-login-credentials strong { text-align: left; }
}

@media (max-width: 390px) {
  .npmc-mobile-checkout-bar { padding-right: 10px; padding-left: 10px; }
  .npmc-mobile-checkout-bar strong { font-size: 18px; }
  .npmc-mobile-checkout-bar .npmc-submit-button { padding-right: 10px; padding-left: 10px; font-size: 13px; }
}
