:root {
    --story-cream: #F6CBBF;
    --story-maroon: #69002b;
    --story-line: #bd8b86;
    --story-green: #234346;
}

/* Use the owl animation for the final gift-success screen. */
.story-step--gift-ready .story-checkmark {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    overflow: hidden;
    background: transparent;
}

/* Shared Prelude/Rhapsody/Symphony Terms layout.  Keep the Terms page padding
   independent from the generic bespoke-content sizing rules. */
#bespoke-package-modals .story-modal__dialog--terms .story-modal__content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 60px 20px 34px 50px;
}

#bespoke-package-modals .story-modal__dialog--terms .story-step--terms h1 {
    margin: 0 42px 50px 0;
    font-size: 44px;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 640px) {
    #bespoke-package-modals .story-modal__dialog--terms .story-modal__content {
        padding: 55px 24px 24px;
    }

    #bespoke-package-modals .story-modal__dialog--terms .story-step--terms h1 {
        margin-bottom: 32px;
        font-size: 34px;
        white-space: normal;
    }
}

.story-bespoke-specs .story-specs__section {
    margin-bottom: 42px;
}

.story-bespoke-specs .story-specs__section h3 {
    font-size: 20px;
    line-height: 1.35;
}

.story-bespoke-specs .story-specs__section h3 small {
    font-size: 13px;
}

.story-bespoke-specs .story-specs__line {
    margin-bottom: 34px;
}

.story-bespoke-specs .story-specs__line input,
.story-bespoke-specs .story-specs__line select {
    font-size: 18px;
}

.story-bespoke-specs .story-option {
    margin: 12px 0;
}

.story-bespoke-specs__sizes {
    gap: 38px;
    flex-wrap: wrap;
}

.bespoke-spec-upload {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 15px 0 14px;
    border-bottom: 1px solid var(--story-line);
    color: var(--story-maroon);
    font-size: 14px;
    cursor: pointer;
}

.bespoke-spec-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.bespoke-spec-upload i {
    margin-left: auto;
    font-size: 22px;
}

.bespoke-spec-toggles {
    display: grid;
    gap: 18px;
    margin: 18px 0 24px;
}

.bespoke-spec-toggles label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    font-size: 14px;
    cursor: pointer;
}

.bespoke-spec-toggles input {
    position: absolute;
    opacity: 0;
}

.bespoke-spec-toggles span {
    width: 42px;
    height: 25px;
    border: 1px solid var(--story-line);
    border-radius: 999px;
}

.bespoke-spec-toggles span::after {
    content: '';
    display: block;
    width: 17px;
    height: 17px;
    margin: 3px;
    border-radius: 50%;
    background: var(--story-maroon);
    transition: transform .2s ease;
}

.bespoke-spec-toggles input:checked+span {
    background: var(--story-maroon);
}

.bespoke-spec-toggles input:checked+span::after {
    background: var(--story-cream);
    transform: translateX(17px);
}

.bespoke-design-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin: 18px 0 38px;
}

.bespoke-design-options label {
    position: relative;
    display: grid;
    min-height: 174px;
    place-items: center;
    border: 1px solid var(--story-line);
    border-radius: 32px;
    text-align: center;
    cursor: pointer;
}

.bespoke-design-options input {
    position: absolute;
    opacity: 0;
}

.bespoke-design-options input:checked+span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.bespoke-design-options span {
    font-size: 20px;
    line-height: 2;
}

.story-bespoke-specs .story-design-options>div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 38px;
    margin: 18px 0 38px;
}

.story-bespoke-specs .story-design-options label {
    position: relative;
    cursor: pointer;
}

.story-bespoke-specs .story-design-options input {
    position: absolute;
    opacity: 0;
}

.story-bespoke-specs .story-design-options label>span {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: .88;
    border: 1px solid var(--story-line);
    border-radius: 34px;
    font-size: 20px;
    text-align: center;
}

.story-bespoke-specs .story-design-options input:checked+span {
    outline: 2px solid var(--story-maroon);
    outline-offset: 3px;
}

.bespoke-spec-list {
    margin: 12px 0 30px;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.45;
}

.bespoke-spine-panel--text {
    margin-top: 16px;
}

.bespoke-spine-panel[hidden] {
    display: none !important;
}

.bespoke-spine-panel--text p {
    margin: 12px 0 22px;
    font-size: 14px;
    line-height: 1.45;
}

.bespoke-spine-panel--text .story-specs__line {
    margin-bottom: 8px;
}

.bespoke-placement {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 34px;
}

.bespoke-book-count {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 18px 0 36px;
    font-size: 14px;
}

.bespoke-book-count>span {
    flex-basis: 100%;
}

.bespoke-book-count button {
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid var(--story-line);
    border-radius: 50%;
    background: transparent;
    color: var(--story-maroon);
    font: 18px/1 Lora, serif;
}

.bespoke-book-count b {
    min-width: 34px;
    border-bottom: 1px solid var(--story-line);
    text-align: center;
    font-weight: 400;
}

#bespoke-package-modals .story-symphony-content .story-prelude__summary {
    display: grid;
    gap: 14px;
}

#bespoke-package-modals .story-symphony-content .story-prelude__summary p {
    margin: 0;
    font-size: 18px;
}

#bespoke-package-modals .story-symphony-content .story-prelude__summary span {
    font-size: 14px;
    line-height: 1.35;
}

#bespoke-package-modals .story-symphony-content .story-prelude__summary strong {
    margin-top: 2px;
}

.story-symphony-content__idea {
    display: block;
    margin: 0 0 18px;
}

.story-symphony-content__idea textarea {
    width: 100%;
    min-height: 45px;
    resize: vertical;
    border: 0;
    border-bottom: 1px solid var(--story-line);
    outline: 0;
    background: transparent;
    color: var(--story-maroon);
    font: 18px/1.4 Lora, serif;
}

.story-symphony-content__idea textarea::placeholder {
    color: inherit;
    opacity: 1;
}

.story-symphony-content__or {
    margin: 0 0 18px;
    text-align: center;
    font-size: 13px;
}

#bespoke-package-modals .story-modal__dialog--symphony-questions {
    width: min(550px, 100%);
    height: min(820px, calc(100dvh - 32px));
    overflow: hidden;
}

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

.story-symphony-questionnaire {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    color: var(--story-maroon);
}

.story-symphony-questionnaire__scroll {
    min-height: 0;
    overflow-y: auto;
    padding: 62px 54px 34px;
    scrollbar-width: none;
}

.story-symphony-questionnaire__scroll::-webkit-scrollbar {
    display: none;
}

.story-symphony-questionnaire h1 {
    margin: 0 0 44px;
    font-size: 44px;
}

.story-symphony-questionnaire section {
    margin: 0 0 46px;
}

.story-symphony-questionnaire h2 {
    margin: 0 0 22px;
    font: 400 20px/1.8 Lora, serif;
}

.story-symphony-questionnaire__select {
    position: relative;
    display: block;
    margin-bottom: 46px;
    border-bottom: 1px solid var(--story-line);
}

.story-symphony-questionnaire__select::after {
    content: '›';
    position: absolute;
    right: 8px;
    bottom: 4px;
    font-size: 30px;
    pointer-events: none;
}

.story-symphony-questionnaire__select select {
    width: 100%;
    padding: 0 28px 12px 0;
    border: 0;
    outline: 0;
    appearance: none;
    background: transparent;
    color: var(--story-maroon);
    font: 20px Lora, serif;
}

.story-symphony-questionnaire__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
}

.story-symphony-questionnaire__choices .story-option {
    margin: 0;
}

.story-symphony-questionnaire__upload {
    position: relative;
    display: block;
    margin: 0 0 50px;
    padding: 0 35px 10px 0;
    border-bottom: 1px solid var(--story-line);
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
}

.story-symphony-questionnaire__upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.story-symphony-questionnaire__upload i {
    position: absolute;
    right: 4px;
    bottom: 10px;
    font-size: 24px;
}

.story-symphony-questionnaire__footer {
    border-top: 1px solid var(--story-line);
    padding: 12px 54px 34px;
}

.story-symphony-questionnaire__footer .story-help-button {
    margin-bottom: 10px;
}

.story-symphony-questionnaire__footer .story-actions {
    display: grid;
    grid-template-columns: repeat(2, 124px);
    justify-content: space-between;
    gap: 16px;
}

.story-symphony-questionnaire__footer .story-button {
    width: auto;
    min-width: 124px;
    height: auto;
}

@media (max-width: 640px) {
    .story-symphony-questionnaire__scroll {
        padding: 52px 34px 28px;
    }

    .story-symphony-questionnaire h1 {
        font-size: 36px;
    }

    .story-symphony-questionnaire__footer {
        padding: 12px 34px 28px;
    }

    .story-symphony-questionnaire__footer .story-actions {
        grid-template-columns: repeat(2, 124px);
    }
}

#bespoke-package-modals .story-modal__dialog--complete {
    width: min(625px, 100%);
    height: min(820px, calc(100dvh - 32px));
    overflow: hidden;
}

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

.story-bespoke-complete {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 88px 54px 36px;
    color: var(--story-maroon);
    text-align: center;
}

.story-bespoke-complete .story-manuscript__back {
    position: absolute;
    top: 27px;
    left: 38px;
    border: 0;
    background: transparent;
    color: inherit;
    font: 40px/1 Lora, serif;
}

.story-bespoke-complete .story-manuscript__help {
    position: absolute;
    top: 82px;
    right: 54px;
}

.story-bespoke-complete .story-manuscript__owl {
    width: 205px;
    height: 205px;
    object-fit: contain;
    margin: 0 0 28px;
}

.story-bespoke-complete h1 {
    margin: 0 0 44px;
    font: 400 48px/1.18 'The Blendinroom', Lora, serif;
}

.story-bespoke-complete .story-manuscript__message {
    margin: 0;
    font-size: 19px;
    line-height: 2.05;
}

.story-bespoke-complete .story-manuscript__actions {
    display: grid;
    grid-template-columns: 185px 290px;
    gap: 44px;
    margin-top: auto;
    width: 100%;
}

.story-bespoke-complete .story-manuscript__actions .story-button {
    width: auto;
    height: 70px;
}

/* Keep the Rhapsody payment layout independent from the shared modal styles. */
#bespoke-package-modals .story-modal__dialog--payment {
    width: min(550px, 100%);
    height: min(820px, calc(100dvh - 32px));
}

#bespoke-package-modals .story-modal__dialog--payment .story-modal__content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

#bespoke-package-modals .story-step--payment {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
}

#bespoke-package-modals .story-payment__main {
    padding: 64px 54px 28px;
    overflow-y: auto;
}

#bespoke-package-modals .story-step--payment h1 {
    margin: 0;
    font: 400 48px/1 'The Blendinroom', Lora, serif;
}

#bespoke-package-modals .story-step--payment .story-summary {
    margin: 46px 0 0;
    padding: 28px 30px;
    border-radius: 35px;
    background: #234346;
    color: #F6CBBF;
}

#bespoke-package-modals .story-step--payment .story-summary>p:first-child {
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(246, 203, 191, .55);
    font-size: 20px;
}

#bespoke-package-modals .story-step--payment .story-summary__row {
    padding: 0;
}

#bespoke-package-modals .story-step--payment .story-summary__row {
    border-top: 0;
}

#bespoke-package-modals .story-step--payment .story-summary__row strong {
    font-size: 20px;
}

#bespoke-package-modals .story-step--payment .story-summary__row small {
    font-size: 14px;
    line-height: 1.35;
}

#bespoke-package-modals .story-step--payment .story-summary__note {
    margin: 32px 0 0;
    font-size: 14px;
    line-height: 1.35;
}

#bespoke-package-modals .story-payment__extras {
    margin: 28px 0 0;
}

#bespoke-package-modals .story-payment__extras h2 {
    margin: 0 0 18px;
    font: 400 20px/1.25 Lora, serif !important;
    letter-spacing: 0 !important;
}

#bespoke-package-modals .story-payment__extras p {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}

#bespoke-package-modals .story-payment__extras .bespoke-book-count {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0 0;
}

#bespoke-package-modals .story-payment__extras .bespoke-book-count strong {
    margin-left: auto;
    font: 400 20px Lora, serif;
}

#bespoke-package-modals .story-symphony-payment .story-summary__row {
    min-height: 54px;
}

#bespoke-package-modals .story-symphony-payment .story-summary__row small {
    display: block;
    margin-top: 8px;
}

.story-symphony-payment__notes {
    margin: 24px 0 0;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.35;
}

.story-symphony-payment__notes li+li {
    margin-top: 8px;
}

#bespoke-package-modals .story-payment__footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    min-height: 196px;
    padding: 24px 54px 34px;
    border-top: 1px solid var(--story-line);
}

#bespoke-package-modals .story-payment__footer .story-payable {
    grid-column: 2;
    margin: 0 16px 12px 0;
}

#bespoke-package-modals .story-payment__footer .story-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 145px 195px;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

#bespoke-package-modals .story-payment__footer .story-button {
    width: auto;
    height: 70px;
}

@media (max-width: 640px) {
    #bespoke-package-modals .story-payment__main {
        padding: 58px 36px 22px;
    }

    #bespoke-package-modals .story-step--payment h1 {
        font-size: 40px;
    }

    #bespoke-package-modals .story-payment__footer {
        min-height: 176px;
        padding: 20px 36px 28px;
    }

    #bespoke-package-modals .story-payment__footer .story-actions {
        grid-template-columns: 135px 175px;
    }
}

@media (max-width: 640px) {
    .story-bespoke-complete {
        padding: 72px 34px 28px;
    }

    .story-bespoke-complete .story-manuscript__back {
        top: 21px;
        left: 26px;
    }

    .story-bespoke-complete .story-manuscript__help {
        top: 70px;
        right: 30px;
    }

    .story-bespoke-complete .story-manuscript__owl {
        width: 165px;
        height: 165px;
        margin-bottom: 22px;
    }

    .story-bespoke-complete h1 {
        margin-bottom: 32px;
        font-size: 37px;
    }

    .story-bespoke-complete .story-manuscript__message {
        font-size: 16px;
        line-height: 1.8;
    }

    .story-bespoke-complete .story-manuscript__actions {
        grid-template-columns: minmax(120px, 1fr) minmax(190px, 1.55fr);
        gap: 20px;
    }

    .story-bespoke-complete .story-manuscript__actions .story-button {
        height: 62px;
    }
}

@media (max-width: 640px) {
    .story-bespoke-specs .story-specs__section h3 {
        font-size: 18px;
    }

    .story-bespoke-specs .story-specs__line input,
    .story-bespoke-specs .story-specs__line select {
        font-size: 16px;
    }

    .bespoke-design-options {
        gap: 20px;
    }

    .bespoke-design-options label {
        min-height: 142px;
        border-radius: 26px;
    }

    .bespoke-design-options span {
        font-size: 17px;
    }

    .story-bespoke-specs .story-design-options>div {
        gap: 20px;
    }

    .story-bespoke-specs .story-design-options label>span {
        border-radius: 26px;
        font-size: 17px;
    }

    .bespoke-placement {
        column-gap: 18px;
    }
}

/* Legal documents opened from the Bespoke terms links. */
.bespoke-legal-modal {
    position: fixed;
    z-index: 10020;
    inset: 0;
    display: none;
    place-items: center;
    padding: 28px 38px;
}

.bespoke-legal-modal.is-open {
    display: grid;
}

.bespoke-legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 35, 31, .58);
}

.bespoke-legal-modal__dialog {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(1150px, 100%);
    height: min(865px, calc(100dvh - 56px));
    overflow: hidden;
    border-radius: 28px;
    padding: 28px 28px 0;
    background: #F6CBBF;
    color: #591829;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.bespoke-legal-modal__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 140px;
    height: 52px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: 14px Lora, serif;
}

.bespoke-legal-modal__back span {
    font-size: 28px;
    line-height: 0;
}

.bespoke-legal-modal__dialog h2 {
    margin: 72px 95px 66px;
    font: 400 46px/1 Lora, serif;
}

.bespoke-legal-modal__content {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 95px 70px;
    scrollbar-color: #cb8d7a transparent;
    scrollbar-width: thin;
}

.bespoke-legal-modal__content::-webkit-scrollbar {
    width: 6px;
}

.bespoke-legal-modal__content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cb8d7a;
}

.bespoke-legal-modal__content h3 {
    margin: 0 0 42px;
    font: 400 28px/1.35 Lora, serif;
    letter-spacing: 2px;
}

.bespoke-legal-modal__content p {
    margin: 0 0 36px;
    font: 400 16px/1.8 Lora, serif;
    letter-spacing: .7px;
}

@media (max-width: 640px) {
    .bespoke-legal-modal {
        padding: 10px;
    }

    .bespoke-legal-modal__dialog {
        height: calc(100dvh - 20px);
        border-radius: 18px;
        padding: 20px 14px 0;
    }

    .bespoke-legal-modal__back {
        width: 120px;
        height: 44px;
        gap: 9px;
        font-size: 13px;
    }

    .bespoke-legal-modal__dialog h2 {
        margin: 45px 18px 40px;
        font-size: 32px;
    }

    .bespoke-legal-modal__content {
        padding: 0 18px 40px;
    }

    .bespoke-legal-modal__content h3 {
        margin-bottom: 24px;
        font-size: 21px;
    }

    .bespoke-legal-modal__content p {
        margin-bottom: 24px;
        font-size: 14px;
        line-height: 1.7;
    }
}

/* Modal scrollbars are reserved for short viewports with real overflow. */
.story-modal-scrollbar {
    display: none;
}

@media (max-height: 760px) {
    .story-modal-scrollbar {
        display: block;
    }
}

/* Only make the gift success screen scroll on short viewports. */
.story-gift-ready__scroll {
    overflow-y: hidden;
}

.story-modal-scrollbar.story-gift-ready-scrollbar {
    display: none;
}

@media (max-height: 760px) {
    .story-gift-ready__scroll {
        overflow-y: auto;
    }

    .story-modal-scrollbar.story-gift-ready-scrollbar {
        display: block;
    }
}

.story-complete__success-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Bespoke package opening screen */
#bespoke-package-modals .story-bespoke__content {
    min-height: 620px;
}

#bespoke-package-modals .story-bespoke-intro {
    position: relative;
    min-height: 514px;
    padding-bottom: 150px;
}

#bespoke-package-modals .story-bespoke-intro h1 {
    margin: 0 32px 28px 0;
    font-family: "Lora", serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -.03em;
}

#bespoke-package-modals .story-bespoke-intro__package {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.3;
}

#bespoke-package-modals .story-bespoke-intro__copy {
    max-width: 355px;
    margin: 0;
    font-size: 15px;
    line-height: 1.72;
}

#bespoke-package-modals .story-bespoke-intro__button {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--story-maroon);
    color: #f6cbbf;
    font-family: "Lora", serif;
    font-size: 13px;
    letter-spacing: .02em;
}

#bespoke-package-modals .story-bespoke-intro__art {
    position: absolute;
    z-index: 1;
    right: -34px;
    bottom: -8px;
    width: 250px;
    height: auto;
}

#bespoke-package-modals .story-bespoke-intro__terms {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    color: var(--story-maroon);
    font-size: 13px;
    text-decoration: underline;
}

@media (max-width: 520px) {
    #bespoke-package-modals.story-modal {
        padding: 12px;
    }

    #bespoke-package-modals .story-modal__dialog {
        border-radius: 16px;
    }

    #bespoke-package-modals .story-bespoke__content {
        min-height: min(620px, calc(100dvh - 24px));
        padding: 44px 32px 28px;
    }

    #bespoke-package-modals .story-bespoke-intro {
        min-height: 514px;
    }

    #bespoke-package-modals .story-bespoke-intro h1 {
        font-size: 25px;
        line-height: 1.22;
    }

    #bespoke-package-modals .story-bespoke-intro__package {
        font-size: 11px;
    }

    #bespoke-package-modals .story-bespoke-intro__copy {
        max-width: 280px;
        font-size: 12px;
        line-height: 1.72;
    }

    #bespoke-package-modals .story-bespoke-intro__button {
        padding: 11px 16px;
        font-size: 11px;
    }

    #bespoke-package-modals .story-bespoke-intro__art {
        right: -24px;
        bottom: -8px;
        width: 205px;
    }

    #bespoke-package-modals .story-bespoke-intro__terms {
        font-size: 11px;
    }
}

/* Prelude package details */
#bespoke-package-modals .story-modal__dialog--plans {
    width: min(530px, 100%);
}

/* Symphony setup follows the wider login-modal layout. */
#bespoke-package-modals .story-modal__dialog--symphony-setup {
    width: min(550px, 100%);
}

#bespoke-package-modals .story-modal__dialog--plans .story-bespoke__content {
    min-height: 0;
    padding: 48px 38px 30px;
}

#bespoke-package-modals .story-step--prelude {
    width: 100%;
}

#bespoke-package-modals .story-step--prelude h1 {
    margin: 0 42px 12px 0;
    font-family: "Lora", serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.1;
}

#bespoke-package-modals .story-prelude__lead {
    margin: 0 0 22px;
    font-size: 18px;
    line-height: 1.8;
}

#bespoke-package-modals .story-prelude__summary {
    margin-bottom: 34px;
    padding: 28px 26px 26px;
    border-radius: 28px;
    background: var(--story-green);
    color: #f6cbbf;
}

#bespoke-package-modals .story-prelude__summary h2,
#bespoke-package-modals .story-prelude__summary p,
#bespoke-package-modals .story-prelude__summary strong {
    margin: 0;
    color: inherit;
    font-family: "Lora", serif;
    font-weight: 400;
}

#bespoke-package-modals .story-prelude__summary h2 {
    font-size: 17px;
}

#bespoke-package-modals .story-prelude__summary p {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.25;
}

#bespoke-package-modals .story-prelude__summary strong {
    display: block;
    margin-top: 18px;
    font-size: 17px;
}

#bespoke-package-modals .story-prelude__form h3 {
    margin: 0 0 17px;
    font-size: 17px;
    font-weight: 400;
}

#bespoke-package-modals .story-prelude__status {
    display: flex;
    flex-wrap: wrap;
    gap: 34px;
    row-gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

#bespoke-package-modals .story-prelude__status legend {
    float: none;
    flex: 0 0 100%;
    width: auto;
    margin: 0;
    padding: 0;
    font-size: 12px;
    margin-bottom: 10px;

}

#bespoke-package-modals .story-prelude__status label,
#bespoke-package-modals .story-prelude__ai label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    cursor: pointer;
}

#bespoke-package-modals .story-prelude__status input,
#bespoke-package-modals .story-prelude__ai input {
    position: absolute;
    opacity: 0;
}

#bespoke-package-modals .story-prelude__status .story-radio,
#bespoke-package-modals .story-prelude__ai .story-checkbox {
    display: inline-block;
    position: relative;
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    border: 1px solid var(--story-maroon);
    border-radius: 50%;
}

#bespoke-package-modals .story-prelude__status input:checked+.story-radio::after {
    content: '';
    position: absolute;
    inset: 4px;
    width: auto;
    height: auto;
    border-radius: 50%;
    background: var(--story-maroon);
    opacity: 1;
}

#bespoke-package-modals .story-prelude__ai input:checked+.story-checkbox::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 13px;
}

#bespoke-package-modals .story-prelude__upload {
    position: relative;
    display: block;
    padding: 0 34px 10px 0;
    border-bottom: 1px solid var(--story-maroon);
    font-size: 12px;
    cursor: pointer;
}

#bespoke-package-modals .story-prelude__upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

#bespoke-package-modals .story-prelude__upload i {
    position: absolute;
    right: 4px;
    bottom: 9px;
    font-size: 20px;
}

#bespoke-package-modals .story-prelude__formats {
    margin: 8px 0 15px;
    font-size: 12px;
}

#bespoke-package-modals .story-prelude__ai {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#bespoke-package-modals .story-prelude__help {
    flex: 0 0 auto;
    min-width: 65px;
    padding: 7px 16px;
    border: 1px solid var(--story-maroon);
    border-radius: 999px;
    background: transparent;
    color: var(--story-maroon);
}

#bespoke-package-modals .story-prelude__actions {
    justify-content: space-between;
    margin-top: 18px;
}

#bespoke-package-modals .story-prelude__actions .story-button {
    min-width: 124px;
}

@media (max-width: 520px) {
    #bespoke-package-modals .story-modal__dialog--plans .story-bespoke__content {
        padding: 44px 30px 26px;
    }

    #bespoke-package-modals .story-step--prelude h1 {
        font-size: 34px;
    }

    #bespoke-package-modals .story-prelude__lead {
        font-size: 15px;
        line-height: 1.6;
    }

    #bespoke-package-modals .story-prelude__summary {
        margin-bottom: 28px;
        padding: 24px 22px;
    }

    #bespoke-package-modals .story-prelude__status {
        gap: 20px;
        row-gap: 8px;
    }

    #bespoke-package-modals .story-prelude__ai label {
        align-items: flex-start;
    }
}

body.story-modal-open {
    overflow: hidden;
}

.story-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    place-items: center;
    padding: 24px;
}

.story-modal.is-open {
    display: grid;
}

.story-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 35, 31, .58);
}

.story-modal__dialog {
    position: relative;
    width: min(550px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border-radius: 26px;
    background: var(--story-cream);
    color: var(--story-maroon);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.story-modal__dialog--plans {
    width: min(600px, 100%);
}

.story-modal__content {
    min-height: 560px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 58px 64px 48px;
}

.story-modal__content::-webkit-scrollbar {
    display: none;
}

/* Shared, clean scrollbar used by every modal screen. */
.story-modal-scrollbar {
    position: absolute;
    z-index: 4;
    top: 118px;
    right: 20px;
    bottom: 38px;
    width: 7px;
    pointer-events: none;
    transition: opacity .18s ease;
}

.story-modal-scrollbar.is-hidden {
    opacity: 0;
}

.story-modal-scrollbar span {
    display: block;
    width: 7px;
    min-height: 60px;
    border-radius: 20px;
    background: #cb8d7a;
    will-change: transform;
}

/* Keep an opaque header in place so content cannot scroll behind the title. */
.story-modal__header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flow-root;
    width: 100%;
    background: var(--story-cream);
}

.story-modal__header::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -200px;
    right: -80px;
    bottom: 0;
    left: -80px;
    background: var(--story-cream);
}

.story-modal__header #story-modal-title {
    position: static;
}

.story-modal__close {
    position: absolute;
    z-index: 5;
    top: 22px;
    right: 25px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 3px;
    border: 0;
    background: none;
}

.story-modal__close img {
    display: block;
    width: 30px;
    height: 30px;
    pointer-events: none;
}

.story-step {
    animation: storyFade .22s ease;
}

@keyframes storyFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

.story-step h2 {
    margin: 0 42px 40px 0;
    font-size: 42px;
    font-weight: 400;
    line-height: 1;
}

/* Keep the Symphony questionnaire compact enough to read as one scrolling page. */
.story-step.story-symphony-questionnaire h2 {
    margin: 0 0 18px;
    font: 400 20px/1.45 Lora, serif;
}

.story-step.story-symphony-questionnaire h1 {
    margin-bottom: 32px;
    font-size: 40px;
}

.story-step.story-symphony-questionnaire section {
    margin-bottom: 34px;
}

.story-step h1 {
    margin: 0 42px 20px 0;
    font-size: 42px;
    font-weight: 400;
    line-height: 1;
}

.story-step h3 {
    margin: 24px 0 8px;
    font: 500 16px/1.4 Lora, serif;
}

.story-lead {
    max-width: 470px;
    margin: 0 0 30px;
    line-height: 1.75;
    letter-spacing: 1px;
}

.story-help,
.story-text-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.story-form {
    display: grid;
    gap: 25px;
    margin-bottom: 25px;
}

.story-field {
    display: grid;
    gap: 5px;
}

.story-field input,
.story-field textarea,
.story-field select {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--story-line);
    border-radius: 0;
    outline: 0;
    padding: 10px 0;
    background: transparent;
    color: var(--story-maroon);
    font: 16px/1.45 Lora, serif;
}

.story-field textarea {
    min-height: 85px;
    resize: vertical;
}

.story-field input::placeholder,
.story-field textarea::placeholder {
    color: var(--story-maroon);
    opacity: 1;
}

.story-field input:focus,
.story-field textarea:focus,
.story-field select:focus {
    border-bottom-color: var(--story-maroon);
}

.story-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.story-button {
    border: 1px solid var(--story-maroon);
    border-radius: 999px;
    padding: 18px 25px;
    background: transparent;
    color: var(--story-maroon);
    font: 400 14px/1 Lora, serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.story-button--primary {
    background: var(--story-maroon);
    color: var(--story-cream);
}

.story-button--back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
}

.story-button--back:hover {
    background: var(--story-maroon);
    color: var(--story-cream);
}

.story-back-arrows {
    position: relative;
    display: block;
    width: 9px;
    height: 14px;
}

.story-button--back .story-back-arrow {
    position: absolute;
    inset: 0;
    display: block;
    width: 9px;
    height: 14px;
    object-fit: contain;
    pointer-events: none;
}

.story-back-arrow--default {
    filter: brightness(0) saturate(100%) invert(12%) sepia(75%) saturate(3133%) hue-rotate(320deg) brightness(72%);
    transform: rotate(180deg);
}

.story-back-arrow--hover {
    opacity: 0;
}

.story-button--back:hover {
    background: var(--story-maroon);
    color: var(--story-cream);
}

.story-button--back:hover .story-back-arrow--default {
    opacity: 0;
}

.story-button--back:hover .story-back-arrow--hover {
    opacity: 1;
}

.story-button__arrow {
    display: inline-block;
    width: 9px;
    height: 14px;
    object-fit: contain;
    vertical-align: -2px;
    pointer-events: none;
}

.story-socials {
    display: grid;
    gap: 20px;
    margin: 34px 0;
}

.story-social {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: min(262px, 100%);
    border: 1px solid var(--story-maroon);
    border-radius: 999px;
    padding: 12px 25px;
    background: transparent;
    color: inherit;
    font: 16px Lora, serif;
}

.story-social img {
    display: block;
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.story-step--login .story-form {
    margin-top: 44px;
}

.story-step--signup,
.story-step--login {
    width: 100%;
}

.story-plans {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 58px;
}

.story-plan {
    overflow: hidden;
    border: 1px solid var(--story-maroon);
    border-radius: 38px;
    text-align: center;
}

.story-plan__title {
    padding: 15px;
    background: var(--story-maroon);
    color: var(--story-cream);
    font-size: 16px;
}

.story-plan__body {
    display: grid;
    gap: 10px;
    padding: 10px 20px 10px;
    font-size: 15px;
}

.story-plan__body strong {
    font-size: 16px;
    font-weight: 500;
}

.story-plan__body hr {
    width: 100%;
    margin: -3px 0 -2px;
    border: 0;
    border-top: 1px solid var(--story-line);
    opacity: 1;
}

.story-plan__button {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--story-maroon);
    padding: 18px 12px 20px;
    background: transparent;
    color: var(--story-maroon);
    font: 16px/1 Lora, serif;
}

.story-plan__button img {
    width: 9px;
    height: 14px;
    margin-left: 9px;
    filter: brightness(0) saturate(100%) invert(12%) sepia(75%) saturate(3133%) hue-rotate(320deg) brightness(72%);
    vertical-align: -1px;
}

.story-plan__button:hover {
    background: var(--story-maroon);
    color: var(--story-cream);
}

.story-plan__button:hover img {
    filter: none;
}

.story-plan__button:hover {
    background: var(--story-maroon);
    color: var(--story-cream);
}

.story-plan-help {
    display: inline-block;
    margin-top: -8px;
    font-size: 16px;
}

.story-plan-note {
    margin: 50px 0 0;
    font-size: 12px;
    line-height: 1.4;
}

.story-step--plans h1 {
    margin-bottom: 28px;
    font-size: 48px;
}

.story-gift-plan__recipient {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: .5px;
}

.story-step--gift-plan .story-lead {
    margin-bottom: 8px;
}

.story-step--plans .story-lead {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.story-modal__dialog--plans .story-modal__content {
    padding: 86px 58px 55px;
}

.story-terms {
    grid-row: 2;
    grid-column: 1;
    height: auto;
    min-height: 0;
    overflow: auto;
    padding: 0 34px 10px 0;
    font-size: 14px;
    line-height: 1.35;
    scrollbar-width: none;
}

.story-terms a[data-open-legal-modal] {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.story-terms::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.story-modal-scrollbar.story-terms-scrollbar {
    position: static;
    grid-row: 2;
    grid-column: 1;
    align-self: stretch;
    justify-self: end;
    width: 7px;
    margin-right: 1px;
    pointer-events: none;
}

.story-modal-scrollbar.story-terms-scrollbar span {
    display: block;
    width: 7px;
    border-radius: 20px;
    background: #cb8d7a;
    will-change: transform;
}

.story-terms section {
    margin-bottom: 38px;
}

.story-terms h3 {
    margin: 0 0 19px;
    font: 400 16px/1.2 Lora, serif;
}

.story-terms h4 {
    margin: 0 0 18px;
    font: 600 14px/1.2 Lora, serif;
}

.story-terms ul {
    margin: 0;
    padding-left: 20px;
}

.story-terms li {
    margin-bottom: 8px;
    font-size: 12px;
    padding-left: 2px;
}

.story-modal__dialog--terms {
    width: min(550px, 100%);
    height: min(820px, calc(100dvh - 48px));
    overflow: hidden;
}

.story-modal__dialog--terms .story-modal__content {
    height: 100%;
    min-height: 0;
    padding: 60px 20px 34px 50px;
}

.story-step--terms {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
}

.story-step--terms h1 {
    grid-row: 1;
    grid-column: 1;
    margin-bottom: 50px;
    font-size: 44px;
    white-space: nowrap;
}

.story-step--gift-terms {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.story-step--gift-terms h1 {
    margin-bottom: 28px;
}

.story-gift-terms__intro {
    grid-row: 2;
    grid-column: 1;
    margin: 0 0 34px;
    font-size: 16px;
    line-height: 1.55;
    letter-spacing: .5px;
}

.story-gift-terms__intro p {
    margin: 0 0 8px;
}

.story-step--gift-terms .story-terms,
.story-step--gift-terms .story-terms-scrollbar {
    grid-row: 3;
}

.story-step--gift-terms .story-terms__footer {
    grid-row: 4;
}

.story-terms__footer {
    grid-row: 3;
    padding-top: 8px;
}

.story-terms__footer .story-actions {
    margin-top: 20px;
    margin-right: 25px;
}

.story-terms__footer .story-button--back {
    width: 110px;
    height: 55px;
    padding: 0 22px;
    font-size: 16px;
}

.story-terms__footer .story-button--primary {
    width: 180px;
    height: 55px;
    padding: 0 28px;
    font-size: 16px;
}

.story-help-button {
    display: block;
    width: 70px;
    height: 35px;
    margin-left: auto;
    border: 1px solid var(--story-maroon);
    border-radius: 999px;
    padding: 0;
    background: var(--story-cream);
    color: var(--story-maroon);
    font: 12px Lora, serif;
    right: 20px;
    bottom: 105px;
}

.story-summary {
    margin: 28px 0;
    border-radius: 22px;
    padding: 22px;
    background: var(--story-green);
    color: var(--story-cream);
}

.story-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .25);
}

/* Make payment screen */
.story-modal__dialog--payment {
    width: min(550px, 100%);
    height: min(820px, calc(100vh - 48px));
    overflow: hidden;
}

.story-modal__dialog--payment .story-modal__content {
    height: 100%;
    min-height: 0;
    padding: 0;
}

.story-step--payment {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
}

.story-payment__main {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: 62px 54px 35px;
}

.story-payment__main::-webkit-scrollbar {
    display: none;
}

.story-modal-scrollbar.story-payment-scrollbar {
    top: 150px;
    right: 20px;
    bottom: 185px;
}

.story-step--payment h1 {
    margin-bottom: 28px;
    font-size: 44px;
}

.story-payment__lead {
    margin: 0;
    font-size: 18px;
    letter-spacing: .5px;
}

.story-step--payment .story-summary {
    margin: 62px 0 0;
    border-radius: 35px;
    padding: 30px;
}

.story-step--payment .story-summary>p:first-child {
    margin: 0 0 10px;
    font-size: 16px;
}

.story-step--payment .story-summary__row {
    align-items: start;
    padding-top: 18px;
}

.story-step--payment .story-summary__row>div {
    display: grid;
    gap: 6px;
}

.story-step--payment .story-summary__row strong {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: .5px;
}

.story-step--payment .story-summary__row small {
    font-size: 12px;
}

.story-summary__note {
    margin: 20px 0 0;
    font-size: 13px;
    line-height: 1.40;
}

.story-payment__footer {
    border-top: 1px solid var(--story-line);
    padding: 12px 52px 34px;
}

.story-payable {
    display: grid;
    justify-content: end;
    gap: 7px;
    margin: 0 28px 12px 0;
}

.story-payable span {
    font-size: 12px;
}

.story-payable strong {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 2px;
}

.story-payment__footer .story-button--back {
    width: 110px;
    height: 55px;
    padding: 0 22px;
    font-size: 16px;
}

.story-payment__footer .story-button--primary {
    width: 150px;
    height: 55px;
    padding: 0 28px;
    font-size: 16px;
}

/* Payment gateway placeholder screen */
.story-modal__dialog--payment-window {
    width: min(550px, 100%);
    height: min(820px, calc(100vh - 48px));
    overflow: hidden;
}

.story-modal__dialog--payment-window .story-modal__content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.story-modal__dialog--payment-window .story-modal__close {
    display: none;
}

.story-step--payment-window {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
}

.story-payment-window__message {
    display: grid;
    place-content: center;
    align-content: center;
    padding: 60px 30px 0;
    text-align: center;
}

.story-payment-window__message h1 {
    margin: 0 0 42px;
    font-size: 42px;
    line-height: 1.25;
}

.story-payment-window__message p {
    margin: 0;
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 1.8;
}

.story-payment-window__footer {
    padding: 0 52px 36px;
}

.story-payment-window__footer .story-button--back {
    width: 110px;
    height: 55px;
    padding: 0 22px;
    font-size: 16px;
}

.story-payment-window__footer .story-button--primary {
    width: 200px;
    height: 55px;
    padding: 0 28px;
    font-size: 16px;
}

/* Schedule questions screen */
.story-modal__dialog--schedule {
    width: min(550px, 100%);
    height: min(890px, calc(100vh - 48px));
    overflow: hidden;
}

.story-modal__dialog--schedule .story-modal__content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.story-step--schedule {
    height: 100%;
}

.story-schedule__main {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    padding: 66px 56px 36px;
}

.story-step--schedule h1 {
    margin: 0 0 22px;
    font-size: 46px;
    line-height: 1.25;
}

.story-schedule__help {
    position: absolute;
    top: 125px;
    right: 52px;
}

.story-schedule__lead {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 1px;
}

.story-schedule__form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
}

.story-schedule__scroll {
    grid-row: 1;
    grid-column: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 8px;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.story-schedule__scroll::-webkit-scrollbar {
    display: none;
}

.story-modal-scrollbar.story-schedule-scrollbar {
    position: static;
    grid-row: 1;
    grid-column: 1;
    align-self: stretch;
    justify-self: end;
    width: 7px;
    margin: 8px -36px 8px 0;
}

.story-step--schedule .story-days {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 32px;
    margin: 0 0 24px;
    padding: 20px 32px;
    border-radius: 35px;
}

.story-step--schedule .story-days label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
}

.story-step--schedule .story-days input {
    position: absolute;
    opacity: 0;
}

.story-radio {
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--story-line);
    border-radius: 50%;
}

.story-radio::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--story-maroon);
    opacity: 0;
}

.story-days input:checked+.story-radio::after {
    opacity: 1;
}

.story-schedule__notes {
    margin: 0 0 25px;
    padding-left: 22px;
    font-size: 12px;
    line-height: 1.35;
}

.story-schedule__notes li {
    margin-bottom: 8px;
}

.story-whatsapp {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
}

.story-whatsapp input {
    position: absolute;
    opacity: 0;
}

.story-checkbox {
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--story-maroon);
    border-radius: 50%;
    color: transparent;
}

.story-whatsapp input:checked+.story-checkbox {
    background: var(--story-maroon);
    color: var(--story-cream);
}

.story-schedule__actions {
    grid-row: 2;
    margin-top: 20px;
}

.story-schedule__actions .story-button--back {
    width: 110px;
    height: 55px;
    padding: 0 22px;
    font-size: 16px;
}

.story-schedule__actions .story-button--primary {
    width: 160px;
    height: 55px;
    padding: 0 28px;
    font-size: 16px;
}

/* First two questions screen */
.story-modal__dialog--questions {
    width: min(550px, 100%);
    height: min(858px, calc(100vh - 48px));
    overflow: hidden;
}

.story-modal__dialog--questions .story-modal__content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 62px 55px 34px;
}

.story-step--questions {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

.story-step--questions h1 {
    margin: 0 0 20px;
    font-size: 44px;
}

.story-questions__help {
    position: absolute;
    top: 55px;
    right: 0;
}

.story-questions__begin {
    margin: 0 0 40px;
    font-size: 16px;
}

.story-questions__intro {
    margin: 0 0 50px;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 1px;

}

.story-questions__form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
}

.story-questions__scroll {
    grid-row: 1;
    grid-column: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 8px;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.story-questions__scroll::-webkit-scrollbar {
    display: none;
}

.story-modal-scrollbar.story-questions-scrollbar {
    position: static;
    grid-row: 1;
    grid-column: 1;
    align-self: stretch;
    justify-self: end;
    width: 7px;
    margin: 8px -35px 8px 0;
}

.story-question {
    position: relative;
}

.story-question-list {
    margin: 0;
    padding-left: 20px;
}

.story-question-list>li {
    padding-left: 2px;
    font-size: 16px;
}

.story-question-list>li+li {
    margin-top: 10px;
}

.story-question+.story-question {
    margin-top: 10px;
}

.story-question>label {
    display: block;
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.9;
}

.story-answer {
    position: relative;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--story-line);
}

.story-question-list>li:nth-child(2…2494 tokens truncated… */ .story-modal__dialog--gift-ready {
        width: min(550px, 100%);
        height: min(820px, calc(100dvh - 48px));
        overflow: hidden;
    }

    .story-modal__dialog--gift-ready .story-modal__content {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    .story-step--gift-ready {
        position: relative;
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        box-sizing: border-box;
        height: 100%;
        min-height: 0;
        padding: 0 52px 34px;
        text-align: center;
    }

    .story-gift-ready__scroll {
        grid-row: 1;
        grid-column: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 25px 0 28px;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .story-gift-ready__scroll::-webkit-scrollbar {
        display: none;
    }

    .story-modal-scrollbar.story-gift-ready-scrollbar {
        position: static;
        grid-row: 1;
        grid-column: 1;
        align-self: stretch;
        justify-self: end;
        width: 7px;
        margin: 145px -32px 18px 0;
    }

    .story-gift-ready__back {
        position: absolute;
        top: 36px;
        left: 54px;
        border: 0;
        padding: 5px;
        background: transparent;
    }

    .story-gift-ready__back img {
        display: block;
        width: 15px;
        height: 20px;
        filter: brightness(0) saturate(100%) invert(12%) sepia(75%) saturate(3133%) hue-rotate(320deg) brightness(72%);
        transform: rotate(180deg);
    }

    .story-step--gift-ready .story-checkmark {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
        margin: 0 0 48px;
        font-size: 44px;
    }

    .story-step--gift-ready h1 {
        margin: 0 0 42px;
        font-size: 42px;
        line-height: 1.2;
    }

    .story-gift-ready__message {
        margin: 0;
        font-size: 16px;
        line-height: 2;
        letter-spacing: .5px;
    }

    .story-gift-ready__actions {
        grid-row: 2;
        flex: 0 0 auto;
        width: 100%;
        margin-top: 18px;
    }

    .story-gift-ready__home {
        width: 145px;
        height: 55px;
        font-size: 16px;
    }

    .story-gift-ready__send {
        width: 235px;
        height: 55px;
        font-size: 16px;
    }

    /* Legacy Book plan */
    .story-modal__dialog--legacy-plan {
        width: min(550px, 100%);
        height: min(820px, calc(100vh - 48px));
        overflow: hidden;
    }

    .story-modal__dialog--legacy-plan .story-modal__content {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    .story-step--legacy-plan {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        height: 100%;
        min-height: 0;
    }

    .story-legacy-plan__scroll {
        grid-row: 1;
        grid-column: 1;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 62px 58px 35px;
        scrollbar-width: none;
    }

    .story-legacy-plan__scroll::-webkit-scrollbar {
        display: none;
    }

    .story-step--legacy-plan h1 {
        margin: 0 35px 48px 0;
        font-size: 40px;
        line-height: 1.15;
    }

    .story-step--legacy-plan .story-modal__header {
        padding-bottom: 1px;
    }

    .story-legacy-plan__card {
        overflow: hidden;
        border: 1px solid var(--story-maroon);
        border-radius: 30px;
        text-align: center;
    }

    .story-legacy-plan__card header {
        display: grid;
        gap: 3px;
        padding: 12px 20px;
        background: #5f172d;
        color: var(--story-cream);
    }

    .story-legacy-plan__card header strong {
        font-size: 16px;
        font-weight: 400;
    }

    .story-legacy-plan__card header small {
        font-size: 11px;
    }

    .story-legacy-plan__card>div {
        padding: 24px 26px 28px;
    }

    .story-legacy-plan__card>div>strong {
        font-size: 17px;
        font-weight: 400;
    }

    .story-legacy-plan__card p {
        margin: 20px 0 0;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--story-line);
        font-size: 12px;
    }

    .story-legacy-plan__card p:last-child {
        border-bottom: 0;
    }

    .story-legacy-plan__notes {
        margin: 34px 0 0;
        padding-left: 18px;
        font-size: 12px;
        line-height: 1.35;
    }

    .story-legacy-plan__footer {
        grid-row: 2;
        border-top: 1px solid var(--story-line);
        padding: 26px 48px 34px;
    }

    .story-legacy-plan__footer .story-button {
        height: 55px;
        font-size: 15px;
        white-space: nowrap;
    }

    .story-legacy-plan__footer .story-button--back {
        width: 145px;
    }

    .story-legacy-plan__footer .story-button--primary {
        width: 200px;
    }

    .story-modal-scrollbar.story-legacy-plan-scrollbar {
        position: static;
        grid-row: 1;
        grid-column: 1;
        align-self: stretch;
        justify-self: end;
        width: 7px;
        margin: 135px 20px 25px 0;
    }

    /* Legacy Book family-member invitation */
    .story-step--legacy-members {
        position: relative;
    }

    .story-step--legacy-members .story-semi-invite__main {
        padding-top: 78px;
    }

    .story-step--legacy-members h1 {
        margin-bottom: 24px;
    }

    .story-step--legacy-members .story-semi-invite__lead {
        margin-bottom: 46px;
    }

    .story-legacy-members__back {
        position: absolute;
        z-index: 5;
        top: 34px;
        left: 50px;
        border: 0;
        padding: 5px;
        background: transparent;
    }

    .story-legacy-members__back img {
        display: block;
        width: 15px;
        height: 20px;
        filter: brightness(0) saturate(100%) invert(12%) sepia(75%) saturate(3133%) hue-rotate(320deg) brightness(72%);
        transform: rotate(180deg);
    }

    .story-legacy-member {
        display: grid;
        gap: 25px;
        margin-bottom: 44px;
    }

    .story-legacy-member h3 {
        margin: 0 0 12px;
        font: 600 16px/1.2 Lora, serif;
        letter-spacing: .5px;
    }

    .story-step--legacy-members .story-semi-invite__footer .story-button--back {
        width: 185px;
    }

    .story-step--legacy-members .story-semi-invite__footer .story-button--primary {
        width: 175px;
    }

    /* Semi-autobiography co-author invitation */
    .story-modal__dialog--semi-invite {
        width: min(550px, 100%);
        height: min(820px, calc(100vh - 48px));
        overflow: hidden;
    }

    .story-modal__dialog--semi-invite .story-modal__content,
    .story-step--semi-invite,
    .story-semi-invite__form {
        height: 100%;
        min-height: 0;
        padding: 0;
    }

    .story-step--semi-invite,
    .story-semi-invite__form {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .story-semi-invite__main {
        grid-row: 1;
        grid-column: 1;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 72px 68px 40px 54px;
        scrollbar-width: none;
    }

    .story-semi-invite__main::-webkit-scrollbar {
        display: none;
    }

    .story-step--semi-invite h1 {
        margin: 0 35px 20px 0;
        font-size: 42px;
        line-height: 1.15;
    }

    .story-semi-invite__lead {
        margin: 0 0 48px;
        font-size: 16px;
        line-height: 1.85;
        letter-spacing: .5px;
    }

    .story-semi-invite__fields {
        display: grid;
        gap: 26px;
    }

    .story-semi-invite__fields .story-field input {
        font-size: 16px;
    }

    .story-semi-invite__footer {
        grid-row: 2;
        border-top: 1px solid var(--story-line);
        padding: 34px 48px;
    }

    .story-semi-invite__footer .story-button {
        width: 175px;
        height: 55px;
        font-size: 15px;
    }

    .story-modal-scrollbar.story-semi-invite-scrollbar {
        position: static;
        grid-row: 1;
        grid-column: 1;
        align-self: stretch;
        justify-self: end;
        width: 7px;
        margin: 125px 20px 30px 0;
    }

    .story-modal__dialog--semi-invite-success {
        width: min(550px, 100%);
        height: min(820px, calc(100vh - 48px));
        overflow: hidden;
    }

    .story-modal__dialog--semi-invite-success .story-modal__content {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    .story-step--semi-invite-success {
        position: relative;
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        box-sizing: border-box;
        height: 100%;
        min-height: 0;
        padding: 0 52px 40px;
        text-align: center;
    }

    .story-semi-invite-success__scroll {
        grid-row: 1;
        grid-column: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 160px 0 30px;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .story-semi-invite-success__scroll::-webkit-scrollbar {
        display: none;
    }

    .story-modal-scrollbar.story-semi-invite-success-scrollbar {
        position: static;
        grid-row: 1;
        grid-column: 1;
        align-self: stretch;
        justify-self: end;
        width: 7px;
        margin: 145px -32px 18px 0;
    }

    .story-semi-invite-success__back {
        position: absolute;
        top: 36px;
        left: 54px;
        border: 0;
        padding: 5px;
        background: transparent;
    }

    .story-semi-invite-success__back img {
        display: block;
        width: 15px;
        height: 20px;
        filter: brightness(0) saturate(100%) invert(12%) sepia(75%) saturate(3133%) hue-rotate(320deg) brightness(72%);
        transform: rotate(180deg);
    }

    .story-step--semi-invite-success .story-checkmark {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
        margin: 0 0 48px;
        font-size: 44px;
    }

    .story-step--semi-invite-success h1 {
        margin: 0 0 34px;
        font-size: 40px;
        line-height: 1.35;
    }

    .story-semi-invite-success__message {
        margin: 0 0 28px;
        font-size: 16px;
        line-height: 1.9;
        letter-spacing: .5px;
    }

    .story-semi-invite-success__continue {
        grid-row: 2;
        justify-self: center;
        width: 145px;
        height: 55px;
        margin-top: 18px;
        font-size: 16px;
    }

    /* Gifting flow */
    .story-modal__dialog--gift {
        width: min(550px, 100%);
        height: min(820px, calc(100vh - 48px));
        overflow: hidden;
    }

    .story-gift__content {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    .story-gift {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        box-sizing: border-box;
        height: 100%;
        min-height: 0;
    }

    .story-gift__form {
        display: contents;
    }

    .story-gift__scroll {
        grid-row: 1;
        grid-column: 1;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 70px 68px 35px 54px;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .story-gift__scroll::-webkit-scrollbar {
        display: none;
    }

    .story-gift h1,
    .story-gift h2 {
        margin: 0 38px 42px 0;
        font-size: 42px;
        font-weight: 400;
        line-height: 1.15;
    }

    .story-gift h2 {
        margin-top: 62px;
    }

    .story-gift__intro {
        margin: -18px 0 35px;
        font-size: 16px;
        line-height: 1.8;
        letter-spacing: .5px;
    }

    .story-gift__fields {
        display: grid;
        gap: 30px;
    }

    .story-gift__field input,
    .story-gift__field textarea {
        display: block;
        width: 100%;
        border: 0;
        border-bottom: 1px solid var(--story-line);
        outline: 0;
        padding: 10px 0;
        resize: none;
        background: transparent;
        color: var(--story-maroon);
        font: 16px/1.4 Lora, serif;
    }

    .story-gift__field input::placeholder,
    .story-gift__field textarea::placeholder {
        color: var(--story-maroon);
        opacity: 1;
    }

    .story-gift__footer {
        grid-row: 2;
        border-top: 1px solid var(--story-line);
        padding: 36px 48px 34px;
    }

    .story-gift__footer .story-actions {
        justify-content: flex-end;
    }

    .story-gift__footer .story-button--primary {
        width: 155px;
        height: 55px;
        font-size: 15px;
    }

    .story-modal-scrollbar.story-gift-scrollbar {
        position: static;
        grid-row: 1;
        grid-column: 1;
        align-self: stretch;
        justify-self: end;
        width: 7px;
        margin: 80px 20px 25px 0;
    }

    @media (max-width: 640px) {
        .story-modal {
            padding: 10px;
        }

        .story-modal__dialog {
            max-height: calc(100vh - 20px);
            max-height: calc(100dvh - 20px);
            border-radius: 18px;
        }

        .story-modal__content {
            min-height: 540px;
            max-height: calc(100vh - 20px);
            max-height: calc(100dvh - 20px);
            padding: 52px 24px 30px;
        }

        .story-modal__dialog--gift {
            height: calc(100vh - 20px);
        }

        .story-gift__scroll {
            padding: 60px 40px 28px 24px;
        }

        .story-gift h1,
        .story-gift h2 {
            font-size: 34px;
        }

        .story-gift__footer {
            padding: 24px;
        }

        .story-modal__header::before {
            right: -24px;
            left: -24px;
        }

        .story-modal__dialog--terms {
            height: calc(100vh - 20px);
        }

        .story-modal__dialog--payment {
            height: calc(100vh - 20px);
        }

        .story-payment__main {
            padding: 55px 24px 25px;
        }

        .story-modal-scrollbar.story-payment-scrollbar {
            top: 125px;
            right: 10px;
            bottom: 165px;
        }

        .story-step--payment h1 {
            font-size: 36px;
        }

        .story-step--payment .story-summary {
            margin-top: 38px;
            padding: 24px;
            border-radius: 26px;
        }

        .story-payment__footer {
            padding: 12px 24px 24px;
        }

        .story-payment__footer .story-button--back {
            width: 125px;
        }

        .story-payment__footer .story-button--primary {
            width: 150px;
        }

        .story-modal__dialog--terms .story-modal__content {
            height: 100%;
            min-height: 0;
            padding: 55px 24px 24px;
        }

        .story-step--terms h1 {
            margin-bottom: 32px;
            font-size: 34px;
            white-space: normal;
        }

        .story-terms {
            height: auto;
            padding-right: 16px;
        }

        .story-terms__footer .story-button--primary {
            min-width: 150px;
        }

        .story-modal__dialog--specs {
            height: calc(100vh - 20px);
        }

        .story-specs-scroll {
            padding: 55px 38px 55px 24px;
        }

        .story-step--specs h1 {
            font-size: 34px;
        }

        .story-specs__skip {
            margin-left: 10px;
        }

        .story-layouts {
            gap: 16px;
        }

        .story-specs__footer {
            padding: 12px 24px 24px;
        }

        .story-specs__footer .story-button--back {
            width: 125px;
        }

        .story-specs__footer .story-button--primary {
            width: 150px;
        }

        .story-plans {
            grid-template-columns: 1fr;
        }

        .story-days {
            grid-template-columns: repeat(2, 1fr);
        }

        .story-actions {
            flex-wrap: wrap;
        }
    }

    /* Bespoke package modal overrides. */
    /* Bespoke package modal background. */
    #bespoke-package-modals {
        --story-cream: #F6CBBF;
    }

    /* Keep every bespoke screen the same size as the login modal. */
    #bespoke-package-modals .story-modal__dialog {
        width: min(550px, 100%);
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
    }

    #bespoke-package-modals .story-modal__content {
        height: 560px;
        min-height: 560px;
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
    }

    #bespoke-package-modals .story-modal__dialog--specs {
        width: min(550px, 100%);
        height: min(820px, calc(100vh - 48px));
        height: min(820px, calc(100dvh - 48px));
        overflow: hidden;
    }

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

    #bespoke-package-modals .story-modal__dialog--bespoke-intro {
        width: min(550px, 100%);
        border-radius: 26px;
    }

    #bespoke-package-modals .story-modal__dialog--bespoke-intro .story-modal__content {
        min-height: 560px;
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 58px 64px 48px;
    }

    #bespoke-package-modals .story-modal__dialog--bespoke-plan {
        width: min(550px, 100%);
    }

    #bespoke-package-modals .story-modal__dialog--bespoke-plan .story-modal__content {
        min-height: 560px;
        padding: 0;
    }

    .bespoke-plan {
        min-height: 578px;
        padding: 39px 36px 25px;
        color: #5F2029;
        font-family: 'Lora', serif;
    }

    .bespoke-plan h1 {
        margin: 0 0 8px;
        font-family: 'The Blendinroom', 'Lora', serif;
        font-size: 35px;
        font-weight: 400;
    }

    .bespoke-plan__lead {
        margin: 0 0 18px;
        font-size: 15px;
        line-height: 1.8;
    }

    .bespoke-plan__summary {
        padding: 24px 21px 22px;
        border-radius: 25px;
        background: #234346;
        color: #F6CBBF;
    }

    .bespoke-plan__summary h2,
    .bespoke-plan__summary p,
    .bespoke-plan__summary strong {
        margin: 0;
        font-weight: 400;
    }

    .bespoke-plan__summary h2,
    .bespoke-plan__summary strong {
        font-size: 15px;
        letter-spacing: .35px;
    }

    .bespoke-plan__summary p {
        margin: 6px 0 18px;
        font-size: 11px;
        line-height: 1.35;
    }

    .bespoke-plan__manuscript {
        margin-top: 27px;
    }

    .bespoke-plan__manuscript h2 {
        margin: 0 0 13px;
        font-size: 15px;
        font-weight: 400;
    }

    .bespoke-plan__manuscript > p,
    .bespoke-plan__upload,
    .bespoke-plan__manuscript small {
        display: block;
        font-size: 11px;
    }

    .bespoke-plan__manuscript > p {
        margin: 0 0 7px;
    }

    .bespoke-plan__status {
        display: flex;
        gap: 27px;
        margin-bottom: 15px;
    }

    .bespoke-plan__status label,
    .bespoke-plan__ai {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 11px;
        line-height: 1.25;
    }

    .bespoke-plan input {
        position: absolute;
        opacity: 0;
    }

    .bespoke-plan__status span,
    .bespoke-plan__ai span {
        width: 19px;
        height: 19px;
        flex: 0 0 19px;
        border: 1px solid #8d565c;
        border-radius: 50%;
    }

    .bespoke-plan__status input:checked + span::after {
        display: block;
        width: 11px;
        height: 11px;
        margin: 3px;
        border-radius: 50%;
        background: #5F2029;
        content: '';
    }

    .bespoke-plan__upload {
        position: relative;
        padding: 6px 0 8px;
        border-bottom: 1px solid #8d565c;
        cursor: pointer;
    }

    .bespoke-plan__upload i {
        position: absolute;
        right: 3px;
        bottom: 7px;
        font-size: 18px;
    }

    .bespoke-plan__manuscript small {
        margin-top: 7px;
    }

    .bespoke-plan__ai {
        margin-top: 12px;
    }

    .bespoke-plan__ai span {
        border-radius: 50%;
    }

    .bespoke-plan__ai input:checked + span::after {
        display: block;
        width: 9px;
        height: 9px;
        margin: 4px;
        border-radius: 50%;
        background: #5F2029;
        content: '';
    }

    .bespoke-plan__actions {
        display: grid;
        grid-template-columns: 1fr auto 1.25fr;
        align-items: center;
        gap: 10px;
        margin-top: 15px;
    }

    .bespoke-plan__back,
    .bespoke-plan__next,
    .bespoke-plan__help {
        border: 1px solid #5F2029;
        font: 400 14px 'Lora', serif;
        cursor: pointer;
    }

    .bespoke-plan__back,
    .bespoke-plan__next {
        height: 49px;
        border-radius: 999px;
    }

    .bespoke-plan__back {
        background: transparent;
        color: #5F2029;
    }

    .bespoke-plan__back i {
        margin-right: 12px;
        font-size: 12px;
    }

    .bespoke-plan__help {
        width: 55px;
        height: 29px;
        border-radius: 999px;
        background: transparent;
        color: #5F2029;
        font-size: 12px;
    }

    .bespoke-plan__next {
        background: #5F2029;
        color: #F6CBBF;
    }

    .bespoke-intro {
        position: relative;
        min-height: 454px;
        padding: 0;
        overflow: hidden;
        color: #5F2029;
        font-family: 'Lora', serif;
    }

    .bespoke-intro h1 {
        margin: 0 0 26px;
        color: #5F2029;
        font-family: 'The Blendinroom', 'Lora', serif;
        font-size: 36px;
        font-weight: 400;
        line-height: 1.17;
    }

    .bespoke-intro__package {
        margin: 0 0 8px;
        font-size: 15px;
        letter-spacing: .3px;
    }

    .bespoke-intro__description {
        position: relative;
        z-index: 1;
        max-width: 330px;
        margin: 0;
        font-size: 15px;
        line-height: 1.82;
        letter-spacing: .15px;
    }

    .bespoke-intro__start {
        position: relative;
        z-index: 2;
        margin-top: 16px;
        padding: 13px 25px;
        border: 0;
        border-radius: 999px;
        background: #5F2029;
        color: #F6CBBF;
        font: 400 15px 'Lora', serif;
        cursor: pointer;
    }

    .bespoke-intro__art {
        position: absolute;
        right: 3px;
        bottom: 24px;
        width: 244px;
        height: auto;
    }

    .bespoke-intro__terms {
        position: absolute;
        z-index: 2;
        bottom: 33px;
        left: 45px;
        color: #5F2029;
        font-size: 15px;
    }

    @media (max-width: 520px) {
        #bespoke-package-modals .story-modal__dialog--bespoke-intro {
            padding: 10px;
        }

        #bespoke-package-modals .story-modal__dialog--bespoke-intro .story-modal__content {
            min-height: min(560px, calc(100dvh - 20px));
        }

        .bespoke-intro {
            min-height: min(454px, calc(100dvh - 126px));
        }

        .bespoke-intro {
            padding: 48px 10% 28px;
        }

        .bespoke-intro h1 {
            font-size: clamp(29px, 8vw, 36px);
        }

        .bespoke-intro__art {
            width: min(58vw, 244px);
        }

        .bespoke-intro__terms {
            left: 10%;
        }
    }

    /* Restored Book Specifications base styles. */
    .story-step--specs,
    .story-specs__form {
        height: 100%;
    }

    .story-specs__form {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .story-specs-scroll {
        grid-row: 1;
        grid-column: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-anchor: none;
        padding: 62px 70px 70px 54px;
        scrollbar-width: none;
    }

    .story-specs-scroll::-webkit-scrollbar {
        display: none;
    }

    .story-step--specs h1 {
        margin: 0 0 22px;
        font-size: 44px;
    }

    .story-specs__lead {
        margin: 0 0 30px;
        font-size: 16px;
        line-height: 1.8;
    }

    .story-specs__skip {
        display: inline;
        margin-left: 52px;
        font-size: 16px;
        white-space: nowrap;
    }

    .story-specs__line {
        display: block;
        margin-bottom: 30px;
    }

    .story-specs__line input,
    .story-specs__line select {
        width: 100%;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid var(--story-line);
        outline: 0;
        appearance: none;
        background: transparent;
        color: var(--story-maroon);
        font: 16px "Lora", serif;
    }

    .story-specs__line input::placeholder {
        color: var(--story-maroon);
        opacity: 1;
    }

    .story-specs__select {
        position: relative;
    }

    .story-specs__select::after {
        content: '⌄';
        position: absolute;
        right: 8px;
        bottom: 10px;
        pointer-events: none;
    }

    .story-specs__section {
        margin-bottom: 30px;
    }

    .story-specs__section h3 {
        margin: 0 0 14px;
        font: 400 16px "Lora", serif;
    }

    .story-specs__section p {
        margin: 0 0 20px;
        font-size: 12px;
    }

    .story-unit {
        display: inline-flex;
        margin-left: 15px;
        padding: 2px;
        border: 1px solid var(--story-line);
        border-radius: 999px;
        overflow: hidden;
        vertical-align: middle;
    }

    .story-unit button {
        padding: 5px 10px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--story-maroon);
        font: 400 12px/1 "Lora", serif;
    }

    .story-unit button.is-active {
        background: var(--story-maroon);
        color: var(--story-cream);
    }

    .story-option {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 13px 0;
        font-size: 14px;
        cursor: pointer;
    }

    .story-option input,
    .story-layout input {
        position: absolute;
        top: 50%;
        left: 0;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        transform: translateY(-50%);
    }

    .story-option input:checked + .story-radio::after {
        opacity: 1;
    }

    .story-inline-options {
        display: flex;
        gap: 32px;
    }

    .story-layouts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 38px;
    }

    .story-layout {
        position: relative;
        cursor: pointer;
    }

    .story-layout__page {
        display: grid;
        place-content: center;
        width: 100%;
        aspect-ratio: .82;
        padding: 18px;
        border: 1px solid var(--story-line);
        border-radius: 32px;
        background: #fffdf2;
        color: #130b0d;
        text-align: center;
    }

    .story-layout__page small,
    .story-layout__page strong,
    .story-layout__page em {
        display: block;
    }

    .story-layout__page small {
        margin-bottom: 28px;
        font-size: 5px;
        letter-spacing: 2px;
    }

    .story-layout__page strong {
        font: 600 12px/1.2 Georgia, serif;
    }

    .story-layout__page em {
        margin-top: 28px;
        font: 7px/1.5 Georgia, serif;
    }

    .story-layout input:checked + .story-layout__page {
        outline: 2px solid var(--story-maroon);
        outline-offset: 3px;
    }

    .story-spine {
        margin-top: 50px;
    }

    .story-spine__panel[hidden] {
        display: none;
    }

    .story-spine__panel ul {
        margin: 8px 0 30px;
        padding-left: 20px;
        font-size: 12px;
        line-height: 1.4;
    }

    .story-spine__panel p {
        margin: 18px 0 24px;
        font-size: 14px;
        line-height: 1.35;
    }

    .story-spine__panel .story-spine__example {
        margin-top: 8px;
        font-size: 12px;
    }

    .story-closing h3 {
        line-height: 1.8;
    }

    .story-closing__choice {
        margin-top: 32px;
        font-size: 16px;
    }

    .story-closing-example {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 28px;
        padding: 20px;
        background: #fff;
    }

    .story-closing-example figure {
        margin: 0;
        padding: 0 14px;
    }

    .story-closing-example figure + figure {
        border-left: 1px solid var(--story-line);
    }

    .story-closing-example img {
        display: block;
        width: 100%;
        aspect-ratio: .82;
        object-fit: cover;
    }

    .story-closing-example figcaption {
        margin-top: 10px;
        font-size: 11px;
    }

    .story-closing-example.is-two-per-page {
        row-gap: 12px;
    }

    .story-closing-example.is-two-per-page figure {
        border-left: 0;
    }

    .story-closing-example.is-two-per-page figure:nth-child(even) {
        border-left: 1px solid var(--story-line);
    }

    .story-closing-example.is-two-per-page img {
        aspect-ratio: 1.75;
    }

    .story-photo-uploads {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
        margin: 20px 0;
    }

    .story-photo-uploads label {
        position: relative;
        display: grid;
        place-items: center;
        min-height: 82px;
        border: 1px solid var(--story-line);
        cursor: pointer;
    }

    .story-photo-uploads input {
        position: absolute;
        opacity: 0;
    }

    .story-photo-uploads b {
        position: absolute;
        top: 6px;
        left: 8px;
        font-size: 11px;
    }

    .story-photo-uploads span {
        font-size: 26px;
    }

    .story-photo-note {
        line-height: 1.5;
    }

    .story-payment__extras {
        margin: 28px 0 0;
    }

    .story-payment__extras h2 {
        margin: 0 0 18px;
        font: 400 20px "Lora", serif;
    }

    .story-payment__extras p {
        font-size: 14px;
        line-height: 1.35;
    }

    .story-payment__extras .bespoke-book-count {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-top: 16px;
    }

    .story-payment__extras .bespoke-book-count button {
        width: 28px;
        height: 28px;
        border: 1px solid var(--story-line);
        border-radius: 50%;
        background: transparent;
        color: var(--story-maroon);
    }

    .story-payment__extras .bespoke-book-count strong {
        margin-left: auto;
        font: 400 20px "Lora", serif;
    }

    .story-specs__footer {
        border-top: 1px solid var(--story-line);
        padding: 12px 52px 34px;
    }

    .story-specs__footer .story-help-button {
        margin-top: -52px;
        margin-bottom: 10px;
    }

    .story-specs__footer .story-button--back {
        width: 110px;
        height: 55px;
    }

    .story-specs__footer .story-button--primary {
        width: 160px;
        height: 55px;
    }


    @media (max-width: 640px) {
        .story-specs-scroll {
            padding: 54px 34px 58px 30px;
        }

        .story-step--specs h1 {
            font-size: 32px;
        }

        .story-specs__skip {
            display: inline-block;
            margin: 8px 0 0;
        }

        .story-layouts {
            gap: 18px;
        }

        .story-specs__footer {
            padding: 12px 28px 24px;
        }
    }

    /* Keep the owl success animation large in the final gift state. */
    .story-step--gift-ready .story-checkmark {
        flex: 0 0 200px;
        width: 200px;
        height: 200px;
        overflow: hidden;
        background: transparent;
    }