@media (max-width: 600px) {
  #archive {
    width: 100%;
    height: 100dvh;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-y;
  }

  .archive-controls {
    top: max(72px, calc(env(safe-area-inset-top) + 62px));
    left: 14px;
    width: calc(100% - 28px);
    max-width: none;
    padding: 0 0 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background: linear-gradient(var(--paper) 78%, transparent);
  }

  .archive-controls::-webkit-scrollbar { display: none; }

  .filters {
    gap: 15px;
    width: max-content;
    min-height: 24px;
    padding-right: 12px;
  }

  .filter {
    padding: 7px 0;
    font-size: 8px;
    letter-spacing: .06em;
  }

  .filter-count { font-size: 7px; }

  .photo-wall {
    display: flex;
    width: max-content;
    height: 100%;
    min-height: 100%;
    align-items: stretch;
    gap: 16px;
    padding: max(176px, calc(env(safe-area-inset-top) + 164px)) 14px max(88px, calc(env(safe-area-inset-bottom) + 72px));
    touch-action: pan-y;
  }

  .photo-project {
    flex: 0 0 clamp(174px, 56vw, 198px);
  }

  .photo-project-stack { gap: 6px; }

  .photo-tile {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    transform: none;
  }

  .photo-tile.is-loaded { aspect-ratio: var(--native-photo-ratio, 3 / 2); }

  .photo-tile img { width: 100%; height: 100%; object-fit: contain; }

  .photo-tile:hover img,
  .photo-tile:focus-visible img { transform: none; }

  .collection-stamp {
    position: fixed;
    top: max(108px, calc(env(safe-area-inset-top) + 98px));
    right: auto;
    bottom: auto;
    left: 14px;
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-items: start;
    gap: 8px;
    margin: 0;
    text-align: left;
    transform: none;
  }

  .collection-heading { gap: 3px; font-size: 25px; }
  .collection-count { font-size: 9px; }
  .collection-total { font-size: 8px; }

  .drag-cue {
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 14px;
    gap: 7px;
    font-size: 6px;
    letter-spacing: .08em;
  }

  .drag-cue-line { width: 20px; }
  .drag-cue > span:last-child { font-size: 0; }
  .drag-cue > span:last-child::after { content: "Swipe to explore · Scroll a project"; font-size: 6px; }

  .view-switch {
    right: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
    gap: 9px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
  }

  .full-view {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 56px;
    gap: 10px;
    padding: max(88px, calc(env(safe-area-inset-top) + 76px)) 14px max(14px, env(safe-area-inset-bottom));
  }

  .viewer-category { display: none; }
  .full-current { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
  .full-current img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
  .thumbnail-rail { height: 56px; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
}
