/* BRIEF §10.8 bar C: the staff app's phone bottom bar (≤700px). H = 52px. A milky bar (solid #F4F0EC: content scrolling under a see-through bar was readable through it) 5H wide with four items and a
   separate round button H×H, 10px apart, centred, 12px above the safe area. The active item is a soft grey pill
   2H × .8H with a filled icon and its label; the others are outline icons. Built by phoneBar() in portal.js, outside
   .staff-exact so the lens may use the one allowed backdrop filter, and only while a finger is down. */
.staff-tabbar { display: none; }
@media (max-width: 700px) {
  .staff-tabbar {
    --h: 52px; --stb-bg: #F4F0EC; --stb-rim: rgba(255,255,255,.60); --stb-tx: #2E2A27; --stb-on: rgba(60,50,44,.10);
    position: fixed; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-nav);
    display: flex; justify-content: center; align-items: center; gap: 10px; pointer-events: none;
    font-family: "Helvetica Neue", Arial, sans-serif;
  }
  html.staff-poppins .staff-tabbar { font-family: "Swangz Staff Poppins", "Helvetica Neue", Arial, sans-serif; }
  html.staff-hold .staff-tabbar { visibility: hidden; }
  html[data-theme="light"] .staff-tabbar { --stb-rim: rgba(82,60,44,.28); }
  .stb-bar, .stb-round { pointer-events: auto; background: var(--stb-bg); border: 1px solid var(--stb-rim); color: var(--stb-tx); box-shadow: 0 10px 28px -12px rgba(0,0,0,.55); }
  .stb-bar { position: relative; display: flex; align-items: center; justify-content: space-between; width: calc(var(--h) * 5); height: var(--h); padding: 0 5px; border-radius: 16px; touch-action: none; }
  .stb-bar a { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 44px; height: 44px; border-radius: 10px; color: var(--stb-tx); text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .stb-bar a span { display: none; }
  .stb-bar a.on { width: calc(var(--h) * 2); background: var(--stb-on); }
  .stb-bar a.on span { display: inline; }
  .stb-bar svg, .stb-round svg { width: 19px; height: 19px; flex: none; }
  .stb-bar a { -webkit-user-drag: none; user-select: none; -webkit-tap-highlight-color: transparent; }
  /* Probe S5 (13 Nov): the items stay 42px tall inside the 52px bar; an invisible layer makes the pressed area 44px. */
  .stb-bar a { position: relative; }
  .stb-bar a::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 44px; transform: translateY(-50%); }
  .stb-bar a.on svg { fill: currentColor; }
  .stb-bar a.on[data-ic="search"] svg { fill: none; stroke-width: 2.6; } /* a filled magnifier is a blob */
  .stb-round { position: relative; display: grid; place-items: center; width: var(--h); height: var(--h); border-radius: 16px; }
  .stb-round.on { background: #F2EEEC; outline: 2px solid var(--stb-tx); outline-offset: -4px; }
  .stb-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #B51E33; color: #fff; font-family: inherit; font-weight: 700; font-size: 9px; line-height: 16px; text-align: center; }
  .staff-tabbar a:focus-visible { outline: 2px solid #B4530F; outline-offset: 2px; }
  .stb-lens { position: absolute; left: 0; top: 50%; width: calc(var(--h) * 2.1); height: calc(var(--h) * 1.15); margin: calc(var(--h) * -.575) 0 0 calc(var(--h) * -1.05);
    border-radius: 16px; border: 1px solid rgba(255,255,255,.75); background: rgba(60,50,44,.10); pointer-events: none;
    backdrop-filter: blur(2px) brightness(.9); -webkit-backdrop-filter: blur(2px) brightness(.9); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
  /* Room under the bar so the last content and the footer are never covered. */
  .staff-exact { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  @media (prefers-reduced-transparency: reduce) { .stb-lens { backdrop-filter: none; -webkit-backdrop-filter: none; } }
  @media print { .staff-tabbar { display: none; } }
}
