
/* V9 Sovereign Absolute overlay: does not replace V8 */
:root{--v9-safe-bottom:env(safe-area-inset-bottom,0px)}
html{scroll-behavior:smooth}
body{overscroll-behavior-y:none}
[data-v9-quality="stale"]{opacity:.72}
[data-v9-quality="error"]{outline:1px solid #ff6b88}
.v9-source-badge{font-size:10px;opacity:.78;border:1px solid rgba(150,110,230,.3);border-radius:999px;padding:3px 7px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* =========================================================
   V9.1 MOBILE FIX — REMOVE EMPTY BLACK BAND + REPOSITION JF
   ========================================================= */
:root{
  --v91-nav-height: 104px;
  --v91-safe-bottom: env(safe-area-inset-bottom, 0px);
  --v91-fab-size: 74px;
  --v91-fab-gap: 12px;
}

/* Remove oversized empty regions accidentally created above bottom navigation */
html, body{
  min-height:100%;
  background:#08060d;
}

body{
  padding-bottom:calc(var(--v91-nav-height) + var(--v91-safe-bottom) + 12px)!important;
}

/* Main app content must finish naturally above the bottom navigation */
main,
#app,
#root,
#workspace,
.workspace,
.content,
.app-content,
.page,
.screen,
.view,
.tab-content,
[data-screen],
[data-view]{
  min-height:auto!important;
  padding-bottom:calc(var(--v91-nav-height) + var(--v91-safe-bottom) + 18px)!important;
  margin-bottom:0!important;
}

/* Kill generic spacer / footer blocks that create the large black band */
.bottom-spacer,
.nav-spacer,
.footer-spacer,
.safe-spacer,
.mobile-bottom-spacer,
[data-bottom-spacer],
[aria-hidden="true"].spacer{
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
}

/* Bottom navigation is the only fixed lower layer */
#tabs,
.tabs,
.bottom-nav,
.bottom-tabs,
nav[aria-label*="avigation"]{
  position:fixed!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  min-height:var(--v91-nav-height)!important;
  height:auto!important;
  padding:10px 8px calc(10px + var(--v91-safe-bottom))!important;
  margin:0!important;
  z-index:9998!important;
  background:rgba(8,6,13,.98)!important;
  border-top:1px solid rgba(139,93,255,.20)!important;
  box-sizing:border-box!important;
}

/* JF button: fully visible and floating above navigation */
.jf-floating,
.floating-jf,
.assistant-fab,
.fab,
#jf-button,
#jfButton,
button[aria-label="JF"],
button[aria-label*="JF"],
button[title="JF"],
button[title*="JF"],
[data-jf-button]{
  position:fixed!important;
  width:var(--v91-fab-size)!important;
  height:var(--v91-fab-size)!important;
  min-width:var(--v91-fab-size)!important;
  min-height:var(--v91-fab-size)!important;
  max-width:var(--v91-fab-size)!important;
  max-height:var(--v91-fab-size)!important;
  right:16px!important;
  left:auto!important;
  bottom:calc(var(--v91-nav-height) + var(--v91-safe-bottom) + var(--v91-fab-gap))!important;
  margin:0!important;
  padding:0!important;
  border-radius:24px!important;
  z-index:10010!important;
  overflow:visible!important;
  transform:none!important;
  clip-path:none!important;
  box-sizing:border-box!important;
}

/* Prevent parent containers from clipping the floating button */
body,
#app,
#root,
#workspace,
.workspace,
.content,
.app-content,
.page,
.screen,
.view{
  overflow-x:hidden!important;
  overflow-y:visible;
}

/* Build label should not create a second lower black section */
.build-version,
.build-label,
[data-build],
.version-badge{
  position:relative!important;
  display:block!important;
  margin:10px 16px 8px!important;
  padding:0!important;
  min-height:0!important;
  background:transparent!important;
}

/* iPhone compact widths */
@media(max-width:430px){
  :root{
    --v91-nav-height: 96px;
    --v91-fab-size: 70px;
    --v91-fab-gap: 10px;
  }

  .jf-floating,
  .floating-jf,
  .assistant-fab,
  .fab,
  #jf-button,
  #jfButton,
  button[aria-label="JF"],
  button[aria-label*="JF"],
  button[title="JF"],
  button[title*="JF"],
  [data-jf-button]{
    right:14px!important;
    border-radius:22px!important;
  }
}

@media(max-width:390px){
  :root{
    --v91-nav-height: 92px;
    --v91-fab-size: 66px;
  }
}
