/* ================= 移动端 / 微信内 H5 适配 ================= */
.nav-toggle { display: none; }
/* 桌面/平板：春招「分类考试填报」只在右上角出现一次（金色按钮），导航条里不再重复；
   手机端头部放不下第三个按钮，改由展开菜单里的 #navSpring 承载 */
@media (min-width: 901px) { .nav a.nav-spring { display: none !important; } }

@media (max-width: 1180px) {
  .header-inner { padding: 0 14px !important; gap: 12px !important; }
  .header-cta .btn:not(.primary) { display: none; }
  .header-cta .btn.login-btn { display: inline-flex !important; align-items: center; }
  .home-hero h1 { font-size: 36px !important; }
}

/* 17px 导航 + 三按钮：1240 以下收紧间距与 CTA 字号，1099 以下只留「分类考试填报 + 登录」（避免横向溢出） */
@media (max-width: 1240px) {
  .header-inner { gap: 16px !important; }
  .nav { gap: 2px !important; }
  .nav a { padding: 8px 9px !important; }
  .header-cta { gap: 8px; }
  .header-cta .btn { padding: 9px 11px; font-size: 15px; }
}
@media (max-width: 1099px) {
  .header-cta .btn.primary { display: none !important; }
  /* 春招是主入口：窄屏保留金色按钮，只收起蓝色的「智能选志愿」 */
  .header-cta .btn.primary.spring-entry { display: inline-flex !important; align-items: center; font-size: 14px !important; padding: 8px 11px !important; }
}

@media (max-width: 900px) {
  /* 头部：汉堡菜单 */
  .header-inner { height: 64px !important; }
  .logo-img { width: 54px !important; height: 54px !important; border-radius: 12px !important; }
  .logo { font-size: 26px !important; gap: 8px !important; letter-spacing: .5px !important; }
  .logo > span { max-width: 168px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-cta { display: flex !important; align-items: center; }
  .header-cta .btn.primary { display: none !important; }
  .header-cta .btn.primary.spring-entry { display: none !important; }
  .header-cta .btn.login-btn { display: inline-flex !important; align-items: center; height: 34px; padding: 0 12px !important; font-size: 13px !important; border-radius: 9px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
    width: 40px; height: 40px; border-radius: 10px; background: #f2f5fa; color: #14456B; font-size: 19px;
  }
  /* 登录/注册弹窗：小屏收窄 */
  #regGateHost .am-card { width: 94vw; }
  #regGateHost .am-banner { padding: 13px 70px 13px 15px !important; }
  #regGateHost .am-mascot { right: 40px !important; width: 40px !important; height: 40px !important; font-size: 21px !important; }
  #regGateHost .am-b1 { font-size: 15.5px !important; }
  #regGateHost .am-b2 { font-size: 11.5px !important; }
  #regGateHost .am-body { padding: 14px 16px 16px !important; }
  #regGateHost .am-qr { width: 166px !important; height: 166px !important; }
  #regGateHost .am-arrow { font-size: 24px !important; }
  #regGateHost .am-ways { gap: 26px !important; }
  .nav {
    position: fixed; left: 0; right: 0; top: 64px; z-index: 80;
    background: #fff; border-bottom: 1px solid #e6ecf7; box-shadow: 0 18px 40px rgba(11, 42, 91, .14);
    display: none !important; flex-direction: column; align-items: stretch; gap: 0 !important;
    padding: 8px 12px 14px; max-height: calc(100vh - 64px); overflow: auto;
  }
  .nav.open { display: flex !important; }
  .nav > a, .nav-more > a {
    padding: 12px 10px !important; border-radius: 9px; font-size: 15px !important; border-bottom: 1px solid #f4f7fc;
  }
  .nav > a.on, .nav > a:hover { background: #f5f9ff; }
  .nav-drop {
    position: static !important; display: flex !important; flex-direction: column; box-shadow: none !important;
    border: 0 !important; padding: 2px 0 6px 12px !important; opacity: 1 !important; visibility: visible !important; transform: none !important;
  }
  .nav-drop a { padding: 9px 8px !important; font-size: 14px !important; }

  main { min-height: auto; }
  .container { padding: 0 14px !important; }
  .home-hero { padding: 30px 0 26px !important; }
  .home-hero h1 { font-size: 28px !important; line-height: 1.35 !important; }
  .home-hero h1 .hl { font-size: 12px !important; padding: 3px 9px !important; margin-left: 6px !important; }
  .home-hero .sub { font-size: 13px !important; margin-top: 10px !important; }
  .hero-badges { gap: 6px !important; margin-bottom: 14px !important; }
  .hero-badges span { font-size: 11.5px !important; padding: 3px 10px !important; }
  .hero-flex { flex-direction: column !important; gap: 18px !important; }
  .hero-side { width: 100% !important; padding: 18px 16px !important; border-radius: 16px !important; gap: 10px !important; }
  .hero-seal { font-size: 18px !important; padding: 9px 20px !important; letter-spacing: 5px !important; text-indent: 5px !important; border-radius: 11px !important; }
  .hero-cd .cd-top { font-size: 12.5px !important; }
  .hero-cd .cd-num b { font-size: 34px !important; }
  .hero-cd .cd-num i { font-size: 13px !important; }
  .hero-search { margin-top: 18px !important; padding: 6px !important; border-radius: 13px !important; }
  .hero-search input { font-size: 14px !important; padding: 10px 12px !important; }
  .hero-search .hs-region { padding: 0 10px !important; font-size: 13px !important; }
  .hero-search .btn { padding: 8px 16px !important; font-size: 13.5px !important; }
  .home-hero .stats { margin-top: 20px !important; padding: 14px 4px !important; }
  .home-hero .stat b { font-size: 22px !important; }
  .home-hero .stat span { font-size: 11.5px !important; }

  /* 五大入口：窄屏改两列，卡片仍保持「图标左 + 信息右」 */
  .feature-row { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; margin-top: 16px !important; }
  .feature-row .feature-card { padding: 12px 12px !important; border-radius: 12px !important; gap: 10px !important; }
  .feature-row .feature-card .fi { width: 38px !important; height: 38px !important; border-radius: 10px !important; font-size: 0 !important; }
  .feature-row .feature-card .fi svg { width: 20px !important; height: 20px !important; }
  .feature-row .feature-card .ft { font-size: 15px !important; margin-top: 0 !important; }
  .feature-row .feature-card .fd { margin-top: 3px !important; }
  .feature-row .feature-card .fn { font-size: 13.5px !important; }
  .feature-row .feature-card .fu { font-size: 11px !important; }
  .home-cols { grid-template-columns: minmax(0,1fr) !important; gap: 16px !important; }
  .home-cols > * { min-width: 0 !important; }
  .hot-list, .rank-box { border-radius: 13px !important; }
  /* 热点推荐：手机端标题两行显示，避免被截成半句 */
  .hot-list { padding: 4px 14px !important; }
  .hot-item { padding: 12px 0 !important; gap: 10px !important; }
  .hi-no { width: 26px !important; height: 26px !important; font-size: 13.5px !important; border-radius: 8px !important; }
  .hi-main { gap: 10px !important; }
  .hi-title {
    font-size: 14.5px !important; line-height: 1.45 !important; white-space: normal !important;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
  .hi-date { font-size: 12px !important; }
  .hot-more { border-radius: 13px !important; font-size: 14px !important; padding: 11px 0 !important; }
  .section-head h2 { font-size: 17px !important; }

  /* 通用列表/表格：横向滚动 */
  .table-wrap, .kb-table, .vb-table, .vp-table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  table { min-width: 560px; }
  .tbl { min-width: 620px; }

  /* 查院校 / 查专业 / 选科 */
  .kb-page { padding: 14px 12px 30px !important; }
  .kb-tabs { overflow-x: auto !important; flex-wrap: nowrap !important; justify-content: flex-start !important; }
  .kb-tabs span { flex: 0 0 auto !important; font-size: 13px !important; padding: 7px 12px !important; }
  .kb-filter-panel, .kb-filter-row { flex-direction: column !important; align-items: stretch !important; }
  .kb-combo-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .kb-combo-card { padding: 12px 14px !important; }
  .kb-assess-hero.kb-hero-inline { flex-direction: column !important; align-items: flex-start !important; gap: 6px !important; }
  .kb-assess-hero h2 { font-size: 19px !important; }
  .kb-assess-hero p { font-size: 12.5px !important; }
  .kb-assess-grid { grid-template-columns: 1fr !important; }
  .kb-school-card, .kb-uni-row { grid-template-columns: 56px 1fr !important; }
  .kb-uni-card { flex-wrap: wrap !important; }

  /* 智能选志愿：纵向堆叠 */
  .vb-page { padding: 10px 10px 40px !important; }
  .vb-topbar { flex-wrap: wrap !important; gap: 8px !important; }
  .vb-top-left { flex-wrap: wrap !important; row-gap: 4px; font-size: 12.5px !important; }
  .vb-filter { flex-wrap: wrap !important; gap: 6px !important; }
  .vb-filter .vb-fbtn { font-size: 12px !important; padding: 5px 9px !important; }
  .vb-tabs { overflow-x: auto !important; flex-wrap: nowrap !important; }
  .vb-table .vb-thead, .vb-table .vb-row { min-width: 760px; }
  .vb-planner-tip { font-size: 12px !important; padding: 8px 10px !important; }
  .vp-page.vp-wide, .vp-page { padding: 10px 10px 40px !important; max-width: 100% !important; }
  .vp-head { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
  .vp-head-r { width: 100%; overflow-x: auto; }
  .vp-bar { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
  .vp-wide .vp-table { min-width: 980px; }

  /* 用户中心 / 规划师台：侧栏改顶部横向 */
  .shell { grid-template-columns: 1fr !important; }
  .main { padding: 12px !important; }
  .view { padding: 0 !important; }
  .stats { grid-template-columns: repeat(2, 1fr) !important; }
  .pl-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .pl-hero { padding: 16px !important; border-radius: 14px !important; }
  .pl-hero .acts { width: 100%; margin-left: 0 !important; }
  .pl-hero .acts .btn { flex: 1; }
  .pl-tabs { overflow-x: auto !important; }
  .pl-tabs button { min-width: 104px; }
  .pl-plan .ops { width: 100%; margin-left: 0 !important; }
  .pl-profile-grid { grid-template-columns: 1fr !important; }
  .pl-as { grid-template-columns: 1fr !important; }
  .pl-modal { max-height: 92vh; }
  .pl-modal .bd { padding: 14px !important; }

  /* 抽屉全屏化 */
  .drawer { width: 100% !important; max-width: 100% !important; }
  .modal.wide { width: 96vw !important; }
}

@media (max-width: 520px) {
  .feature-row { grid-template-columns: 1fr !important; }
  .feature-row .feature-card { padding: 12px 14px !important; }
  .home-hero h1 { font-size: 25px !important; }
  .home-hero .stat b { font-size: 19px !important; }
  .pl-stat .vl { font-size: 23px !important; }
  .uc-form { grid-template-columns: 1fr !important; }
  .pl-row2, .pl-row3 { grid-template-columns: 1fr !important; }
}

/* 微信内 H5 安全区 & 字号修正 */
body.in-wechat { padding-bottom: env(safe-area-inset-bottom); }
body.in-wechat .site-header { position: sticky; top: 0; }
body.in-wechat .site-footer { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
body.in-wechat input, body.in-wechat select, body.in-wechat textarea { font-size: 16px; }

/* ===== 春招 · 按分数选大学（手机端） ===== */
@media (max-width: 760px) {
  .spring-page .page { padding: 8px 10px 40px !important; }
  .sph { padding: 0 !important; margin-bottom: 0 !important; }
  .spring-page .sph-bar { padding: 10px 10px 12px !important; }
  /* 频道导航：2×2 等分整行，两行大按钮比原来单行横向滑动更好点 */
  .sph-tabs { width: 100% !important; max-width: none !important; gap: 6px !important; }
  .sph-tab { height: 34px !important; padding: 0 8px !important; font-size: 14px !important; border-radius: 9px !important; }
  .spm-page .vb-topbar { padding: 10px 12px !important; }
  .spm-page .vb-top-left { gap: 8px !important; row-gap: 6px !important; }
  .spm-page .vb-top-right { width: 100%; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
  .spm-meta { font-size: 12px !important; }
  .vb-filterbar { flex-wrap: wrap !important; gap: 8px !important; padding: 10px 12px !important; }
  .vb-filter-toggle { flex: none !important; white-space: nowrap; height: 34px !important; padding: 0 12px !important; font-size: 12.5px !important; }
  .vb-search { order: 3; min-width: 100%; }
  .vb-badge { white-space: nowrap; height: 32px !important; padding: 0 12px !important; font-size: 12.5px !important; }
  .vb-filterpanel { padding: 4px 12px 10px !important; }
  .vb-frow { gap: 8px !important; padding: 8px 0 !important; }
  .vb-fk { width: 58px !important; font-size: 12px !important; }
  .vb-fv { gap: 5px 10px !important; font-size: 12.5px !important; }
  .vb-tabbar { padding: 10px 12px !important; gap: 8px !important; }
  .vb-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .vb-tab { padding: 6px 12px !important; font-size: 13px !important; white-space: nowrap; }
  .vb-range { flex-wrap: wrap !important; gap: 8px !important; width: 100%; }
  .vb-range-label { white-space: nowrap; }
  .vb-slider { width: 100% !important; }
  /* 手机端改成固定像素列：6 列按百分比缩到 390px 会把「梯度/概率」挤到重叠 */
  .spm-page .vb-table.has-plan .vb-thead { min-width: 894px; grid-template-columns: 74px 200px 250px 86px 168px 116px !important; }
  .spm-page .vb-table.has-plan .vb-tbody table { min-width: 894px; width: 894px; }
  .spm-page .vb-table.has-plan .vb-tbody col:nth-child(1) { width: 74px !important; }
  .spm-page .vb-table.has-plan .vb-tbody col:nth-child(2) { width: 200px !important; }
  .spm-page .vb-table.has-plan .vb-tbody col:nth-child(3) { width: 250px !important; }
  .spm-page .vb-table.has-plan .vb-tbody col:nth-child(4) { width: 86px !important; }
  .spm-page .vb-table.has-plan .vb-tbody col:nth-child(5) { width: 168px !important; }
  .spm-page .vb-table.has-plan .vb-tbody col:nth-child(6) { width: 116px !important; }
  .spm-page .vb-table .vb-thead .th { padding: 10px 8px !important; font-size: 12.5px !important; }
  .spm-vol-row { flex-wrap: wrap !important; }
  .spm-vol-op { width: 100%; justify-content: flex-end; }
  .spm-welcome { padding: 34px 16px 38px !important; }
  .spm-w-t { font-size: 15px !important; }
}

/* 春招 · 手机端头部瘦身（导航 2×2 常驻，时间线单行横向滑动；标题文字已下线） */
@media (max-width: 760px) {
  .spm-page .vb-crumb,
  .spm-page .vb-top-left > .vb-div:first-of-type { display: none !important; }
  .sph { padding: 0 !important; margin-bottom: 0 !important; }
  .spring-page .sph-bar { padding: 10px 10px 12px !important; gap: 8px !important; }
  .sph-tab { font-size: 14px !important; }
  .sph-node { flex: 0 0 148px !important; min-width: 148px !important; padding: 0 5px !important; }
  .sph-date { font-size: 12px !important; }
  .sph-ev { font-size: 11px !important; }
  .spring-page #springBody.plain { padding: 12px 12px 14px !important; }
}

/* ===== 春招「智能填春招」· 顶部条 / 成绩弹窗 / 志愿表抽屉 / 可报专业弹窗（手机端） ===== */
@media (max-width: 760px) {
  /* 顶部条对齐智能选志愿：分隔符在窄屏省掉，成绩与批次独立成行，操作按钮独占一行 */
  .spm-page .vb-topbar { padding: 9px 10px !important; gap: 6px !important; row-gap: 8px !important; }
  .spm-page .vb-top-left { width: 100%; gap: 6px 10px !important; font-size: 12.5px !important; }
  .spm-page .vb-top-left > .vb-div { display: none !important; }
  .spm-page .vb-top-left > .vb-link,
  .spm-page .vb-top-left > .vb-dd > .vb-link { white-space: nowrap; }
  .spm-page .vb-top-left #spmScoreBtn { font-weight: 600; color: #1D5C8A; }
  .spm-page .vb-top-right { width: 100%; gap: 6px !important; flex-wrap: wrap !important; }
  .spm-page .vb-top-right .vb-icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .spm-page .vb-top-right .vb-badge { margin-left: auto; height: 32px !important; padding: 0 12px !important; font-size: 12px !important; }
  .spm-page .vb-topbar .vb-dd-menu { left: 0; right: auto; min-width: 138px; }
  .spm-page .vb-topbar .vb-dd-item { font-size: 12.5px; padding: 8px 10px; }

  /* 筛选区默认全部展开：行内标签固定宽度，选项整体换行不挤压 */
  .spm-page .vb-filterbar { row-gap: 6px !important; }
  .spm-page .spm-filter-title { font-size: 12.5px !important; }
  .spm-page .vb-filterpanel { max-height: none !important; }
  .spm-page .vb-frow { align-items: flex-start !important; }
  .spm-page .vb-fk { flex: none; padding-top: 3px !important; }
  .spm-page .vb-fv { flex: 1; min-width: 0; }
  .spm-page .vb-cond { font-size: 11.5px !important; }

  /* 招生专业：窄屏大类占满整行、· 分隔照旧；细分专业浮层贴到大类下方并收窄 */
  .spm-maj-row { flex-wrap: wrap !important; align-items: baseline !important; }
  .spm-maj-row .spm-maj-cats { flex: 1 1 100% !important; gap: 3px 0 !important; max-height: 176px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .spm-maj-cats > .vb-fitem { font-size: 12.5px !important; line-height: 19px !important; }
  .spm-mj-sep { margin: 0 6px !important; }
  .spm-mjpop { max-width: calc(100vw - 20px) !important; max-height: 62vh !important; padding: 10px 12px 12px !important; }
  .spm-mjpop-b { gap: 7px 8px !important; }
  .spm-mjpop-chip { font-size: 12px !important; padding: 3px 10px !important; }
  /* 筛选栏提示：窄屏改为独占一行、右对齐，不挤掉搜索框 */
  .spm-page .vb-filterbar { flex-wrap: wrap !important; }

  /* 「我的成绩」弹窗：表单行在窄屏竖排，输入框放大到 16px 防 iOS 缩放 */
  .vb-modal-mask { padding: 10px !important; }
  .spm-score-modal { width: 94vw !important; max-height: 88vh !important; padding: 14px 14px 16px !important; }
  .spm-score-modal .vb-m-h { font-size: 15px !important; padding-bottom: 10px !important; }
  .spm-score-body .vb-form-row { flex-direction: column; align-items: flex-start !important; gap: 6px !important; padding: 9px 0 !important; }
  .spm-score-body .vb-form-row label { font-size: 12.5px; }
  .spm-score-body .vb-form-row input,
  .spm-score-body .vb-form-row select,
  .spm-score-body .vb-form-row .spm-sel { font-size: 16px !important; height: 40px !important; width: 100% !important; }
  .spm-score-body .spm-score-wrap { width: 100%; }
  .spm-score-body .spm-score-wrap input { width: calc(100% - 34px) !important; }
  .spm-score-body .spm-catgrp .vb-cat { height: 36px; padding: 0 16px; }
  .spm-score-body .vb-m-f { justify-content: flex-end; gap: 8px; padding-top: 6px; }
  .spm-score-hint .spring-note { line-height: 1.6; }

  /* 志愿表抽屉：接近全屏，工具条换行，6 列表格横向滚动 */
  #vbDrawerHost { padding: 1.5vh 2vw !important; }
  .spm-drawer { width: 96vw !important; max-height: 96vh !important; padding: 12px 12px 16px !important; border-radius: 10px !important; }
  .spm-drawer .vb-d-h { gap: 8px !important; }
  .spm-drawer .vb-d-title b { font-size: 14.5px !important; }
  .spm-drawer .vb-d-score { font-size: 11.5px !important; line-height: 1.5; }
  .spm-drawer .vb-d-tools { width: 100%; gap: 6px !important; }
  .spm-drawer .vb-tool { padding: 5px 9px !important; font-size: 12px !important; }
  .spm-drawer .vb-d-search { order: 5; width: 100%; }
  .spm-drawer .vb-d-search input { width: 100%; height: 34px; font-size: 16px; }
  .spm-drawer .vb-d-count { font-size: 11.5px !important; gap: 6px !important; }
  .spm-drawer .vb-d-table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .spm-drawer .vb-d-table table { min-width: 760px !important; width: 760px !important; }
  .spm-drawer .vb-d-table td { font-size: 12px !important; }

  /* 可报专业大弹窗：表头文字不换行，表格横向滚动 */
  .spm-maj-modal { width: 100vw !important; height: 100vh !important; max-height: 100vh !important; }
  .spm-maj-modal .vb-m-h { flex-wrap: wrap !important; gap: 6px 8px !important; padding: 12px 12px 10px !important; font-size: 15px !important; }
  .spm-maj-modal .spm-maj-sub { width: 100%; order: 4; margin-left: 0 !important; font-size: 11px !important; }
  .spm-maj-modal .vb-m-search { width: 100% !important; order: 5; height: 36px; font-size: 16px; margin-left: 0 !important; }
  .spm-maj-modal .vb-m-body { padding: 0 12px 20px !important; overflow-x: auto !important; }
  .spm-maj-table { min-width: 620px !important; }
  .spm-maj-table th, .spm-maj-table td { padding: 8px 6px !important; font-size: 12px !important; }
  .spm-maj-gtitle { font-size: 12.5px !important; }

  /* 院校库卡片：收藏 / 院校详情 上下结构在窄屏收窄，避免挤掉院校名 */
  .spring-page .su-actions { width: 74px !important; gap: 5px !important; }
  .spring-page .su-actions .fav-btn,
  .spring-page .su-actions .kb-detail-btn { height: 28px !important; font-size: 11.5px !important; }
}
