.download-page {
    background: var(--background-white);
}

.download-page .header {
    position: sticky;
    top: 0;
}

.download,
.download * {
    box-sizing: border-box;
}

.download {
    flex: 1 0 auto;
    min-height: 100svh;
    padding: 64px 32px 80px;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

.download-hero {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.download-icon {
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto 32px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.download h1 {
    margin: 0;
    font-size: clamp(48px, 5.5vw, 80px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.045em;
    text-wrap: balance;
    overflow-wrap: break-word;
}

.download-description {
    max-width: 780px;
    margin: 24px auto 0;
    font-size: 22px;
    line-height: 1.5;
    color: var(--text-light);
    text-wrap: pretty;
}

.download .store-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

/* Match the store badges and tap areas on the invitation page. */
.download .store-badge {
    display: block;
    padding: 12.5px;
    line-height: 0;
}

.download .store-badge img {
    display: block;
    height: 50px;
    width: auto;
    max-width: 100%;
}

.download-screenshots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(24px, 4vw, 72px);
    max-width: 960px;
    margin: 72px auto 0;
}

.download-screenshots img {
    display: block;
    width: 100%;
    height: auto;
    border: 7px solid #000;
    border-radius: 42px;
    background: #000;
}

.download-page .footer {
    position: static;
}

.download-mobile-action {
    display: none;
}

@media (max-width: 767px) {
    .download-mobile-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        margin: 56px -20px -48px;
        padding: 72px 20px 80px;
        border-top: 1px solid rgba(147, 52, 221, 0.06);
        background: linear-gradient(180deg, #f7f7f9 0%, #f1eef5 100%);
        text-align: center;
    }

    .download-mobile-action h2 {
        margin: 0;
        max-width: min(100%, 20ch);
        font-size: 28px;
        line-height: 1.2;
        font-weight: 600;
        letter-spacing: -0.035em;
        text-wrap: balance;
    }

    .download-cta-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: calc(50% + 20px);
        max-width: 100%;
        min-height: 48px;
        height: auto;
        padding: 12px 16px;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        background: var(--primary);
        color: #fff;
        border: 2px solid var(--primary);
        transition: var(--transition-fast);
        line-height: 1.25;
        white-space: normal;
        border-radius: 16px;
        box-shadow: 0 6px 18px rgba(112, 34, 181, 0.18);
    }

    .download-cta-button:hover {
        background: var(--primary-dark);
        border-color: var(--primary-dark);
        transform: translateY(-2px);
    }

    .download {
        padding: 48px 20px 48px;
    }

    .download-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 28px;
        border-radius: 15px;
    }

    .download h1 {
        font-size: clamp(40px, 10vw, 64px);
    }

    .download-description {
        margin-top: 20px;
        font-size: 18px;
    }

    .download .store-links {
        max-width: 380px;
        margin-inline: auto;
        flex-wrap: nowrap;
    }

    .download .store-badge {
        flex: 0 1 50%;
        min-width: 0;
        padding: 8px;
    }

    .download .store-badge img {
        width: 100%;
        height: auto;
        max-height: 46px;
        object-fit: contain;
    }

    .download-screenshots {
        display: block;
        width: calc(100% - 20px);
        max-width: 440px;
        margin-top: 44px;
    }

    .download-screenshots img:not(:first-child) {
        display: none;
    }
}

@media (max-width: 767px) and (prefers-color-scheme: dark) {
    .download-mobile-action {
        background: linear-gradient(180deg, #242426 0%, #29232f 100%);
        border-top-color: rgba(212, 179, 243, 0.08);
    }
}
