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

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: thin;
    scrollbar-color: #cb8d7a transparent;
    padding: 58px 64px 48px;
}

.story-modal__content::-webkit-scrollbar {
    width: 7px;
}

.story-modal__content::-webkit-scrollbar-track {
    background: transparent;
}

.story-modal__content::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: #cb8d7a;
}

/* Keep each screen title in place while only its body content scrolls. */
.story-modal__content #story-modal-title {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--story-cream);
}

.story-modal__close {
    position: absolute;
    z-index: 2;
    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;
}

.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 30px;
    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-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::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

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

.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(100vh - 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-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 {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
}

.story-payment__main {
    padding: 62px 54px 35px;
}

.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;
    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;
    padding: 0;
}

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

.story-schedule__main {
    position: relative;
    height: 100%;
    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: flex;
    flex-direction: column;
}

.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 {
    margin-top: 30px;
}

.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;
    padding: 62px 55px 34px;
}

.story-step--questions {
    position: relative;
    height: 100%;
}

.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: flex;
    flex-direction: column;
    height: calc(100% - 240px);
}

.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) .story-answer {
    padding-bottom: 0;
}

.story-answer textarea {
    display: block;
    width: 100%;
    height: 40px;
    padding: 8px 44px 8px 0;
    border: 0;
    outline: 0;
    resize: none;
    overflow: hidden;
    background: transparent;
    color: var(--story-maroon);
    font: 13px/1.4 Lora, serif;
}

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

.story-mic {
    position: absolute;
    right: 0;
    top: 3px;
    bottom: auto;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--story-green);
    border-radius: 50%;
    background: transparent;
    color: var(--story-green);
    font-size: 16px;
}

.story-ai-correct {
    position: absolute;
    z-index: 1;
    left: 0;
    bottom: 8px;
    border: 1px solid var(--story-maroon);
    border-radius: 999px;
    padding: 5px 15px;
    background: var(--story-cream);
    color: var(--story-maroon);
    font: 12px/1 Lora, serif;
}

.story-questions__actions {
    margin-top: auto;
}

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

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

.story-days {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 18px 0 24px;
    padding: 20px;
    border: 1px solid var(--story-line);
    border-radius: 20px;
}

.story-days label,
.story-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
}

.story-center {
    min-height: 450px;
    display: grid;
    place-content: center;
    text-align: center;
}

.story-checkmark {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 26px;
    border-radius: 50%;
    background: var(--story-green);
    color: white;
    font-size: 34px;
}

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

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

.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;
    overflow-y: auto;
    padding: 62px 70px 70px 54px;
    scrollbar-width: none;
}

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

.story-specs-scrollbar {
    grid-row: 1;
    grid-column: 1;
    align-self: stretch;
    justify-self: end;
    width: 7px;
    margin: 170px 20px 30px 0;
    pointer-events: none;
}

.story-specs-scrollbar span {
    display: block;
    width: 7px;
    border-radius: 20px;
    background: #cb8d7a;
}

.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;
    letter-spacing: 1px;
}

.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;
    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: 8px;
    font-size: 28px;
    pointer-events: none;
}

.story-specs__line select {
    appearance: 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;
    border: 1px solid var(--story-line);
    border-radius: 999px;
    overflow: hidden;
    vertical-align: middle;
    font-size: 12px;
    padding: 2px;
}

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

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

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

.story-option input,
.story-layout input {
    position: absolute;
    opacity: 0;
}

.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, 1fr);
    gap: 38px;
}

.story-layout {
    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 {
    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-closing h3 {
    font-size: 16px;
    line-height: 1.8;
}

.story-closing .story-option {
    margin-top: 28px;
    font-size: 16px;
}

.story-specs__footer {
    grid-row: 2;
    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;
    padding: 0 22px;
    font-size: 16px;
}

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

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

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

.story-step--complete {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 114px 52px 34px;
    text-align: center;
}

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

.story-complete__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--complete .story-checkmark {
    width: 100px;
    height: 100px;
    margin: 0 0 48px;
    font-size: 44px;
}

.story-step--complete h1 {
    margin: 0 0 42px;
    font-size: 42px;
    line-height: 1.25;
    text-align: center;
}

.story-complete__week {
    margin: 0 0 46px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 1px;
}

.story-complete__message {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 2.2;
    text-align: center;
}

.story-complete__actions {
    width: 100%;
    margin-top: auto;
}

.story-complete__home {
    width: 140px;
    height: 55px;
    padding: 0 22px;
    font-size: 16px;
}

.story-complete__dashboard {
  width: 250px;
    height: 55px;
    padding: 0 28px;
    font-size: 16px;
}

@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--terms {
        height: calc(100vh - 20px);
    }

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

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

    .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;
    }
}
