/* Shared small-screen fixes for Green Neko public pages. */
html {
  width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  width: 100%;
  overflow-x: clip;
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

@media (max-width: 760px) {
  html { scroll-padding-top: 82px; }

  .topbar {
    height: auto !important;
    min-height: 64px;
    padding: 6px 16px !important;
    gap: 10px;
  }

  .topbar .brand { flex: 0 0 auto; }
  .topbar .brand img { width: 56px; height: 56px; }
  .topbar .nav,
  .topbar .toplinks {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: clamp(8px, 2.2vw, 16px) !important;
    flex-wrap: wrap;
  }

  /* Keep every primary destination available on touch screens. */
  .topbar .nav a,
  .topbar .toplinks a {
    display: inline-flex !important;
    align-items: center;
    min-height: 40px;
    font-size: clamp(9px, 2.45vw, 11px) !important;
    letter-spacing: .06em !important;
    white-space: nowrap;
  }

  .topbar .nav .home,
  .topbar .toplinks .home-link { padding: 7px 9px; }

  .toolbar { top: 68px !important; }

  .hero {
    min-height: 0;
    padding: clamp(52px, 13vw, 76px) 20px 36px !important;
  }

  .hero:after { right: -35px !important; top: -20px !important; font-size: clamp(190px, 55vw, 270px) !important; }
  .hero h1 { font-size: clamp(42px, 12vw, 72px) !important; overflow-wrap: anywhere; }
  main { min-width: 0; }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 22px 18px !important;
  }

  footer > div:last-child,
  footer a,
  footer span { min-width: 0; overflow-wrap: anywhere; }

  .event-meta { gap: 8px 14px; font-size: 9px; }
  .gallery { grid-template-columns: minmax(0, 1fr) !important; }
  .gallery img { width: 100%; height: auto; min-height: 0 !important; max-height: none !important; object-fit: contain; }

  .founder-portrait { width: clamp(112px, 34vw, 150px) !important; margin-right: 14px !important; }

  .category-nav { overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
  .category-nav a { scroll-snap-align: start; min-height: 40px; }

  input, select, textarea { font-size: 16px !important; }
  button, [role="button"], .submit, .cta, .btn-solid, .btn-outline { min-height: 44px; }
}

@media (max-width: 420px) {
  .topbar { padding-right: 12px !important; padding-left: 12px !important; gap: 6px; }
  .topbar .brand img { width: 48px; height: 48px; }
  .topbar .nav,
  .topbar .toplinks { column-gap: 7px !important; }
  .topbar .nav a,
  .topbar .toplinks a { font-size: 9px !important; letter-spacing: .025em !important; }

  .items,
  .addon-grid { grid-template-columns: minmax(0, 1fr) !important; }

  .item { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: stretch; }
  .item-photo { width: 96px; height: 100%; min-height: 96px; aspect-ratio: 1; object-fit: cover; }
  .item-copy { min-width: 0; }
  .item-name { overflow-wrap: anywhere; }

  .hero-meta { flex-wrap: wrap; }
  .price-head { justify-content: flex-start; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
