/**
 * Elysian Mobile View Lock — v5.73.0 recertification
 *
 * Authoritative mobile geometry guardrail for <=760px, recertified for the
 * compact Level 55 header/search shell. Commerce interactions remain unchanged.
 * Presentation only.
 */

@media (max-width:760px){
  :root{
    --ely-mobile-lock-header-h:60px;
    --ely-mobile-lock-gutter:15px;
    --ely-mobile-lock-control:44px;
    --ely-mobile-lock-safe-bottom:env(safe-area-inset-bottom,0px);
  }

  html,
  body.elysian-mobile-view-lock-v56827{
    width:100%!important;
    max-width:100%!important;
    overflow-x:clip!important;
  }
  body.elysian-mobile-view-lock-v56827,
  body.elysian-mobile-view-lock-v56827 *{
    box-sizing:border-box;
  }
  body.elysian-mobile-view-lock-v56827 :where(img,video,canvas,svg){
    max-width:100%;
  }
  body.elysian-mobile-view-lock-v56827 :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
    max-width:100%!important;
    font-size:max(16px,1em)!important;
  }

  /* Header geometry is frozen to the current certified three-cell mobile shell. */
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-site-header{
    position:sticky!important;
    top:var(--elysian-sticky-top,0px)!important;
    z-index:1000!important;
    width:100%!important;
    max-width:100%!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-header-inner{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 44px!important;
    grid-template-rows:var(--ely-mobile-lock-header-h)!important;
    align-items:center!important;
    width:calc(100% - 30px)!important;
    height:var(--ely-mobile-lock-header-h)!important;
    min-height:var(--ely-mobile-lock-header-h)!important;
    margin-inline:auto!important;
    padding:0!important;
    gap:0!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-menu-toggle,
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-header-actions{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-site-header .text-wordmark{
    left:50%!important;
    top:50%!important;
    width:auto!important;
    max-width:150px!important;
    margin:0!important;
    transform:translate(-50%,-50%)!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-site-header .text-wordmark strong{
    font-size:29px!important;
    line-height:1!important;
  }

  /* Search stays near-edge-to-edge without creating horizontal overflow. */
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-search-shell{
    width:calc(100% - 24px)!important;
    max-width:none!important;
    margin-inline:12px!important;
    padding-inline:0!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search :where(.elysian-l22-search-experience,.elysian-l22-search-form){
    width:100%!important;
    max-width:none!important;
  }

  /* Fixed mobile navigation is frozen to four equal destinations and safe-area aware. */
  body.elysian-mobile-view-lock-v56827 .mobile-bottom-nav-refined{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100dvw!important;
    max-width:100dvw!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    z-index:950!important;
    padding-bottom:var(--ely-mobile-lock-safe-bottom)!important;
  }
  body.elysian-mobile-view-lock-v56827 .mobile-bottom-nav-refined>a{
    min-width:0!important;
  }

  /* Floating support remains compact and cannot drift into primary navigation. */
  body.elysian-mobile-view-lock-v56827.elysian-level15-mobile-support-nav .elysian-chat-hub{
    width:44px!important;
    height:44px!important;
    right:10px!important;
    bottom:calc(74px + var(--ely-mobile-lock-safe-bottom))!important;
    z-index:910!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level15-mobile-support-nav .elysian-chat-launcher{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level15-mobile-support-nav .elysian-chat-choice{
    right:0!important;
    bottom:54px!important;
    width:min(300px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
  }

  /* Route shells never exceed the mobile viewport; intentional horizontal rails remain scrollable. */
  body.elysian-mobile-view-lock-v56827 :where(
    .content-main,.shop-shell,.shop-content,.site-main,#primary,
    .elysian-l24-home,.elysian-l25-catalogue,.elysian-l27-checkout-shell,
    .elysian-tracking-page,.woocommerce,.woocommerce-page
  ){
    max-width:100%!important;
  }
  body.elysian-mobile-view-lock-v56827 :where(
    .elysian-l24-product-viewport,.elysian-l24-review-viewport,
    .elysian-l25-chip-rail,.elysian-l25-quick-refine,.elysian-l25-active-filters,
    .elysian-mobile-discovery-track,.quick-category-track
  ){
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
  }
  body.elysian-mobile-view-lock-v56827 :where(
    .elysian-l24-product-viewport,.elysian-l24-review-viewport,
    .elysian-l25-chip-rail,.elysian-l25-quick-refine,.elysian-l25-active-filters,
    .elysian-mobile-discovery-track,.quick-category-track
  )::-webkit-scrollbar{display:none;}

  /* Dialog/sheet geometry cannot exceed the visual viewport. */
  body.elysian-mobile-view-lock-v56827 :where(
    .ely-app-install-dialog,.elysian-l25-filter-panel,.v57-quick-add-drawer,
    .elysian-live-chat-panel,.elysian-l27-bag-drawer
  ){
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - 24px)!important;
  }

  /* Footer clears the fixed mobile nav exactly as in the locked baseline. */
  body.elysian-mobile-view-lock-v56827 .v589-footer{
    padding-bottom:calc(94px + var(--ely-mobile-lock-safe-bottom))!important;
  }
}

@media (max-width:360px){
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-site-header .text-wordmark{
    max-width:138px!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-site-header .text-wordmark strong{
    font-size:27px!important;
  }
  body.elysian-mobile-view-lock-v56827.elysian-level22-header-search .elysian-l22-search-shell{
    width:calc(100% - 20px)!important;
    margin-inline:10px!important;
  }
}
