/* 须在 landing-pages.css 之后加载，覆盖其绝对定位与大尺寸按钮 */

@media (max-width: 991px) {
    .fm-hero-card {
        display: flex;
        flex-direction: column;
    }

    .fm-hero-action,
    .fm-hero-action.fm-hero-action--dual {
        position: static;
        left: auto;
        bottom: auto;
        width: 100%;
        box-sizing: border-box;
        padding: 12px 12px 14px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .fm-cta {
        min-width: 0;
        width: auto;
        max-width: 100%;
        flex: 0 1 auto;
        min-height: 42px;
        height: auto;
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 700;
        gap: 6px;
        line-height: 1.2;
        box-shadow: 0 8px 18px rgba(63, 16, 188, 0.2);
    }

    .fm-cta i {
        font-size: 13px;
    }

    .fs-hero-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .fs-hero-card img {
        display: block;
        width: 100%;
        height: auto;
    }

    .fs-hero-cta {
        position: static;
        left: auto;
        top: auto;
        bottom: auto;
        align-self: center;
        width: auto;
        max-width: calc(100% - 24px);
        min-width: 0;
        min-height: 0;
        height: auto;
        margin: 12px auto 14px;
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.25;
        gap: 6px;
        box-shadow: 0 8px 18px rgba(75, 24, 209, 0.22);
        white-space: normal;
        text-align: center;
    }

    .fs-hero-cta i {
        font-size: 12px;
    }
}

@media (max-width: 575px) {
    .fm-hero-action,
    .fm-hero-action.fm-hero-action--dual {
        padding: 10px 10px 12px;
        gap: 8px;
    }

    .fm-cta {
        min-height: 40px;
        padding: 8px 14px;
        font-size: 13px;
    }

    .fs-hero-cta {
        margin: 10px auto 12px;
        padding: 9px 14px;
        font-size: 13px;
        max-width: calc(100% - 20px);
    }
}

@media (max-width: 400px) {
    .fm-hero-action--dual {
        flex-direction: column;
        align-items: center;
    }

    .fm-cta {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .fs-hero-cta {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* instant-match 列表：手机端卡片布局 */
@media (max-width: 991px) {
    .instant-match-page .im-table-wrap {
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .instant-match-page .im-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
        border-spacing: 0 !important;
    }

    .instant-match-page .im-table thead {
        display: none !important;
    }

    .instant-match-page .im-table tbody {
        display: block !important;
    }

    .instant-match-page .im-table tbody tr {
        display: block !important;
        width: 100% !important;
        margin-bottom: 12px;
        padding: 14px;
        border: 1px solid rgba(109, 60, 255, 0.12) !important;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(42, 28, 78, 0.08);
    }

    .instant-match-page .im-table tbody tr:hover {
        background: #fff;
    }

    .instant-match-page .im-table tbody td {
        display: flex !important;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        width: 100% !important;
        padding: 8px 0 !important;
        border-top: 1px solid rgba(67, 48, 105, 0.07) !important;
        text-align: right;
        font-size: 13px !important;
        white-space: normal !important;
        word-break: break-word;
    }

    .instant-match-page .im-table tbody td::before {
        content: attr(data-label);
        flex: 0 0 78px;
        color: #6b6580;
        font-size: 12px;
        font-weight: 600;
        text-align: left;
        line-height: 1.4;
    }

    .instant-match-page .im-table tbody td:first-child {
        display: block !important;
        border-top: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 10px !important;
        text-align: left;
    }

    .instant-match-page .im-table tbody td:first-child::before {
        display: none !important;
    }

    .instant-match-page .im-table tbody td:last-child {
        display: block !important;
        border-top: 1px solid rgba(67, 48, 105, 0.1) !important;
        padding-top: 12px !important;
        margin-top: 4px;
        text-align: center;
    }

    .instant-match-page .im-table tbody td:last-child::before {
        display: none !important;
    }

    .instant-match-page .im-table .im-claim {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        font-size: 14px;
    }

    .instant-match-page .im-table .im-empty-cell,
    .instant-match-page .im-table .im-loading-row td {
        display: block !important;
        text-align: center !important;
        border: 0 !important;
        padding: 32px 16px !important;
    }

    .instant-match-page .im-table .im-empty-cell::before,
    .instant-match-page .im-table .im-loading-row td::before {
        display: none !important;
    }

    .instant-match-page .im-table th:nth-child(n),
    .instant-match-page .im-table td:nth-child(n) {
        width: auto !important;
        min-width: 0 !important;
    }

    .instant-match-page .im-topbar-actions {
        width: 100%;
    }

    .instant-match-page .im-seller-auth {
        width: 100%;
    }

    .instant-match-page .im-seller-login-btn {
        width: 100%;
        min-height: 40px;
        padding: 0 16px;
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .instant-match-page .im-table tbody tr {
        padding: 12px;
    }

    .instant-match-page .im-table tbody td::before {
        flex-basis: 70px;
        font-size: 11px;
    }

    .instant-match-page .im-event {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 8px;
    }

    .instant-match-page .im-event img {
        width: 48px;
        height: 48px;
    }

    .instant-match-page .im-event strong {
        font-size: 13px;
    }

    .instant-match-page .im-event span {
        font-size: 11px;
    }

    .instant-match-page .im-price {
        font-size: 16px !important;
    }
}
