/* Checkout inherits the approved layout width, Pretendard and shared role tokens. */
.rm-checkout { padding: 12px 0 32px; color: var(--rm-home-text); font-size: var(--rm-type-body); }
.rm-checkout [hidden] { display: none !important; }
.rm-checkout-heading { margin-bottom: 28px; }
.rm-checkout h1 { font-size: var(--rm-type-page-title); font-weight: 800; }
.rm-checkout h2 { font-size: var(--rm-type-section-title); font-weight: 800; line-height: 1.4; }
.rm-checkout-heading p { margin-top: 8px; color: var(--rm-home-text-secondary); }
.rm-checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 24px; align-items: start; }
.rm-checkout-fields { display: grid; gap: 20px; min-width: 0; border: 0; padding: 0; }
.rm-checkout-section, .rm-checkout-summary { min-width: 0; padding: 28px; border: 1px solid var(--rm-home-border-defined); border-radius: var(--rm-home-radius); background: var(--rm-home-surface); }
.rm-checkout-section-head, .rm-checkout-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rm-checkout-section-head > span { color: var(--rm-home-text-tertiary); font-size: var(--rm-type-support); }
.rm-checkout-product { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--rm-home-border-defined); }
.rm-checkout-product:last-child { padding-bottom: 0; border-bottom: 0; }
.rm-checkout-product img { width: 40px; height: 30px; object-fit: contain; }
.rm-checkout-product-copy { grid-column: 2; min-width: 0; }
.rm-checkout-product h3 { font-size: var(--rm-type-card-title); font-weight: 700; overflow-wrap: anywhere; }
.rm-checkout-product p { margin-top: 6px; color: var(--rm-home-text-secondary); line-height: 1.6; overflow-wrap: anywhere; }
.rm-checkout-product-price { grid-column: 3; text-align: right; white-space: nowrap; }
.rm-checkout-product-price strong { display: block; font-size: var(--rm-type-card-title); }
.rm-checkout-product-price span { color: var(--rm-home-text-tertiary); font-size: var(--rm-type-support); }
.rm-checkout-label { display: block; margin: 22px 0 9px; font-weight: 700; }
.rm-checkout-available { color: var(--rm-home-primary-strong); font-size: var(--rm-type-support); }
.rm-checkout-input-row { display: flex; align-items: stretch; gap: 8px; }
.rm-checkout-input { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid var(--rm-home-border-defined); border-radius: 10px; background: var(--rm-home-surface); }
.rm-checkout-input:read-only { background: var(--rm-home-page); color: var(--rm-home-text-secondary); }
.rm-checkout-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; flex-shrink: 0; padding: 10px 16px; border: 1px solid var(--rm-home-border-defined); border-radius: 10px; color: var(--rm-home-primary-strong); background: var(--rm-home-surface); font-weight: 700; }
.rm-checkout-button:hover, .rm-checkout-coupon-trigger:hover { background: var(--rm-home-primary-soft); border-color: var(--rm-home-primary); }
.rm-checkout-help { margin-top: 10px; color: var(--rm-home-text-secondary); font-size: var(--rm-type-support); line-height: 1.65; overflow-wrap: anywhere; }
.rm-checkout-save { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; }
.rm-checkout input:is([type=checkbox],[type=radio]) { appearance: auto; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--rm-home-primary); }
.rm-checkout-coupon-trigger { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 14px; text-align: left; border: 1px solid var(--rm-home-border-defined); border-radius: 10px; background: var(--rm-home-surface); }
.rm-checkout-coupon-trigger span { overflow-wrap: anywhere; }
.rm-checkout svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rm-checkout-coupon-trigger.is-selected { color: var(--rm-home-primary-strong); background: var(--rm-home-primary-soft); border-color: var(--rm-home-primary); }
.rm-checkout-text-button { display: inline-flex; align-items: center; min-height: 44px; color: var(--rm-home-primary-strong); font-size: var(--rm-type-support); text-decoration: underline; text-underline-offset: 3px; }
.rm-checkout-point-field { margin-top: 16px; padding-top: 2px; border-top: 1px solid var(--rm-home-border-defined); }
.rm-checkout-point-input { position: relative; flex: 1; min-width: 0; }
.rm-checkout-point-input input { text-align: right; padding-right: 36px; font-variant-numeric: tabular-nums; }
.rm-checkout-point-input > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--rm-home-text-tertiary); }
.rm-checkout-point-help { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rm-checkout-point-help button { flex-shrink: 0; }
.rm-checkout-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.rm-checkout-method { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 64px; padding: 14px; border: 1px solid var(--rm-home-border-defined); border-radius: 10px; cursor: pointer; }
.rm-checkout-method:has(:checked) { border-color: var(--rm-home-primary); background: var(--rm-home-primary-soft); color: var(--rm-home-primary-strong); }
.rm-checkout-method img { width: 35px; height: 18px; object-fit: contain; }
.rm-checkout-summary { position: sticky; top: 96px; }
.rm-checkout-totals { margin-top: 24px; font-variant-numeric: tabular-nums; }
.rm-checkout-totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 14px; }
.rm-checkout-totals dt { color: var(--rm-home-text-secondary); }
.rm-checkout-totals dd { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.rm-checkout-totals [data-coupon-amount], .rm-checkout-totals [data-point-amount] { color: var(--rm-home-primary-strong); }
.rm-checkout-totals .rm-checkout-total { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--rm-home-border-defined); }
.rm-checkout-total dt { color: var(--rm-home-text); font-weight: 700; }
.rm-checkout-total dd { font-size: var(--rm-type-price); font-weight: 800; color: var(--rm-home-primary-strong); }
.rm-checkout-saving { margin-top: 16px; padding: 10px 12px; border-radius: 8px; background: var(--rm-home-primary-soft); color: var(--rm-home-primary-strong); text-align: center; font-size: var(--rm-type-support); }
.rm-checkout-paybar { margin-top: 24px; }
.rm-checkout-pay { width: 100%; min-height: 52px; padding: 14px 18px; border-radius: 12px; background: var(--rm-home-primary); color: var(--rm-home-surface); font-weight: 700; }
.rm-checkout-pay:hover { background: var(--rm-home-primary-strong); }
.rm-checkout :is(button,input):disabled { cursor: not-allowed; opacity: .55; }
.rm-checkout-mobile-total { display: none; }
.rm-checkout-error { margin-top: 10px; color: #a32e1a; line-height: 1.6; font-size: var(--rm-type-support); overflow-wrap: anywhere; }
.rm-checkout-error:empty, .rm-checkout-help:empty { display: none; }
.rm-checkout-status { margin: 16px 0; color: var(--rm-home-text-secondary); }
.rm-checkout-status.is-error { color: #a32e1a; }
.rm-checkout-dialog { width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--rm-home-border-defined); border-radius: 18px; color: var(--rm-home-text); background: var(--rm-home-surface); }
.rm-checkout-dialog::backdrop { background: rgba(25,29,38,.5); }
html:has(.rm-checkout-dialog[open]) { overflow: hidden; }
.rm-checkout-dialog[open] { display: flex; flex-direction: column; }
.rm-checkout-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--rm-home-border-defined); flex-shrink: 0; }
.rm-checkout-close { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; }
.rm-checkout-close:hover { background: var(--rm-home-primary-soft); }
.rm-checkout-dialog-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 20px 24px; }
.rm-checkout-coupon-list { display: grid; gap: 12px; margin-top: 16px; }
.rm-checkout-coupon { display: grid; gap: 6px; width: 100%; padding: 18px; text-align: left; border: 1px solid var(--rm-home-border-defined); border-radius: 12px; }
.rm-checkout-coupon[aria-pressed=true] { background: var(--rm-home-primary-soft); border-color: var(--rm-home-primary); }
.rm-checkout-coupon strong { font-size: var(--rm-type-card-title); }
.rm-checkout-coupon small { color: var(--rm-home-text-secondary); font-size: var(--rm-type-support); line-height: 1.6; overflow-wrap: anywhere; }
.rm-checkout-coupon em { color: var(--rm-home-primary-strong); font-style: normal; font-weight: 700; }
.rm-checkout-coupon:disabled { opacity: 1; background: var(--rm-home-page); color: var(--rm-home-text-tertiary); }
.rm-checkout-dialog.rm-checkout-payment-dialog { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.rm-checkout-payment-dialog iframe { display: block; width: 100%; height: 100%; flex: 1; min-height: 0; border: 0; }
.rm-checkout-dialog.rm-checkout-alert { width: min(360px, calc(100% - 32px)); padding: 24px; gap: 24px; }
.rm-checkout-alert p { font-size: var(--rm-type-body); line-height: 1.7; text-align: center; overflow-wrap: anywhere; white-space: pre-line; }
.rm-checkout-alert .rm-checkout-pay { flex: none; }
.rm-checkout :is(button,input,a):focus-visible { outline: 3px solid var(--rm-home-primary); outline-offset: 3px; }
.rm-checkout-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1023px) { .rm-checkout-grid { grid-template-columns: minmax(0,1fr) 280px; gap: 16px; } .rm-checkout-section, .rm-checkout-summary { padding: 22px; } .rm-checkout-methods { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
    .rm-checkout { padding: 4px 0 116px; }
    .rm-checkout-heading { margin-bottom: 20px; }
    .rm-checkout-grid { display: block; }
    .rm-checkout-fields { gap: 16px; }
    .rm-checkout-section, .rm-checkout-summary { padding: 20px 16px; border-radius: 14px; }
    .rm-checkout-summary { position: static; margin-top: 16px; }
    .rm-checkout-product { grid-template-columns: 30px minmax(0,1fr); gap: 10px; padding-top: 18px; }
    .rm-checkout-product img { width: 30px; height: 24px; }
    .rm-checkout-product-price { grid-column: 2; display: flex; align-items: baseline; gap: 8px; text-align: left; }
    .rm-checkout-input { font-size: 16px; }
    .rm-checkout-button { padding: 10px 12px; }
    .rm-checkout-methods { grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
    .rm-checkout-method { min-height: 52px; }
    .rm-checkout-paybar { position: fixed; z-index: 45; bottom: var(--rm-bottom-nav-height, 0px); left: 0; right: 0; margin: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rm-home-border-defined); background: var(--rm-home-surface); }
    .rm-checkout-paybar-inner { display: flex; gap: 16px; align-items: center; max-width: 720px; margin: 0 auto; }
    .rm-checkout-mobile-total { display: grid; gap: 4px; flex-shrink: 0; }
    .rm-checkout-mobile-total span { color: var(--rm-home-text-secondary); font-size: var(--rm-type-support); }
    .rm-checkout-mobile-total strong { color: var(--rm-home-primary-strong); font-size: var(--rm-type-price); font-variant-numeric: tabular-nums; }
    .rm-checkout-pay { flex: 1; min-width: 0; }
    .rm-checkout-dialog { max-height: calc(100dvh - 32px); }
    .rm-checkout-dialog-head { padding: 12px 16px; }
    .rm-checkout-dialog-body { padding: 0 16px 20px; }
}
