/* 春举志愿学生端移动适配：最后加载，仅覆盖窄屏布局。 */
.mobile-nav-icon{display:none}

@media (max-width:700px){
  html,body{max-width:100%;overflow-x:hidden}
  body{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
  button,a,input,select{touch-action:manipulation}

  .topbar{position:sticky!important;top:0;z-index:40;display:flex!important;height:58px!important;min-height:58px!important;padding:0 14px!important;gap:8px!important;border-bottom:1px solid var(--line);background:#fff;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .topbar .brand{display:flex!important;min-width:0;gap:9px}
  .topbar .brand-mark{width:36px;height:36px;flex:0 0 36px}
  .topbar .brand strong{font-size:16px}
  .topbar .brand small{display:none}
  .topbar .user-pill{display:flex!important;min-width:0;margin-left:auto!important;padding:4px 7px 4px 4px!important;gap:5px!important}
  .topbar .user-pill #accountPhone,.topbar .logout-button{display:none!important}
  .topbar .avatar{width:34px;height:34px;font-size:12px}
  .topbar .user-center-label{display:inline!important;font-size:13px}

  .topbar #nav{position:fixed!important;right:0;bottom:0;left:0;z-index:60;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));width:100%!important;height:calc(64px + env(safe-area-inset-bottom))!important;margin:0!important;padding:4px 4px env(safe-area-inset-bottom)!important;overflow:visible!important;border-top:1px solid #dce7e1;background:rgba(255,255,255,.97);box-shadow:0 -8px 28px rgba(20,66,48,.09);backdrop-filter:blur(18px)}
  .topbar #nav .nav-item{position:relative;display:flex!important;min-width:0;min-height:56px!important;align-items:center;justify-content:center;flex-direction:column;gap:2px;padding:4px 1px!important;color:#718078;font-size:10px!important;font-weight:600;line-height:1.15;white-space:nowrap}
  .topbar #nav .nav-item.active{color:var(--green);font-weight:750}
  .topbar #nav .nav-item.active:after{right:18px!important;bottom:auto!important;left:18px!important;top:-4px;height:3px}
  .mobile-nav-icon{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-nav-label{display:block;max-width:100%;overflow:hidden;text-overflow:clip}
  .nav-badge{position:absolute;top:1px;left:50%;min-width:16px;height:16px;margin:0 0 0 5px;padding:0 4px;font-size:9px}

  main{width:100%;max-width:none;padding:14px 14px 28px}
  .page-title{margin:2px 0 16px}
  .page-title>div{min-width:0}
  .page-title h1{margin:5px 0 8px;font-size:25px!important;line-height:1.25;letter-spacing:-.02em}
  .page-title p{margin:0;font-size:13px;line-height:1.65}
  .section-heading{align-items:flex-end;margin:24px 0 12px}
  .section-heading h2{font-size:22px}
  .section-heading .text-button{min-height:44px;padding:8px 0;font-size:13px}

  .hero{min-height:0;padding:24px 18px;border-radius:18px;grid-template-columns:minmax(0,1fr);gap:20px}
  .hero:after{display:none}
  .hero h1{margin:8px 0 10px;font-size:27px!important;line-height:1.25;letter-spacing:-.035em}
  .hero p{font-size:14px;line-height:1.7}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:20px}
  .hero-actions button{width:100%;min-height:46px;padding:10px 8px}
  .hero-panel{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:0!important;overflow:hidden;border-radius:14px}
  .hero-stat{display:grid!important;align-content:center;min-width:0;min-height:82px;padding:11px 5px!important;text-align:center!important;border-right:1px solid var(--line)!important;border-bottom:0!important}
  .hero-stat:nth-child(even){border-right:0!important}
  .hero-stat:nth-child(-n+2){border-bottom:1px solid var(--line)!important}
  .hero-stat strong{font-size:21px!important;line-height:1.1}
  .hero-stat span{margin-top:6px!important;font-size:10px;line-height:1.35}

  #homeProfiles{grid-template-columns:1fr}
  #homeProfiles .profile-card,.profile-card{padding:16px;border-radius:16px}
  .profile-top{gap:12px}
  .profile-name{gap:10px}
  .student-avatar{width:42px;height:42px;flex:0 0 42px}
  .profile-name strong{font-size:18px}
  .profile-facts{margin-top:12px!important}
  .profile-facts>span{padding:10px}
  .profile-actions{padding-top:12px}
  .profile-actions button{min-height:44px}

  .feature-grid{grid-template-columns:1fr;gap:10px;margin-top:14px}
  .feature-card{min-height:82px;padding:14px 16px;border-radius:15px}
  .feature-icon{width:44px;height:44px;flex:0 0 44px}
  .truth-note{align-items:flex-start;margin-top:14px;padding:14px 15px;border-radius:12px;font-size:12px;line-height:1.65}
  .hero-data-update{grid-column:1/-1;margin:0;padding:9px;border-top:1px solid var(--line);font-size:9px}
  .data-foundation{margin-top:14px;padding:18px 15px;border-radius:17px}
  .data-foundation-head{display:block;margin-bottom:15px}
  .data-foundation-head h2{font-size:22px}
  .data-foundation-head p{font-size:12px}
  .data-version-badge{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;margin-top:14px;padding:11px 12px}
  .data-version-badge strong{margin:0;font-size:16px}
  .data-version-badge span{font-size:10px}
  .data-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .data-metric-grid article{padding:17px 14px}
  .data-metric-grid article:nth-child(3){border-left:0;border-top:1px solid var(--line)}
  .data-metric-grid article:nth-child(4){border-top:1px solid var(--line)}
  .data-metric-grid strong{font-size:20px}
  .data-metric-grid h3{margin-top:9px;font-size:12px}
  .data-quality-grid{grid-template-columns:1fr;gap:8px}
  .data-quality-grid article{padding:13px}

  .school-filter-panel{margin-bottom:14px;padding:14px;border-radius:15px}
  .school-search-row{grid-template-columns:1fr 1fr;gap:8px;padding-bottom:12px}
  .school-search-row input{grid-column:1/-1;width:100%;height:46px}
  .school-search-row button{min-height:44px}
  .quick-filter-row{display:block;padding-top:12px}
  .quick-filter-row>strong{display:block;padding:0 0 7px;font-size:12px}
  .quick-options{display:flex;flex-wrap:nowrap;gap:7px;margin:0 -14px;padding:0 14px 4px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-inline:contain}
  .quick-options::-webkit-scrollbar{display:none}
  .quick-options button{flex:0 0 auto;min-height:42px;padding:9px 12px;border:1px solid #e3ebe7;background:#fff}
  .quick-options button.active{border-color:#8fc8ad;background:#e1f2e9;color:var(--green-dark);font-weight:750;box-shadow:inset 0 0 0 1px rgba(9,104,68,.08)}
  #schoolMeta{display:block;margin:12px 2px;font-size:12px;line-height:1.6}
  #schoolMeta>*{display:block;margin-top:4px}
  .result-list{gap:10px}
  .result-card{padding:15px;border-radius:15px}
  .school-result-main{align-items:flex-start;gap:11px}
  .school-logo-card{width:52px!important;height:52px!important;flex-basis:52px!important}
  .school-result-card h3{margin-top:0;font-size:18px}
  .school-result-card p{margin:4px 0;font-size:12px;line-height:1.55}
  .school-feature-tags{display:flex;flex-wrap:nowrap;margin-right:-4px;padding-bottom:3px;overflow-x:auto;scrollbar-width:none}
  .school-feature-tags::-webkit-scrollbar{display:none}
  .school-feature-tags .tag{flex:0 0 auto}
  .school-result-card .decision-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;margin-top:12px}
  .school-result-card .mini-button{min-height:44px}
  .school-pager{justify-content:flex-start;margin:18px -14px 0;padding:0 14px 4px;overflow-x:auto;scrollbar-width:none}
  .school-pager button{flex:0 0 auto;min-width:44px;height:44px}

  .major-search-row{grid-template-columns:1fr 1fr!important;gap:8px;padding:14px;border-radius:15px}
  .major-search-row input{grid-column:1/-1!important;width:100%;height:46px}
  .major-search-row button{min-height:44px}
  .major-browser{overflow:visible;border:0;background:transparent;box-shadow:none}
  .major-level-tabs{position:static!important;display:flex;justify-content:flex-start!important;gap:7px;min-width:0!important;min-height:0;margin:0 -14px 10px;padding:0 14px 6px;overflow-x:auto;border:0;scrollbar-width:none}
  .major-level-tabs::-webkit-scrollbar{display:none}
  .major-level-tabs button{flex:0 0 auto;min-height:44px;padding:9px 13px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:13px}
  .major-level-tabs button.active{border-color:#a9d1bf;background:var(--green-soft)}
  .major-level-tabs button.active:after{display:none}
  .major-browser-grid{display:block;min-width:0!important;min-height:0}
  .major-browser-grid>aside{margin-bottom:9px;overflow:hidden;border:1px solid var(--line);border-radius:13px;background:#fff}
  .major-column-title{height:auto;padding:10px 12px;border:0;font-size:12px}
  .major-option-list{display:flex;max-height:none;padding:0 9px 9px;overflow-x:auto;scrollbar-width:none}
  .major-option-list::-webkit-scrollbar{display:none}
  .major-option-list button{flex:0 0 auto;width:auto;min-height:42px;margin-right:7px;padding:8px 11px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:13px}
  .major-option-list button.active{border-color:#9dcab5;background:var(--green-soft)}
  .major-guide{padding:10px 12px;white-space:nowrap}
  .major-table-panel{width:100%;overflow:visible;border:0}
  .major-table-head{display:none}
  .major-table-body{display:grid;gap:9px}
  .major-table-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px 12px;min-width:0;padding:14px;border:1px solid var(--line);border-radius:13px;background:#fff}
  .major-table-row>div:first-child{grid-column:1}
  .major-name-button{min-height:32px;font-size:17px;text-align:left}
  .major-table-row>code{grid-column:2;grid-row:1;align-self:start;padding-top:6px;font-size:12px}
  .major-flags{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px}
  .major-row-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .major-row-actions .mini-button{min-height:44px}

  .recommend-profile-actions{grid-template-columns:1fr}
  .recommend-profile-actions button{min-height:46px;padding-inline:12px;font-size:14px;line-height:1.25;font-weight:750}
  .recommend-profile-manager{padding:14px;margin-bottom:14px}
  .recommend-profile-heading,.recommend-profile-empty{align-items:flex-start}
  .recommend-profile-heading>div,.recommend-profile-empty>div{min-width:0}
  .recommend-profile-heading strong,.recommend-profile-empty strong{font-size:16px}
  .recommend-profile-heading small,.recommend-profile-empty small{line-height:1.5}
  .recommend-profile-edit{flex:0 0 auto;padding:9px 12px}
  .recommend-profile-edit svg{display:none}
  .recommend-profile-facts{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}
  .recommend-profile-facts span{border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  .recommend-profile-facts span:nth-child(2n){border-right:0}
  .recommend-profile-facts span:nth-last-child(-n+2){border-bottom:0}
  .recommend-filters{margin:14px 0!important;padding:0;overflow:visible}
  .recommend-tier-tabs{margin:0 -14px;padding:0 14px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
  .recommend-tier-tabs::-webkit-scrollbar{display:none}
  .recommend-tier-tabs>button{flex:0 0 auto;min-width:78px;min-height:44px;padding-inline:14px}
  .recommend-filter-panel{grid-template-columns:1fr 1fr;padding:14px;gap:12px}
  .recommend-filter-panel label,.recommend-province-picker,.recommend-major-picker{min-width:0}
  .recommend-filter-apply,.recommend-filter-reset{width:100%;min-height:44px}
  #recommendFilterMeta{grid-column:1/-1;margin:0;text-align:right}
  .recommend-workspace{display:block}
  .draft-editor{position:static;margin-top:14px;padding:15px}
  .recommend-card{border-radius:15px}
  .recommend-card .decision-actions{width:100%}

  .assessment-report-card{display:grid;gap:14px;padding:18px}
  .assessment-report-card button{width:100%;min-height:44px}
  .assessment-card{padding:16px}
  .assessment-card button{min-height:44px}
  .favorite-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .favorite-tabs button{min-height:44px;padding:9px}

  dialog:not(.account-security-dialog),.detail-dialog,.major-detail-dialog{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;margin:0!important;border-radius:0!important}
  .detail-shell,.major-detail-dialog .detail-shell{height:100dvh!important;max-height:none!important}
  .dialog-head,.detail-head{padding:16px!important}
  .dialog-head .close,.detail-head .close{width:44px;height:44px}
  #profileDialog .dialog-actions{position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:20px -20px -20px;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.97);box-shadow:0 -10px 24px rgba(20,66,48,.08);backdrop-filter:blur(8px)}
  #profileDialog .dialog-actions button{width:100%;min-height:46px;padding-inline:8px}
  #profileDialog #saveAndRecommendProfile:not([hidden]){grid-column:1/-1}
  .detail-body{padding:14px!important}

  .auth-gate{align-items:end;padding:12px 12px calc(12px + env(safe-area-inset-bottom));background:rgba(10,31,24,.42)}
  .auth-card{display:block;width:100%;min-height:0;max-height:92dvh;padding:26px 20px 22px;overflow:auto;border:0;border-radius:22px;box-shadow:0 24px 70px rgba(10,39,29,.28)}
  .auth-close{top:12px;right:12px;width:44px;height:44px}
  .auth-brand{margin-bottom:24px;padding-right:42px}
  .auth-brand img{width:40px;height:40px}
  .auth-card h1{padding-right:24px;font-size:25px}
  .auth-card>div>p{margin-bottom:18px;font-size:13px}
  .auth-card input,.auth-submit{height:48px}

  .compare-bar{right:8px;left:8px;bottom:calc(70px + env(safe-area-inset-bottom));width:auto;transform:translateY(150%)}
  .compare-bar.show{transform:translateY(0)}
  .toast{bottom:calc(78px + env(safe-area-inset-bottom));max-width:calc(100vw - 28px);text-align:center}
}

@media (max-width:374px){
  .topbar #nav .nav-item{font-size:9px!important}
  .mobile-nav-icon{width:19px;height:19px}
  .profile-completeness{grid-template-columns:1fr 1fr}
}
