:root { --site-header-sticky-height: 56px; --portal-bottom-nav-height: 62px; }

.portal-nav {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid #eae3e4;
}
.portal-nav__links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 680px);
  margin-inline: auto;
}
.portal-nav a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 55px;
  color: #544a4d;
  font-size: 14px;
  font-weight: 700;
}
.portal-nav a[aria-current="page"] { color: #a12a32; background: #fdf5f5; }
.portal-nav a:focus-visible { outline: 2px solid #a12a32; outline-offset: -3px; }
.portal-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 901px) {
  body.portal-home, body.post-card-body { padding-top: var(--site-header-sticky-height); }
}
@media (max-width: 900px) {
  :root { --site-header-sticky-height: 0px; }
  body, body.portal-home, body.post-card-body { padding-bottom: calc(var(--portal-bottom-nav-height) + env(safe-area-inset-bottom)); }
  .portal-nav {
    inset: auto 0 0;
    border-bottom: 0;
    border-top: 1px solid #eae3e4;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 88;
  }
  .portal-nav a { flex-direction: column; gap: 3px; min-height: 61px; font-size: 12px; }
  .portal-nav svg { width: 22px; height: 22px; }
}
