#page-dialog:has(.sd-page) {
  width: min(100%, 480px); max-height: 90dvh; background: #131217; padding: 0;
  color: #faf9fc; border-color: #38353f;
}
.sd-page { --sd-line: #38353f; --sd-muted: #b1aeb9; --sd-tone: #8fc5fb; isolation: isolate; }
.sd-page:is([data-stage="pending"],[data-stage="processing"],[data-stage="simulated"],[data-stage="issue"]) { --sd-tone: #eac475; }
.sd-page[data-stage="delivered"] { --sd-tone: #8fce9b; }
.sd-page[data-stage="denied"] { --sd-tone: #f394a0; }
.sd-page .close-layer { top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; }
.sd-page .sd-header { position: relative; display: flex; isolation: isolate; align-items: center; overflow: hidden; gap: 16px; padding: 32px 48px 16px 20px; }
.sd-header .sd-photo { width: 64px; flex: none; aspect-ratio: 175/260; object-fit: contain; }
.sd-header .sd-glow { position: absolute; z-index: -1; inset: -40px 0 auto; width: 100%; height: 128px; object-fit: cover; filter: blur(40px); opacity: .2; pointer-events: none; }
.sd-header > div { min-width: 0; }
.sd-header h2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
.sd-header h1 { margin: 4px 0 0; font-size: 13px; font-weight: 550; color: var(--sd-muted); line-height: 1.4; }
.sd-content { display: grid; gap: 14px; padding: 0 20px max(20px,env(safe-area-inset-bottom)); }
.sd-box { min-width: 0; padding: 16px; margin: 0; background: #201e25; border: 1px solid var(--sd-line); border-radius: 18px; }
.sd-box h2 { font-size: 16px; line-height: 1.35; margin: 0 0 10px; }
.sd-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-color: color-mix(in srgb,var(--sd-tone) 37%,var(--sd-line)); background: color-mix(in srgb,var(--sd-tone) 7%,#19181d); }
.sd-status-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font: 20px/1 'Checkout Icons'; color: var(--sd-tone); background: color-mix(in srgb,var(--sd-tone) 14%,transparent); }
.sd-status-copy { flex: 1; min-width: 0; }
.sd-status-copy h2 { color: var(--sd-tone); margin: 0; }
.sd-status-copy p, .sd-timeline p { font-size: 14px; }
.sd-status-copy small, .sd-timeline .sd-event-meta { display: block; color: var(--sd-muted); font-size: 11px; margin-block: 2px; }
.sd-eta { flex-basis: 100%; border-top: 1px solid var(--sd-line); padding-top: 10px; font-size: 13px; }
.sd-progress { display: flex; list-style: none; }
.sd-progress li { position: relative; flex: 1; text-align: center; color: #9c99a4; font-size: 11px; }
.sd-progress li::before { content: ''; display: block; width: 10px; height: 10px; position: relative; z-index: 1; margin: 0 auto 6px; box-sizing: border-box; border-radius: 50%; border: 2px solid #45434d; background: #201e25; }
.sd-progress li + li::after { content: ''; position: absolute; top: 4px; left: -50%; right: 50%; height: 2px; background: #45434d; }
.sd-progress li.reached { color: #eeeaf4; }
.sd-progress li.reached::before, .sd-progress li.reached::after { border-color: #7a45fd; background: #7a45fd; }
.sd-progress small { display: block; font-size: 10px; color: var(--sd-muted); }
.sd-track-button { text-align: center; background: #f7f6f9; color: #17151b; font-size: 14px; font-weight: 750; border-radius: 999px; padding: 12px; }
.sd-facts { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 9px 12px; align-items: baseline; font-size: 13px; }
.sd-facts dt { color: var(--sd-muted); }
.sd-facts dd { text-align: right; overflow-wrap: anywhere; font-weight: 650; }
.sd-copy { background: transparent; border: 0; color: var(--sd-muted); padding: 6px; font: 15px/1 'Checkout Icons'; }
.sd-copy-status:not(:empty) { display: block; font-size: 12px; }
.sd-timeline { list-style: none; padding: 0; margin: 0; }
.sd-timeline li { position: relative; margin-left: 4px; padding: 0 0 19px 19px; border-left: 2px solid #504461; font-size: 14px; }
.sd-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.sd-timeline li::before { content: ''; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #5a5478; }
.sd-timeline li:first-child::before { background: #7a45fd; }
.sd-address-lines { white-space: pre-line; font-size: 14px; }
.sd-hint, .sd-note, .sd-reference { color: var(--sd-muted); font-size: 12px; line-height: 1.5; margin: 6px 0 0; }
.sd-link { display: inline-flex; padding-block: 6px; color: #c4a9ff; font-weight: 700; font-size: 14px; }
.sd-page .related { display: flex; flex-wrap: wrap; gap: 7px 15px; margin: 0; }
.sd-page .related-link { border: 0; padding: 4px 0; min-height: 0; color: #c3bfcc; background: none; font-size: 12px; }
.sd-page .related-link::after { display: none; }
.sd-empty { display: grid; gap: 12px; justify-items: center; padding: 44px 20px 20px; text-align: center; }
.sd-empty h1 { font-size: 21px; }
.sd-empty p { font-size: 14px; color: var(--sd-muted); }
.sd-empty + .related, .sd-empty ~ .sd-note { margin: 0 20px 16px; }
