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

<GpsDialog />

<main>
  {@render children()}
</main>

<nav>
  <ul>
    <li>
      <a
        href={resolve("/")}
        aria-label="Home"
        aria-current={$page.url.pathname === "/" ? "page" : undefined}
      >
        <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
          <polygon points="16,11 24,8 22,16 16,15" />
          <ellipse cx="11" cy="14" rx="7" ry="5.5" />
          <circle cx="6" cy="10" r="5" />
          <polygon points="1,10 6,8.5 6,11.5" />
          <circle cx="4.5" cy="9.5" r="1" fill="var(--bg-deep)" />
        </svg>
      </a>
    </li>
    <li>
      <a
        href={resolve("/guide")}
        aria-label="Field Guide"
        aria-current={$page.url.pathname.startsWith("/guide") ? "page" : undefined}
      >
        <svg viewBox="0 0 24 24" aria-hidden="true">
          <rect x="5" y="2" width="14" height="20" rx="2" fill="currentColor" />
          <rect x="5" y="2" width="3.5" height="20" fill="var(--accent-amber)" />
          <rect x="11" y="7" width="6" height="1.5" fill="var(--bg-deep)" />
          <rect x="11" y="11" width="6" height="1.5" fill="var(--bg-deep)" />
          <rect x="11" y="15" width="4" height="1.5" fill="var(--bg-deep)" />
        </svg>
      </a>
    </li>
    <li>
      <a
        href={resolve("/history")}
        aria-label="History"
        aria-current={$page.url.pathname === "/history" ? "page" : undefined}
      >
        <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
          <rect x="5" y="8" width="5" height="4" rx="1" />
          <rect x="14" y="8" width="5" height="4" rx="1" />
          <circle cx="7" cy="16" r="6" />
          <circle cx="17" cy="16" r="6" />
          <rect x="10" y="14" width="4" height="4" />
          <circle cx="7" cy="16" r="3" fill="var(--bg-deep)" />
          <circle cx="17" cy="16" r="3" fill="var(--bg-deep)" />
        </svg>
      </a>
    </li>
  </ul>
</nav>

<style>
  :global(*) {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  :global(html) {
    /* Surfaces */
    --bg-cream:       #fff4d6;
    --bg-paper:       #f5e9d4;
    --bg-field:       #e89a3a;
    --bg-deep:        #3a1810;
    --bg-near-black:  #1a0808;

    /* Brand */
    --brand-red:      #c4253a;
    --brand-red-deep: #7a0e1f;

    /* Warm accents */
    --accent-amber:   #e89a3a;
    --accent-gold:    #f0c96b;
    --accent-rust:    #b85a1c;

    /* Cool accents (sky/water/foliage only) */
    --accent-teal:    #2a5a78;
    --accent-blue:    #1d6fb8;
    --accent-forest:  #1d6638;

    --nav-height: 4rem;
  }

  :global(body) {
    background: var(--bg-cream);
    color: var(--bg-near-black);
    font-family: system-ui, sans-serif;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
  }

  main {
    min-height: 100dvh;
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
  }

  nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    background: var(--bg-deep);

    ul {
      height: var(--nav-height);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 3.5rem;
      list-style: none;

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

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

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

        svg {
          width: 1.75rem;
          height: 1.75rem;
        }
      }
    }
  }
</style>