📄 src/routes/history/+layout.svelte
<script lang="ts">
  import { resolve } from "$app/paths";
  import { page } from "$app/stores";
  let { children } = $props();
</script>

{@render children()}

<nav class="sub">
  <a
    href={resolve("/history")}
    aria-label="Detection log"
    aria-current={$page.url.pathname === "/history" ? "page" : undefined}
  >
    <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
      <rect x="2" y="5" width="20" height="3" rx="1.5" />
      <rect x="2" y="11" width="20" height="3" rx="1.5" />
      <rect x="2" y="17" width="14" height="3" rx="1.5" />
    </svg>
  </a>
  <a
    href={resolve("/history/map")}
    aria-label="Sightings map"
    aria-current={$page.url.pathname.startsWith("/history/map") ? "page" : undefined}
  >
    <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
      <circle cx="12" cy="9" r="8" />
      <polygon points="5,14 12,23 19,14" />
      <circle cx="12" cy="9" r="3.5" fill="var(--bg-deep)" />
    </svg>
  </a>
</nav>

<style>
  .sub {
    position: fixed;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    height: 3rem;
    background: var(--bg-deep);
    border-top: 1px solid rgba(255, 244, 214, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;

    a {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: var(--bg-cream);
      opacity: 0.5;
      text-decoration: none;
      padding: 0.25rem 0.5rem;
      gap: 0.2rem;
      transition: opacity 0.18s ease-out;

      svg {
        width: 1.25rem;
        height: 1.25rem;
      }

      &:hover,
      &:focus-visible,
      &[aria-current="page"] {
        opacity: 1;
      }

      &[aria-current="page"]::after {
        content: "";
        width: 0.3rem;
        height: 0.3rem;
        border-radius: 50%;
        background: var(--brand-red);
      }
    }
  }
</style>