/* ===== v9: responsive shell — docked iOS tab bar, full-bleed to every edge, nothing hidden under bars ===== */
:root{
  --tabh:50px;                                   /* iOS tab bar height (49pt) */
  --tabbar:calc(var(--tabh) + var(--safe-b));    /* full tab bar incl. home-indicator area */
  --navh:var(--tabh);                            /* legacy var used by feed layout */
}
/* fill the whole phone, including the home-indicator strip (iOS standalone black-band fix) */
html,body{background:#07090D;height:100%;min-height:100vh;min-height:-webkit-fill-available}
html:has(.screen.light){background:#F4F5F8}
[data-theme=dark] html:has(.screen.light),html[data-theme=dark]:has(.screen.light){background:#07090D}
#app{position:fixed;inset:0;height:auto}  /* follows the VISIBLE area (never under Safari bars) */

/* ---- tab bar: floating glass pill, a little above the bottom edge ---- */
:root{--navgap:calc(var(--safe-b) * .5 + 8px)}   /* lift: home-indicator + small gap */
.nav,.nav.solid{position:absolute;left:12px!important;right:12px!important;bottom:var(--navgap)!important;top:auto;
  height:var(--tabh)!important;padding:0 4px!important;border-radius:25px!important;
  display:flex;align-items:center;justify-content:space-around;
  background:rgba(14,17,23,.82)!important;backdrop-filter:saturate(180%) blur(24px);-webkit-backdrop-filter:saturate(180%) blur(24px);
  border:.5px solid rgba(255,255,255,.12)!important;box-shadow:0 8px 28px rgba(0,0,0,.4)!important;z-index:40}
:root{--tabbar:calc(var(--tabh) + var(--navgap))}
.nav button{height:var(--tabh)!important;flex:1;min-width:0;gap:3px;color:rgba(255,255,255,.55)}
.nav button span{font:600 10px/1 var(--f)!important;letter-spacing:.01em}
.nav button .i,.nav button .ict{width:23px!important;height:23px!important}
.nav button.on{color:#fff}
.nav button.on:before{display:none}
.nav .shutter{flex:none;width:46px;height:34px;margin:0 4px;border-radius:17px}
.nav .shutter .i{width:21px!important;height:21px!important}
html:has(.screen.light) .nav{background:rgba(255,255,255,.88)!important;border-color:rgba(14,23,32,.08)!important;box-shadow:0 8px 28px rgba(14,23,32,.14)!important}
html:has(.screen.light) .nav button{color:#8A94A3}
html:has(.screen.light) .nav button.on{color:#0E1720}
html[data-theme=dark]:has(.screen.light) .nav{background:rgba(14,17,23,.82)!important;border-color:rgba(255,255,255,.12)!important;box-shadow:0 8px 28px rgba(0,0,0,.4)!important}
html[data-theme=dark]:has(.screen.light) .nav button{color:rgba(255,255,255,.55)}
html[data-theme=dark]:has(.screen.light) .nav button.on{color:#fff}

/* ---- content never hides under the tab bar ---- */
.screen{padding-bottom:calc(var(--tabbar) + 24px)!important;scroll-padding-bottom:calc(var(--tabbar) + 24px)}
.screen>*:last-child{margin-bottom:0}
/* feed overlays sit right above the tab bar */
.pinfo{bottom:calc(var(--tabbar) + 62px)!important}
.pbar{bottom:calc(var(--tabbar) + 10px)!important}
.progress{bottom:calc(var(--tabbar) + 2px)!important;left:20px!important;right:20px!important;border-radius:2px!important}
/* standalone plot view & capture have their own bottoms */
.sheet{padding-bottom:calc(var(--safe-b) + 14px)}

/* ---- top bars respect the notch / Dynamic Island on every phone ---- */
.topbar{padding-top:calc(var(--safe-t) + 4px)!important;min-height:calc(var(--safe-t) + 48px)!important}
/* profile: transparent header, avatar sits fully below it */
#prof>.topbar{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border:0!important;z-index:3}
.phead{padding-top:calc(var(--safe-t) + 56px)!important;position:relative;z-index:1}
.phead .avatar{margin-top:0}

/* ---- small phones (iPhone SE / mini / Android compact) ---- */
@media (max-width:375px){
  .nav button span{font-size:9.5px!important}
  .pacts a{padding:0 10px;font-size:13px}
  .pstats b{font-size:17px}.pstats span{font-size:11px}
  .sec{font-size:19px}
  .feat{width:150px!important;height:220px!important}
  .feat:first-child{width:180px!important}
}
@media (max-height:700px){ /* SE height */
  .pinfo{bottom:calc(var(--tabbar) + 56px)!important}
  .phead{padding-top:calc(var(--safe-t) + 50px)!important}
  .phead .avatar{width:64px!important;height:64px!important}
}
/* large phones / tablets: keep phone width, centered */

