.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #17251dcc;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 14px;
    border: 0;
    background: transparent;
    font-size: 32px;
    cursor: pointer;
    color: var(--muted);
}

.floating-profile-switch {
    position: fixed;
    z-index: 110;
    left: 50%;
    bottom: 7vh;
    transform: translateX(-50%);
    box-shadow: 0 8px 24px #0003;
    white-space: nowrap;
}

@media(max-width:520px) {
    .floating-profile-switch {
        bottom: 3vh;
        max-width: calc(100vw - 40px);
        white-space: normal;
    }
}

.confirmation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.confirmation-actions .danger-action,
.confirmation-actions .secondary-link {
    width: 100%;
    min-height: 45px;
    margin: 0;
}

.mobile-sheet-backdrop {
    padding: 20px;
    background: #17251d99;
}

.mobile-sheet {
    position: relative;
    width: min(560px,100%);
    max-height: 90dvh;
    overflow-y: auto;
    padding: 19px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px;
    background: #fffdf8;
    box-shadow: 0 -20px 60px #0004;
    animation: mobile-sheet-in .18s ease-out;
}

.mobile-sheet-handle {
    width: 42px;
    height: 4px;
    margin: -8px auto 15px;
    border-radius: 999px;
    background: #d3d1c9;
}

.mobile-sheet h2 {
    margin: 0 42px 16px 0;
    color: #183426;
    font: 800 27px "Playfair Display",serif;
}

.mobile-sheet>.primary {
    width: 100%;
    margin-top: 15px;
}

.mobile-sheet .modal-close {
    right: 13px;
    top: 16px;
}

.modal-close {
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
}

.mobile-sheet:focus,
.modal-backdrop>[role="dialog"]:focus {
    outline: none;
}

.mobile-sheet :focus-visible {
    outline: 3px solid #267454;
    outline-offset: 3px;
}

@media(max-width:850px) {
    .mobile-sheet-backdrop {
        align-items: end;
        padding: 0;
    }

    .mobile-sheet {
        max-height: 88dvh;
        border-radius: 22px 22px 0 0;
    }

    .mobile-sheet .eyebrow {
        font-size: 13px;
    }

    .mobile-sheet select,
    .mobile-sheet input {
        font-size: 16px;
        min-height: 44px;
    }
}

@media(prefers-reduced-motion:reduce) {
    .mobile-sheet {
        animation: none;
    }
}
