/* ==========================================================================
   Naver Pay order surface — visual clone of pay-cafe-naver.com/order
   Used by templates/checkout.html and templates/order.html (base.html loads
   only this stylesheet for both pages).
   Reference values are taken from the target's inline checkout CSS:
   content column 425px (target .container), body #f5f5f5 on mobile.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body, h1, h2, h3, p, ul, li, dl, dd, dt, fieldset, figure { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; color: inherit; line-height: normal; }
select { -webkit-appearance: none; appearance: none; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  font-size: 16px;
  margin: 0;
}
body.is-locked { overflow: hidden; }

@media (min-width: 1152px) {
  body { background-color: #fff; }
}

.checkout-page {
  width: 100%;
  max-width: 425px;
  margin: 0 auto;
  background-color: #fff;
  padding-bottom: 80px;
  position: relative;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.payment-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 16px;
  height: 56px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #fff;
  width: 100%;
  gap: 8px;
}
.header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.btn-back {
  font-size: 24px;
  line-height: 1;
  color: #000;
  width: auto;
  display: inline-block;
  padding: 0;
  flex: none;
}
.npay-logo { width: 60px; height: auto; display: block; flex: none; }
.header-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-close { font-size: 24px; line-height: 1; color: #666; padding: 0; flex: none; }

@media (min-width: 1152px) {
  .payment-header { position: sticky; top: 0; z-index: 1000; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
}

/* --------------------------------------------------------------------------
   Shipping banner (before a shipping address is registered)
   -------------------------------------------------------------------------- */
.shipping-banner {
  padding: 0;
  background-color: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
}
.shipping-banner-inner {
  text-align: center;
  padding: 20px 16px;
  background-color: #fff;
  border-radius: 8px;
}
.shipping-banner-inner h3 { font-size: 14px; color: #333; margin-bottom: 16px; font-weight: 600; line-height: 1.6; }
.shipping-banner-inner p { font-size: 13px; color: #666; margin-bottom: 16px; line-height: 1.5; }
.banner-button {
  background-color: #00c853;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.18;
}

/* --------------------------------------------------------------------------
   Registered shipping address summary
   -------------------------------------------------------------------------- */
.shipping-info { background-color: #fff; border-bottom: 8px solid #f5f5f5; }
.shipping-info-head { padding: 16px; border-bottom: 1px solid #e0e0e0; cursor: pointer; }
.shipping-info-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
}
#shippingArrow { transition: transform 0.2s; }
.shipping-info-head[aria-expanded="false"] #shippingArrow { transform: rotate(180deg); }
.shipping-content { padding: 16px; }
.shipping-receiver { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.shipping-receiver-main { flex: 1; min-width: 0; }
.shipping-name-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.shipping-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.shipping-name strong { font-size: 13px; color: #333; font-weight: 600; overflow-wrap: anywhere; }
.shipping-name span { font-size: 11px; color: #999; flex: none; }
.btn-change {
  background-color: #fff;
  color: #333;
  border: solid 1px;
  border-color: #969696;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: normal;
}
.shipping-phone-line {
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.display-phone { flex: 0 0 auto; font-size: 14px; color: #999; font-weight: 600; }
.virtual-phone {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin: 0;
  background-color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
}
.virtual-phone span { font-size: 12px; color: #333; margin: 0; }
.display-address { font-size: 14px; color: #333; line-height: 1.4; overflow-wrap: anywhere; }

.round-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  background-color: #d9f4e3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 14px rgba(14, 163, 87, 0.2);
  margin: 0;
  flex: none;
}
.round-checkbox::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background-color: #09b054;
  opacity: 0.25;
  transition: opacity 0.2s ease;
}
.round-checkbox::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4 10-10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: translate(-50%, -50%) scale(0.6);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}
.round-checkbox:checked { background-color: #09b054; box-shadow: 0 8px 18px rgba(14, 163, 87, 0.28); }
.round-checkbox:checked::before { opacity: 0; }
.round-checkbox:checked::after { opacity: 1; transform: translate(-50%, -50%) scale(0.95); }
.round-checkbox:active { transform: scale(0.94); }

.shipping-memo { position: relative; margin-bottom: 12px; }
.shipping-memo select {
  width: 100%;
  padding: 10px 8px;
  line-height: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  cursor: pointer;
}
.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  flex-shrink: 0;
}
.shipping-request { margin-top: 8px; }
.shipping-request textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 13px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
  min-height: 66px;
}
#shippingRequestInput {
  outline: none;
  border-color: #e0e0e0;
  box-shadow: 0 0 0 1px hsl(145, 10%, 57%);
}
#shippingRequestInput:focus { border-color: #00c73c; box-shadow: none; }

/* --------------------------------------------------------------------------
   Order product
   -------------------------------------------------------------------------- */
.order-section { padding: 16px; background-color: #fff; border-bottom: 1px solid #e0e0e0; }
.order-title { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 12px; }
.order-seller { display: flex; align-items: center; gap: 4px; }
.order-seller > label { font-size: 16px; line-height: 1.6; color: #333; overflow-wrap: anywhere; }
.order-shipping { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; flex: none; }
.order-shipping span { font-size: 13px; color: #939594; font-weight: 500; }
.order-product { display: flex; gap: 12px; }
.order-product > img,
.order-product-placeholder {
  width: 70px;
  height: 70px;
  background-color: #f0f0f0;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: cover;
}
.order-product-placeholder { display: grid; place-items: center; color: #bbb; font-size: 22px; }
.order-product-info { flex: 1; min-width: 0; }
.order-product-title { font-size: 13px; color: #333; margin-bottom: 8px; font-weight: 500; overflow-wrap: anywhere; }
.order-product-qty { font-size: 12px; color: #999; margin-bottom: 8px; }
.order-product-price { font-size: 14px; color: #333; font-weight: 700; }

/* --------------------------------------------------------------------------
   Price summary
   -------------------------------------------------------------------------- */
.price-section { padding: 16px; background-color: #fff; border-bottom: 8px solid #f5f5f5; }
.price-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; font-size: 13px; margin-bottom: 8px; }
.price-row > span:first-child { color: #666; font-weight: 500; }
.price-row > span:last-child { color: #333; font-weight: 600; text-align: right; white-space: nowrap; }
.price-fee { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.price-fee-label { display: flex; align-items: center; gap: 6px; position: relative; }
.price-fee-label > span:first-child { color: #666; font-weight: 500; }
.info-icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; flex: none; }
.price-fee-amount { color: #969696; font-weight: 600; text-align: right; }
.price-total { display: grid; grid-template-columns: 1fr auto; gap: 16px; font-size: 16px; margin: 0; }
.price-total > span { color: #333; font-weight: 700; }
.price-total > span:last-child { text-align: right; white-space: nowrap; }
/* Target parity: the total row must beat .price-row > span:first-child (0,2,1). */
.price-row.price-total > span:first-child { color: #333; font-weight: 700; }
.price-row.price-total > span:last-child { color: #333; font-weight: 700; }
.fee-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.5;
  color: #555;
  font-weight: 400;
  width: 220px;
}

/* --------------------------------------------------------------------------
   Payment methods
   -------------------------------------------------------------------------- */
.payment-section { padding: 16px; background-color: #fff; border-bottom: 8px solid #f5f5f5; }
.payment-section h3 { font-size: 14px; font-weight: 700; color: #333; margin-bottom: 16px; }
.payment-methods { display: flex; flex-direction: column; gap: 12px; }
.payment-method { display: flex; align-items: center; gap: 8px; }
.checkout-page input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #000;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  vertical-align: middle;
  background-color: #fff;
  margin: 0;
  cursor: pointer;
  flex: none;
}
.checkout-page input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background-color: #03c75a;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.checkout-page input[type="radio"]:disabled { cursor: default; }
.checkout-page input[type="radio"]:disabled:checked::after { background-color: #8fbf9f; }
.checkout-page input[type="radio"]:disabled:checked { border-color: #8c8c8c; }
.payment-npay { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.npay-payment-logo { width: 50px; height: 20px; flex: none; }
.payment-npay span { font-size: 15px; color: #333; font-weight: 700; }
.payment-general { cursor: pointer; font-size: 14px; color: #333; font-weight: 700; margin: 0; }
.payment-unavailable { font-size: 11px; line-height: 1.6; color: #888; margin: 4px 0 0; }

/* --------------------------------------------------------------------------
   Benefits row
   -------------------------------------------------------------------------- */
.benefits-section { padding: 16px; background-color: #fff; border-bottom: 8px solid #f5f5f5; }
.benefits-row { display: flex; justify-content: space-between; align-items: center; }
.benefits-label { display: flex; align-items: center; gap: 8px; }
.benefits-label span { font-size: 13px; color: #333; font-weight: 500; }
.benefits-more { color: #9c9d9e; font-size: 12px; font-weight: 500; }

/* --------------------------------------------------------------------------
   Cash receipt
   -------------------------------------------------------------------------- */
.cash-receipt-section { padding: 0; background-color: #fff; border-bottom: 8px solid #f5f5f5; }
.cash-receipt-title { padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.cash-receipt-heading { display: flex; align-items: center; gap: 6px; }
.cash-receipt-heading > span { font-size: 14px; font-weight: 700; color: #333; }
.cash-receipt-options { display: flex; align-items: center; gap: 16px; }
.cash-receipt-options label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.cash-receipt-options label span { font-size: 13px; color: #333; }
.cash-receipt-form { margin: 0 16px 16px; padding-top: 16px; border-top: 1px solid #e0e0e0; }
.receipt-types { display: flex; gap: 20px; margin-bottom: 16px; }
.receipt-types label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; font-size: 13px; color: #333; }
.receipt-sub-label { display: block; font-size: 12px; color: #999; margin-bottom: 8px; font-weight: 600; }
.receipt-select {
  width: 100%;
  padding: 10px 0;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  font-size: 13px;
  background: #fff;
  margin-bottom: 12px;
}
.receipt-phone-row { display: flex; gap: 8px; margin-bottom: 12px; }
.receipt-prefix { width: 70px; padding: 10px; border: 1px solid #e0e0e0; border-radius: 0; font-size: 13px; background: #fff; flex: none; }
.receipt-part { width: 120px; padding: 10px 0; border: 1px solid #e0e0e0; border-radius: 0; font-size: 13px; box-sizing: border-box; flex-shrink: 0; }
.receipt-business { margin-bottom: 16px; }
.receipt-biz-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.receipt-biz-part { border: 0; border-bottom: 1px solid #e0e0e0; border-radius: 0; font-size: 13px; padding: 10px 0; box-sizing: border-box; flex-shrink: 0; background: transparent; }
.receipt-biz-1 { width: 60px; }
.receipt-biz-2 { width: 50px; }
.receipt-biz-3 { width: 80px; }
.receipt-save { display: flex; align-items: center; gap: 8px; }
.receipt-save input { width: 16px; height: 16px; margin: 0; accent-color: #03c75a; cursor: pointer; flex: none; }
.receipt-save label { font-size: 12px; color: #666; cursor: pointer; }

/* --------------------------------------------------------------------------
   Sticky bottom pay bar
   -------------------------------------------------------------------------- */
.checkout-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  z-index: 999;
}
.checkout-bottom-inner { max-width: 430px; margin: 0 auto; }
.btn-green {
  width: 100%;
  padding: 14px;
  background: #00c853;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}
.btn-green:active { filter: brightness(0.97); }

/* --------------------------------------------------------------------------
   Overlays (shipping sheet, N Pay alert, bank transfer, order confirm)
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  overscroll-behavior: contain;
}

/* Shipping bottom sheet */
.shipping-overlay { background: rgba(0, 0, 0, 0.5); z-index: 1000; align-items: flex-end; }
.shipping-sheet {
  background: #fff;
  width: 100%;
  max-width: 430px;
  border-radius: 12px 12px 0 0;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  overscroll-behavior: contain;
}
.shipping-head {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.shipping-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.sheet-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 1;
  flex: none;
}
.shipping-body { padding: 20px; }
.sheet-field { margin-bottom: 24px; }
.sheet-field > label { display: block; font-size: 12px; color: #999; margin-bottom: 8px; font-weight: 600; }
.sheet-field input {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  box-sizing: border-box;
  font-size: 14px;
  background: transparent;
  color: #333;
  outline: none;
  border-radius: 0;
}
.sheet-field input { line-height: 16px; }
.sheet-field input::placeholder { color: #b4b4b4; }
.sheet-field input:focus { border-bottom-color: #00c73c; }
.sheet-field input[aria-invalid="true"] { border-bottom-color: #ff3b30; }
.add-contact-wrap { margin-top: 12px; }
.add-contact { background: none; border: none; color: #0066ff; cursor: pointer; font-size: 13px; font-weight: 500; padding: 0; line-height: normal; }
.extra-contact { margin: 16px 0 0; }
.extra-contact > label { display: flex; justify-content: space-between; align-items: center; }
.remove-contact { border: 0; background: none; color: #777; font-size: 12px; padding: 0; line-height: normal; }
.delivery-labels { display: flex; gap: 8px; flex-wrap: wrap; }
.delivery-labels button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: normal;
  transition: none;
}
.delivery-labels button[aria-pressed="true"] { border: 1px solid #333; background: #333; color: #fff; font-weight: 600; }
.shipping-submit {
  width: 100%;
  padding: 16px;
  background: #00c73c;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.address-input { margin-bottom: 12px; }

/* N Pay unavailable alert */
.alert-overlay { background: rgba(0, 0, 0, 0.7); }
.alert-win {
  background: #fff;
  border-radius: 12px;
  width: 85%;
  max-width: 360px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.alert-head { padding: 24px 20px; text-align: center; font-size: 18px; font-weight: 700; color: #333; border-bottom: none; line-height: 1.6; }
.alert-content { padding: 28px 20px; font-size: 14px; color: #666; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
.btn-list { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid #e0e0e0; }
.btn-list li { flex: 1; }
.btn-alert { width: 100%; padding: 16px; background: #00c853; color: #fff; border: none; cursor: pointer; font-size: 16px; font-weight: 700; line-height: 1.2; }

/* Bank transfer */
.bank-overlay { background: rgba(0, 0, 0, 0.5); }
.order-bank-info {
  position: relative;
  background: #fff;
  border-radius: 0;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.bank-head { padding: 18px 20px; background: #f8f8f8; display: flex; justify-content: space-between; align-items: center; }
.bank-head h1 { margin: 0; font-size: 17px; font-weight: 700; color: #333; }
.bank-close { cursor: pointer; line-height: 0; background: none; border: 0; padding: 0; display: inline-flex; flex: none; }
.bank-body { padding: 20px; background: #fff; }
.bank-table { width: 100%; border-collapse: collapse; }
.bank-table td { padding: 12px 0; vertical-align: middle; }
.bank-table td.bank-label-cell { text-align: right; font-size: 14px; color: #666; width: 80px; padding: 12px 0; }
.bank-table td.bank-value-cell { padding: 12px 0 12px 16px; }
.bank-value-row { display: flex; align-items: center; gap: 12px; }
.bank-value { flex: 1; min-width: 0; padding: 0; border: none; font-size: 16px; font-weight: 600; color: #333; background: transparent; outline: none; text-overflow: ellipsis; }
.copy-btn {
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  flex: none;
  line-height: normal;
}
.copy-btn.copied { background: #16a34a; border-color: #16a34a; color: #fff; }
.bank-holder-row td { border-top: 1px solid #f0f0f0; }
.bank-depositor-row td { border-top: 1px solid #f0f0f0; padding: 16px 0 4px; }
.depositor-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.depositor-label > span:first-child { font-size: 14px; color: #111; font-weight: 700; }
.required-badge { font-size: 11px; font-weight: 700; color: #fff; background: #ff3b30; border-radius: 4px; padding: 2px 6px; line-height: 1.4; }
.depositor-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 2px solid #00c73c;
  border-radius: 8px;
  font-size: 16px;
  color: #111;
  box-sizing: border-box;
  background: #f3fff6;
  outline: none;
}
.depositor-input::placeholder { color: #3d6b4f; opacity: 1; }
.depositor-input:focus { outline: none; border-color: #00c73c; background: #f3fff6; box-shadow: 0 0 0 3px rgba(0, 199, 60, 0.18); }
.depositor-input.is-invalid { border-color: #ff3b30; background: #fff5f5; }
.depositor-hint { margin: 8px 0 0; font-size: 12px; color: #e03131; font-weight: 600; line-height: 1.5; }
.transfer-note {
  margin-top: 20px;
  padding: 12px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f8f5;
  border-radius: 4px;
  font-size: 12px;
  color: #687568;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}
.transfer-note-message, .transfer-note-extra { margin: 0; white-space: pre-wrap; }
.transfer-note-extra { margin-top: 6px; }
.bank-footer { padding: 16px 20px; background: #fafafa; border-top: 1px solid #e0e0e0; }
.bank-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bank-total span { font-size: 14px; color: #666; }
.bank-total strong { font-weight: 700; font-size: 20px; color: #000; }
.btn-bank-pay {
  width: 100%;
  height: 48px;
  font-size: 16px;
  padding: 0;
  background: #00c73c;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
}

/* Order confirm */
.confirm-overlay { background: rgba(0, 0, 0, 0.7); z-index: 10000; }
.order-confirm { background: #fff; width: 90%; max-width: 360px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
.confirm-head { padding: 20px 20px 16px; text-align: center; border-bottom: 1px solid #f0f0f0; }
.confirm-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: #333; }
.confirm-body { padding: 24px 20px; text-align: center; }
.confirm-body p { margin: 0 0 16px; font-size: 14px; color: #333; line-height: 1.6; }
.confirm-actions { padding: 0 20px 20px; }
.btn-confirm-ok {
  width: 100%;
  padding: 14px;
  background: #00c853;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

/* Copy toast */
.checkout-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  background: rgba(34, 34, 34, 0.9);
  color: #fff;
  z-index: 100000;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 13px;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Naver Financial footer
   -------------------------------------------------------------------------- */
.naver-footer { background-color: #f5f5f5; padding: 40px 20px; font-size: 13px; color: #666; line-height: 1.6; }
.naver-footer-inner { max-width: 430px; margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; font-size: 12px; }
.footer-links a { color: #666; text-decoration: none; font-weight: 500; }
.footer-links a strong { font-weight: 700; }
.footer-logo { margin-bottom: 20px; }
.naver-financial-logo { display: block; vertical-align: top; opacity: 0.5; width: 80px; height: auto; }
.footer-disclaimer { font-size: 12px; color: #999; margin-bottom: 20px; line-height: 1.6; }
.corp-info-wrap { border-top: 1px solid #e0e0e0; padding-top: 20px; }
.corp-toggle { display: block; cursor: pointer; font-weight: 500; color: #666; padding: 10px 0; user-select: none; font-size: 13px; }
.corp-toggle span { float: right; font-size: 12px; }
.corp-info { margin-top: 15px; font-size: 12px; color: #999; }
.corp-info > div { margin-bottom: 12px; }
.corp-info strong { display: block; color: #666; margin-bottom: 4px; }
.corp-link { color: #0066ff; }

/* ==========================================================================
   Receipt / order status page (templates/order.html)
   ========================================================================== */
.order-page { padding-bottom: 0; }

.order-complete { padding: 32px 20px; text-align: center; border-bottom: 8px solid #f5f5f5; }
.order-complete .order-check {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f9ef;
  color: #00b943;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  font-size: 29px;
}
.order-complete h1 { font-size: 22px; line-height: 1.4; margin-bottom: 8px; color: #333; }
.order-complete p { font-size: 12px; color: #999; margin: 4px 0; overflow-wrap: anywhere; }

.receipt-section { padding: 20px 16px; border-bottom: 8px solid #f5f5f5; background: #fff; }
.receipt-section h2 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: #333; }
.receipt-state { color: #00b943; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.receipt-rows .price-row { margin-bottom: 7px; }
.receipt-rows .price-row > span:last-child { font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.receipt-rows .price-row > span:first-child { flex: none; color: #888; }
.receipt-rows .price-total { border-top: 1px solid #eee; margin-top: 10px; padding-top: 14px; font-size: 16px; }
.receipt-note { font-size: 12px; line-height: 1.7; color: #777; background: #f7f7f7; padding: 14px; margin-top: 16px; border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.receipt-extra { margin-top: 8px; }
.receipt-product { display: flex; gap: 12px; margin-bottom: 18px; }
.receipt-product > img,
.receipt-product > .order-product-placeholder { width: 70px; height: 70px; border-radius: 4px; flex-shrink: 0; object-fit: cover; background: #f0f0f0; }
.receipt-product-info { flex: 1; min-width: 0; }
.receipt-product-title { font-size: 13px; font-weight: 500; color: #333; margin-bottom: 6px; overflow-wrap: anywhere; }
.receipt-product-qty { font-size: 12px; color: #999; }
.receipt-product-link { display: inline-block; margin-top: 8px; font-size: 12px; color: #0066ff; }
.receipt-refund label { display: block; margin-top: 14px; font-size: 13px; }
.receipt-refund input,
.receipt-refund textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  outline: none;
}
.receipt-refund textarea { resize: vertical; }
.checkout-page .receipt-refund-button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #555;
  font-size: 14px;
  font-weight: 700;
}
.receipt-home {
  display: block;
  text-align: center;
  margin: 20px 16px 28px;
  border: 1px solid #ddd;
  padding: 13px;
  border-radius: 6px;
  font-size: 14px;
  color: #555;
  background: #fff;
}
.receipt-actions { padding: 0 0 24px; }

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .payment-header { padding: 0 12px; }
  .btn-close { font-size: 22px; }
  .receipt-part { width: 96px; }
  .virtual-phone { padding: 8px 12px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Receipt sections reuse the checkout price rows without extra surfaces. */
.receipt-section .price-section { padding: 0; border-bottom: 0; background: transparent; }
.receipt-prices { margin-top: 4px; }
.receipt-section .receipt-rows { font-size: 13px; }
.receipt-rows .copy-btn { margin-left: 6px; }
.overlay .alert-win:focus,
.overlay .shipping-sheet:focus,
.overlay .order-bank-info:focus,
.overlay .order-confirm:focus { outline: none; }
.delivery-labels + .optional,
.sheet-field label .optional { color: #ccc; font-weight: 400; }

/* ==========================================================================
   Order completion page (target's /order/complete.php surface)
   ========================================================================== */
.order-page { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.order-result { width: 100%; max-width: 425px; margin: 0 auto; }
.order-result-head { padding: 16px 16px 0; }
.order-pay-inline {
  display: inline-block;
  border: 0;
  border-radius: 4px;
  background: #00c73c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding: 11px 18px;
  cursor: pointer;
}
.order-result-number { margin: 20px 0 0; font-size: 15px; line-height: 1.5; color: #333; font-weight: 500; }
.order-result-date { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: #888; }
.order-summary-card {
  margin: 18px 16px 0;
  padding: 18px 16px;
  border-radius: 8px;
  background: #f7f7f7;
}
.order-summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; font-size: 14px; line-height: 1.6; color: #666; padding: 4px 0; }
.order-summary-row > span:last-child, .order-summary-row > strong { color: #333; font-weight: 500; text-align: right; white-space: nowrap; }
.order-summary-row.total { margin-top: 6px; font-size: 17px; font-weight: 700; color: #333; }
.order-summary-row.total > strong { color: #00c73c; font-weight: 700; }
.order-summary-divider { height: 1px; background: #e5e5e5; margin: 12px 0; }
.order-summary-bank .order-summary-row { font-size: 13px; padding: 3px 0; }
.order-summary-bank .order-summary-row > span:first-child { color: #888; }
.order-info-section { padding: 20px 16px; border-bottom: 8px solid #f5f5f5; background: #fff; }
.order-info-section h2 { font-size: 15px; line-height: 1.5; font-weight: 700; color: #333; margin: 0 0 14px; }
.order-page .receipt-product { margin-bottom: 0; }
.order-page .receipt-actions { margin: 0 16px; }
.order-pay-overlay { background: rgba(0, 0, 0, 0.7); padding: 24px; }
.order-pay-overlay[hidden] { display: none; }
.order-pay-dialog { width: 100%; max-width: 330px; text-align: center; }
.order-pay-dialog h2 { margin: 0; padding: 22px 20px 0; font-size: 18px; line-height: 1.5; font-weight: 700; color: #333; }
.order-pay-account { margin: 16px 20px 0; font-size: 14px; line-height: 1.6; font-weight: 600; color: #333; word-break: keep-all; overflow-wrap: anywhere; }
.order-pay-copy { margin: 10px 20px 22px; }
.order-pay-message, .order-pay-extra { margin: 0; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-pay-message { color: #444; }
.order-pay-extra { margin-top: 8px; font-weight: 600; color: #e02020; }
.order-pay-confirm {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  height: 52px;
  border: 0;
  border-radius: 8px;
  background: #00c53c;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.order-pay-bar { z-index: 1000; }
@media (min-width: 1152px) {
  .order-page .checkout-bottom-bar { background: transparent; border-top: 0; }
  .order-page .checkout-bottom-inner { max-width: 425px; }
}

/* Compact completion page: order summary + product only (target surface). */
.order-product-card { display: flex; gap: 14px; padding: 14px; border-radius: 8px; background: #f7f7f7; align-items: flex-start; }
.order-product-thumb { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; flex: none; background: #eee; }
.order-product-info { flex: 1; min-width: 0; }
.order-product-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.order-product-title { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 500; color: #333; overflow-wrap: anywhere; }
.order-product-price { flex: none; font-size: 15px; line-height: 1.5; font-weight: 700; color: #333; white-space: nowrap; }
.order-product-qty { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: #888; }
a.order-done-link { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }

/* Completion page: the 주문완료 button sits in the document flow, immediately
   after the product card (target's completion page), not fixed to the viewport. */
.order-page { padding-bottom: 0; }
.order-page .order-pay-bar { position: static; padding: 16px; background: #fff; border-top: 0; }
.order-page .order-pay-bar .checkout-bottom-inner { max-width: 425px; margin: 0 auto; }
.order-page .order-done-link { height: 56px; font-size: 16px; border-radius: 8px; }
.order-page { background: #fff; }

/* 주문완료 popup (target completion page) */
.order-complete-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.42); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 24px; }
.order-complete-overlay[hidden] { display: none; }
.order-complete-dialog { background: #fff; border-radius: 14px; padding: 28px 28px 20px; max-width: 350px; min-width: 260px; width: 100%; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); text-align: center; }
.order-complete-dialog:focus { outline: none; }
.order-complete-dialog h2 { font-size: 19px; line-height: 1.4; margin: 0 0 16px; text-align: center; color: #222; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; font-weight: 700; }
.order-complete-bank { text-align: center; color: #444; font-size: 15px; line-height: 1.6; margin: 0 0 14px; word-break: keep-all; overflow-wrap: anywhere; }
.order-complete-copy { margin: 0 0 24px; }
.order-complete-message, .order-complete-extra { margin: 0; color: #444; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-complete-extra { margin-top: 8px; color: #777; font-size: 13px; }
.order-complete-confirm { width: 100%; background: #00c73c; color: #fff; border: none; border-radius: 8px; padding: 12px 0; font-size: 16px; font-weight: 700; cursor: pointer; }
