/* Phones: the primary routes as three equal tabs in the top strip, the
   current one on the desktop sidebar's amber tile. The strip stays on top:
   at scroll 0 nothing sits under it, where a fixed bottom bar covers
   whatever lands at the fold. This is the one mobile nav rule set: each
   screen's <style> stays injected after leaving it, so a per-screen copy
   would override this sheet by visit order. */
@media screen and (max-width: 859px) {
  body > nav {
    inset: 0 0 auto 0;
    z-index: 100;
    height: auto;
    min-height: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: var(--sp-sm);
    padding: 6px var(--sp-sm);
    background: var(--snapcards-surface);
    border: none;
    border-bottom: var(--border-size-1) solid var(--snapcards-border);
    box-sizing: border-box;
  }
  body > nav::before,
  body > nav::after,
  body > nav .shell-me {
    display: none;
  }
  body > nav > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 52px;
    box-sizing: border-box;
    padding: 4px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--snapcards-secondary);
    font-size: var(--type-label);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
  }
  body > nav > a::before {
    font-size: 20px;
    line-height: 1;
  }
  body > nav > a[data-route="cards"]::before { content: "🏠"; }
  body > nav > a[data-route="generate"]::before { content: "✨"; }
  body > nav > a[data-route="print"]::before { content: "🖨️"; }
  body > nav > a[data-route="about"]::before { content: "📖"; }
  body > nav > a[aria-current="page"] {
    background: #F59E0B;
    color: #181D25;
    font-weight: 700;
  }
  body > main#app {
    margin-left: 0;
    margin-bottom: 0;
  }
}
