.checkout-dialog { position:fixed; inset:0; width:min(620px,calc(100% - 32px)); max-width:none; max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); margin:auto; padding:0; border:1px solid var(--cherry-line); border-radius:28px; background:var(--cherry-canvas); color:var(--cherry-ink); box-shadow:0 24px 70px -42px rgb(var(--cherry-heading-rgb)/.55); }
.checkout-dialog[open] { display:flex; flex-direction:column; overflow:hidden; animation:checkout-enter .18s ease-out; }
.checkout-dialog::backdrop { background:rgb(0 0 0/.5); animation:checkout-backdrop .18s ease-out; }
.checkout-dialog__header { display:flex; align-items:flex-start; justify-content:space-between; flex-shrink:0; gap:16px; padding:24px 24px 20px; border-bottom:1px solid var(--cherry-line); }
.checkout-dialog h2 { margin:0; color:var(--cherry-heading); font-size:28px; font-weight:700; line-height:1.2; letter-spacing:-.03em; }
.checkout-dialog__header p { margin:8px 0 0; color:var(--cherry-text); font-size:14px; line-height:24px; }
.checkout-close { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:32px; height:32px; padding:0; border:0; border-radius:50%; color:var(--cherry-subtle); background:transparent; cursor:pointer; }
.checkout-close:hover { color:var(--cherry-text); background:var(--cherry-surface-alt); }
.checkout-form { display:flex; flex-direction:column; min-height:0; gap:20px; margin:0; padding:24px; overflow-y:auto; overscroll-behavior:contain; }
.checkout-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.checkout-field { display:grid; align-content:start; gap:8px; min-width:0; }
.checkout-field--wide { grid-column:1/-1; }
.checkout-field label,.checkout-methods legend { color:var(--cherry-strong); font-size:13px; font-weight:600; line-height:20px; }
.checkout-field input { width:100%; min-width:0; min-height:48px; padding:12px 16px; border:1px solid var(--cherry-line); border-radius:16px; background:var(--cherry-canvas); color:var(--cherry-ink); font:inherit; font-size:15px; line-height:22px; outline:none; transition:border-color .15s,box-shadow .15s; }
.checkout-field input::placeholder { color:var(--cherry-subtle); }
.checkout-field input:focus { border-color:var(--cherry-accent); box-shadow:0 0 0 2px var(--cherry-rose-soft); }
.checkout-field input[aria-invalid=true] { border-color:var(--cherry-primary); }
.checkout-methods { min-width:0; margin:0; padding:0; border:0; }
.checkout-methods legend { margin:0 0 10px; font-size:14px; }
.checkout-methods__grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.checkout-method { position:relative; display:block; min-width:0; cursor:pointer; }
.checkout-method>input { position:absolute; width:1px; height:1px; margin:0; opacity:0; }
.checkout-method__card { display:flex; align-items:center; justify-content:center; width:100%; height:64px; padding:8px; border:1px solid var(--cherry-line); border-radius:16px; background:var(--cherry-canvas); transition:border-color .15s,background-color .15s; }
.checkout-method:hover>input:not(:disabled) + .checkout-method__card { border-color:var(--cherry-border-strong); }
.checkout-method>input:checked + .checkout-method__card { border:2px solid var(--cherry-primary); background:var(--cherry-selected); }
.checkout-method>input:focus-visible + .checkout-method__card { outline:2px solid var(--cherry-primary); outline-offset:3px; }
.checkout-method>input:disabled + .checkout-method__card { opacity:.4; cursor:not-allowed; }
.checkout-method__mark { display:flex; align-items:center; justify-content:center; width:100%; height:40px; overflow:hidden; }
.checkout-method__mark img { display:block; max-width:100%; flex-shrink:0; object-fit:contain; }
.checkout-visa { width:72px; height:28px; }
.checkout-mastercard { width:54px; height:34px; }
.checkout-method__mark .checkout-unionpay { width:116px; max-width:none; height:88px; }
.checkout-promo { display:grid; gap:12px; }
.checkout-promo__toggle { justify-self:start; padding:0; border:0; background:transparent; color:var(--cherry-link); font:inherit; font-size:13px; font-weight:600; line-height:20px; text-align:left; cursor:pointer; }
.checkout-promo__toggle:hover { color:var(--cherry-primary-hover); }
.checkout-promo__toggle:disabled { opacity:.65; cursor:wait; }
.checkout-consent__row { display:flex; align-items:flex-start; gap:10px; }
.checkout-consent input { width:20px; height:20px; flex-shrink:0; margin:2px 0 0; accent-color:var(--cherry-primary); cursor:pointer; }
.checkout-dialog #checkout-consent-copy { display:block; margin:0; color:var(--cherry-text); font-size:13px; font-weight:400; line-height:21px; transform:none; overflow-wrap:anywhere; cursor:pointer; }
.checkout-consent a { color:var(--cherry-link); text-decoration:underline; text-underline-offset:2px; }
.checkout-consent a:hover { color:var(--cherry-primary-hover); }
.checkout-error { margin:0; color:var(--cherry-primary); font-size:13px; font-weight:400; line-height:20px; }
.checkout-methods>.checkout-error,.checkout-consent>.checkout-error { margin-top:8px; }
.checkout-actions { display:grid; gap:8px; }
.checkout-submit { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:50px; padding:12px 18px; border:0; border-radius:999px; background:var(--cherry-primary); color:white; font:inherit; font-size:15px; font-weight:700; line-height:22px; text-align:center; cursor:pointer; box-shadow:0 8px 18px -8px rgb(var(--cherry-accent-rgb)/.55); transition:background-color .15s,opacity .15s; }
.checkout-submit:hover { background:var(--cherry-primary-hover); }
.checkout-submit:active { background:var(--cherry-primary-active); }
.checkout-submit:disabled { opacity:.65; cursor:wait; }
.checkout-spinner { display:none; flex-shrink:0; }
.checkout-submit[aria-busy=true] .checkout-spinner { display:block; animation:checkout-spin .8s linear infinite; }
.checkout-dialog button:focus-visible,.checkout-consent input:focus-visible,.checkout-consent a:focus-visible { outline:2px solid var(--cherry-primary); outline-offset:3px; }
.checkout-dialog [hidden] { display:none!important; }
body.checkout-open { overflow:hidden; }
@keyframes checkout-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes checkout-backdrop { from { background:rgb(0 0 0/0); } to { background:rgb(0 0 0/.5); } }
@keyframes checkout-spin { to { transform:rotate(360deg); } }
@media (max-width:479px) {
 .checkout-dialog { width:calc(100% - 24px); max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); border-radius:24px; }
 .checkout-dialog__header { gap:10px; padding:20px; }
 .checkout-dialog h2 { font-size:24px; line-height:29px; }
 .checkout-form { gap:18px; padding:20px; }
 .checkout-fields { grid-template-columns:minmax(0,1fr); gap:14px; }
 .checkout-methods__grid { gap:8px; }
}
@media (prefers-reduced-motion:reduce) {
 .checkout-dialog[open],.checkout-dialog::backdrop { animation:none; }
}
