/* Bottom bar for phones (2026-11-17): Chat · Today · Calendar · Calories in one tap. Navigation only: every tab presses the same button the side menu already has.
   Phones only (< 700 px); computers and tablets keep the layout they have. html.tb-on is set by tabbar.js while the bar is useful (signed in, keyboard down). */
#tabBar{ display:none; }
@media (max-width:699px){
  html.tb-on{ --tb-h:50px; --tb-pad:0px; }
  html.tb-on #app{ padding-bottom:var(--tb-h); }
  html.tb-on #tabBar{
    display:flex; position:absolute; left:0; right:0; bottom:0; height:var(--tb-h); z-index:15; box-sizing:border-box;
    background:color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
    border-top:1px solid var(--line);
  }
  /* the three screens that live on the bar stop above it; every other panel still covers the whole screen, bar included */
  html.tb-on #app > #hoyPanel, html.tb-on #app > #calendarPanel, html.tb-on #app > #caloriePanel{ bottom:var(--tb-h); }
  /* store app / home-screen app: #app stops above the home indicator (--sab), so the bar is fixed to the real bottom edge (no gap under it).
     Only a third of that strip is added to the bar: the buttons sit low, next to the indicator, and the bar stays slim. */
  html.store-app.tb-on, html.ios-pwa.tb-on{ --tb-pad:calc(var(--sab, env(safe-area-inset-bottom, 0px)) * .35); }
  html.store-app.tb-on #tabBar, html.ios-pwa.tb-on #tabBar{ position:fixed; height:calc(var(--tb-h) + var(--tb-pad)); padding-bottom:var(--tb-pad); }
  html.store-app.tb-on #app, html.ios-pwa.tb-on #app{ padding-bottom:max(0px, calc(var(--tb-h) + var(--tb-pad) - var(--sab, env(safe-area-inset-bottom, 0px)))); }
  html.store-app.tb-on.tb-on #app > #hoyPanel, html.store-app.tb-on.tb-on #app > #calendarPanel, html.store-app.tb-on.tb-on #app > #caloriePanel,
  html.ios-pwa.tb-on.tb-on #app > #hoyPanel, html.ios-pwa.tb-on.tb-on #app > #calendarPanel, html.ios-pwa.tb-on.tb-on #app > #caloriePanel{
    bottom:calc(var(--tb-h) + var(--tb-pad)); padding-bottom:0;
  }
}
/* 2026-11-18: phones: the three screens live on the bar, so the side menu does not repeat them (the bar still presses these same buttons, hidden or not) */
@media (max-width:699px){ html.tb-phone #openHoyBtn, html.tb-phone #openCalendarBtn, html.tb-phone #openCaloriesBtn, html.tb-phone #tSideGrpDay.is-empty{ display:none !important; } }
.tb-item{
  flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; position:relative;
  border:0; background:transparent; color:var(--text-dim); font:600 10.5px/1 var(--font-ui, 'Manrope', sans-serif); letter-spacing:.01em;
  cursor:pointer; -webkit-tap-highlight-color:transparent; touch-action:manipulation; padding:5px 2px 3px;
}
.tb-item svg{ width:22px; height:22px; flex:none; transition:transform .18s ease; }
.tb-item span{ line-height:1.3; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-item::before{ content:''; position:absolute; top:-1px; left:50%; width:26px; height:2px; border-radius:0 0 2px 2px; background:var(--gold); transform:translateX(-50%) scaleX(0); transition:transform .2s ease; }
.tb-item[aria-current="page"]{ color:var(--gold); }
.tb-item[aria-current="page"]::before{ transform:translateX(-50%) scaleX(1); }
.tb-item[aria-current="page"] svg{ transform:translateY(-1px); }
.tb-item:active svg{ transform:scale(.9); }
.tb-item:focus-visible{ outline:2px solid var(--gold); outline-offset:-3px; border-radius:10px; }
@media (prefers-reduced-motion: reduce){ .tb-item svg, .tb-item::before{ transition:none; } .tb-item:active svg{ transform:none; } }
