/* ============================================================
 * 政策文件查询页 · 手机端适配（仅追加样式，不改动原有规则）
 * 断点与站点通用顶部/底部的适配断点一致：640px（参考页视觉口径同源）
 * 生效范围：查询搜索表单 / 左侧分类 / 右侧搜索结果列表
 * 桌面端（>640px）完全不受影响
 * ============================================================ */
@media screen and (max-width: 640px) {

    /* ---------- 一、整体容器：固定 1200px 改为流式 ---------- */
    body {
        background: #fff;
    }

    #form_TysbgO_946756,
    .zcwj_container,
    .zcwj_search,
    .zcwj_form,
    .tile-list2,
    .wrap-body,
    .main-body,
    .con_bg,
    .zcwjk-right.fr,
    .card-list {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .zcwj_container {
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .zcwj_search {
        padding: 0 0 10px 0 !important;
        background: #fff !important;
    }

    .zcwj_form {
        margin-top: 15px !important;
        padding: 0 !important;
    }

    .main-body {
        width: auto !important;
        padding: 0 !important;
    }

    .con_bg {
        padding: 20px 0 30px 0 !important;
        min-height: 0 !important;
    }

    /* 页面标题：字号收敛，避免挤压 */
    .zcwj_search .search_title span {
        font-size: 18px !important;
        height: auto !important;
        line-height: 20px !important;
        padding-left: 10px !important;
        border-left-width: 4px !important;
    }

    /* 让所有内容在窄屏内自然换行，不产生横向溢出 */
    .zcwj_form .search_sub,
    .zcwj_form .search_sub > div,
    .zcwj_form .search_sub .layui-inline,
    .zcwj_form .search_sub .ssflm,
    .zcwj_form .search_sub #allchoiceDiv {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ---------- 二、查询搜索表单：两列浮动改为单列堆叠 ---------- */
    .zcwj_form .search_sub {
        height: auto !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
    }

    /* 每个字段块独占一行（原有行内 style 含 float，需 !important 覆盖） */
    .zcwj_form .search_sub > div {
        display: block !important;
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* 字段名：由右对齐浮动改为左侧独占一行 */
    .zcwj_form .search_sub .in_title,
    .zcwj_form .search_sub .in_title.ml10,
    .zcwj_form .search_sub .in_title.ml20 {
        display: block !important;
        float: none !important;
        width: auto !important;
        text-align: left !important;
        margin: 12px 0 6px 0 !important;
        font-size: 14px !important;
        line-height: 20px !important;
    }

    .zcwj_form .search_sub .layui-inline {
        display: block !important;
        float: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 输入框：定宽改为 100%，触摸高度统一 38px */
    .zcwj_form .search_sub input,
    .zcwj_form .search_sub .layui-input,
    .zcwj_form .search_sub input.js_bt,
    .zcwj_form .search_sub input.js_zw,
    .zcwj_form .search_sub input.js_gjc,
    .zcwj_form .search_sub input.js_zy,
    .zcwj_form .search_sub input.js_zh,
    .zcwj_form .search_sub input.js_fwdw,
    .zcwj_form .search_sub input.js_rq,
    .zcwj_form .search_sub .ssflm input {
        display: block !important;
        float: none !important;
        width: 100% !important;
        height: 38px !important;
        line-height: 38px !important;
        margin: 0 0 6px 0 !important;
        box-sizing: border-box !important;
        font-size: 14px !important;
    }

    /* 清除原有的左外边距错位 */
    .zcwj_form .search_sub input.ml10,
    .zcwj_form .search_sub input.ml20 {
        margin-left: 0 !important;
    }

    /* 发文字号三连输入框：与外层一致，纵向堆叠 */
    .zcwj_form .search_sub .js_zh {
        text-align: left !important;
        padding-left: 10px !important;
    }

    /* 主题分类：输入框 + 下拉框整体宽度自适应 */
    .zcwj_form .search_sub .ssflm {
        display: block !important;
        float: none !important;
        width: 100% !important;
        position: relative !important;
    }

    .zcwj_form .search_sub #allchoiceDiv,
    .zcwj_form .search_sub .themecategory_list #allchoiceDiv {
        display: block !important;
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    .zcwj_form .search_sub .showsel {
        display: block !important;
        float: none !important;
        width: 100% !important;
        height: 38px !important;
        line-height: 38px !important;
        box-sizing: border-box !important;
        font-size: 14px !important;
    }

    /* 下拉候选面板：窄屏内不超出屏幕 */
    .zcwj_form .search_sub #dropdownList,
    #dropdownList {
        max-width: 100% !important;
        max-height: 240px !important;
        box-sizing: border-box !important;
    }

    #dropdownList li {
        font-size: 14px !important;
        line-height: 34px !important;
    }

    /* 查询 / 重置按钮：居中并相对均衡 */
    .zcwj_form .search_sr {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 22px !important;
        text-align: center !important;
    }

    .zcwj_form .search_sr button,
    .search_sr button {
        width: 42% !important;
        max-width: 160px !important;
        height: 40px !important;
        line-height: 38px !important;
        font-size: 16px !important;
        padding: 0 !important;
        margin: 0 6px !important;
    }

    .search_sr button[type="reset"] {
        margin-left: 6px !important;
    }

    /* ---------- 三、左侧分类：按参考页手机端效果收起 ---------- */
    .zcwjk-left {
        display: none !important;
    }

    /* ---------- 四、右侧搜索结果列表：整宽单列 ---------- */
    .zcwjk-right.fr {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }

    .pad-l {
        padding-left: 0 !important;
    }

    .wjk-item {
        margin-top: 0 !important;
        padding: 16px 0 !important;
        border-bottom: 1px solid #efefef !important;
    }

    .card-list .wjk-item:first-child {
        padding-top: 4px !important;
    }

    .wjk-item h5 {
        font-size: 16px !important;
        line-height: 24px !important;
        margin-bottom: 8px !important;
    }

    .wjk-item h5 a {
        display: block !important;
        white-space: normal !important;
        word-break: break-all !important;
    }

    /* 摘要：参考页手机端保留正文摘要，取消原有的窄屏隐藏 */
    .zcwjk-right .wjk-item p,
    .zcwjk-right .wjk-item p.pc2 {
        display: block !important;
        font-size: 14px !important;
        line-height: 22px !important;
        max-height: none !important;
        overflow: visible !important;
        margin-bottom: 6px !important;
        text-align: left !important;
    }

    /* 发文单位 / 发文字号 / 发文日期等标签：换行排列，不溢出 */
    .zcwjk-right .jsq {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        margin-top: 2px !important;
    }

    /* 仅调整外观与间距，不强制 display，保留原有“隐藏空标签”的行内样式 */
    .zcwjk-right .jsq a {
        margin: 6px 8px 0 0 !important;
        padding: 3px 8px !important;
        font-size: 13px !important;
        line-height: 18px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-break: break-all !important;
        border: 1px solid #115DB2 !important;
        border-radius: 4px !important;
        color: #115DB2 !important;
    }

    /* 时间排序等小控件 */
    .rank-list {
        flex-wrap: wrap !important;
    }

    .rank-item {
        margin-left: 0 !important;
        margin-right: 8px !important;
    }

    /* 分页：居中、可换行 */
    .pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        margin-top: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .zcwjk-right .pagination .layui-box,
    .zcwjk-right .pagination .layui-laypage {
        max-width: 100% !important;
        flex-wrap: wrap !important;
    }

    /* 日期控件弹层：窄屏内不撑出屏幕 */
    .layui-laydate {
        max-width: calc(100vw - 16px) !important;
        box-sizing: border-box !important;
    }

    /* 图片与图层不撑破容器 */
    .zcwj_container img,
    .wrap-body img,
    .con_bg img {
        max-width: 100% !important;
        height: auto !important;
    }
}