/* Shared mobile navigation: readable glass surface with an opaque fallback. */
/* Space the floating bar takes at the bottom of the screen: 10px gap + 66px bar
   (+ phone safe area). Pages place their own fixed buttons and scroll areas above
   this with var(--bottom-nav-space, <old value>) so they never slide under it. */
:root {
  --bottom-nav-space: calc(76px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav {
  box-sizing: border-box;
  --nav-side-space: max(10px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  left: 50%;
  right: auto;
  width: calc(100% - var(--nav-side-space) - var(--nav-side-space));
  -webkit-transform: translateX(-50%) translateZ(0);
  transform: translateX(-50%) translateZ(0);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  height: 66px;
  padding: 6px;
  gap: 2px;
  align-items: stretch;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 28px;
  background: #30363c;
  box-shadow: 0 4px 16px rgba(0,0,0,.16);
  transition: width .26s cubic-bezier(.2,.7,.3,1), height .26s cubic-bezier(.2,.7,.3,1);
}
@supports ((backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px))) {
  .bottom-nav {
    background: rgba(48,54,60,.56);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}
.bottom-nav__button {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 44px;
  justify-content: center;
  border-radius: 22px;
  padding: 3px 4px;
  font-size: clamp(9px, 2.67vw, 10px);
  color: #b7bdc3;
  transition: transform .12s ease, background-color .15s ease;
}
.bottom-nav__button.is-active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.bottom-nav__button.is-active .bottom-nav__icon { color: #fff; }
.bottom-nav__button > span:last-child {
  flex-shrink: 0;
  max-height: 16px;
  opacity: 1;
  transition: opacity .18s ease, max-height .22s ease,
              max-width .26s cubic-bezier(.2,.7,.3,1);
}
/* The selected label is bold and therefore wider. Every label reserves its bold
   width (invisible copy), so no button changes size when the selection moves. */
.bottom-nav__button > span:last-child[data-label]::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: var(--w-cta, 700);
}
.bottom-nav__icon { transition: margin-bottom .22s ease; }
/* Fixed positioning means this never changes the page's scroll height.
   58px minus 12px padding and 2px border leaves a 44px compact target. */
.bottom-nav.is-compact {
  height: 58px;
  width: min(280px, calc(100% - var(--nav-side-space) - var(--nav-side-space)));
}
/* Labels fold away by width (animated, see floating_nav.js); with only the icons
   left every button ends up the same size without a sudden re-layout. */
.bottom-nav.is-compact .bottom-nav__button > span:last-child { max-width: 0; }
/* One shared selection surface. Without JS, retain the active-tab fallback. */
.bottom-nav.has-sliding-highlight::before {
  content: '';
  position: absolute;
  pointer-events: none;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: var(--nav-highlight-width);
  transform: translateX(var(--nav-highlight-x));
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  transition: transform .26s cubic-bezier(.2,.7,.3,1), width .26s cubic-bezier(.2,.7,.3,1);
}
.bottom-nav.has-sliding-highlight .bottom-nav__button.is-active { background: transparent; }
.bottom-nav.highlight-instant::before { transition: none; }
.bottom-nav.is-compact .bottom-nav__button > span:last-child {
  opacity: 0;
  max-height: 0;
}
.bottom-nav.is-compact .bottom-nav__icon { margin-bottom: 0; }
.bottom-nav__button:active { transform: scale(.96); }
.bottom-nav__button:focus-visible {
  outline: 2px solid #b7c4ce;
  outline-offset: -2px;
}
.phone.phone-with-bottom-nav {
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}
/* Keep the existing draggable assistant clear of the taller floating bar. */
body .noqe-cotrainer-fab {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
/* The assistant's plain look (no spinning green ring) on every phone page. It was
   only set in each page's own stylesheet, which loads at the end of the page, so
   the old ring flashed for a moment when the app opened. This file is in <head>. */
body .noqe-cotrainer-fab__ring { display: none; }
body .noqe-cotrainer-fab__core {
  animation: none;
  box-shadow: none;
  background: #20252a;
  border: 1px solid #515b64;
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav, .bottom-nav__button, .bottom-nav__icon,
  .bottom-nav__button > span:last-child,
  .bottom-nav.has-sliding-highlight::before { transition: none; }
}
