.shot-image-preview{margin:0 0 1.75rem;color:#fff}
.shot-image-frame{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:480/204;background:#101216;border:1px solid #272b31;overflow:hidden}
.shot-image-frame img{display:block;width:100%;height:100%;object-fit:contain}
.shot-image-frame span{padding:1rem;text-align:center;color:#969da7;font-size:.9rem}
.shot-image-frame [hidden]{display:none}
.shot-image-preview figcaption{min-height:2.6em;margin-top:.6rem;font-size:.85rem;color:#adb5bd}
@media(max-width:700px){.map-detail-panel .shot-image-preview{grid-column:1/-1;width:min(100%,320px);margin:0 auto .5rem}}.shot-thumbnail-gallery{margin-top:1.5rem}
.shot-thumbnail-list{display:flex;flex-direction:column;gap:1rem;max-height:52vh;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding:2px 8px 4px 2px}
.shot-thumbnail{display:block;flex:none;width:100%;padding:0;border:1px solid #343a40;border-radius:4px;background:#101216;color:#d5dae0;text-align:left;cursor:pointer;overflow:hidden}
.shot-thumbnail img{display:block;width:100%;aspect-ratio:480/204;object-fit:contain}
.shot-thumbnail span{display:block;padding:.55rem;font-size:.8rem}
.shot-thumbnail:hover,.shot-thumbnail.is-active,.shot-thumbnail:focus-visible{border-color:#fff;outline:1px solid #fff;outline-offset:0}
.shot-location-dot{position:absolute;width:11px;height:11px;transform:translate(-50%,-50%);border-radius:50%;background:#fff;box-shadow:0 0 0 2px #08090b99,0 0 8px #fff9;z-index:15;pointer-events:none}
.shot-location-dot[hidden]{display:none}
@media(max-width:991px){.shot-thumbnail-list{max-height:45vh}}
.viewer-shot-dot{position:absolute;z-index:16;width:10px;height:10px;padding:0;border:0;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #08090baa;transform:translate(-50%,-50%);cursor:pointer}
.viewer-shot-dot:hover,.viewer-shot-dot:focus-visible,.viewer-shot-dot.is-active{outline:2px solid #fff;outline-offset:3px}
/* Keep the map and selected still together inside the iPhone viewport. */
@media(max-width:700px){
  .map-view-dialog{height:94vh;height:94dvh;min-height:0}
  .map-study-grid{overflow:hidden;grid-template-rows:minmax(0,1fr) auto}
  .map-detail-panel.has-shot-preview{display:block}
  .map-detail-panel.has-shot-preview .map-detail-window,
  .map-detail-panel.has-shot-preview .map-detail-info{display:none}
  .map-detail-panel .shot-image-preview{width:min(100%,320px);margin:0 auto}
  .map-detail-panel .shot-image-frame{max-height:24vh;max-height:24dvh}
  .map-detail-panel .shot-image-preview figcaption{min-height:0;margin:.35rem 0;font-size:.8rem}
  .map-detail-panel:not(.has-shot-preview) .shot-image-preview{display:none}
  .viewer-shot-dot::before{content:"";position:absolute;inset:-9px;border-radius:50%}
}

/* Mobile main page: browse small stills immediately below the unobstructed map. */
@media(max-width:700px){
  .interactive-map>.shot-thumbnail-gallery{min-width:0;width:100%;margin:0 0 1rem}
  .interactive-map>.shot-thumbnail-gallery .shot-thumbnail-list{flex-direction:row;max-height:none;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-gutter:auto;padding:2px 2px 8px;gap:.65rem}
  .interactive-map>.shot-thumbnail-gallery .shot-thumbnail{width:140px}
  .interactive-map>.shot-thumbnail-gallery .shot-thumbnail span{font-size:.72rem;padding:.4rem}
  .map-stage[data-map-data]{touch-action:pan-y}
}

/* Mobile Viewer: magnified detail at the top left, selected still at the bottom. */
@media (max-width:700px) {
  .map-study-grid {
    grid-template-columns: min(25vw,110px) minmax(0,1fr);
    grid-template-rows: auto minmax(0,1fr) auto;
    gap: .6rem;
  }
  .map-study-grid > .map-view-viewport { grid-column: 1 / -1; grid-row: 2; }
  .map-study-grid > .map-detail-panel,
  .map-study-grid > .map-detail-panel.has-shot-preview { display: contents; }
  .map-detail-panel .map-detail-window,
  .map-detail-panel.has-shot-preview .map-detail-window {
    display: block; grid-column: 1; grid-row: 1; align-self: start;
  }
  .map-detail-panel .map-detail-info,
  .map-detail-panel.has-shot-preview .map-detail-info {
    display: block; grid-column: 2; grid-row: 1; align-self: center;
    padding: .25rem 0; min-height: 0; font-size: .75rem;
  }
  .map-detail-panel .map-detail-info strong { font-size: 1rem; margin-bottom: .25rem; }
  .map-detail-panel .shot-image-preview { grid-column: 1 / -1; grid-row: 3; }
  .interactive-map > .map-stage { margin-bottom: 4rem; }
  .map-stage .map-view-button {
    left: .75rem; bottom: -3rem; font-size: .85rem;
    padding: .4rem .7rem; min-height: 36px; gap: .35rem;
  }
}
