﻿/* ============================================================
   实习就业网（shsxjy.com）职业问答 /ask/ 手机阅读适配样式
   ------------------------------------------------------------
   · 只在窄屏（宽度 <= 768px）生效；桌面端一律不生效，PC 版式与原来完全一样。
   · 由 /ask/ 下 8 个页面在 <head> 里引入，页面同时补了一行 viewport 声明；
     两者要一起上传：只传页面、不传这个样式表，手机上反而会更难读。
   · 只做排版适配：单列、整宽、字号放大；不改颜色、不改图片资源、不改任何脚本。
   · 原页面骨架是 1200px 固定宽（页头 1200 / 主区 965 + 侧栏 225，列表项内部还有 745 固定宽），
     所以下面按“先解除固定宽度与浮动，再逐块调整字号行高”的顺序写。
   ============================================================ */

@media only screen and (max-width: 768px) {

    /* ---------- 0. 手机端返回条 ----------
       页面里这段 HTML 自带 style="display:none"，桌面端一定不显示；
       这里用 !important 把它在窄屏打开（CSS 的 !important 优先于行内样式）。 */
    .askm-bar {
        display: flex !important;
        align-items: center !important;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 999;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        padding: 8px 10px;
        font-size: 15px;
    }
    .askm-bar a {
        display: inline-block;
        padding: 4px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        color: #333;
        text-decoration: none;
        line-height: 22px;
    }
    .askm-bar a.home { margin-left: auto; border-color: #0fa3f6; color: #0fa3f6; }

    /* ---------- 1. 页面骨架：解除固定宽度与浮动，全部整宽单列 ---------- */
    html, body { width: 100% !important; overflow-x: hidden !important; }
    .bodybg { font-size: 15px !important; }

    .pubtopbar, .headbar, .channel,
    #main, #maina, #mainb, #mainal, #mainar,
    .ask_Search, .ask_Searchtwo, .asksea, .asksea1, .asksea2, .asksea3, .asksea_inp,
    .ask_queTitle, .ask_queList, .ask_queList ul, .ask_queListPage,
    .ask_queDetail, .ask_queDetail ul,
    .ask_anwTitle, .ask_anwTitle span, .ask_anwList, .ask_anwList ul, .ask_ansSubmit,
    .ansSubmit1, .ansSubmit2,
    .ask_clsTitle, .ask_clsList, .ask_clsListPage,
    .ask_Login, .ask_Hot, .askHott, .askHotc, .ask_UserInfo, .ask_My,
    .que_Title, .que_TitleSub, .que_Text, .que_Button,
    .foots, .foots .left, .foots .right, .foots .right .r1, .foots .right .r2 {
        width: auto !important;
        max-width: 100% !important;
        float: none !important;
        box-sizing: border-box !important;
    }

    /* ---------- 2. 页头：顶部条与导航换行压缩，不再撑出 1200px ---------- */
    /* 这两行必须显式给 100%：它们的父级不是普通块级流，只写 width:auto 会被挤成窄条 */
    .pubtop, .pubhead { display: block !important; width: 100% !important; height: auto !important; }
    .pubtopbar { display: block !important; width: 100% !important; padding: 0 10px !important; }
    .pubtopbar .left, .pubtopbar .right { float: none !important; width: auto !important; }
    .pubtopbar .left span { margin-left: 10px !important; }

    .headbar { display: block !important; width: 100% !important; height: auto !important; padding: 8px 10px !important; overflow: hidden; }
    .headbar .left { float: left !important; width: auto !important; height: auto !important; }
    .headbar .left img { width: 132px !important; height: 40px !important; margin-top: 2px !important; }
    .headbar .middle { float: left !important; width: auto !important; height: auto !important; }
    .weblist { padding-top: 12px !important; font-size: 13px !important; }
    .headbar .right { float: none !important; width: auto !important; height: auto !important; clear: both !important; }
    .headbar .right ul { display: block !important; overflow: hidden; padding-top: 4px !important; }
    .headbar .right ul li { float: left !important; line-height: 28px !important; font-size: 14px !important; margin: 0 9px 0 0 !important; }
    .headbar .right ul .hli a,
    .headbar .right ul .hli a:hover { line-height: 28px !important; }
    .headbar .right ul li a.hMore { height: 28px !important; background-position: 55px 12px !important; }

    /* ---------- 3. 频道标题 + 搜索框 ---------- */
    .channel { margin: 10px auto 0 !important; padding: 0 10px !important; }
    .channel .left { width: auto !important; height: auto !important; line-height: 30px !important; font-size: 18px !important; text-indent: 0 !important; }
    .channel .right { width: auto !important; height: auto !important; line-height: 30px !important; }
    .channel .right .txt { float: none !important; width: 100% !important; height: 34px !important; line-height: 34px !important; margin-top: 6px !important; }

    /* ---------- 3b. 手机端收起问答搜索入口 ----------
       问答搜索页实测不按关键词过滤（任意关键词、连不存在的词都返回同样 20 条），
       手机端先把它收起来，避免"能搜却搜不到"的误导；桌面端保留原样，PC 用户不受影响。
       收起后各页面都仍有内容：列表页有问题列表、标签页有标签卡片、提问页有表单。 */
    .channel .right, .ask_Search, .ask_Searchtwo, .asksea { display: none !important; }

    /* ---------- 4. 问题列表（首页 / 有回答 / 零回答 / 标签详情 / 搜索结果） ---------- */
    .ask_queTitle { height: auto !important; line-height: 30px !important; font-size: 15px !important; padding: 8px 10px !important; }
    .ask_queList ul, .ask_queDetail ul { margin: 0 !important; padding: 10px !important; }
    .ask_queList img, .ask_anwList img { max-width: 100%; }

    .queListl { float: left !important; width: 44px !important; height: auto !important; }
    .queListl img { width: 40px !important; height: 40px !important; }
    .queListr { float: none !important; width: auto !important; margin-left: 52px !important; }
    .queListr1, .queListr2, .queListr3, .queListr4 { float: none !important; width: auto !important; height: auto !important; }
    .queListr1 { font-size: 13px !important; line-height: 22px !important; color: #888 !important; }
    .queListr3 b, .queListr4 b { display: block !important; float: none !important; width: auto !important; font-size: 17px !important; line-height: 26px !important; }
    .queListr3 b a, .queListr4 b a { font-size: 17px !important; line-height: 26px !important; }
    .queListr3 { line-height: 24px !important; font-size: 15px !important; }
    .queListr3 span, .queListr4 span { float: none !important; width: auto !important; font-size: 15px !important; line-height: 24px !important; color: #555 !important; margin-top: 4px !important; }
    .queListr3 i, .queListr4 i { float: none !important; width: auto !important; display: block !important; font-size: 12px !important; line-height: 20px !important; margin-top: 5px !important; }

    /* ---------- 5. 问题详情：问题块 / 提交回答 / 答案列表 ---------- */
    .ask_queDetail { padding: 10px !important; }
    .ask_ansSubmit { padding: 12px 10px !important; }
    .ansSubmit1, .ansSubmit2 { float: none !important; width: auto !important; }
    .ansSubmit_inp { width: 100% !important; height: 90px !important; font-size: 15px !important; }
    .ansSubmit2 { height: auto !important; }
    .ansSubmit2 b, .ansSubmit2 i { float: none !important; width: auto !important; display: inline-block !important; font-size: 12px !important; }

    .ask_anwTitle { height: auto !important; line-height: 32px !important; font-size: 15px !important; padding: 0 10px !important; }
    .ask_anwTitle span { float: left !important; width: auto !important; line-height: 32px !important; font-size: 16px !important; }
    .ask_anwList ul { width: auto !important; margin: 0 10px !important; padding: 10px 0 !important; }
    .anwListl { float: left !important; width: 44px !important; height: auto !important; }
    .anwListl img { width: 40px !important; height: 40px !important; }
    .anwListr { float: none !important; width: auto !important; margin-left: 52px !important; }
    .anwListr1, .anwListr2, .anwListr3 { float: none !important; width: auto !important; height: auto !important; }
    .anwListr1 { font-size: 13px !important; line-height: 22px !important; color: #888 !important; }
    .anwListr3 span { float: none !important; width: auto !important; font-size: 15px !important; line-height: 24px !important; color: #444 !important; }
    .anwListr3 i { float: none !important; width: auto !important; display: block !important; font-size: 12px !important; line-height: 20px !important; margin-top: 5px !important; }

    /* ---------- 6. 问答标签列表（Class.aspx / Class_detail.aspx） ---------- */
    .ask_clsTitle { height: auto !important; line-height: 32px !important; font-size: 15px !important; padding: 0 10px !important; }
    .ask_clsList { padding: 10px !important; }
    .ask_clsList ul { overflow: hidden; }
    .ask_clsList ul li {
        float: none !important;
        display: inline-block !important;
        vertical-align: top !important;
        width: 48% !important;
        height: auto !important;
        padding: 10px !important;
        margin: 4px 1% !important;
        background: #fafafa !important;
        border: 1px solid #eee !important;
        border-radius: 6px !important;
    }
    .ask_clsList ul li b, .ask_clsList ul li p { float: none !important; width: auto !important; height: auto !important; background: none !important; font-size: 14px !important; line-height: 22px !important; }

    /* ---------- 7. 侧栏（登录块 / 热门标签）随之下移为整宽 ---------- */
    .ask_Login, .ask_Hot { float: none !important; width: auto !important; margin: 10px !important; }
    .ask_Login { padding: 14px 0 !important; }
    .askHott { padding: 0 10px !important; }
    .askHotc { padding: 6px 10px 10px !important; }
    .askHotc a { padding: 4px 10px !important; margin: 4px !important; }

    /* ---------- 8. 表单页（我要提问） ---------- */
    #mainb { padding: 10px !important; }
    .que_Title, .que_TitleSub, .que_Text, .que_Button { margin-left: 0 !important; padding: 0 10px !important; width: auto !important; }
    .que_Title { font-size: 16px !important; line-height: 34px !important; height: auto !important; }
    .que_Text .txt, .que_Text .qinp_Text, .que_Text .qinp_Texts,
    .que_Text input[type="text"], .que_Text textarea { width: 100% !important; box-sizing: border-box !important; }
    .que_Text .qinp_Texts, .que_Text textarea { min-height: 110px !important; }
    .que_Text img { max-width: 100% !important; }

    /* ---------- 9. 分页与页脚 ---------- */
    .ask_queListPage, .ask_clsListPage { height: auto !important; padding: 12px 0 !important; font-size: 14px !important; line-height: 30px !important; }
    .foots { padding: 12px 10px !important; }
    .foots .left, .foots .right { float: none !important; width: auto !important; }
    .foots .right .r1, .foots .right .r2 { float: none !important; width: auto !important; }
}

/* =====================================================================
   2026-11-06 追加
   ① 手机端不再呈现电脑版页头/页脚：问答页现在是「手机版」，不是把 PC 页面丢给手机。
   ② 手机返回条按钮加大，「我要提问 / 我要回答」高亮。
   ③ 标签弹窗适配窄屏：整屏宽、不溢出、可点、内容可滚动。
   ===================================================================== */
@media only screen and (max-width: 768px) {

    /* ① 隐藏电脑版页头（顶栏 + LOGO/导航）与页脚 */
    .pubtop, .pubhead, #foot, #footspace { display: none !important; }

    /* ② 手机返回条 */
    .askm-bar { padding: 10px !important; }
    .askm-bar a { padding: 8px 14px !important; font-size: 15px !important; line-height: 20px !important; }
    .askm-bar a.home { margin-left: auto !important; }
    .askm-bar a.ask, .askm-bar a.ans { border-color: #ff8a00 !important; color: #ff8a00 !important; font-weight: 700; }

    /* ③ 标签弹窗（.choice_specialty 为弹窗容器） */
    .choice .choice_dialog { width: 94vw !important; left: 3vw !important; top: 10px !important; }
    .choice_content .choice_header { padding-left: 12px !important; }
    .choice_content .choice_header .title { font-size: 15px !important; }
    .choice_content .choice_body { padding: 0 10px !important; }
    .choice_content .choice_footer { padding: 10px !important; }
    .choice_content .choice_footer .res_add_but { width: 100% !important; }
    .choice_content .choice_footer .res_add_but .butlist { width: 50% !important; }
    .choice_body_box { width: auto !important; max-width: 100% !important; height: auto !important;
        max-height: 66vh !important; box-sizing: border-box !important; }
    .choice_specialty .left_box { width: 34% !important; height: auto !important; max-height: 66vh !important;
        box-sizing: border-box !important; }
    .choice_specialty .right_box { width: 64% !important; height: auto !important; max-height: 66vh !important;
        padding-left: 0 !important; box-sizing: border-box !important; }
    .choice_body_box .list_nav li { white-space: normal !important; }
    .choice_body_box .list_nav li label { padding: 9px 6px !important; line-height: 1.25 !important; }
    .choice_specialty .right_box .list_nav li { float: none !important; }
    .listed_group { padding: 8px 10px 0 !important; }
    .listed_group .center_text { max-width: none !important; }
}

/* =====================================================================
   2026-11-06 追加（第二轮）
   标签列表页（/ask/Class.aspx）手机端：卡片里的标签名原本是白字（#FFF），
   靠桌面版的图片底衬托；手机上图片底不显示，白字落在浅色卡片上＝看不见，
   只剩「提问N次」。这里把标签名改成可见文字，并把卡片排成规整两列。
   ===================================================================== */
@media only screen and (max-width: 768px) {

    .ask_clsList ul li {
        float: left !important;
        display: block !important;
        width: 48% !important;
        height: auto !important;
        box-sizing: border-box !important;
        padding: 12px 10px !important;
        margin: 0 2% 8px 0 !important;
        background: #f7f9fc !important;
        border: 1px solid #e6eef7 !important;
        border-radius: 8px !important;
    }
    .ask_clsList ul li:nth-child(2n) { margin-right: 0 !important; }

    .ask_clsList ul li b {
        float: none !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        padding: 0 !important;
    }
    .ask_clsList ul li b a {
        color: #1f5f9e !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        line-height: 22px !important;
        text-decoration: none !important;
    }
    .ask_clsList ul li p {
        float: none !important;
        width: auto !important;
        height: auto !important;
        color: #8a94a6 !important;
        font-size: 12px !important;
        line-height: 20px !important;
    }
}
