/* v10 — full photographs and a responsive consent panel. */

/* The foreground image is always complete. A soft blurred copy fills the matte. */
.stack .shot {
  isolation: isolate;
  background: #111;
}
.stack .shot::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: 0;
  background-image: var(--shot-backdrop);
  background-position: center;
  background-size: cover;
  filter: blur(20px) brightness(.42) saturate(.9);
  opacity: .9;
  transform: scale(1.1);
  pointer-events: none;
}
.stack .shot img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  background: transparent;
  transform: none !important;
}
.stack .shot .shot-label {
  z-index: 2;
}

.viewer-frame {
  isolation: isolate;
  background: #111;
}
.viewer-frame::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: 0;
  background-image: var(--photo-backdrop);
  background-position: center;
  background-size: cover;
  filter: blur(24px) brightness(.38) saturate(.92);
  opacity: .92;
  transform: scale(1.1);
  pointer-events: none;
}
.viewer-frame #mainPhoto,
.viewer-frame .photo-outgoing {
  object-fit: contain !important;
  object-position: center;
  background: transparent;
}
.viewer-frame #mainPhoto {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
}
.viewer-frame .photo-outgoing {
  z-index: 2;
}
.viewer-frame .glow { z-index: 3; }
.viewer-frame .frame-meta { z-index: 4; }

/* Keep image transitions, but never zoom the photo beyond its natural frame. */
@keyframes photoAppear {
  from { opacity: .35; transform: scale(1); filter: saturate(.68) blur(2px); }
  to { opacity: 1; transform: scale(1); filter: saturate(1) blur(0); }
}
@keyframes photoLeave {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1); }
}
.hero-card .shot:hover img,
.thumb:hover img {
  transform: none !important;
}

.thumb {
  background: #111;
}
.thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain !important;
  object-position: center;
  background: #111;
  transform: none !important;
}

/* Consent row: checkbox is a fixed 18px control; copy owns the remaining width. */
.result,
#resultText,
#submitFeedback,
.result .quiz-actions {
  min-width: 0;
  max-width: 100%;
}
.result {
  overflow-wrap: anywhere;
}
.answer-consent {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px 15px;
  line-height: 1.55;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}
.answer-consent input[type="checkbox"],
#allowSubmit {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  flex: 0 0 18px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 3px !important;
  justify-self: start;
  accent-color: #fff;
}
.answer-consent span {
  display: block;
  width: auto;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
#sendAnswersBtn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}
.result .quiz-actions > .btn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

@media (max-width: 700px) {
  .stack .shot {
    background: #111;
  }
  .viewer-frame {
    aspect-ratio: 4 / 5;
  }
  .quiz-card {
    min-width: 0;
    padding: 18px !important;
  }
  .result {
    padding: 18px;
    border-radius: 22px;
  }
  .answer-consent {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    font-size: .82rem;
  }
  .result .quiz-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  .result .quiz-actions > .btn {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
  }
}

@media (max-width: 360px) {
  .quiz-card { padding: 15px !important; }
  .result { padding: 15px; }
  .answer-consent { gap: 9px; padding: 11px; font-size: .78rem; }
  .section-head h2 { font-size: 2.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stack .shot::before,
  .viewer-frame::before { transform: none; }
}
