.sg-payment-backdrop {
    box-sizing: border-box;
    position: fixed; inset: 0; z-index: 100010; display: grid; place-items: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: rgba(34, 60, 52, .38); backdrop-filter: blur(18px) saturate(.85); -webkit-backdrop-filter: blur(18px) saturate(.85);
    overscroll-behavior: contain;
}
.sg-payment-dialog {
    box-sizing: border-box; width: min(480px, 100%); min-width: 0; max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: flex; flex-direction: column; overflow: hidden; position: relative;
    border: 1px solid #ffffffd9; border-radius: 22px; color: #29473b;
    background: #f6fcf5ed; box-shadow: 0 28px 90px #193b3938, inset 0 1px 0 #fff;
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); text-align: left;
}
.sg-payment-dialog * { letter-spacing: 0; box-sizing: border-box; }
.sg-payment-head { position: relative; flex-shrink: 0; padding: 28px 28px 16px; }
.sg-payment-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border: 1px solid #c2dccb; border-radius: 12px; color: #34775b; background: #e2f0e7; }
.sg-payment-icon.is-warning { color: #ac6544; background: #f5e8d8; border-color: #e3ceb4; }
.sg-payment-icon svg { width: 24px; height: 24px; }
.sg-payment-close { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; display: grid; place-items: center; color: #6e8278; border: 0; border-radius: 50%; background: transparent; }
.sg-payment-close svg { width: 22px; height: 22px; }
.sg-payment-close:hover { background: #dceadd; }
.sg-payment-close:focus { outline: none; }
.sg-payment-close:focus-visible { outline: 2px solid #397057; outline-offset: -4px; background: #e2f0e7; }
.sg-payment-kicker { color: #688675; font-size: 12px; font-weight: 650; }
.sg-payment-head h2 { margin: 8px 0 10px; font-size: 23px; line-height: 1.4; font-weight: 750; overflow-wrap: anywhere; }
.sg-payment-head p { margin: 0; color: #657b6d; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.sg-payment-body { min-height: 0; overflow-y: auto; padding: 0 28px 20px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sg-payment-details { margin: 0; }
.sg-payment-details > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid #cadbc99c; font-size: 14px; }
.sg-payment-details dt { color: #748176; }
.sg-payment-details dd { min-width: 0; margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; font-weight: 650; }
.sg-payment-details strong { font-size: 21px; font-weight: 750; color: #326d53; }
.sg-payment-details dd > span { font-size: 12px; font-weight: 500; color: #758379; }
.sg-payment-details .sg-payment-shortage strong { color: #b57346; }
.sg-payment-details .sg-payment-order { font-size: 12px; font-weight: 500; }
.sg-payment-note { margin: 16px 0 0; color: #788376; font-size: 12px; line-height: 1.6; }
.sg-payment-remember { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 6px; width: fit-content; font-size: 13px; color: #5b7463; cursor: pointer; }
.sg-payment-remember input { width: 18px; height: 18px; margin: 0; accent-color: #397057; }
.sg-payment-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; flex-shrink: 0; padding: 18px 28px 24px; border-top: 1px solid #d4e0d2; background: #e9f1e7c4; }
.sg-payment-actions form { margin: 0; min-width: 0; }
.sg-payment-primary, .sg-payment-secondary { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 700; text-decoration: none; text-align: center; line-height: 1.5; touch-action: manipulation; }
.sg-payment-primary { border: 1px solid #32634c; background: #3a7056; color: #fff; box-shadow: 0 3px 0 #28543d, inset 0 1px 0 #ffffff26; }
.sg-payment-secondary { border: 1px solid #c7d7c5; color: #61755f; background: #f8fcf4bd; }
.sg-payment-primary svg { width: 18px; height: 18px; flex-shrink: 0; }
.sg-payment-primary:active, .sg-payment-secondary:active { transform: translateY(2px); }
.sg-payment-primary:disabled { opacity: .55; }
.sg-payment-primary:focus-visible, .sg-payment-secondary:focus-visible { outline: 2px solid #397057; outline-offset: 3px; }
.sg-confirm-reset, .sg-payment-resume { padding: 8px 4px; min-height: 44px; border: 0; color: #4c7561; background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.sg-payment-enter { transition: opacity .25s ease, transform .32s cubic-bezier(.2, 1.15, .3, 1); }
.sg-payment-leave { transition: opacity .16s ease, transform .16s ease; }
.sg-payment-hidden { opacity: 0; transform: translateY(18px) scale(.97); }
.sg-payment-visible { opacity: 1; transform: translateY(0) scale(1); }
@media (max-width: 600px) {
    .sg-payment-backdrop { padding-inline: 14px; }
    .sg-payment-dialog { border-radius: 18px; }
    .sg-payment-head { padding: 22px 20px 12px; }
    .sg-payment-head h2 { font-size: 21px; }
    .sg-payment-body { padding: 0 20px 14px; }
    .sg-payment-actions { padding: 16px 20px 20px; gap: 10px; }
    .sg-payment-details > div { padding: 13px 0; }
}
@media (max-height: 620px) {
    .sg-payment-head { padding-top: 16px; }
    .sg-payment-icon { width: 34px; height: 34px; margin-bottom: 8px; }
    .sg-payment-head h2 { font-size: 20px; margin: 5px 0; }
    .sg-payment-actions { padding-top: 12px; padding-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .sg-payment-enter, .sg-payment-leave { transition: none !important; }
}
