/* Crypto Split — mobile layout */

.exchange-page {
    overflow-x: hidden;
}

.wallet-mobile-hint {
    display: none;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.mm-open-app-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.65rem;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 760px) {
    .exchange-page .wallet-mobile-hint {
        display: block;
    }

    .exchange-page .wallet-connect .btn.primary,
    .exchange-page .wallet-connect .btn.primary.mm-open-primary {
        width: 100%;
        justify-content: center;
    }
    .exchange-page .hero-section {
        padding: 1.5rem 1rem 1.75rem;
        padding-top: max(1.5rem, env(safe-area-inset-top));
    }

    .exchange-page .hero-glow {
        display: none;
    }

    /* Mobile hero: only feature pills + commission + timing */
    .exchange-page .hero-badge,
    .exchange-page .hero-title,
    .exchange-page .hero-sub,
    .exchange-page .hero-cta {
        display: none !important;
    }

    .exchange-page .hero-content {
        padding: 0;
    }

    .exchange-page .feature-pills {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        padding: 0;
        margin: 0;
        max-width: 100%;
    }

    .exchange-page .feature-pills .pill {
        width: 100%;
        justify-content: flex-start;
        font-size: 0.88rem;
        padding: 0.7rem 0.85rem;
        border-radius: 10px;
    }

    .exchange-page .commission-notice,
    .exchange-page .timing-notice {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: flex-start;
        margin-top: 0.75rem;
        margin-left: 0;
        margin-right: 0;
        font-size: 0.82rem;
        text-align: left;
        max-width: 100%;
        width: 100%;
        line-height: 1.45;
    }

    .exchange-page .timing-notice {
        margin-top: 0.55rem;
    }

    .exchange-page .layout {
        padding: 1rem 0.85rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .exchange-page .card-head {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .exchange-page .card-head .hint {
        width: 100%;
    }

    .exchange-page .row-3 {
        grid-template-columns: 1fr;
    }

    .exchange-page .address-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .exchange-page .address-row code {
        width: 100%;
    }

    .exchange-page .balances {
        grid-template-columns: 1fr;
    }

    .exchange-page .receive-coin-row {
        flex-direction: column;
        align-items: stretch;
    }

    .exchange-page .receive-coin-row label {
        width: 100%;
    }

    .exchange-page .pct-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .exchange-page .recipient-grid.head {
        display: none;
    }

    .exchange-page .recipient-grid.row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.85rem;
        background: #0f1218;
        border: 1px solid #2d3544;
        border-radius: 10px;
        margin-bottom: 0.75rem;
    }

    .exchange-page .recipient-grid.row .row-num {
        text-align: left;
        font-weight: 700;
        color: #00ff9d;
        font-size: 0.82rem;
    }

    .exchange-page .recipient-grid.row .row-num::before {
        content: "Recipient ";
    }

    .exchange-page .recipient-grid.row .send-amt,
    .exchange-page .recipient-grid.row .recv-amt {
        font-size: 0.78rem;
        padding-top: 0.15rem;
        border-top: 1px solid #2d3544;
    }

    .exchange-page .recipient-grid.row .send-amt::before {
        content: "You send: ";
        color: #9aa0a6;
    }

    .exchange-page .recipient-grid.row .recv-amt::before {
        content: "They get ≈ ";
        color: #9aa0a6;
    }

    .exchange-page .rates-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .exchange-page .send-footer-main .btn.primary {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .exchange-page .announcement-overlay {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .exchange-page .announcement {
        width: 100%;
        max-height: 92vh;
        border-radius: 14px 14px 0 0;
        padding: 1rem 1rem 1.25rem;
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }

    .exchange-page .fd-legend {
        flex-direction: column;
        gap: 0.35rem;
    }

    .exchange-page .history-card {
        margin: 0 0.85rem 1rem;
    }

    .exchange-page .site-footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .exchange-page .pay-mode-tabs {
        grid-template-columns: 1fr;
    }

    .exchange-page .manual-treasury-row {
        flex-direction: column;
        align-items: stretch;
    }

    .exchange-page.manual-split-mode .recipient-grid.row .send-amt,
    .exchange-page .manual-split-mode .recipient-grid.row .send-amt {
        display: none !important;
    }

    .exchange-page .manual-split-mode .recipient-grid.row .recv-amt::before {
        content: "Amount to receive: ";
        color: #9aa0a6;
        font-weight: 500;
    }
}

@media (min-width: 761px) and (max-width: 900px) {
    .exchange-page .feature-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .exchange-page .fcard:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}
