.photo-gallery {
  position: relative;
  width: 100%;
  height: 255px;
  overflow: hidden;
  background: var(--tan, #e8dbc2);
}

.photo-gallery .photo-slide {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-gallery [hidden] {
  display: none !important;
}

.photo-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffffa6;
  border-radius: 50%;
  background: #183522d9;
  color: #fff;
  font: 32px/1 system-ui, sans-serif;
  cursor: pointer;
  transform: translateY(-50%);
}

.photo-prev { left: 10px; }
.photo-next { right: 10px; }
.photo-arrow:hover { background: #183522; }

.photo-arrow:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #183522;
}

.photo-gallery:focus-visible {
  outline: 3px solid var(--forest, #274e32);
  outline-offset: -3px;
}

.photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  border-radius: 20px;
  background: #183522d9;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.panel .photo-help {
  margin: 6px 0 14px;
  color: #657067;
  font-size: 13px;
}

#editor.modal { align-items: start; padding-top: 24px; padding-bottom: 24px; }

.parent-photo-link {
  color: var(--forest, #274e32);
  font-weight: 700;
  text-underline-offset: 3px;
}

.parent-photo-dialog {
  position: fixed;
  width: min(900px, 94vw);
  max-height: 92vh;
  padding: 26px;
  border: 0;
  border-radius: 14px;
  color: var(--ink, #26332a);
  background: #fff;
  box-shadow: 0 20px 70px #0006;
}

.parent-photo-dialog::backdrop { background: #112418cc; }
.parent-photo-dialog [hidden] { display: none !important; }
.parent-photo-dialog .parent-photo-loading { display: grid; place-items: center; min-height: 200px; margin: 0; padding: 24px; text-align: center; color: #657067; background: #f7f2e7; border-radius: 6px; }
.parent-photo-dialog h2 { margin: 0 44px 0 0; font-size: 34px; line-height: 1.2; }
.parent-photo-dialog p { margin: 8px 0 18px; color: #657067; }
.parent-photo-dialog img { display: block; width: 100%; max-height: 65vh; object-fit: contain; border-radius: 6px; }
.parent-photo-close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #edf4ed; color: var(--forest, #274e32); font-size: 28px; cursor: pointer; }
.parent-photo-link:focus-visible, .parent-photo-close:focus-visible { outline: 3px solid var(--forest, #274e32); outline-offset: 3px; }

@media (max-width: 750px) {
  .photo-gallery { height: 280px; }
}
