/* LUXIS V43 — issues verified by live Chromium 1440/834/390/320.
 * Mobile root/lab top navigation compression and SVG clipping, without hiding page content.
 * Keep internal scroll for long tables; only prevent external overflow from SVG art.
 */
@media(max-width:680px){
  html,body{max-width:100%!important;overflow-x:clip!important}
  main svg,#optical-lab svg{max-width:100%;overflow:hidden!important}
  main :is(.osl-preview,.osl-stage,.lab-stage,.hero-art){min-width:0;max-width:100%}
  /* The logo already returns to '/', so the duplicate "Full website" item is unnecessary. */
  header nav #lxv23-home{display:none!important}
  /* A single horizontally scrollable language row replaces two or three rows of large buttons. */
  body header nav .site-language{min-width:0!important;max-width:100%!important;overflow:hidden!important}
  body header nav .site-language.is-ready .site-language-buttons{
    display:flex!important;grid-template-columns:none!important;
    flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
    gap:5px!important;max-width:100%!important;width:100%!important;
    padding:3px!important;scrollbar-width:thin;
  }
  body header nav .site-language-buttons >:is(button,a){
    flex:0 0 auto!important;white-space:nowrap!important;
    min-height:38px!important;padding:6px 9px!important;
    line-height:1.25!important;font-size:12px!important;
    max-width:none!important;
  }
  /* Optical-lab standalone header has no hamburger: use one swipeable shortcut row. */
  body header:not(.lxv5-ready) #lxv33-optical-menu{
    display:flex!important;flex:1 1 100%!important;
    flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
    max-width:100%!important;min-height:0!important;max-height:57px!important;
    gap:5px!important;padding:4px 6px!important;margin:3px 0!important;
    -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
  }
  body header:not(.lxv5-ready) #lxv33-optical-label{display:none!important}
  body header:not(.lxv5-ready) #lxv33-optical-menu > a{
    flex:0 0 auto!important;min-height:38px!important;
    padding:6px 9px!important;white-space:nowrap!important;
    max-width:none!important;line-height:1.25!important;
  }
  /* Optical lab's seven-language body chooser: one scroll row, not 3 rows. */
  #optical-lab #lxv233-languages{
    display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;
    overflow-y:hidden!important;max-width:100%!important;min-width:0!important;
    gap:5px!important;margin:7px 0 12px!important;
    padding:4px 0!important;scrollbar-width:thin;
  }
  #optical-lab #lxv233-languages > a{
    flex:0 0 auto!important;max-width:none!important;
    white-space:nowrap!important;min-height:40px!important;
    padding:7px 11px!important;line-height:1.25!important;
  }
}
@media(max-width:360px){
  main svg,#optical-lab svg{overflow:clip!important}
  header nav{column-gap:7px!important;row-gap:6px!important}
  header nav .corporate-nav-logo{flex:0 1 auto!important;min-width:0!important}
  header nav .corporate-nav-logo img{width:32px!important;height:32px!important}
  header nav #lxv5-menu{min-height:40px!important;padding:6px 10px!important}
}
@media(forced-colors:active){
  header nav .site-language-buttons >:is(button,a){border:1px solid ButtonText!important}
}
@media(prefers-reduced-motion:reduce){
  header nav .site-language-buttons >:is(button,a){transition:none!important;transform:none!important}
}

/* V44 compact independent optical lab header: verified tall at 320px in Chromium */
@media(max-width:680px){
  body header nav > a#lxv23-home{display:none!important}
  body:has(main#lx244-main > section#optical-lab) header nav{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-auto-rows:auto;align-items:center!important;gap:5px 7px!important;
    padding:7px 10px!important;max-width:100%!important
  }
  body:has(main#lx244-main > section#optical-lab) header nav > .corporate-nav-logo{
    grid-column:1;grid-row:1;margin:0!important;min-width:0!important;max-width:100%!important
  }
  body:has(main#lx244-main > section#optical-lab) header nav > label[for="lang"]{display:none!important}
  body:has(main#lx244-main > section#optical-lab) header nav > select#lang{
    grid-column:2;grid-row:1;justify-self:end;max-width:130px!important;
    min-width:0!important;width:100%;min-height:38px!important;padding:6px!important;margin:0!important
  }
  body:has(main#lx244-main > section#optical-lab) header nav > a#osl-real-video-lab{
    grid-column:1;grid-row:2;min-width:0!important;max-width:100%!important;
    width:100%;min-height:42px!important;padding:6px 8px!important;
    margin:0!important;font-size:11px!important;text-align:center;justify-content:center
  }
  body:has(main#lx244-main > section#optical-lab) header nav > a#lxv32-workbench-quick{
    grid-column:2;grid-row:2;min-width:0!important;max-width:100%!important;
    width:100%;min-height:42px!important;padding:6px 8px!important;
    margin:0!important;font-size:11px!important;text-align:center;justify-content:center
  }
  body:has(main#lx244-main > section#optical-lab) header nav > div#lxv33-optical-menu{
    grid-column:1/-1;grid-row:3;width:100%!important;min-width:0!important;
    padding:4px!important;margin:1px 0!important;min-height:0!important;max-height:54px!important
  }
}

/* V45 optical stage proportional height — avoid excessive black top/bottom bars on narrow screens */
@media(max-width:600px){
  #osl-effect-explorer #osl-effect-3d{
    height:clamp(180px,54vw,215px)!important;
    min-height:180px!important;max-height:215px!important;
    width:100%!important;max-width:100%!important;
  }
  #osl-effect-explorer .fx-render-stage{
    max-width:100%!important;overflow:hidden!important;
    background:linear-gradient(145deg,#102c42,#091e30)!important;
  }
}
