/* Responsive adjustments shared by the public site and admin pages. */
*,*::before,*::after{box-sizing:border-box}
img,video,canvas,iframe{max-width:100%}
.wrap,.wrap-md,.wrap-sm,.card,.modal,.adm-main,.adm-content{min-width:0;max-width:100%}
.tbl-scroll,.table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
pre{max-width:100%;overflow-x:auto}

@media(max-width:991px){
  .g2,.g3,.g4,.g5{min-width:0}
  .g2>*,.g3>*,.g4>*,.g5>*{min-width:0}
}

@media(max-width:768px){
  .svc-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
  .svc-card,.svc-tools>*{min-width:0}
  .svc-name,.wl-card h2,.tx-sh h3{overflow-wrap:anywhere}
  .mnav{
    grid-template-columns:repeat(5,minmax(0,1fr));
    grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);
    min-height:64px;align-items:stretch;
  }
  .mnav>a,.mnav>button{min-width:0;min-height:50px;line-height:1.25;text-align:center}
  .mnav>a .mi,.mnav>button .mi{display:block;line-height:1.1}
  .msheet{max-height:min(80vh,calc(100dvh - 16px));overscroll-behavior:contain}
  .nav .nav-in{min-width:0}
  .nav .logo{min-width:0}
  .nav .uh-right{min-width:0;flex-shrink:1}
  .hero{padding:2.4rem 1rem 2rem !important}
  .hero h1{font-size:clamp(1.5rem,6.5vw,2rem) !important;line-height:1.35}
  .hero p{max-width:34rem;margin-bottom:1.5rem}
  .hero-tag{max-width:100%;justify-content:center;text-align:center;line-height:1.6}
  .hero-cta{gap:.6rem;margin-bottom:1.8rem}
  .hero-cta .btn{min-width:0;flex:1 1 130px}
  .hero-cta .btn-ghost{flex-basis:100%}
  .hero-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem !important}
  .hero-stats .hstat{min-width:0}
  .hero-stats .hstat .v{font-size:clamp(1.1rem,5.4vw,2rem);overflow-wrap:anywhere}
  .hero-stats .hstat .l{font-size:clamp(.66rem,2.9vw,.8rem)}
  input,select,textarea{max-width:100%}
  .modal,.modal-bg>*,.modal-overlay>*{max-width:calc(100vw - 24px) !important;max-height:calc(100dvh - 24px)}
  .card,.wrap,.wrap-md,.wrap-sm{min-width:0}
  .tbl,.card>table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tbl-scroll>.tbl,.table-responsive>.tbl{display:table;overflow:visible}
}

@media(max-width:380px){
  .svc-tools{grid-template-columns:minmax(0,1fr)}
  .svc-search{grid-column:auto}
  .nav .nav-in{padding-inline:.5rem !important;gap:.3rem !important}
  .nav .logo{font-size:.9rem !important;gap:.3rem !important}
  .nav .logo-box{width:30px !important;height:30px !important;flex:none}
  .nav .uh-right{gap:3px}
  .nav .uh-right .btn{padding:6px 7px !important;font-size:.7rem !important}
  .hero-cta .btn{flex-basis:100%}
  .mgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-height:420px) and (max-width:900px){
  .msheet{max-height:calc(100dvh - 12px)}
  #site-assistant .sa-panel{height:calc(100dvh - 145px)}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto !important;animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}
}
