body {
    padding-bottom: 112px;
}
.purchase-entry {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    z-index: 40;
    width: 280px;
    border-radius: 9999px;
    box-shadow: 0 4px 16px rgb(0 0 0 / 24%);
}
.purchase-entry .purchase-open {
    background: #ff981f;
    color: #111;
    border-radius: 9999px;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 20px 24px;
    gap: 16px;
    font-size: 16px;
    text-align: center;
    justify-content: center;
}
.purchase-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    line-height: 1.4;
}
.purchase-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.purchase-label small {
    font-size: 12px;
    font-weight: 600;
    color: #59452c;
}
.purchase-entry .purchase-open:hover {
    background: #ffad4d;
}
.purchase-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    background: #fff;
    color: #111;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.purchase-dialog::backdrop {
    background: rgb(0 0 0 / 55%);
}
.purchase-dialog[open] {
    animation: purchase-open 240ms ease-out both;
}
.purchase-dialog[open]::backdrop {
    animation: purchase-backdrop-in 240ms ease-out both;
}
.purchase-dialog[open].is-closing {
    animation: purchase-close 200ms ease-in both;
}
.purchase-dialog[open].is-closing::backdrop {
    animation: purchase-backdrop-out 200ms ease-in both;
}
@keyframes purchase-open {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes purchase-close {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(12px) scale(.98); }
}
@keyframes purchase-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes purchase-backdrop-out {
    from { opacity: 1; }
    to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .purchase-dialog[open],
    .purchase-dialog[open]::backdrop {
        animation: none !important;
    }
}
.purchase-dialog-inner {
    padding: 24px 32px 32px;
}
.purchase-close-form {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}
.purchase-close {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border: 0;
    background: transparent;
    font-size: 13px;
}
.purchase-close span {
    font-size: 24px;
}
.purchase-dialog h2 {
    margin: 0 0 20px;
    font-size: clamp(24px, 5vw, 32px);
    line-height: 1.5;
    font-weight: 700;
}
.purchase-dialog p {
    font-size: 14px;
    line-height: 1.8;
}
.purchase-slots {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}
.purchase-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #fff0d9;
    color: #111;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}
.purchase-slot:hover {
    background: #ffda9f;
}
.purchase-pending {
    padding: 20px;
    background: #f5f5f5;
}
.purchase-dialog .purchase-warning {
    margin-top: 24px;
    color: #c92323;
    font-size: 12px;
    font-weight: 700;
}
.purchase-open:focus-visible,
.purchase-close:focus-visible,
.purchase-slot:focus-visible {
    outline: 3px solid #c92323;
    outline-offset: 4px;
}
html.purchase-dialog-open {
    overflow: hidden;
}
@media (min-width: 801px) {
    body {
        padding-bottom: 136px;
    }
    .purchase-entry {
        width: 400px;
    }
    .purchase-entry .purchase-open {
        min-height: 80px;
        padding: 24px 36px;
        font-size: 20px;
    }
}
@media (max-width: 800px) {
    body {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
    .purchase-entry {
        right: calc(12px + env(safe-area-inset-right, 0px));
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        left: calc(12px + env(safe-area-inset-left, 0px));
        transform: none;
        width: auto;
    }
    .purchase-entry .purchase-open {
        justify-content: center;
        padding-right: max(24px, env(safe-area-inset-right, 0px));
        padding-left: max(24px, env(safe-area-inset-left, 0px));
    }
}
@media (max-width: 600px) {
    .purchase-dialog-inner {
        padding: 16px 20px 24px;
    }
}
