/* A single moving glass lens; the existing app still owns all navigation/permissions. */
.mobile-glass-lens { display: none; pointer-events: none; }
@media (max-width: 899px) {
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] {
    border: 1.5px solid rgba(255, 255, 255, .88) !important;
    border-radius: 999px !important;
    background: rgba(252, 251, 245, .94) !important;
    box-shadow: 0 10px 30px rgba(29, 39, 48, .15), 0 1px 4px rgba(34, 43, 51, .08), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(255, 255, 255, .5) !important;
    isolation: isolate;
    overflow: visible !important;
  }

  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > button[data-mobile-nav-group] {
    position: relative !important;
    z-index: 1;
    border-radius: 999px !important;
    background: transparent !important;
    color: #435968 !important;
    -webkit-tap-highlight-color: transparent;
    transition: color 160ms ease;
  }
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > button[data-mobile-nav-group] > span {
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    transition: transform 260ms cubic-bezier(.2,.8,.2,1);
    transform-origin: center;
  }
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > button[data-glass-selected="true"] {
    color: #123856 !important;
  }
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > button[data-glass-selected="true"] > span {
    transform: translateY(-1px) scale(1.06);
  }
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > button:active > span {
    transform: scale(.94);
  }
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > button:focus-visible {
    outline: 2px solid #966720 !important;
    outline-offset: -3px;
  }
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > .mobile-glass-lens {
    position: absolute;
    display: block;
    left: 0;
    top: 0;
    z-index: 0;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255,255,255,.74), rgba(209,216,209,.56) 46%, rgba(222,229,228,.65));
    box-shadow: inset 1px 1.5px 1px rgba(255,255,255,.96), inset -1px -1px 2px rgba(106,126,130,.16), 0 2px 5px rgba(42,62,70,.07);
    transform-origin: 0 0;
    will-change: transform;
    pointer-events: none;
  }
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > .mobile-glass-lens[hidden] { display: none; }
  .mobile-glass-lens::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 15% 6%, rgba(255,255,255,.95), transparent 45%), linear-gradient(120deg, transparent 38%, rgba(255,255,255,.48) 48%, transparent 61%);
    opacity: .45;
    transition: opacity 180ms ease;
    pointer-events: none;
  }
  [data-glass-moving="true"] > .mobile-glass-lens::after { opacity: .9; }

  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] {
      background: linear-gradient(120deg, rgba(255,255,253,.72), rgba(252,251,241,.57), rgba(255,255,255,.66)) !important;
      -webkit-backdrop-filter: blur(18px) saturate(165%);
      backdrop-filter: blur(18px) saturate(165%);
    }
    body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > .mobile-glass-lens {
      -webkit-backdrop-filter: blur(3px) saturate(165%);
      backdrop-filter: blur(3px) saturate(165%);
    }
  }
}
@media (max-width: 359px) {
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] > button[data-mobile-nav-group] {
    /* Keep four-character labels whole without shrinking the text or tap targets. */
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-mobile-glass-nav] > button, [data-mobile-glass-nav] > button > span, .mobile-glass-lens::after { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav] {
    background: #fafaf6 !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}


/* Keep the whole bar intact; only its composited scale changes on scroll. */
@media(max-width:899px){
 body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav]{
  box-sizing:border-box!important;
  transform-origin:center center;
  transform:translate3d(0,0,0) scale(1)!important;
  transition:transform 260ms cubic-bezier(.2,.7,.25,1)!important;
  will-change:transform;
  background:linear-gradient(120deg,#fafaf7,#efefe8,#fafafa)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 }
 body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]{transform:translate3d(0,0,0) scale(.92)!important;}
 body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav]>.mobile-glass-lens{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
 body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav]>button[data-mobile-nav-group]{touch-action:manipulation;transition:color 140ms ease!important;}
}
@media(prefers-reduced-motion:reduce){body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav]{transition:none!important;}}

/* Labels remain visible; scrolling scales the intact bar without rearranging icons. */
/* Android LINE resizes its WebView when browser controls fold away. Keep
   the visual anchor at the safe expanded height while scaling independently. */
@media(max-width:899px){
 body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-viewport-anchor="true"]{
  top:calc(var(--nav-stable-height) - 77px - env(safe-area-inset-bottom))!important;
  bottom:auto!important;
 }
}

/* Vehicle lists scroll on the document. Avoid nested scroll/clip surfaces when
   the Android LINE viewport changes as browser controls fold away. */
@media(max-width:899px){
 body:not(.desktop-page):is([data-mobile-page="inventory"],[data-mobile-page="sold"]):not(:has(.page.active:is(.management-detail-open,.sold-management-detail-open))){
  overflow-x:clip!important;overflow-y:visible!important;
 }
 body:not(.desktop-page):is([data-mobile-page="inventory"],[data-mobile-page="sold"]):not(:has(.page.active:is(.management-detail-open,.sold-management-detail-open))) #hongyi-mobile-shell,
 body:not(.desktop-page):is([data-mobile-page="inventory"],[data-mobile-page="sold"]):not(:has(.page.active:is(.management-detail-open,.sold-management-detail-open))) #hongyi-mobile-shell>.page-stack{
  overflow:visible!important;height:auto!important;max-height:none!important;
 }
}

/* Anchor to the current viewport bottom; scrolling never moves or scales the bar. */
@media(max-width:899px){html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]{position:fixed!important;top:auto!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;transform:none!important;transition:none!important;will-change:auto;}}

/* LINE already reserves its native bottom inset; avoid adding that space twice. */
@media(max-width:899px){html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact][data-nav-line-browser="true"]{bottom:6px!important;}}

/* Shrink on scroll while keeping the lower edge fixed. */
@media(max-width:899px){html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]{transform-origin:center bottom!important;transform:scale(1)!important;transition:transform 260ms cubic-bezier(.2,.7,.25,1)!important;will-change:transform;}html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]{transform:scale(.92)!important;}}
@media(prefers-reduced-motion:reduce){html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]{transition:none!important;}}

/* Compact navigation keeps icons and unread badges, fading only labels. */
@media(max-width:899px){
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]{transform:scale(.86)!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav]>button[data-mobile-nav-group]>strong{opacity:1;transition:opacity 160ms ease!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]>button[data-mobile-nav-group]>strong{opacity:0!important;}
}
@media(prefers-reduced-motion:reduce){html body .mobile-bottom-nav[data-mobile-glass-nav]>button[data-mobile-nav-group]>strong{transition:none!important;}}

/* Collapse the label space as well as the bar and selected lens height. */
@media(max-width:899px){
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]{transition:transform 260ms cubic-bezier(.2,.7,.25,1),height 260ms cubic-bezier(.2,.7,.25,1),padding 260ms cubic-bezier(.2,.7,.25,1)!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]{height:52px!important;min-height:0!important;padding:4px 5px!important;align-items:center!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]>button[data-mobile-nav-group]{height:40px!important;min-height:0!important;padding:0 2px!important;gap:0!important;align-content:center!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]>button[data-mobile-nav-group]>strong{position:absolute!important;pointer-events:none;}
}
@media(prefers-reduced-motion:reduce){html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-glass-nav][data-nav-compact]{transition:none!important;}}

/* Hide labels before removing their layout space; reveal after expansion. */
@media(max-width:899px){
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group]{transition:height 260ms cubic-bezier(.2,.7,.25,1),padding 260ms cubic-bezier(.2,.7,.25,1),gap 260ms cubic-bezier(.2,.7,.25,1),color 140ms ease!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group]>strong{visibility:visible;transition:opacity 100ms ease 260ms,visibility 0s linear 260ms!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]>button[data-mobile-nav-group]>strong{visibility:hidden!important;opacity:0!important;transition:none!important;}
}
@media(prefers-reduced-motion:reduce){html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group],html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group]>strong{transition:none!important;}}

/* Keep layout stable during scrolling: composite the bar, counter-scale icons. */
@media(max-width:899px){
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]{height:70px!important;min-height:70px!important;padding:5px!important;align-items:start!important;transition:transform 260ms cubic-bezier(.2,.7,.25,1)!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]{transform:scale(.64)!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group]{height:58px!important;min-height:0!important;padding:5px 2px!important;gap:4px!important;align-content:center!important;transition:color 140ms ease!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group]>strong{position:static!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group]>span:not([data-workspace-unread-group]):not([data-announcement-unread-badge]){transition:transform 260ms cubic-bezier(.2,.7,.25,1)!important;}
 html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-bottom-nav][data-mobile-glass-nav][data-nav-compact="true"]>button[data-mobile-nav-group]>span:not([data-workspace-unread-group]):not([data-announcement-unread-badge]){transform:translateY(8px) scale(1.34375)!important;}
}
@media(prefers-reduced-motion:reduce){html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-glass-nav][data-nav-compact],html body:not(.desktop-page) .mobile-bottom-nav[data-mobile-glass-nav][data-nav-compact]>button[data-mobile-nav-group]>span{transition:none!important;}}
