/* ==================== 5. SCRAPBOOK CARDS & DUAL GPU SHADOWS ==================== */
.card {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% calc(6px * var(--z));
  cursor: grab;
  touch-action: none;
}

.card.dragging {
  cursor: grabbing;
}

/* Dual shadow layers crossfaded via opacity only (zero box-shadow animation repaints) */
.sh-rest,
.sh-lift {
  position: absolute;
  inset: 0;
  border-radius: calc(2px * var(--z));
  pointer-events: none;
}

.sh-rest {
  box-shadow:
    0 calc(9px * var(--z)) calc(20px * var(--z)) calc(-4px * var(--z)) rgba(0, 0, 0, var(--sh-rest-a, 0.15)),
    0 calc(2px * var(--z)) calc(5px * var(--z)) rgba(0, 0, 0, var(--sh-rest-b, 0.10));
  opacity: 1;
}

.sh-lift {
  box-shadow:
    0 calc(26px * var(--z)) calc(48px * var(--z)) calc(-6px * var(--z)) rgba(0, 0, 0, var(--sh-lift-a, 0.24)),
    0 calc(8px * var(--z)) calc(18px * var(--z)) rgba(0, 0, 0, var(--sh-lift-b, 0.15));
  opacity: 0;
  visibility: hidden;
}

/* Crisp off-white matte cardstock body */
.paper {
  position: relative;
  background-color: #fdfcfa;
  background-image: linear-gradient(155deg, #ffffff 0%, #fdfcfa 56%, #f3f1eb 100%);
  border-radius: max(1px, calc(1.5px * var(--z)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 0 0 1px rgba(15, 23, 42, 0.085),
    inset 0 -1px 1px rgba(15, 23, 42, 0.04);
}

.s-polaroid .paper {
  background-color: #fdfbf7;
  background-image: linear-gradient(155deg, #ffffff 0%, #fdfbf7 62%, #f1efe7 100%);
  border-radius: max(1px, calc(2px * var(--z)));
}

.s-minimal .paper {
  background: #ffffff;
  border-radius: max(1px, calc(2px * var(--z)));
}

.card.drop-hi .paper {
  outline: 2.5px solid var(--accent);
  outline-offset: 4px;
}

/* Screenshot Well — NO milky sheen/glare overlay over screenshots */
.well {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0d0f13;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.img-slot {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Dedicated Progressive HiDPI Mipmap Canvas sized to exact CSS * DPR pixels */
.hi-res-img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Crisp Empty Slot Placeholder */
.ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, #1c1f26 0%, #13151b 56%, #0d0f13 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(7px * var(--z));
  padding: calc(10px * var(--z));
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
  transition: color 0.16s ease;
}

.card:hover .ph {
  color: rgba(255, 255, 255, 0.72);
}

.ph-ic {
  width: calc(28px * var(--z));
  height: calc(28px * var(--z));
  border-radius: 50%;
  border: 1px dashed currentColor;
  display: grid;
  place-items: center;
}

.ph-ic svg {
  width: calc(13px * var(--z));
  height: calc(13px * var(--z));
}

.ph span {
  font-size: calc(11.5px * var(--z));
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Optional Handwritten Caption (scales natively at scale(1) for razor-sharp glyphs) */
.cap {
  margin-top: calc(8px * var(--z));
  text-align: center;
  font-family: var(--hand);
  font-weight: 600;
  font-size: calc(19px * var(--z));
  line-height: 1.12;
  color: #232730;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 calc(4px * var(--z));
}

.s-polaroid .cap {
  margin-top: calc(10px * var(--z));
  font-size: calc(22px * var(--z));
}

.cap.empty {
  display: none;
}
