/* The app's bottom tab bar (js/nav.js). */
body.has-appnav {
  --appnav-h: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: var(--appnav-h);
}
.appnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 100vw;
  padding: 6px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  background: rgba(4, 11, 22, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.appnav a {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 5px 0 6px;
  color: #6c7c95;
  text-decoration: none;
  font: 700 10.5px/1 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.appnav a.on { color: #d9c49a; }
.appnav .ico { width: 25px; height: 25px; transition: transform 0.1s ease; }
.appnav a:active .ico { transform: scale(0.9); }

.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Fixed bars and toasts on the page sit above the tab bar. */
body.has-appnav .save-bar { bottom: var(--appnav-h); }
body.has-appnav .toast { bottom: calc(var(--appnav-h) + 16px); }

/* A round home button for screens that have their own bottom tabs. */
.home-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  color: var(--muted, #a7b3c6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.home-btn .ico { width: 20px; height: 20px; }

@media (min-width: 720px) {
  .appnav { left: 50%; right: auto; width: 520px; transform: translateX(-50%); border: 1px solid rgba(255, 255, 255, 0.09); border-bottom: 0; border-radius: 18px 18px 0 0; }
}

a.btn { text-decoration: none; text-align: center; }
