/* Wallnuvia Phase 8.5.3d — fixed viewport-safe floating glass navigation */
.mobileFloatNav{display:none}.mobileSearchPanel[hidden]{display:none!important}
@media(max-width:700px){
  body:not(.mobilePanelVisible) {padding-bottom:calc(86px + env(safe-area-inset-bottom,0px))}
  /* Override global `nav { gap:26px }` which made the fifth button overflow. */
  html body > nav#mobileFloatNav.mobileFloatNav {
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:0 !important;
    align-items:center;
    position:fixed !important;
    z-index:900;
    left:0px !important;
    right:0px !important;
    width:100% !important;
    max-width:100vw !important;
    margin:0 !important;
    bottom:var(--wallnuvia-visible-bottom, 0px) !important;
    height:65px;
    padding:3px 5px;
    box-sizing:border-box;
    border:0;
    border-top:1px solid #96969633;
    border-radius:0px;
    background:rgb(60 60 60 / 36%);
    -webkit-backdrop-filter:blur(10px) saturate(140%);
    backdrop-filter:blur(10px) saturate(140%);
    transform:none !important;
  }
  .mobileFloatNav a,.mobileFloatNav button{
    appearance:none;-webkit-appearance:none;display:flex;flex-direction:column;
    justify-content:center;align-items:center;gap:3px;min-width:0;height:46px;
    padding:2px 0;border:0;background:transparent;color:#ffffff;
    text-decoration:none;font:inherit;font-size:7px;font-weight:500;
    cursor:pointer;touch-action:manipulation;
  }
  .mobileFloatNav i{font-size:13px;line-height:1.1}
  .mobileFloatNav .active{color:#ffffff}
  .mobileFloatNav .mobileMoreIcon{display:block;width:15px;height:15px;flex:none}
  body.mobilePanelVisible > nav#mobileFloatNav,body.mobileSearchOpen > nav#mobileFloatNav,body:has(#modal.open) > nav#mobileFloatNav{display:none!important}
  .mobileSearchPanel{position:fixed;inset:0;z-index:1100;overflow-y:auto;box-sizing:border-box;padding:calc(20px + env(safe-area-inset-top,0px)) 16px 30px;background:linear-gradient(140deg,#121017,#070c11 70%);color:#fff}
  .mobileSearchHead{display:flex;align-items:center;justify-content:center;position:relative;min-height:46px;border-bottom:1px solid rgba(255,255,255,.09);margin-bottom:34px}.mobileSearchHead strong{font-size:17px}.mobileSearchHead button{position:absolute;left:0;border:0;background:none;color:#fff;font:inherit;font-size:13px;padding:12px 0;cursor:pointer}
  #mobileSearchForm label{display:block;color:#a4aab1;font-size:12px;margin-bottom:12px}.mobileSearchField{display:flex;align-items:center;gap:10px;border:1px solid rgba(255,255,255,.15);border-radius:14px;background:#10141b;padding:7px 8px 7px 13px}.mobileSearchField>i{color:#a6a6af}.mobileSearchField input{min-width:0;flex:1;background:none;border:0;outline:0;color:#fff;font:inherit;font-size:13px}.mobileSearchField input::placeholder{color:#8e919b}.mobileSearchField button{background:linear-gradient(110deg,#ff9b70,#f45b91);border:0;border-radius:10px;color:#111;font-weight:700;font-size:12px;padding:12px;cursor:pointer}
  html{scroll-padding-top:68px}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.mobileFloatNav{background:rgba(12,14,19,.94)!important}}
@media(prefers-reduced-transparency:reduce){.mobileFloatNav{background:#111219;-webkit-backdrop-filter:none;backdrop-filter:none}}

/* 8.5.3h — thumb-friendly search sheet above fixed navigation */
@media(max-width:700px){
 body.mobileSearchOpen > nav#mobileFloatNav.mobileFloatNav{display:grid!important}
 body.mobileSearchOpen{overflow:auto!important}
 .mobileSearchPanel[hidden]{display:none!important}
 .mobileSearchPanel:not([hidden]){
   position:fixed!important;inset:auto 0 auto 0!important;top:auto!important;
   bottom:calc(65px + var(--wallnuvia-visible-bottom,0px))!important;
   width:100%!important;max-width:100vw!important;height:auto!important;max-height:min(55dvh,340px)!important;
   overflow:auto!important;padding:18px 16px 22px!important;box-sizing:border-box!important;
   border-radius:20px 20px 0 0!important;border:1px solid rgba(255,255,255,.12)!important;
   background:rgba(18,19,25,.94)!important;
   -webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);
   box-shadow:0 -14px 45px rgba(0,0,0,.36);z-index:899!important;
 }
 .mobileSearchHead{min-height:32px!important;margin-bottom:14px!important;padding-bottom:8px!important}
 .mobileSearchField{max-width:100%;box-sizing:border-box}
 .mobileSearchField button{flex-shrink:0;padding:11px 12px!important}
 .mobileSearchField input{width:100%;font-size:13px!important}
}

/* Phase 8.5.3i: approved compact mobile search field */
@media (max-width:700px) {
  .mobileSearchField {display:flex;align-items:center;gap:10px;border:1px solid rgba(255,255,255,.15);border-radius:50px;background:#10141b;padding:7px 8px 7px 13px;}
  .mobileSearchField input {width:100%;font-size:10px!important;}
  .mobileSearchField button {background:linear-gradient(110deg,#ff9b70,#f45b91);border:0;border-radius:50px;color:#ffffff!important;font-weight:500;font-size:10px;padding:12px;cursor:pointer;}
}

/* Phase 8.5.3j: both bottom sheets live above, never behind, the fixed nav. */
.mobileMorePanel[hidden]{display:none!important}
@media(max-width:700px){
  body.mobileMoreOpen > nav#mobileFloatNav.mobileFloatNav{display:grid!important}
  body.mobileSearchOpen > nav#mobileFloatNav.mobileFloatNav{display:grid!important}
  html body > #mobileSearchPanel.mobileSearchPanel:not([hidden]),
  html body > #mobileMorePanel.mobileMorePanel:not([hidden]){
    position:fixed!important;inset:auto 0 auto 0!important;top:auto!important;
    bottom:calc(65px + var(--wallnuvia-visible-bottom,0px))!important;
    z-index:1001!important;width:100%!important;max-width:100vw!important;
    height:auto!important;max-height:min(60dvh,420px)!important;
    overflow-y:auto!important;box-sizing:border-box!important;
    padding:18px 16px 22px!important;border-radius:20px 20px 0 0!important;
    border:1px solid rgba(255,255,255,.12)!important;
    background:rgba(18,19,25,.96)!important;
    -webkit-backdrop-filter:blur(18px) saturate(140%);
    backdrop-filter:blur(18px) saturate(140%);
    box-shadow:0 -14px 45px rgba(0,0,0,.36);
    transform:none!important;
  }
  .mobileMoreHead{display:flex;justify-content:center;align-items:center;position:relative;min-height:34px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.09);color:#fff;font-size:17px}
  .mobileMoreHead button{position:absolute;right:0;top:0;background:none;border:0;color:#fff;font-size:23px;cursor:pointer;padding:0 4px}
  .mobileMoreLinks{display:grid;gap:3px;margin-top:10px}
  .mobileMoreLinks a,.mobileMoreLinks button{display:flex;align-items:center;gap:13px;min-height:44px;padding:9px 8px;background:transparent;border:0;border-bottom:1px solid rgba(255,255,255,.055);color:#e4e4e7;text-align:left;text-decoration:none;font:inherit;font-size:12px;font-weight:500;cursor:pointer}
  .mobileMoreLinks i{width:19px;color:#ff967d;font-size:15px}
}

/* 8.5.3k: one shared viewport anchor for nav and both bottom sheets. */
@media(max-width:700px){
 html body > nav#mobileFloatNav.mobileFloatNav {
   top:var(--wallnuvia-nav-top,calc(100dvh - 65px))!important;
   bottom:auto!important;
   height:65px!important;
 }
 html body > #mobileSearchPanel.mobileSearchPanel:not([hidden]),
 html body > #mobileMorePanel.mobileMorePanel:not([hidden]) {
   top:auto!important;bottom:auto!important;
   /* The panel's lower edge is always exactly at the nav's upper edge. */
   transform:translateY(-100%)!important;
   margin-top:0!important;
   top:var(--wallnuvia-nav-top,calc(100dvh - 65px))!important;
 }
}
