/* Stage 41 — final mobile interaction and touch audit */
@media (max-width:920px), (hover:none) and (pointer:coarse){
  html{max-width:100%;overflow-x:clip!important;-webkit-text-size-adjust:100%;}
  body{max-width:100%;min-width:0;overflow-x:clip!important;}
  img,video,picture,svg{max-width:100%;}
  a,button,[role="button"],summary,input,select,textarea{touch-action:manipulation;}

  /* Custom pointers are desktop-only. Native touch feedback stays visible. */
  #fluo-cursor,.fluo-cursor,.custom-cursor,.project-cursor,.project-cursor-ring,
  .project-cursor-core,.cursor,.cursor-ring,.cursor-dot,.ic-fluo-cursor-final,
  .ic-cursor-ring,.ic-cursor-glow{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;}
  html,body,body *{cursor:auto!important;}

  /* Side panels: remove animated residual offsets and keep every line readable. */
  .history-panel{
    position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;
    width:100vw!important;max-width:100vw!important;height:100dvh!important;min-height:100dvh!important;
    margin:0!important;box-sizing:border-box!important;overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  }
  body:not(.history-open) .history-panel{transform:translate3d(100%,0,0)!important;visibility:hidden!important;pointer-events:none!important;}
  body.history-open .history-panel{transform:translate3d(0,0,0)!important;visibility:visible!important;pointer-events:auto!important;}
  .history-panel-header,.history-content,.history-body,.history-text,.service-detail-body,
  .service-detail-section,.service-detail-copy{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  .history-content{padding-left:20px!important;padding-right:20px!important;}
  .history-panel-header{padding-left:18px!important;padding-right:18px!important;}
  .history-close,[data-panel-close]{min-width:44px!important;min-height:44px!important;}
  .service-detail-copy p,.history-body p,.history-lead{overflow-wrap:anywhere;word-break:normal;}

  /* Menus and news panels remain scrollable inside small and landscape screens. */
  .section-menu,#section-menu,.news-tool-panel{
    max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 92px)!important;
    overflow:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  }
  [data-menu-toggle],[data-news-open],[data-news-close],.ic-lang-switcher button,.lang button{
    min-width:44px;min-height:44px;
  }
  .floating-talk{bottom:calc(14px + env(safe-area-inset-bottom))!important;max-width:calc(100vw - 28px)!important;}
}
@media (max-width:920px) and (orientation:landscape) and (max-height:520px){
  .history-content{padding-top:28px!important;padding-bottom:40px!important;}
  .history-panel-header{position:sticky!important;top:0!important;}
  .section-menu,#section-menu,.news-tool-panel{max-height:calc(100dvh - 20px)!important;}
}
