/* Phone-first refinements for all public PicPic surfaces. */
@media (max-width: 720px) {
  body { min-width: 0; }
  main { padding: 16px; }
  .home-page header, .account-page header, .gallery-page header, .media-page header { gap: 12px; }
  header nav { gap: 10px; font-size: 11px; }
  .home-page header nav a:last-child { display: none; }

  .upload-stage { width: 100%; padding: 38px 0 24px; }
  .hero-ghost { width: 90px; height: 90px; margin-bottom: 10px; }
  .home-page h1 { font-size: clamp(54px, 18vw, 76px); }
  .intro { font-size: 15px; margin: 20px auto 26px; }
  .drop-zone { align-items: flex-start; padding: 12px; gap: 10px; }
  .drop-zone #drop-ghost { flex: 0 0 42px; }
  .drop-zone strong { max-width: calc(100vw - 132px); }
  .preview-stack { max-width: 110px; flex-wrap: wrap; gap: 3px; }
  .preview-stack img, .preview-stack b { margin-left: 0; }
  .upload-form button { min-height: 52px; }
  .home-page footer { font-size: 10px; padding-bottom: 6px; }
  .home-page footer span { white-space: normal; }

  .account-shell { margin-top: 32px; border-radius: 13px; }
  .account-note { padding: 25px; }
  .account-note h1 { font-size: 45px; }
  .account-note > p:last-child { margin-bottom: 0; }
  .card { padding: 25px; }
  .card h2 { font-size: 41px; }
  .card input { min-height: 46px; font-size: 16px; }
  .card button { min-height: 52px; }

  .gallery-head { margin: 42px 0 20px; }
  .gallery-head h1 { font-size: clamp(55px, 17vw, 78px); }
  .compact-upload { width: 100%; border-radius: 14px; flex-wrap: wrap; padding: 10px; align-items: center; }
  .compact-upload label { flex: 1 1 150px; min-height: 34px; display: flex; align-items: center; }
  .compact-upload button { min-height: 42px; }
  .gallery-preview-stack { max-width: 120px; }
  .gallery-preview-stack img, .gallery-preview-stack b { margin-left: -6px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid img { height: 135px; }
  .media-card-foot { padding-top: 8px; }

  .media-view { margin-top: 30px; }
  .media-frame { padding: 7px; box-shadow: 5px 5px 0 var(--lime); }
  .media-frame img { max-height: none; width: 100%; }
  .media-info { display: block; margin-top: 22px; }
  .media-info h1 { font-size: clamp(30px, 10vw, 45px); line-height: .95; }
  .media-actions { margin-top: 20px; display: grid; grid-template-columns: 1fr; }
  .download-button, .delete-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 380px) {
  .brand { font-size: 18px; }
  .brand img { width: 28px; height: 28px; }
  .home-page h1 { font-size: 52px; }
  .preview-stack { display: none; }
  .gallery-head h1 { font-size: 52px; }
  .grid img { height: 115px; }
}

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