/* A small collection of real portfolio images, lifted on hover or keyboard focus. */
.edit-photo-stack {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.1;
  margin: 12px 12px 24px;
}
.edit-stack-card {
  position: absolute;
  display: block;
  border: 6px solid #e9e3d7;
  border-radius: 15px;
  background: #e9e3d7;
  box-shadow: 0 12px 25px #10170d45;
  transform: rotate(var(--card-angle));
  transform-origin: center;
  transition: transform .4s cubic-bezier(.2,.7,.25,1), box-shadow .4s ease;
  -webkit-tap-highlight-color: transparent;
}
.edit-stack-card[hidden] { display: none; }
.edit-stack-back { --card-angle: -9deg; left: 3%; top: 3%; width: 57%; height: 58%; z-index: 1; }
.edit-stack-middle { --card-angle: 9deg; right: 2%; top: 12%; width: 55%; height: 57%; z-index: 2; }
.edit-stack-front { --card-angle: -3deg; left: 7%; top: 37%; width: 85%; height: 60%; z-index: 3; }
.edit-stack-card > img,
.edit-stack-front #edit-image-frame,
.edit-stack-front #edit-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 9px;
  object-fit: cover;
}
.edit-stack-front #edit-image-frame img { animation: none; transition: none; }
.edit-stack-front:hover #edit-image-frame img { transform: none; }
.edit-stack-label {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 30px;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(#172016d9, #1720168c 65%, transparent);
  color: #faf6eb;
  font-size: clamp(.75rem, .9vw, .9375rem);
  line-height: 1.6;
}
.edit-stack-label > span { flex-shrink: 0; font-size: 1.1rem; }
.edit-stack-front .edit-image-open { right: 12px; bottom: 12px; font-size: .875rem; padding: 9px 13px; gap: 18px; }
.edit-artwork-stack .edit-image-caption { padding-inline: 12px; }
.edit-artwork-stack .edit-stamp { z-index: 6; left: -8px; bottom: 90px; pointer-events: none; transform: rotate(-3deg); }
.edit-stack-card:focus-visible { z-index: 5; transform: translateY(-10px) rotate(0deg) scale(1.035); outline: 2px solid #d5bc91; outline-offset: 5px; box-shadow: 0 24px 48px #10170d70; }
@media (hover: hover) and (pointer: fine) {
  .edit-stack-card:hover { z-index: 5; transform: translateY(-10px) rotate(0deg) scale(1.035); box-shadow: 0 24px 48px #10170d70; }
}
@media (max-width: 1100px) and (min-width: 801px) {
  .edit-photo-stack { aspect-ratio: .85; margin-inline: 6px; }
  .edit-stack-back { width: 62%; }
  .edit-stack-middle { width: 60%; right: 0; }
  .edit-stack-front { left: 4%; width: 92%; }
  .edit-stack-front .edit-image-open { font-size: .75rem; gap: 10px; padding: 7px 10px; }
}
@media (max-width: 800px) {
  .edit-photo-stack { max-width: 650px; margin: 10px auto 24px; aspect-ratio: 1.15; }
  .edit-stack-label { font-size: .8125rem; }
  .edit-artwork-stack .edit-stamp { left: 0; bottom: 80px; }
}
@media (max-width: 600px) {
  .edit-photo-stack { aspect-ratio: .96; margin-inline: 3px; }
  .edit-stack-card { border-width: 4px; border-radius: 12px; }
  .edit-stack-back { --card-angle: -7deg; left: 3%; width: 60%; }
  .edit-stack-middle { --card-angle: 7deg; right: 2%; width: 59%; }
  .edit-stack-front { --card-angle: -3deg; left: 5%; width: 90%; top: 39%; height: 59%; }
  .edit-stack-label { padding: 8px 8px 28px; gap: 5px; font-size: .75rem; }
  .edit-stack-front .edit-image-open { right: 8px; bottom: 8px; padding: 7px 9px; gap: 10px; font-size: .75rem; }
  .edit-stack-front .edit-image-open > span { width: 28px; height: 28px; font-size: 18px; }
  .edit-artwork-stack .edit-stamp { width: 54px; height: 70px; left: -7px; bottom: 80px; }
  .edit-artwork-stack .edit-stamp > span { font-size: 25px; }
  .edit-artwork-stack .edit-stamp small { font-size: 6px; margin-top: 7px; }
  .edit-artwork-stack .edit-image-caption { padding-inline: 0; gap: 8px; font-size: .6875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .edit-stack-card { transition: none; }
  .edit-stack-card:hover, .edit-stack-card:focus-visible { transform: rotate(var(--card-angle)); }
}
