/* App-style bottom tab bar (shared/tabbar.js). Phones only; themed per concept. */
.tabbar { display: none; }
html[data-tab-theme="studio"] { --tb-bg: rgb(246 243 238 / .94); --tb-line: #d9d1c4; --tb-text: #6c6f68; --tb-on: #2f3b33; --tb-accent: #2f3b33; --tb-accent-ink: #f6f3ee; --tb-font: "Manrope", system-ui, sans-serif; }
html[data-tab-theme="perf"]   { --tb-bg: rgb(11 11 11 / .94);   --tb-line: #2c2b29; --tb-text: #9a958c; --tb-on: #ece8e1; --tb-accent: #b07a52; --tb-accent-ink: #0b0b0b; --tb-font: "Inter", system-ui, sans-serif; }
html[data-tab-theme="soft"]   { --tb-bg: rgb(255 255 255 / .95); --tb-line: #e4d6c6; --tb-text: #74675e; --tb-on: #b8643f; --tb-accent: #b8643f; --tb-accent-ink: #fff;   --tb-font: "DM Sans", system-ui, sans-serif; }

@media (max-width: 860px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;  /* below the header (50) so the full menu covers it */
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: var(--tb-bg); border-top: 1px solid var(--tb-line);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    font-family: var(--tb-font); -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none; user-select: none;
  }
  .tab {
    display: grid; justify-items: center; gap: 3px; padding: 6px 2px 4px; min-height: 52px; box-sizing: border-box;
    color: var(--tb-text); text-decoration: none; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
    border-radius: 12px; transition: color .2s, transform .12s;
  }
  .tab:active { transform: scale(.94); }
  .tab:focus-visible { outline: 2px solid var(--tb-on); outline-offset: -2px; }
  .tab[aria-current] { color: var(--tb-on); }
  .tab-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
  .tab[aria-current] .tab-ico svg { stroke-width: 2.2; }
  /* Centre "Book" tab: raised accent button */
  .tab-center .tab-ico { display: grid; place-items: center; width: 46px; height: 46px; margin-top: -20px; border-radius: 50%;
    background: var(--tb-accent); color: var(--tb-accent-ink); box-shadow: 0 6px 16px rgb(0 0 0 / .22), 0 0 0 4px var(--tb-bg); }
  .tab-center .tab-ico svg { width: 22px; height: 22px; stroke-width: 2; }
  .tab-center, .tab-center[aria-current] { color: var(--tb-on); }
  html[data-tab-theme="perf"] .tab-center .tab-ico { border-radius: 0; }

  /* Keep page content, toasts and the review panel clear of the bar */
  html.has-tabbar body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  html.has-tabbar .a-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  html.has-tabbar #rv-panel { bottom: calc(80px + env(safe-area-inset-bottom)); }
  html.has-tabbar .header .nav { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .tab { transition: none; } .tab:active { transform: none; } }

/* Notch/rounded-corner phones in landscape (viewport-fit=cover) */
@supports (padding: env(safe-area-inset-left)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
