/* Curved photo wall. Colours come from the page: --wall-bg, --wall-focus. */
[hidden] { display: none !important; }
.wall { position: relative; overflow: hidden; outline: none; touch-action: none; cursor: grab; user-select: none; }
.wall.is-dragging { cursor: grabbing; }
.wall__stage { position: absolute; inset: 0; perspective: 1100px; }
.wall__world { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; }
.wall__tile {
  position: absolute; left: 0; top: 0; width: var(--tw); height: var(--th);
  padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #111;
  transform-style: preserve-3d; cursor: inherit; backface-visibility: hidden;
}
.wall__tile img {
  width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none;
  transform: scale(1.04); opacity: 0;
  /* grey and dim by distance from the centre; no blur, which is slow on many 3D layers */
  filter: grayscale(1) brightness(calc(0.85 - var(--d, 0) * 0.38)) contrast(1.06);
  transition: filter .36s cubic-bezier(.16, 1, .3, 1), transform .36s cubic-bezier(.16, 1, .3, 1), opacity .4s ease;
}
.wall__tile img.is-loaded { opacity: 1; }
.wall__tile.is-focus img { filter: none; transform: scale(1); }
.wall__tile.is-focus { box-shadow: 0 0 0 2px var(--wall-focus, #ffb600); }
.wall__tile:focus-visible { outline: 3px solid var(--wall-focus, #ffb600); outline-offset: 3px; }
.wall:focus-visible { outline: 3px solid var(--wall-focus, #ffb600); outline-offset: -3px; }

/* Reduced motion: a flat grid that scrolls like a page */
.wall--flat { overflow: auto; touch-action: auto; cursor: auto; }
.wall--flat .wall__stage { position: static; perspective: none; }
.wall--flat .wall__world {
  position: static; display: grid; gap: 14px; padding: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.wall--flat .wall__tile { position: relative; width: auto; height: auto; aspect-ratio: 4 / 5; transform: none !important; }
.wall--flat .wall__tile img { transition: none; filter: none; transform: none; opacity: 1; }
.wall--flat .wall__tile.is-focus { box-shadow: none; }
