/* Phone layout shared by index.html, bundle.html and makes.html. Load after each page's own <style>. */

html {
  overflow-x: clip;
}

@media (max-width: 640px) {
  /* Logo and theme/cart on the first row, SHOP / MAKES full width underneath. */
  .nav {
    padding: 0.7rem 0;
  }

  .nav-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand end"
      "links links";
    column-gap: 0.75rem;
    row-gap: 0.65rem;
  }

  .nav-brand {
    grid-area: brand;
    gap: 0.5rem;
    min-width: 0;
  }

  .nav-brand span {
    font-size: 1.1rem;
  }

  .nav-logo {
    width: 2.3rem;
    height: 2.3rem;
  }

  .nav-end {
    grid-area: end;
    gap: 0.5rem;
  }

  .nav-inner > .nav-links {
    grid-area: links;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .nav-pill {
    min-width: 0;
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
  }

  .theme-switch button {
    padding: 0.45rem 0.6rem;
  }

  .wrap {
    width: min(100% - 1.75rem, var(--max));
  }
}

@media (max-width: 360px) {
  .nav-brand span {
    font-size: 0.98rem;
  }

  .theme-switch button {
    padding: 0.4rem 0.45rem;
    font-size: 0.75rem;
  }
}
