.a360-port-lightbox-bar [data-portfolio-lightbox-close],
.a360-port-player-bar [data-portfolio-player-close] {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  justify-content: center;
  padding: 0;
  gap: 0;
}
.a360-port-lightbox-viewport {
  position: relative;
  align-self: stretch;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.a360-port-lightbox-viewport.is-zoomed { touch-action: auto; }
.a360-port-lightbox-track {
  position: absolute;
  inset: 0;
  display: flex;
  transform: translate3d(-100%, 0, 0);
}
.a360-port-lightbox-track.is-settling {
  transition: transform 660ms cubic-bezier(.4, 0, .2, 1);
}
/* Adjacent images must not bleed across fractional viewport edges at rest. */
.a360-port-lightbox-track [data-portfolio-lightbox-neighbor] { visibility: hidden; }
.a360-port-lightbox-track.is-dragging [data-portfolio-lightbox-neighbor],
.a360-port-lightbox-track.is-settling [data-portfolio-lightbox-neighbor] { visibility: visible; }
.a360-port-lightbox-stage > button[hidden] { display: none; }
.a360-port-lightbox-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}
.a360-port-lightbox-stage .a360-port-lightbox-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 600px) {
  .a360-port-lightbox-stage {
    padding-bottom: 0;
    gap: 0;
  }
  .a360-port-lightbox-stage > button { display: none; }
  .a360-port-lightbox-viewport { margin-inline: -14px; }
}
@media (prefers-reduced-motion: reduce) {
  .a360-port-lightbox-track.is-settling { transition: none; }
}

/* A phone uses the full available film width, including after rotation. */
@media (max-width: 700px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .a360-port-player:not(.is-tour) { padding-inline: 0; }
  .a360-port-player:not(.is-tour) .a360-port-player-bar,
  .a360-port-player:not(.is-tour) .a360-port-player-footer { padding-inline: max(16px,env(safe-area-inset-left)); }
  .a360-port-player:not(.is-tour) .a360-port-player-stage iframe { width: 100%; }
  .a360-port-player.is-portrait .a360-port-player-stage iframe { width: auto; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .a360-port-player:not(.is-tour) { padding: 0; background: #000; }
  .a360-port-player:not(.is-tour) .a360-port-player-stage { position: absolute; inset: 0; }
  .a360-port-player:not(.is-tour) .a360-port-player-stage iframe { width: 100%; height: 100%; aspect-ratio: auto; }
  .a360-port-player:not(.is-tour) .a360-port-player-bar { position: absolute; top: max(8px,env(safe-area-inset-top)); right: max(8px,env(safe-area-inset-right)); z-index: 2; min-height: 44px; padding: 0; }
  .a360-port-player:not(.is-tour) .a360-port-player-bar strong,
  .a360-port-player:not(.is-tour) .a360-port-player-footer { display: none; }
  .a360-port-player:not(.is-tour) [data-portfolio-player-close] { border-radius: 50%; background: #06131fc9; }
}
