/* Keep the shared autobiography modal UI on the bespoke color palette. */
#bespoke-package-modals {
    --story-cream: #F6CBBF;
}

#bespoke-package-modals .story-modal__dialog,
#bespoke-package-modals .story-modal__header,
#bespoke-package-modals .story-modal__header::before {
    background: var(--story-cream);
}

#bespoke-package-modals .story-modal__close {
    z-index: 10;
    top: 22px;
    right: 25px;
}

#bespoke-package-modals .story-modal__close img {
    display: block;
    width: 30px;
    height: 30px;
}

/* Final manuscript received screen */
#bespoke-package-modals .story-modal__dialog--complete {
    width: min(560px, 100%);
    height: min(730px, calc(100dvh - 28px));
}

#bespoke-package-modals .story-modal__dialog--complete .story-bespoke__content {
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

#bespoke-package-modals .story-step--manuscript-received {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 86px 48px 30px;
    text-align: center;
}

#bespoke-package-modals .story-manuscript__back {
    position: absolute;
    top: 26px;
    left: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--story-maroon);
    font: 38px/1 "Lora", serif;
}

#bespoke-package-modals .story-manuscript__help {
    position: absolute;
    top: 86px;
    right: 46px;
    min-width: 68px;
    padding: 8px 18px;
    border: 1px solid var(--story-maroon);
    border-radius: 999px;
    background: transparent;
    color: var(--story-maroon);
    font: 14px "Lora", serif;
    z-index: 5;
}

#bespoke-package-modals .story-manuscript__owl {
    position: relative;
    z-index: 9;
    display: block !important;
    width: 155px;
    height: 170px;
    object-fit: contain;
    opacity: 1 !important;
    visibility: visible !important;
    mix-blend-mode: multiply;
}

#bespoke-package-modals .story-step--manuscript-received h1 {
    position: static;
    margin: 18px 0 34px;
    background: transparent;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.3;
}

#bespoke-package-modals .story-manuscript__message {
    margin: 0;
    font-size: 17px;
    line-height: 2;
}

#bespoke-package-modals .story-manuscript__actions {
    width: 100%;
    margin-top: auto;
    justify-content: space-between;
}

#bespoke-package-modals .story-manuscript__actions .story-button {
    height: 60px;
    font-size: 16px;
}

#bespoke-package-modals .story-manuscript__home {
    width: 164px;
    border: 1px solid var(--story-maroon);
    border-radius: 999px;
    background: transparent;
    color: var(--story-maroon);
}

#bespoke-package-modals .story-manuscript__dashboard {
    width: 260px;
}

@media (max-width: 520px) {
    #bespoke-package-modals .story-step--manuscript-received {
        padding: 78px 24px 24px;
    }

    #bespoke-package-modals .story-manuscript__back {
        left: 24px;
    }

    #bespoke-package-modals .story-manuscript__help {
        top: 72px;
        right: 24px;
    }

    #bespoke-package-modals .story-manuscript__owl {
        width: 130px;
        height: 148px;
    }

    #bespoke-package-modals .story-step--manuscript-received h1 {
        margin-bottom: 24px;
        font-size: 32px;
    }

    #bespoke-package-modals .story-manuscript__message {
        font-size: 14px;
        line-height: 1.8;
    }

    #bespoke-package-modals .story-manuscript__actions {
        gap: 12px;
    }

    #bespoke-package-modals .story-manuscript__home,
    #bespoke-package-modals .story-manuscript__dashboard {
        width: auto;
        min-width: 0;
        flex: 1;
        padding: 0 14px;
        font-size: 13px;
    }
}
