/* Paint the Telegram control area as one surface with the sticky header.
   Keep the existing safe top offset: native Close/Menu controls stay unobstructed. */
html.cv-mobile-editorial.cv-catalog-refined:not(.cv-desktop-mode) body.cv-telegram-expanded.cv-all-models-open:not(.cv-max-webapp):not(.welcome-open):not(.cv-language-chat-open) #cvAllModelsHub::before {
  clip-path: inset(calc(0px - var(--cv-nav-safe-top, 104px)) -100vmax 0) !important;
}

/* A 48px touch row with smaller surrounding padding. On home-indicator phones,
   reclaim only 8px of the lower inset; keep the remainder clear for gestures. */
html.cv-mobile-editorial:not(.cv-desktop-mode) body:not(.welcome-open) {
  --cv-bottom-nav-height: 58px !important;
  --cv-bottom-nav-item: 48px !important;
  --cv-bottom-nav-pad: 5px !important;
  --cv-bottom-nav-inset: max(0px, calc(env(safe-area-inset-bottom, 0px) - 8px));
  --cv-bottom-nav-clearance: calc(var(--cv-bottom-nav-height) + var(--cv-bottom-nav-inset) + 1px + var(--cv-bottom-nav-extra) + 16px) !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) body:not(.welcome-open) > .bottom-nav-wrap {
  padding-bottom: var(--cv-bottom-nav-inset) !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) body:not(.welcome-open) #cvBottomNavWrap .bottom-nav :is(#allModelsNav, #aiStudioNav, #balanceNav) {
  padding-block: 2px 4px !important;
  gap: 4px !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) body:not(.welcome-open) #cvBottomNavWrap .cv-first-topup-bonus {
  bottom: calc(var(--cv-bottom-nav-height) + var(--cv-bottom-nav-inset) + 9px) !important;
}

/* Landscape and short webviews keep a 44px target and an exact 50px surface. */
@media (max-height: 420px) {
  html.cv-mobile-editorial:not(.cv-desktop-mode) body:not(.welcome-open) {
    --cv-bottom-nav-height: 50px !important;
    --cv-bottom-nav-item: 44px !important;
    --cv-bottom-nav-pad: 3px !important;
  }
  html.cv-mobile-editorial:not(.cv-desktop-mode) body:not(.welcome-open) #cvBottomNavWrap .bottom-nav :is(#allModelsNav, #aiStudioNav, #balanceNav) {
    gap: 3px !important;
  }
}
