/* ==========================================================================
   求路网移动站 · 查询页筛选区 统一补丁  mobile-filter-unify v2.0
   --------------------------------------------------------------------------
   基准：/rank 一分一段 .mr2-query（430px 视口实测计算值）
   v2 变更（2026-09-23）：
     1) 【修复】新高考「立即查询 / 重置条件」按钮改用 form 网格方案
        （v1 的 float 方案导致按钮错位分行为 bug），恢复双列对齐样板；
     2) 【字号】筛选区全部文字强制对齐一分一段实测值：
        标签 12px/700/18px · 控件 13px/400/18px · 胶囊 12px/600
        按钮 13px/800 · placeholder 13px #9aa5b5（含行高 normal 修正）；
     3) 【胶囊】全站单选/多选胶囊统一：未选中 #f7f8fa，选中红渐变白字
        （input:checked+span 相邻选择器，兼容性好、无 :has 依赖）；
     4) 【新增】招生计划「首选科目」胶囊单选组样式（.qln-plan-inline /
        .qln-plan-pills），配合模板把 select 换成 radio 组后即生效；
        未改造前 select 仍按下拉样式兜底，两态都不出 bug。

   加载：由移动端公共 header 在 mobile-core / mobile-header-unify /
         type-unify 之后提前加载；本文件使用高优先级作用域覆盖页面旧规则，
         避免筛选区首次显示后再改变尺寸。
   ========================================================================== */

/* ------------------------------------------------ 1. 容器：统一白卡片 + 吸 hero */
html body.qlm-body .mp-college-selects,
html body.qlm-body .mq-filter,
html body.qlm-body .qln-plan-filter,
html body.qlm-body .mcontrol-query,
html body.qlm-body .mgaokao-query {
  position: relative;
  z-index: 4;
  margin: -15px 12px 12px !important;
  padding: 12px !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(34, 42, 58, .07) !important;
}
/* 查大学页容器原本是双列裸排 → 收为单列纵排 */
html body.qlm-body .mp-college-selects {
  display: grid !important;
  grid-template-columns: none !important;
  gap: 8px !important;
  width: auto !important;
  margin: 9px 0 12px !important;
}
/* 查询卡已位于 data-page 的统一内边距中，不再重复增加左右外边距。 */
html body.qlm-body .mq-filter.mq-major-filter {
  width: 100% !important;
  margin: -15px 0 12px !important;
  box-sizing: border-box !important;
}
/* 招生计划页容器原本不吸 hero、内部双列 → 统一吸底单列 */
html body.qlm-body .qln-plan-filter {
  display: block !important;
}

/* --------------------------------- 2. 字段行：统一「图标 | 标签 | 控件」行式 */
html body.qlm-body .mp-college-selects label,
html body.qlm-body .mq-filter label:not(.mq-keyword),
html body.qlm-body .qln-plan-filter > label,
html body.qlm-body .mcontrol-field,
html body.qlm-body .mgaokao-query form > label,
html body.qlm-body .mgaokao-query .mgaokao-row {
  display: grid !important;
  grid-template-columns: 31px 66px minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: 43px !important;
  height: auto !important;
  border: 1px solid #edf0f4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}
/* 图标格（第一列） */
html body.qlm-body .mp-college-selects label::before,
html body.qlm-body .mq-filter label:not(.mq-keyword)::before,
html body.qlm-body .qln-plan-filter > label::before,
html body.qlm-body .mcontrol-field::before,
html body.qlm-body .mgaokao-query form > label::before,
html body.qlm-body .mgaokao-query .mgaokao-row::before {
  content: "" !important;
  display: block !important;
  width: 100% !important;
  min-height: 41px !important;
  background: #fbfbfc center / 17px 17px no-repeat !important;
}
/* 标签（第二列）—— 字号对齐一分一段：12px/700/18px */
html body.qlm-body .mp-college-selects label > span,
html body.qlm-body .mq-filter label > span,
html body.qlm-body .mq-filter label > b,
html body.qlm-body .qln-plan-filter > label > b,
html body.qlm-body .mcontrol-field > b,
html body.qlm-body .mgaokao-query form > label > b,
html body.qlm-body .mgaokao-query .mgaokao-row > b {
  grid-column: 2 !important;
  display: flex !important;
  align-items: center !important;
  padding-left: 8px !important;
  border-right: 1px solid #f0f1f4 !important;
  color: #4e5b70 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
}
/* 控件（第三列）—— 13px/400/18px，修正行高 normal 漂移 */
html body.qlm-body .mp-college-selects select,
html body.qlm-body .mq-filter select,
html body.qlm-body .mq-filter input:not([type="checkbox"]):not([type="radio"]),
html body.qlm-body .qln-plan-filter > label > select,
html body.qlm-body .qln-plan-filter > label > input {
  grid-column: 3 !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 41px !important;
  padding: 0 26px 0 9px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #161d2b !important;
  font-size: 13px !important;
  line-height: 18px !important;
  outline: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
/* 自绘下拉箭头 */
html body.qlm-body .mp-college-selects select,
html body.qlm-body .mq-filter select,
html body.qlm-body .qln-plan-filter > label > select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111827' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 9px center !important;
  background-size: 13px 13px !important;
}
/* placeholder 统一：13px #9aa5b5 */
html body.qlm-body .mp-college-selects input::placeholder,
html body.qlm-body .mq-filter input::placeholder,
html body.qlm-body .qln-plan-filter input::placeholder,
html body.qlm-body .mgaokao-query input::placeholder {
  color: #9aa5b5 !important;
  opacity: 1 !important;
  font-size: 13px !important;
}

/* 关键词输入行（查专业首行）：放大镜图标 + 输入框 */
html body.qlm-body .mq-filter label.mq-keyword {
  display: grid !important;
  grid-template-columns: 31px minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: 43px !important;
  border: 1px solid #edf0f4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}
html body.qlm-body .mq-filter label.mq-keyword::before {
  content: "" !important;
  display: block !important;
  width: 100% !important;
  min-height: 41px !important;
  background: #fbfbfc center / 17px 17px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") !important;
}
html body.qlm-body .mq-filter label.mq-keyword > svg {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
html body.qlm-body .mq-filter label.mq-keyword > input,
html body.qlm-body .mq-filter label.mq-keyword input {
  grid-column: 2 !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 41px !important;
  padding: 0 12px !important;
  border: 0 !important;
  background: #fff !important;
  color: #161d2b !important;
  font-size: 13px !important;
  line-height: 18px !important;
  outline: 0 !important;
}
/* 查大学页主搜索框（若有）同步行式 */
html body.qlm-body .mp-college-main-search {
  display: grid !important;
  grid-template-columns: 31px minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  min-height: 43px !important;
  border: 1px solid #edf0f4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}

/* --------------------------------- 3. 语义图标（:has() 按字段 name 匹配） */
/*
 * 模板显式类是主路径，避免旧版 WebView 不支持 :has() 时图标空白；
 * 后面的 :has() 选择器仅作为未标注旧模板的兼容兜底。
 */
/* 年份 */
html body.qlm-body .filter-icon-year::before,
html body.qlm-body .mq-filter label:has(>select[name="year"])::before,
html body.qlm-body .qln-plan-filter > label:has(>select[name="year"])::before,
html body.qlm-body .mcontrol-field:has(input[name="year"])::before,
html body.qlm-body .mgaokao-query label:has(>.mgaokao-year)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 2v6m10-6v6M3 10h18'/%3E%3C/svg%3E") !important;
}
/* 科类 / 首选科目 / 考生类别（含计划页改造后结构） */
html body.qlm-body .filter-icon-subject::before,
html body.qlm-body .mq-filter label:has(>select[name="subject_group"])::before,
html body.qlm-body .qln-plan-filter > label:has(>select[name="first_subject"])::before,
html body.qlm-body .qln-plan-filter > .qln-plan-inline::before,
html body.qlm-body .mcontrol-field:has(input[name="subject_group"])::before,
html body.qlm-body .mgaokao-query .mgaokao-row:has(input[name="first_subject"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='8' r='4'/%3E%3Cpath d='M3 21c.5-5 3-7 7-7s6.5 2 7 7'/%3E%3C/svg%3E") !important;
}
/* 分数输入 */
html body.qlm-body .filter-icon-score::before,
html body.qlm-body .mq-filter label:has(>input[name="score"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 12h3m4 0h1M8 16h1m3 0h4'/%3E%3C/svg%3E") !important;
}
/* 查分数：分数、位次 */
html body.qlm-body .mq-filter label:has(>input[name="score_point"])::before,
html body.qlm-body .mq-filter label:has(>input[name="rank_point"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19h16M6 16l4-4 3 2 5-7'/%3E%3Cpath d='m15 7 3 0 0 3'/%3E%3C/svg%3E") !important;
}
/* 所在地区 */
html body.qlm-body .filter-icon-region::before,
html body.qlm-body .mp-college-selects label:has(>select[name="province"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-5.5-7-11a7 7 0 0 1 14 0c0 5.5-7 11-7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E") !important;
}
/* 院校层次 / 学历层次 */
html body.qlm-body .filter-icon-level::before,
html body.qlm-body .mp-college-selects label:has(>select[name="level"])::before,
html body.qlm-body .mgaokao-query label:has(>select[name="education_level"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 9 10-5 10 5-10 5z'/%3E%3Cpath d='M6 11v5c0 1.5 3 3 6 3s6-1.5 6-3v-5'/%3E%3C/svg%3E") !important;
}
/* 院校类型 */
html body.qlm-body .filter-icon-college-type::before,
html body.qlm-body .mp-college-selects label:has(>select[name="college_type"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V7l8-4 8 4v14'/%3E%3Cpath d='M9 21v-4h6v4M9 10h.01M12 10h.01M15 10h.01M9 13h.01M12 13h.01M15 13h.01'/%3E%3C/svg%3E") !important;
}
/* 办学性质 */
html body.qlm-body .filter-icon-nature::before,
html body.qlm-body .mp-college-selects label:has(>select[name="college_nature"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.5 5 5.5.8-4 3.9.9 5.5-4.9-2.6L7.1 18.2l.9-5.5-4-3.9L9.5 8z'/%3E%3C/svg%3E") !important;
}
/* 专业大类 / 专业类 */
html body.qlm-body .filter-icon-major::before,
html body.qlm-body .mq-filter label:has(>select[name="major_category"])::before,
html body.qlm-body .mq-filter label:has(>select[name="major_class"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") !important;
}
/* 专业组 */
html body.qlm-body .filter-icon-group::before,
html body.qlm-body .mq-filter label:has(>select[name="group_filter"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6' rx='1'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1'/%3E%3C/svg%3E") !important;
}
/* 院校名称 */
html body.qlm-body .filter-icon-college::before,
html body.qlm-body .mq-filter label:has(>input[name="college_name"])::before,
html body.qlm-body .qln-plan-filter > label:has(>input[name="college_name"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V8l7-5 7 5v13'/%3E%3Cpath d='M9 21v-5h6v5M9.5 10h.01M14.5 10h.01'/%3E%3C/svg%3E") !important;
}
/* 专业名称 */
html body.qlm-body .mq-filter label:has(>input[name="major_name"])::before,
html body.qlm-body .qln-plan-filter > label:has(>input[name="major_name"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h14v16H5z'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E") !important;
}
/* 批次 */
html body.qlm-body .filter-icon-batch::before,
html body.qlm-body .qln-plan-filter > label:has(>select[name="batch"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 9 5-9 5-9-5 9-5z'/%3E%3Cpath d='m3 12 9 5 9-5'/%3E%3Cpath d='m3 17 9 5 9-5'/%3E%3C/svg%3E") !important;
}
/* 招生计划专业查询的学历层次 */
html body.qlm-body .qln-plan-filter > label:has(>select[name="plan_level"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 9 10-5 10 5-10 5z'/%3E%3Cpath d='M6 11v5c0 1.5 3 3 6 3s6-1.5 6-3v-5'/%3E%3C/svg%3E") !important;
}
/* 招生类别（省控线） */
html body.qlm-body .filter-icon-category::before,
html body.qlm-body .mcontrol-field:has(input[name="line_category"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h8l10 10-8 8L3 11z'/%3E%3Ccircle cx='8' cy='8' r='1.5'/%3E%3C/svg%3E") !important;
}
/* 院校/专业目标（新高考） */
html body.qlm-body .filter-icon-target::before,
html body.qlm-body .mgaokao-query .mgaokao-row:has(input[name="target_type"])::before,
html body.qlm-body .mgaokao-query .mgaokao-row.mgaokao-target-row::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 2v4m0 12v4M2 12h4m12 0h4'/%3E%3C/svg%3E") !important;
}
/* 再选科目（多选） */
html body.qlm-body .filter-icon-secondary::before,
html body.qlm-body .mgaokao-query .mgaokao-row:has(input[name="secondary[]"])::before,
html body.qlm-body .qln-plan-filter fieldset:has(input[name="secondary[]"])::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 19a2 2 0 0 0 2 2h13'/%3E%3C/svg%3E") !important;
}

/* --------------- 4. 胶囊组（全站统一：未选中灰底 / 选中红渐变白字） --------------- */
html body.qlm-body .mcontrol-field .mcontrol-pills,
html body.qlm-body .mgaokao-query .mgaokao-radios,
html body.qlm-body .mgaokao-query .mgaokao-checks {
  grid-column: 3 !important;
  grid-row: 1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 8px !important;
  background: #fff !important;
}
/* 隐藏原生 radio/checkbox：状态由胶囊底色表达（label 关联点击不受影响） */
html body.qlm-body .mcontrol-field .mcontrol-pills input,
html body.qlm-body .mgaokao-query .mgaokao-radios input,
html body.qlm-body .mgaokao-query .mgaokao-checks input,
html body.qlm-body .qln-plan-filter fieldset input,
html body.qlm-body .qln-plan-filter .qln-plan-pills input {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* 胶囊容器内的 label：紧凑内联、禁止被压窄 */
html body.qlm-body .mcontrol-field .mcontrol-pills label,
html body.qlm-body .mgaokao-query .mgaokao-radios label,
html body.qlm-body .mgaokao-query .mgaokao-checks label,
html body.qlm-body .qln-plan-filter fieldset label,
html body.qlm-body .qln-plan-filter .qln-plan-pills label {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  cursor: pointer !important;
}
/* 胶囊字面：12px/600，未选中灰底，文字禁止换行 */
html body.qlm-body .mcontrol-field .mcontrol-pills span,
html body.qlm-body .mgaokao-query .mgaokao-radios span,
html body.qlm-body .mgaokao-query .mgaokao-checks span,
html body.qlm-body .qln-plan-filter fieldset span,
html body.qlm-body .qln-plan-filter .qln-plan-pills span {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  min-height: 27px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #f7f8fa !important;
  color: #3d4a5c !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}
/* 选中态：红渐变白字（input:checked+span 相邻选择器，无 :has 依赖） */
html body.qlm-body .mcontrol-field .mcontrol-pills input:checked + span,
html body.qlm-body .mgaokao-query .mgaokao-radios input:checked + span,
html body.qlm-body .mgaokao-query .mgaokao-checks input:checked + span,
html body.qlm-body .qln-plan-filter fieldset input:checked + span,
html body.qlm-body .qln-plan-filter .qln-plan-pills input:checked + span {
  background: linear-gradient(90deg, #ed001b, #f6293f) !important;
  color: #fff !important;
}

/* 招生计划 · 再选科目 fieldset：图标 + 标题 + 胶囊 */
html body.qlm-body .qln-plan-filter fieldset {
  display: grid !important;
  grid-template-columns: 31px minmax(0, 1fr) !important;
  border: 1px solid #edf0f4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body.qlm-body .qln-plan-filter fieldset::before {
  content: "" !important;
  display: block !important;
  min-height: 41px !important;
  background: #fbfbfc center / 17px 17px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 19a2 2 0 0 0 2 2h13'/%3E%3C/svg%3E") !important;
}
html body.qlm-body .qln-plan-filter fieldset > legend {
  grid-column: 2 !important;
  display: flex !important;
  align-items: center !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  border-bottom: 1px solid #f0f1f4 !important;
  color: #4e5b70 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  float: left !important;
  width: 100% !important;
}
html body.qlm-body .qln-plan-filter fieldset > div {
  grid-column: 2 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 7px 8px !important;
}

/* --------- 5. 招生计划「首选科目」胶囊单选（配合模板改造片段生效） --------- */
/* 合法结构：.qln-plan-inline > b + .qln-plan-pills，内部再放选项 label。 */
html body.qlm-body .qln-plan-filter > .qln-plan-inline {
  display: grid !important;
  grid-template-columns: 31px 66px minmax(0, 1fr) !important;
  min-height: 43px !important;
  border: 1px solid #edf0f4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}
html body.qlm-body .qln-plan-filter > .qln-plan-inline::before {
  content: "" !important;
  display: block !important;
  min-height: 41px !important;
  background: #fbfbfc center / 17px 17px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='8' r='4'/%3E%3Cpath d='M3 21c.5-5 3-7 7-7s6.5 2 7 7'/%3E%3C/svg%3E") !important;
}
html body.qlm-body .qln-plan-filter > .qln-plan-inline > b {
  grid-column: 2 !important;
  display: flex !important;
  align-items: center !important;
  padding-left: 8px !important;
  border-right: 1px solid #f0f1f4 !important;
  color: #4e5b70 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
}
html body.qlm-body .qln-plan-filter .qln-plan-pills {
  grid-column: 3 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 8px !important;
  background: #fff !important;
}

/* 招生计划输入行只保留整行外框，输入控件本身无二次边框并与上下行齐平。 */
html body.qlm-body .qln-plan-filter > label > input {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* --------------------------------- 6. 按钮区：红色渐变主按钮 + 浅灰重置 */
html body.qlm-body .mq-actions,
html body.qlm-body .qln-plan-buttons {
  display: grid !important;
  grid-template-columns: 1.4fr 1fr !important;
  gap: 8px !important;
  margin-top: 1px !important;
}
html body.qlm-body .mq-actions button,
html body.qlm-body .mq-actions a,
html body.qlm-body .qln-plan-buttons button,
html body.qlm-body .qln-plan-buttons a {
  height: 40px !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 18px !important;
  font-size: 13px !important;
  line-height: 18px !important;
}
html body.qlm-body .mq-actions button,
html body.qlm-body .qln-plan-buttons button {
  background: linear-gradient(90deg, #ed001b, #f6293f) !important;
  color: #fff !important;
  font-weight: 800 !important;
}
html body.qlm-body .mq-actions a,
html body.qlm-body .qln-plan-buttons a {
  gap: 6px !important;
  background: #fafafa !important;
  color: #4f5c70 !important;
  font-weight: 600 !important;
  border: 0 !important;
}
html body.qlm-body .mq-actions button svg,
html body.qlm-body .qln-plan-buttons button svg {
  width: 17px !important;
  fill: none !important;
  stroke: #fff !important;
  stroke-width: 1.8 !important;
}
html body.qlm-body .qln-plan-buttons a svg {
  width: 16px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
}
/* 查专业/查分数的重置按钮补旋转箭头图标 */
html body.qlm-body .mq-actions a::before {
  content: "" !important;
  width: 16px !important;
  height: 16px !important;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5c70' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5'/%3E%3Cpath d='M18.5 9A7 7 0 0 0 6 7'/%3E%3Cpath d='M4 17v-5h5'/%3E%3Cpath d='M5.5 15A7 7 0 0 0 18 17'/%3E%3C/svg%3E") !important;
}

/* 省控线：单按钮 → 全宽红渐变 */
html body.qlm-body .mcontrol-query form > button {
  width: 100% !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: linear-gradient(90deg, #ed001b, #f6293f) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 18px !important;
}

/* ------- 7. 新高考按钮（v2 修复：form 网格方案，弃用 v1 的 float） -------
   form 直接变两列网格：字段行全部跨两列保持纵排，最后两个按钮各占一列，
   宽度比例与一分一段一致（1.4 : 1）、间隔 8px，无错位、无分行。 */
html body.qlm-body .mgaokao-query form {
  display: grid !important;
  grid-template-columns: 1.4fr 1fr !important;
  gap: 6px 8px !important;
}
html body.qlm-body .mgaokao-query form > * {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
}
html body.qlm-body .mgaokao-query form > button[type="submit"] {
  grid-column: 1 !important;
  height: 40px !important;
  min-height: 40px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: linear-gradient(90deg, #ed001b, #f6293f) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
html body.qlm-body .mgaokao-query form > button[type="submit"] svg {
  width: 17px !important;
  fill: none !important;
  stroke: #fff !important;
  stroke-width: 1.8 !important;
}
html body.qlm-body .mgaokao-query form > .mgaokao-reset {
  grid-column: 2 !important;
  float: none !important;
  width: auto !important;
  height: 40px !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #fafafa !important;
  color: #4f5c70 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
}

/* 新高考：只读年份红框 → 红字；目标行输入框独占第二行；必填星号红色 */
html body.qlm-body .mgaokao-query form > label > .mgaokao-year {
  grid-column: 3 !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 9px !important;
  border: 0 !important;
  background: #fff !important;
  color: #ed001b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
}
html body.qlm-body .mgaokao-query .mgaokao-row.mgaokao-target-row {
  grid-template-columns: 31px 66px minmax(0, 1fr) !important;
}
html body.qlm-body .mgaokao-query .mgaokao-row.mgaokao-target-row > input {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-top: 1px solid #f0f1f4 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #161d2b !important;
  font-size: 13px !important;
  line-height: 18px !important;
  outline: 0 !important;
}
html body.qlm-body .mgaokao-query b > i {
  color: #ed001b !important;
  font-style: normal !important;
}

/* 查询页统一使用系统中文无衬线字体，避免不同模板退回 Arial 或宋体。 */
html body.qlm-body .mp-college-query,
html body.qlm-body .mp-college-results,
html body.qlm-body .mq-filter,
html body.qlm-body .mq-results,
html body.qlm-body .qln-plan-page,
html body.qlm-body .mcontrol-query,
html body.qlm-body .mcontrol-result,
html body.qlm-body .mgaokao-query,
html body.qlm-body .mgaokao-results,
html body.qlm-body .mr2-query,
html body.qlm-body .mr2-result {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========================================================================
   v3.0 最终兼容层：图标改为模板内联 SVG，不依赖 data URI / :has / 缓存。
   ======================================================================== */
html body.qlm-body .mp-college-selects label::before,
html body.qlm-body .mq-filter label::before,
html body.qlm-body .qln-plan-filter > label::before,
html body.qlm-body .qln-plan-filter > .qln-plan-inline::before,
html body.qlm-body .qln-plan-filter fieldset::before,
html body.qlm-body .mcontrol-field::before,
html body.qlm-body .mgaokao-query form > label::before,
html body.qlm-body .mgaokao-query .mgaokao-row::before {
  display: none !important;
  content: none !important;
  background-image: none !important;
}

html body.qlm-body .mq-field-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  display: block !important;
  width: 31px !important;
  height: 100% !important;
  min-height: 41px !important;
  margin: 0 !important;
  padding: 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fbfbfc !important;
  color: #2c2426 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  box-sizing: border-box !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 查专业首行固定为「图标 + 完整输入框」，避免被通用三列表单规则挤到第3列。 */
html body.qlm-body.mobile-query-major .mq-filter.mq-major-filter label.mq-keyword {
  grid-template-columns: 31px minmax(0, 1fr) !important;
}
html body.qlm-body.mobile-query-major .mq-filter.mq-major-filter label.mq-keyword > input[name="q"] {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 查分数筛选卡从导航下方正常开始，不再用负边距覆盖页签边框。 */
html body.qlm-body.mobile-query-score .mq-filter.mq-score-filter {
  position: relative !important;
  width: auto !important;
  margin: 10px 12px 12px !important;
  box-sizing: border-box !important;
}

/* 查询结果及可展开卡片去除浏览器默认黑色焦点框，保留主题浅红分隔线。 */
html body.qlm-body :where(
  .qln-plan-results,.plan-school-list,.plan-school-card,.plan-school-card > summary,
  .plan-major-list,.plan-major-list > section,.mq-results,.mq-results article,
  .mgaokao-results,.mgaokao-results article,.mcontrol-result,.mr2-result
) {
  outline: 0 !important;
  -webkit-tap-highlight-color: transparent !important;
}
html body.qlm-body .plan-school-card,
html body.qlm-body .plan-school-card:focus,
html body.qlm-body .plan-school-card:focus-within {
  border-color: #f7eff0 !important;
  outline: 0 !important;
  box-shadow: 0 6px 20px rgba(74,53,57,.06) !important;
}
html body.qlm-body .plan-school-card > summary,
html body.qlm-body .plan-school-card > summary:focus,
html body.qlm-body .plan-school-card > summary:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* 移动端交互状态统一为教育红，覆盖旧版蓝色焦点阴影和链接强调色。 */
html body.qlm-body {
  --mp-blue: #e60012 !important;
  --ql-blue: #e60012 !important;
  --m-blue: #e60012 !important;
  -webkit-tap-highlight-color: transparent;
}
html body.qlm-body :where(input,select,textarea,button,a,summary):focus,
html body.qlm-body :where(input,select,textarea,button,a,summary):focus-visible {
  outline: 0 !important;
}
html body.qlm-body :where(input,select,textarea):focus {
  border-color: #e60012 !important;
  box-shadow: 0 0 0 3px rgba(230,0,18,.08) !important;
}

/* ========================================================================
   v3.1 定点兼容修复：仅查专业、查分数、招生计划、新高考选科。
   ======================================================================== */

/* 查专业、查分数：三个单元强制处于同一网格行，避免图标单独占第一行。 */
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword) > .mq-field-icon,
html body.qlm-body.mobile-query-score .mq-score-filter label > .mq-field-icon {
  grid-row: 1 !important;
}
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword) > :is(span,b),
html body.qlm-body.mobile-query-score .mq-score-filter label > :is(span,b) {
  grid-row: 1 !important;
}
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword) > :is(select,input),
html body.qlm-body.mobile-query-score .mq-score-filter label > :is(select,input) {
  grid-row: 1 !important;
}

/* 招生计划：页签和表单合成连续白卡片，不露出旧版灰色间隙。 */
html body.qlm-body.mobile-query-plan .qln-plan-page {
  gap: 0 !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-tabs {
  position: relative !important;
  z-index: 5 !important;
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  background: #fff !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-filter {
  margin: 0 !important;
  border-radius: 0 0 18px 18px !important;
  background: #fff !important;
}

/* Safari 对 fieldset/legend + grid 支持不一致，改用普通容器保持稳定排版。 */
html body.qlm-body.mobile-query-plan .qln-plan-filter > .qln-plan-secondary {
  display: grid !important;
  grid-template-columns: 31px minmax(0,1fr) !important;
  grid-template-rows: 34px auto !important;
  min-width: 0 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 1px solid #edf0f4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-secondary > .mq-field-icon {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  width: 31px !important;
  height: 100% !important;
  min-height: 83px !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-secondary > b {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  padding: 0 8px !important;
  border-bottom: 1px solid #f0f1f4 !important;
  color: #4e5b70 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-secondary > div {
  grid-column: 2 !important;
  grid-row: 2 !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  min-width: 0 !important;
  padding: 7px 8px !important;
  background: #fff !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-secondary label {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-secondary input {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-secondary span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 38px !important;
  min-height: 28px !important;
  padding: 0 9px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #f7f8fa !important;
  color: #4e5b70 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
html body.qlm-body.mobile-query-plan .qln-plan-secondary input:checked + span {
  background: linear-gradient(90deg,#ed001b,#f6293f) !important;
  color: #fff !important;
}

/* 新高考选科去掉独立标题后，表单从卡片顶部正常开始。 */
html body.qlm-body.mobile-query-new_gaokao .mgaokao-query > form {
  margin-top: 0 !important;
}

/* v3.2：旧版 Safari/WebView 不依赖 :is()，模板显式字段类固定三列同一行。 */
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword) > .mq-field-icon,
html body.qlm-body.mobile-query-score .mq-score-filter label > .mq-field-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword) > .mq-field-label,
html body.qlm-body.mobile-query-score .mq-score-filter label > .mq-field-label {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword) > .mq-field-control,
html body.qlm-body.mobile-query-score .mq-score-filter label > .mq-field-control {
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: stretch !important;
  min-width: 0 !important;
  width: 100% !important;
}

/* v3.3：线上计算样式确认旧 ::before 仍占据第二条 41px 网格行。 */
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword)::before,
html body.qlm-body.mobile-query-score .mq-score-filter form > label::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  background: none !important;
}
html body.qlm-body.mobile-query-major .mq-major-filter label:not(.mq-keyword),
html body.qlm-body.mobile-query-score .mq-score-filter label {
  grid-template-rows: 41px !important;
  grid-auto-rows: 0 !important;
  height: 43px !important;
  min-height: 43px !important;
}
