/* Shared narrow-screen fixes, including the native HTML before JS is ready. */
@media (max-width: 700px) {
  /* Keep the brand and all header controls inside the viewport while loading.
     Without JS the search button still submits to the searchable collection. */
  body .header:not(.search-open) > .header-search {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    background: transparent;
  }
  body .header:not(.search-open) > .header-search input,
  body .header:not(.search-open) > .header-search .header-search-close {
    display: none;
  }

  /* Enlarge the actual buttons, retaining the existing small heart artwork. */
  body .tile > .favorite,
  body .collection-page .tile > .favorite {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    top: 0;
    right: 0;
    padding: 0;
  }
  body .featured-controls button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  body .featured-controls {
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 8px;
  }
  body .featured-controls > div { margin-left: auto; }
  body .collection-status-row .text-button {
    min-height: 44px;
    padding-block: 10px;
  }

  /* Keep editable fields readable without disabling browser zoom. */
  body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body textarea,
  body select {
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  /* Let the welcome copy grow naturally; the mascot gets its own grid cell. */
  body .club-login-page .club-login-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(72px, 22vw, 90px);
    align-items: center;
    gap: 18px 12px;
  }
  body .club-login-page .club-login-copy {
    grid-column: 1 / -1;
    max-width: none;
    min-width: 0;
  }
  body .club-login-page .club-login-intro .club-lead { max-width: none; }
  body .club-login-page .club-login-art {
    position: static;
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 0;
    align-self: center;
  }
  body .club-login-page .club-login-intro > .club-text-link {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    min-width: 0;
    gap: 12px;
  }
}
