.ef-gallery {
  min-width: 0;
  margin: 0 0 clamp(24px, 4vw, 40px);
  overflow: hidden;
  border: 1px solid var(--ef-line, #d3ddd3);
  border-radius: 15px;
  background: #fff;
  color: var(--ef-ink, #162823);
}
.ef-gallery [hidden] { display: none !important; }
.ef-gallery figure { margin: 0; }
.ef-gallery .efg-bar,
.ef-gallery .efg-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(12px, 2.4vw, 24px);
}
.ef-gallery .efg-bar {
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ef-line, #d3ddd3);
  background: #f5f7f3;
}
.ef-gallery .efg-languages,
.ef-gallery .efg-step-buttons { display: inline-flex; gap: 3px; align-items: center; }
.ef-gallery .efg-languages {
  padding: 2px;
  border: 1px solid #cbd6ce;
  border-radius: 8px;
  background: #fff;
}
.ef-gallery button {
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.15;
  color: var(--ef-ink, #162823);
  background: transparent;
  cursor: pointer;
}
.ef-gallery button:hover { background: #e7f2eb; }
.ef-gallery button[aria-pressed="true"] { background: var(--ef-dark, #0c202a); color: #fff; }
.ef-gallery .efg-count {
  margin-inline-start: auto;
  color: var(--ef-muted, #4a6058);
  font-size: .94rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ef-gallery .efg-full {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #145d49;
  font-size: .94rem;
  font-weight: 650;
  text-underline-offset: .2em;
}
.ef-gallery .efg-stage {
  display: grid;
  width: 100%;
  aspect-ratio: 1.95;
  place-items: center;
  overflow: hidden;
  background: #0a0a0f;
  cursor: zoom-in;
}
.ef-gallery.efg-ready .efg-stage { touch-action: pan-y pinch-zoom; }
.ef-gallery .efg-stage img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.ef-gallery .efg-caption { justify-content: space-between; min-height: 63px; }
.ef-gallery .efg-caption strong {
  font-size: clamp(1.02rem, 1.65vw, 1.28rem);
  line-height: 1.32;
  overflow-wrap: anywhere;
}
.ef-gallery .efg-step-buttons { flex-shrink: 0; gap: 6px; }
.ef-gallery .efg-step-buttons button { border-color: #bccbc1; }
.ef-gallery .efg-step-buttons button[aria-disabled="true"] {
  border-color: #dce3dd;
  color: #6a756e;
  background: #f5f6f4;
  cursor: default;
}
.ef-gallery .efg-reading { border-top: 1px solid var(--ef-line, #d3ddd3); }
.ef-gallery .efg-reading details + details { border-top: 1px solid var(--ef-line, #d3ddd3); }
.ef-gallery .efg-reading summary {
  padding: 12px clamp(12px, 2.4vw, 24px);
  color: #284c3f;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
.ef-gallery .efg-index h4 { margin: 10px 0 3px; font-size: 1rem; }
.ef-gallery.efg-ready .efg-index h4 { display: none; }
.ef-gallery .efg-index [data-efg-list],
.ef-gallery .efg-transcript { padding: 0 clamp(12px, 2.4vw, 24px) 18px; }
.ef-gallery .efg-index ol { margin: 0; padding-inline-start: 2.6em; }
.ef-gallery .efg-index li { padding-inline-start: .2em; }
.ef-gallery .efg-index li::marker { color: #4a6058; font-variant-numeric: tabular-nums; }
.ef-gallery .efg-index li a { display: inline-block; padding-block: 4px; color: #145d49; }
.ef-gallery .efg-index a[aria-current] { color: #172d24; font-weight: 750; }
.ef-gallery .efg-transcript { max-width: 78ch; }
.ef-gallery .efg-transcript p { margin: 0; white-space: pre-line; line-height: 1.55; }
.ef-gallery .efg-transcript p + p { margin-top: .65em; }
.ef-gallery :is(button, a, summary):focus-visible {
  outline: 3px solid #127f76;
  outline-offset: 1px;
}
.ef-gallery .efg-stage:focus-visible { outline: 3px solid #77e7de; outline-offset: -3px; }
.ef-gallery .efg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 620px) {
  .ef-gallery .efg-caption { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ef-gallery .efg-step-buttons { width: 100%; }
  .ef-gallery .efg-step-buttons button { flex: 1; min-height: 44px; }
  .ef-gallery .efg-languages button { min-height: 40px; }
  .ef-gallery .efg-bar { gap: 7px; }
}
@media print {
  .ef-gallery .efg-bar, .ef-gallery .efg-step-buttons, .ef-gallery .efg-reading { display: none; }
  .ef-gallery { break-inside: avoid; }
}
