/* DIS–MIS–MAL: approved mobile editorial ergonomics, 2026-11-17.
 * Applied after page-specific styles. Desktop composition is unchanged. */
@media screen and (max-width:950px) and (hover:none), screen and (max-width:950px) and (pointer:coarse){
  /* Compact but readable masthead: brand title stays on one line. */
  html body .header .header-inner{
    gap:8px!important;
  }
  html body .header .brand{
    min-width:0!important;
    flex:1 1 auto!important;
    gap:7px!important;
  }
  html body .header .brand > div{
    flex:1 1 auto!important;
    min-width:0!important;
  }
  html body .header .brand-name{
    white-space:nowrap!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    font-size:12px!important;
    letter-spacing:.02em!important;
  }
  html body .header .brand img{
    flex:0 0 42px!important;
    width:42px!important;
    height:42px!important;
  }
  html body .header .menu-toggle{
    flex:0 0 auto!important;
    padding:7px 4px!important;
  }
  /* On short landscape screens, cap the floating sheet to the viewport.
     Without this, its legacy minimum height can put Close offscreen. */
  html body .menu-overlay{
    min-height:0!important;
    max-height:calc(100dvh - 18px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
  }
  /* Floating menu: place Close at the visible lower-right corner.
     JS updates this position if the floating menu itself scrolls. */
  html body .menu-overlay .menu-overlay-inner{
    position:relative!important;
    padding-bottom:72px!important;
  }
  html body .menu-overlay .menu-close{
    position:absolute!important;
    top:var(--mobile-menu-close-top,auto)!important;
    bottom:auto!important;
    left:auto!important;
    right:14px!important;
    z-index:10!important;
    min-width:106px!important;
    min-height:46px!important;
    justify-content:center!important;
  }
  /* Direction is derived from actual tab/guide geometry, not UA detection. */
  html body .article-cer .article-cer-hint-symbol[data-cer-arrow="up"]{
    transform:rotate(90deg)!important;
    transform-origin:center!important;
  }
  html body .article-cer .article-cer-hint-symbol[data-cer-arrow="left"]{
    transform:none!important;
  }
}
@media screen and (max-width:950px) and (orientation:landscape){
  html body .menu-overlay .menu-overlay-inner{
    padding-bottom:70px!important;
  }
}
@media screen and (max-width:400px) and (hover:none), screen and (max-width:400px) and (pointer:coarse){
  html body .header .header-inner{gap:5px!important}
  html body .header .brand{gap:5px!important}
  html body .header .brand-name{letter-spacing:0!important}
  html body .header .menu-toggle{padding:6px 1px!important}
}
