/* ============================================================
   MIN homepage mobile adaptation
   Loaded after main-concept.css + main-cms.css.
   Desktop layout is unchanged; rules apply only to phones/tablets.
   ============================================================ */

.mobile-menu-toggle,
.mobile-nav-backdrop{
  display:none;
}

@media (max-width:900px){
  html{
    scroll-padding-top:82px;
  }

  body{
    min-width:0 !important;
    width:100%;
    overflow-x:hidden;
  }

  body.nav-open{
    overflow:hidden;
  }

  body::before{
    background-size:980px auto;
    opacity:.055;
  }

  .skip-link{
    left:16px;
  }

  /* ---------- Mobile header ---------- */
  .page-shell{
    max-width:none;
    width:100%;
    margin:0;
    padding:0 16px;
  }

  .site-header{
    height:auto;
    min-height:76px;
    padding:12px 0 14px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 44px;
    grid-template-rows:auto auto;
    align-items:center;
    gap:10px 12px;
  }

  .brand{
    grid-column:1;
    grid-row:1;
    width:100%;
    max-width:560px;
    min-width:0;
  }

  .brand img{
    width:100%;
    height:auto;
  }

  .mobile-menu-toggle{
    grid-column:2;
    grid-row:1;
    display:flex;
    width:42px;
    height:42px;
    padding:9px;
    flex-direction:column;
    justify-content:center;
    gap:5px;
    border:1px solid var(--accent);
    border-radius:6px;
    background:#fffaf5;
    color:var(--accent);
    position:relative;
    z-index:120;
  }

  .mobile-menu-toggle span{
    display:block;
    width:100%;
    height:2px;
    border-radius:2px;
    background:currentColor;
    transition:transform .22s ease,opacity .22s ease;
  }

  body.nav-open .mobile-menu-toggle span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }

  body.nav-open .mobile-menu-toggle span:nth-child(2){
    opacity:0;
  }

  body.nav-open .mobile-menu-toggle span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }

  .site-header .search{
    grid-column:1 / -1;
    grid-row:2;
    width:100% !important;
    max-width:none;
    min-width:0;
    height:42px;
    padding:6px 10px;
    background:#fffaf5;
  }

  .search input[type="text"],
  .search input[type="search"]{
    font-size:14px;
  }

  /* ---------- Off-canvas navigation ---------- */
  .side-rail{
    width:min(82vw,320px);
    transform:translateX(-105%);
    transition:transform .25s ease;
    z-index:110;
    overflow-y:auto;
    overflow-x:hidden;
    border-right:1px solid #efb070;
    background:#fffaf5;
    box-shadow:12px 0 35px rgba(95,55,18,.18);
  }

  body.nav-open .side-rail{
    transform:translateX(0);
  }

  .mobile-nav-backdrop{
    position:fixed;
    inset:0;
    display:block;
    z-index:100;
    padding:0;
    margin:0;
    border:0;
    background:rgba(44,30,20,.28);
    opacity:0;
    pointer-events:none;
    transition:opacity .22s ease;
  }

  body.nav-open .mobile-nav-backdrop{
    opacity:1;
    pointer-events:auto;
  }

  .rail-mark{
    height:58px;
    padding:0 20px;
  }

  .side-rail nav{
    padding:8px 12px 24px;
  }

  .rail-decoration{
    display:none;
  }

  .cms-navigation > ul,
  .cms-navigation > [frag="窗口内容"] > ul{
    width:100%;
  }

  .cms-navigation > ul > li,
  .cms-navigation > [frag="窗口内容"] > ul > li{
    border-bottom:1px solid #f1d5ba;
  }

  .cms-navigation > ul > li > a,
  .cms-navigation > [frag="窗口内容"] > ul > li > a{
    min-height:58px;
    width:100%;
    padding:8px 48px 8px 10px;
    flex-direction:row;
    justify-content:flex-start;
    align-items:center;
    gap:14px;
    font-size:15px;
    color:#4a382b;
  }

  .nav-symbol .icon{
    width:24px;
    height:24px;
  }

  .submenu-toggle{
    right:10px;
    top:13px;
    width:34px;
    height:34px;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .cms-navigation .ernav{
    position:static;
    left:auto;
    top:auto;
    min-width:0;
    width:auto;
    max-height:none;
    overflow:visible;
    margin:0 8px 10px 42px;
    padding:4px 0 4px 12px;
    border:0;
    border-left:1px solid var(--accent);
    box-shadow:none;
    background:transparent;
  }

  .cms-navigation li:hover > .ernav{
    display:none;
  }

  .cms-navigation li.is-open > .ernav{
    display:block;
  }

  .cms-navigation .ernav a{
    padding:10px 8px;
    border-bottom:1px solid #f1d5ba;
    font-size:14px;
  }

  /* Publications submenu remains disabled, matching desktop. */
  .cms-navigation > ul > li:nth-child(2) > .ernav,
  .cms-navigation > [frag="窗口内容"] > ul > li:nth-child(2) > .ernav,
  .cms-navigation > ul > li:nth-child(2) > .submenu-toggle,
  .cms-navigation > [frag="窗口内容"] > ul > li:nth-child(2) > .submenu-toggle{
    display:none !important;
  }

  /* ---------- Hero ---------- */
  .hero,
  .hero.without-people{
    display:block;
    min-height:0;
    margin-bottom:24px;
  }

  .hero::before{
    inset:-4px -8px 8px;
  }

  .feature{
    padding:4px 0 64px;
  }

  .feature-slide img{
    width:100%;
    height:auto;
    aspect-ratio:auto;
    object-fit:contain;
  }

  .feature-stage::before{
    opacity:.08;
  }

  .feature-stage::after{
    box-shadow:inset 0 0 20px 6px rgba(255,255,255,.65);
  }

  .hero-network{
    display:none;
  }

  .feature-controls{
    left:8px;
    right:8px;
    bottom:0;
    min-height:70px;
    gap:8px;
    padding:9px 12px;
    clip-path:polygon(16px 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,16px 100%,0 50%);
  }

  .feature-controls::after{
    inset:3px;
  }

  .circle-button{
    width:32px;
    height:32px;
  }

  .feature-caption>a{
    min-height:20px;
    font-size:15px;
    line-height:1.3;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .feature-track{
    margin:8px 2px 5px;
  }

  .slide-dot{
    width:15px;
    height:15px;
  }

  .feature-count{
    right:50px;
    bottom:5px;
    font-size:9px;
  }

  .feature-count strong{
    font-size:15px;
  }

  .pause-button{
    right:17px;
    bottom:2px;
  }

  /* ---------- People panel ---------- */
  .people-panel{
    margin-top:20px;
    padding:0;
    display:grid;
    grid-template-columns:minmax(0,1fr) 150px minmax(0,1fr);
    gap:8px;
    align-items:center;
  }

  .people-panel h2{
    position:static;
    grid-column:1 / -1;
    grid-row:1;
    writing-mode:horizontal-tb;
    letter-spacing:1px;
    font-size:20px;
    text-align:left;
    margin:0 0 6px;
  }

  .person-main{
    grid-column:2;
    grid-row:2;
    width:150px;
    padding:11px 8px 26px;
  }

  .person-main .hex-frame{
    width:105px;
    height:121px;
  }

  .person-main strong{
    font-size:18px;
  }

  .person-main>span:last-child{
    font-size:11px;
    max-width:130px;
  }

  .person-small{
    min-height:72px;
    gap:6px;
    flex-direction:column;
    justify-content:center;
    font-size:12px;
  }

  .previous-person{
    grid-column:1;
    grid-row:2;
  }

  .next-person{
    grid-column:3;
    grid-row:2;
  }

  .next-person{
    flex-direction:column;
  }

  .person-small .hex-frame{
    width:52px;
    height:60px;
  }

  /* ---------- Introduction ---------- */
  .cms-introduction{
    margin:0 0 26px;
    padding:16px;
  }

  .cms-profile h2{
    padding-right:34px;
    font-size:20px;
  }

  .cms-introduction .profile-summary{
    max-height:360px;
    margin-top:14px;
    padding-right:8px;
  }

  .cms-introduction .profile-summary > ul{
    grid-template-columns:1fr;
    gap:10px;
    padding-left:18px;
  }

  .cms-introduction .profile-summary > ul > li:last-child{
    grid-column:auto;
  }

  .cms-introduction .rencai{
    grid-template-columns:1fr;
    gap:0;
  }

  .profile-summary .ren-li{
    gap:12px;
    padding:12px 0;
  }

  .profile-summary .ren-img{
    flex-basis:58px;
  }

  .profile-summary .ren-img img{
    width:58px;
  }

  .cms-introduction .profile-summary .ren-li h5,
  .cms-introduction .profile-summary .ren-li h5 span,
  .cms-introduction .profile-summary .ren-li h5 a{
    font-size:16px;
  }

  /* ---------- Section headings ---------- */
  .section-header{
    margin-bottom:18px;
  }

  .section-header h2{
    font-size:23px;
    gap:11px;
  }

  .section-header h2::before{
    height:24px;
    width:4px;
  }

  .more-button{
    min-width:auto;
    padding:6px 10px;
    font-size:12px;
  }

  .research-section,
  .news-section,
  .papers-section{
    margin-bottom:28px;
  }

  /* ---------- Research ---------- */
  .research-grid,
  .papers-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .research-card{
    min-height:0;
    gap:14px;
    padding:12px 42px 12px 12px;
  }

  .research-image{
    flex:0 0 34%;
    max-width:190px;
  }

  .research-copy h3{
    font-size:16px;
    margin-bottom:8px;
  }

  .research-copy ul{
    font-size:12px;
    line-height:1.55;
  }

  .round-link{
    width:30px;
    height:30px;
    right:10px;
    bottom:10px;
  }

  /* ---------- Latest news ---------- */
  .news-console{
    padding:14px 12px 12px;
    clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px);
  }

  .news-layout{
    grid-template-columns:1fr;
    gap:12px;
    min-height:0;
  }

  .lead-news-window{
    min-width:0;
  }

  .lead-news-window .lead-news,
  .lead-news{
    min-height:220px;
  }

  .lead-news h3{
    font-size:15px;
    line-height:1.4;
  }

  .lead-news-caption{
    min-height:78px;
    padding:34px 14px 14px;
  }

  .lead-news>time{
    top:10px;
    left:10px;
  }

  .news-list{
    max-height:none;
  }

  .news-entry{
    min-height:58px;
    padding:9px 0;
    font-size:12px;
  }

  .network-globe{
    display:none;
  }

  /* ---------- Papers ---------- */
  .paper-card{
    min-height:0;
    gap:14px;
    padding:14px 40px 14px 12px;
    align-items:center;
  }

  .paper-art{
    width:112px;
    height:132px;
    padding:4px;
  }

  .paper-copy{
    padding:0;
  }

  .paper-copy h3{
    font-size:14px;
    line-height:1.45;
    margin-bottom:8px;
  }

  .paper-content{
    font-size:11px;
    line-height:1.55;
    margin-bottom:0;
  }

  /* ---------- Footer ---------- */
  .site-footer{
    margin:34px -16px 0;
    padding:0 16px;
  }

  .footer-top{
    grid-template-columns:1fr;
    gap:18px;
    padding:22px 0;
  }

  .footer-identity{
    border-right:0;
    border-bottom:1px solid #ecc39c;
    padding:0 0 18px;
  }

  .footer-identity img{
    width:min(100%,360px);
  }

  .site-footer address{
    font-size:12px;
  }

  .footer-bottom{
    padding:15px 0 20px;
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .cms-copyright{
    padding-right:0;
  }

  /* ---------- Overlay UI ---------- */
  dialog{
    width:calc(100vw - 32px);
    max-width:calc(100vw - 32px);
    padding:24px 18px;
  }

  .profile-people{
    grid-template-columns:1fr;
  }

  .search-results{
    top:126px;
    left:16px;
    right:16px;
    width:auto;
    max-height:65vh;
    padding:16px;
  }
}

@media (max-width:520px){
  .page-shell{
    padding:0 12px;
  }

  .site-header{
    grid-template-columns:minmax(0,1fr) 40px;
    gap:8px 10px;
  }

  .mobile-menu-toggle{
    width:40px;
    height:40px;
  }

  .brand{
    max-width:none;
  }

  .feature{
    padding-bottom:60px;
  }

  .feature-controls{
    left:2px;
    right:2px;
    min-height:64px;
    padding:8px 8px;
  }

  .feature-caption>a{
    font-size:13px;
  }

  .circle-button{
    width:29px;
    height:29px;
  }

  .people-panel{
    grid-template-columns:minmax(0,1fr) 134px minmax(0,1fr);
  }

  .person-main{
    width:134px;
  }

  .person-main .hex-frame{
    width:92px;
    height:106px;
  }

  .person-small .hex-frame{
    width:46px;
    height:53px;
  }

  .section-header h2{
    font-size:20px;
  }

  .research-card{
    flex-direction:column;
    align-items:stretch;
    padding:12px 38px 14px 12px;
  }

  .research-image{
    flex:none;
    width:100%;
    max-width:none;
  }

  .research-image img{
    max-height:190px;
  }

  .paper-card{
    gap:10px;
    padding:12px 38px 12px 10px;
  }

  .paper-art{
    width:92px;
    height:112px;
  }

  .paper-copy h3{
    font-size:13px;
  }

  .paper-content{
    font-size:10.5px;
  }

  .site-footer{
    margin-left:-12px;
    margin-right:-12px;
    padding-left:12px;
    padding-right:12px;
  }
}

@media (prefers-reduced-motion:reduce){
  .side-rail,
  .mobile-nav-backdrop,
  .mobile-menu-toggle span{
    transition:none !important;
  }
}
