@layer components {
  /* Bottom tab bar -- mobile primary navigation */
  .tab-bar {
    --tab-bar-bg: var(--color-canvas);

    align-items: stretch;
    background-color: var(--tab-bar-bg);
    border-block-start: var(--border);
    display: flex;
    height: var(--tab-bar-height);
    justify-content: space-around;
    padding-bottom: var(--safe-inset-bottom);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-tab-bar);
  }

  @media (min-width: 800px) {
    .tab-bar {
      display: none;
    }
  }

  .tab-bar__item {
    align-items: center;
    color: var(--color-ink-muted);
    display: flex;
    flex: 1;
    flex-direction: column;
    font-size: var(--text-xs);
    gap: 0.15rem;
    justify-content: center;
    text-decoration: none;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
  }

  .tab-bar__item:hover,
  .tab-bar__item--active {
    color: var(--color-link);
  }

  .tab-bar__icon {
    inline-size: 1.25rem;
    block-size: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tab-bar__label {
    font-weight: 500;
    line-height: 1;
  }
}
