/* Keep the photographic composition comfortable on small screens. */
@media (max-width: 1100px) {
  body.menu-is-open { overflow: hidden; }

  .header .menu-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
  }

  .header .nav {
    max-height: calc(100svh - 74px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  .header .nav a { display: flex; min-height: 52px; align-items: center; }
  body.menu-is-open .mini-player { visibility: hidden; }
}

/* A swipe changes photos; vertical gestures and pinch zoom remain native. */
#gallery-photo { touch-action: pan-y pinch-zoom; }

@media (max-width: 760px) {
  :root {
    --gutter: clamp(20px, 5vw, 32px);
    --phone-top: env(safe-area-inset-top, 0px);
    --phone-bottom: env(safe-area-inset-bottom, 0px);
  }

  html { scroll-padding-top: calc(88px + var(--phone-top)); }
  main, .music-copy, .merch-copy, .merch-hero > figure { min-width: 0; }

  .header {
    height: calc(72px + var(--phone-top));
    padding: var(--phone-top) max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
  }

  .header .brand { font-size: 26px; }
  .header .nav {
    top: calc(72px + var(--phone-top));
    max-height: calc(100svh - 72px - var(--phone-top));
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  .header .nav a { font-size: 13px; }

  .hero { height: 100svh; min-height: 560px; max-height: none; }
  .hero-background { object-position: 57% center; }
  .hero-copy {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    max-width: none;
    bottom: calc(116px + var(--phone-bottom));
  }
  .hero-kicker { font-size: 8px; letter-spacing: 1.4px; margin-bottom: 18px; }
  .hero-wordmark { font-size: clamp(64px, 20vw, 106px); line-height: 1.1; }
  .hero-signature { margin: 6px 0 26px; }
  .hero-actions { gap: 16px; }
  .hero-actions .button { min-height: 48px; font-size: 10px; }
  .hero-actions .text-button { padding: 11px 0; gap: 10px; }
  .hero-foot {
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(16px + var(--phone-bottom));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 44px;
    gap: 8px;
    padding-top: 12px;
  }
  .hero-foot > .eyebrow { max-width: none; font-size: 8px; letter-spacing: .8px; }
  .hero-foot .portrait-choices { gap: 0; }
  .hero-foot .portrait-choice { width: 44px; min-width: 44px; height: 44px; }
  .hero-foot .portrait-choice::after { left: 12px; right: 12px; bottom: 7px; }
  .portrait-rule { display: none; }
  .hero-explore { width: 44px; min-height: 44px; justify-content: flex-end; }

  .chapter-nav { padding: 8px var(--gutter); }
  .chapter-nav a { min-height: 72px; }
  .section { padding: 44px var(--gutter) 58px; }
  .section-top { gap: 12px; margin-bottom: 30px; }
  .section-top .eyebrow { line-height: 1.6; }
  .section p { font-size: 14px; line-height: 1.8; }
  .watch-heading, .world-heading { margin-bottom: 28px; }

  .music-stage { padding: 30px var(--gutter) 26px; }
  .music-presentation { gap: 28px; }
  .music-visual { max-width: 440px; }
  .music-stage .music-copy { padding: 0; }
  .music-stage .music-copy h2 { margin: 16px 0 22px; }
  .music-stage .music-copy > p { font-size: 14px; }
  .music-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .music-platforms .platform-button { min-width: 0; min-height: 72px; padding: 12px; gap: 9px; }
  .music-platforms .platform-button span { font-size: 12px; }
  .music-platforms .platform-button small { font-size: 8px; margin-bottom: 4px; letter-spacing: .5px; }
  .music-next, .music-foot > a { min-height: 44px; }

  .artist-player { padding: 14px; }
  .player-track { gap: 10px; }
  .player-track > img { flex-shrink: 0; }
  .player-track label { font-size: 9px; letter-spacing: .6px; }
  .player-track select { min-height: 44px; font-size: 17px; }
  .player-controls {
    display: grid;
    grid-template-columns: 44px 44px 44px minmax(0, 1fr) 44px;
    gap: 4px;
  }
  .player-controls button, .player-controls .player-play { width: 44px; height: 44px; margin: 0; }
  .player-controls .icon { width: 18px; height: 18px; }
  .player-controls .player-time { margin: 0; font-size: 9px; }
  .player-controls button[data-audio-action="mute"] { margin: 0; }
  .player-seek { height: 44px; margin: 3px 0; }
  .player-meta { gap: 10px; font-size: 10px; align-items: flex-start; }
  .player-meta > span { flex: 1; min-width: 0; }
  .player-meta a { min-height: 44px; margin-top: -12px; }

  .film { height: auto; aspect-ratio: 4 / 5; max-height: 520px; }
  .film-title { left: 16px; right: 16px; font-size: 10px; letter-spacing: .4px; }
  .film-meta { flex-wrap: wrap; font-size: 10px; gap: 6px 16px; }
  .film-meta button { min-height: 44px; font-size: 10px; }
  .underlined { min-height: 44px; align-items: center; }

  .world-collage { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 12px; }
  .world-photo { min-width: 0; aspect-ratio: 3 / 4; }
  .world-lead { aspect-ratio: 4 / 5; }
  .world-photo > span { left: 12px; right: 12px; bottom: 14px; gap: 8px; }
  .world-photo strong { font-size: clamp(14px, 3.8vw, 18px); line-height: 1.25; }
  .world-lead strong { font-size: 22px; }
  .community-stories { grid-template-columns: 1fr; gap: 24px; }
  .community-stories h3 { font-size: 14px; }
  .community-stories p { max-width: none; font-size: 14px; }
  .join-layout > div { min-width: 0; }
  .join-layout .button { min-height: 48px; }

  .interior-page { padding: calc(108px + var(--phone-top)) var(--gutter) 50px; }
  .gallery-intro > div { margin-bottom: 30px; }
  .gallery-intro p, .merch-copy p { font-size: 14px; line-height: 1.8; }
  .gallery-filters button { min-height: 44px; font-size: 11px; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .archive-photo img { height: auto; aspect-ratio: 3 / 4; }
  .archive-feature img { height: auto; aspect-ratio: 4 / 5; }
  .archive-photo[data-photo="editorial"] img { aspect-ratio: 16 / 9; }
  .archive-photo strong { font-size: 11px; line-height: 1.5; }
  .archive-photo > span { min-height: 52px; align-items: flex-start; }
  .merch-hero { gap: 30px; }
  .merch-copy .button { width: 100%; max-width: 360px; min-height: 48px; font-size: 10px; padding: 13px 18px; gap: 18px; }
  .merch-hero figure img { height: auto; aspect-ratio: 4 / 5; }
  .merch-bottom > a { min-height: 44px; font-size: 12px; overflow-wrap: anywhere; }

  footer { padding: 36px var(--gutter) calc(36px + var(--phone-bottom)); }
  .footer-bottom { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; font-size: 12px; }
  .footer-bottom > div, .footer-bottom > div.instagram-links { width: 100%; }
  .footer-bottom div > a, .back-top, .footer-pages a { min-height: 44px; }
  .footer-bottom .instagram-backup { min-height: 44px; font-size: 11px; align-items: center; display: flex; }
  .instagram-main, .instagram-personal { font-size: 12px; min-height: 44px; }
  .instagram-main small, .instagram-personal small { font-size: 11px; }
  .footer-pages { gap: 28px; }

  .mini-player {
    display: grid;
    grid-template-columns: repeat(4, minmax(44px, 1fr));
    gap: 2px 8px;
    padding: 10px 12px;
    bottom: calc(10px + var(--phone-bottom));
    width: calc(100% - 24px);
  }
  .mini-track { grid-column: 1 / 4; grid-row: 1; min-height: 44px; gap: 10px; }
  .mini-track > img { display: block; width: 36px; height: 36px; flex-shrink: 0; }
  .mini-track strong { font-size: 15px; max-width: none; }
  .mini-track small { font-size: 8px; }
  .mini-controls { display: contents; }
  .mini-controls button, .mini-controls .player-play { width: 44px; height: 44px; margin: 0; justify-self: center; grid-row: 2; }
  .mini-controls button[data-audio-action="prev"] { grid-column: 1; }
  .mini-controls button[data-audio-action="play"] { grid-column: 2; }
  .mini-controls button[data-audio-action="next"] { grid-column: 3; }
  .mini-controls button[data-audio-action="mute"] { grid-column: 4; }
  .mini-controls #mini-close { grid-column: 4; grid-row: 1; justify-self: end; margin: 0; }
  .mini-controls .icon { width: 18px; height: 18px; }
  body.has-mini-player footer { padding-bottom: calc(164px + var(--phone-bottom)); }

  dialog, #gallery-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px - var(--phone-top) - var(--phone-bottom));
    border-radius: 14px;
  }
  .dialog-bar { min-height: 60px; padding: 8px 12px; gap: 12px; font-size: 10px; }
  .dialog-close { width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; flex-shrink: 0; }
  dialog video { max-height: calc(100dvh - 152px - var(--phone-top) - var(--phone-bottom)); }
  #gallery-photo { max-height: calc(100dvh - 160px - var(--phone-top) - var(--phone-bottom)); }
  .gallery-controls { min-height: 60px; gap: 8px; padding: 8px 12px; }
  .gallery-controls button { min-width: 84px; min-height: 44px; }
}

@media (max-width: 420px) {
  .gallery-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-filters > span { grid-column: 1 / -1; }
}

@media (pointer: coarse) and (min-width: 761px) and (max-width: 1100px) {
  .player-controls {
    display: grid;
    grid-template-columns: 44px 44px 44px minmax(0, 1fr) 44px;
    gap: 4px;
  }
  .player-controls button, .player-controls .player-play,
  .mini-controls button, .mini-controls .player-play,
  .dialog-close { width: 44px; height: 44px; }
  .player-controls .player-play,
  .player-controls button[data-audio-action="mute"],
  .player-controls .player-time { margin: 0; }
  .player-controls .player-time { font-size: 9px; }
  .player-track select, .gallery-filters button, .gallery-controls button { min-height: 44px; }
  .player-seek { height: 44px; }
  .hero-foot .portrait-choice { width: 44px; min-width: 44px; height: 44px; }
}

/* Keep the menu usable when a phone is turned sideways. */
@media (max-width: 1100px) and (max-height: 500px) and (orientation: landscape) {
  .header {
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  }
  .hero { min-height: 520px; }
  .hero-copy { bottom: 112px; }
  .hero-wordmark { font-size: clamp(64px, 9vw, 90px); }
  .hero-signature { margin-bottom: 24px; }
  .hero-foot { bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .mini-player { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  dialog, #gallery-dialog {
    width: calc(100% - max(24px, env(safe-area-inset-left, 0px)) - max(24px, env(safe-area-inset-right, 0px)));
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
  }
  .dialog-bar { min-height: 60px; padding: 8px 12px; }
  .gallery-controls { min-height: 60px; padding: 8px 12px; }
  #gallery-photo, dialog video { max-height: calc(100dvh - 160px - env(safe-area-inset-bottom, 0px)); }
}
