.photo-activity-feature {
  width: 100%;
  margin: -10px auto 30px;
}

.photo-activity-launcher {
  display: grid;
  width: 100%;
  min-height: 210px;
  margin: 0 auto;
  padding: 24px 38px 24px 24px;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 34px;
  background: linear-gradient(90deg, #4a0715 0%, #7a1730 48%, #a34058 100%);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.photo-activity-launcher:hover,
.photo-activity-launcher:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 30px 54px rgba(0, 0, 0, .32),
    0 16px 30px rgba(90, 15, 31, .4);
}

.photo-launcher-illustration {
  display: block;
  width: 100%;
  max-width: 280px;
  height: 180px;
  object-fit: contain;
}

.photo-launcher-copy {
  display: grid;
  gap: 7px;
}

.photo-launcher-badge {
  width: max-content;
  margin-bottom: 3px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff3ed;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.photo-launcher-copy strong {
  color: #fff;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.photo-launcher-copy small {
  color: #f8e9e5;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.4;
}

.photo-launcher-arrow {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 25px;
  line-height: 1;
}

.photo-activity-dialog {
  width: min(760px, calc(100% - 28px));
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(31, 8, 14, .38);
}

.photo-activity-dialog::backdrop {
  background: rgba(30, 8, 14, .7);
  backdrop-filter: blur(5px);
}

.photo-dialog-content { padding: 34px; }

.photo-dialog-close {
  position: sticky;
  top: 14px;
  z-index: 2;
  float: right;
  width: 42px;
  height: 42px;
  margin: 14px 14px 0 0;
  border: 0;
  border-radius: 50%;
  background: #6f1e31;
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}

.photo-dialog-intro { padding-right: 48px; }
.photo-dialog-intro h2 {
  margin: 0;
  color: var(--green-900);
  font-size: clamp(30px, 5vw, 42px);
}
.photo-dialog-intro p {
  max-width: 620px;
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.photo-activity-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  background: #faf6f3;
}
.photo-activity-form > label,
.photo-options {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}
.photo-activity-form label > span,
.photo-options legend {
  color: var(--green-900);
  font-weight: 800;
}
.photo-activity-form input[type="file"],
.photo-activity-form input[type="number"],
.photo-activity-form select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d7c9c5;
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.photo-upload-field,
.photo-options,
.photo-activity-form .btn,
.photo-form-error { grid-column: 1 / -1; }
.photo-upload-field small { color: var(--muted); }
.photo-options { margin: 0; padding: 0; border: 0; }
.photo-options label,
.school-header-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}
.photo-form-error { margin: 0; color: #8c1830; font-weight: 800; }
.photo-generated-preview {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #dfd4cf;
  border-radius: 20px;
  background: #fff;
}
.school-header {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid #b9aaa4;
  border-radius: 12px;
}
.photo-preview-heading h3 {
  margin: 7px 0 10px;
  color: var(--green-900);
  font-size: 27px;
}
.photo-preview-heading p { line-height: 1.55; }
.photo-preview-heading > span,
.photo-preview-heading small {
  display: block;
  color: #6f1e31;
  font-weight: 800;
}
.photo-generated-figure,
.photo-answer-key,
.photo-adapted-note {
  display: grid;
  gap: 5px;
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  background: #f4ebe7;
}
.photo-generated-figure { text-align: center; }
.photo-generated-figure img { display: block; max-width: 100%; max-height: 180px; margin: auto; object-fit: contain; }
.photo-generated-figure figcaption { color: #5c6961; font-size: 13px; }
.photo-answer-key-page { break-before: page; page-break-before: always; }
.photo-activity-page { break-after: page; page-break-after: always; }
.photo-question-list { padding-left: 25px; }
.photo-question-list li { margin: 16px 0; font-size: 17px; line-height: 1.55; }
.photo-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ded3ce;
}

@media (max-width: 680px) {
  .photo-activity-feature { margin-top: -12px; margin-bottom: 24px; }
  .photo-dialog-content { padding: 26px 18px; }
  .photo-activity-launcher {
    min-height: 150px;
    padding: 18px;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    border-radius: 22px;
  }
  .photo-launcher-illustration { width: 96px; height: 116px; }
  .photo-launcher-copy { gap: 5px; }
  .photo-launcher-badge { padding: 4px 8px; font-size: 10px; }
  .photo-launcher-copy strong { font-size: 21px; }
  .photo-launcher-copy small { font-size: 14px; }
  .photo-launcher-arrow { width: 42px; height: 42px; }
  .photo-activity-form { grid-template-columns: 1fr; padding: 18px; }
  .photo-activity-form > * { grid-column: 1; }
  .photo-preview-actions { align-items: stretch; flex-direction: column; }
  .photo-preview-actions .btn { width: 100%; }
}
