/* 1.0.54: keep wide media clear of the dossier sidebar at every breakpoint. */
.article-layout--has-dossier .gh-content .kg-width-wide,
.article-layout--has-dossier .gh-content .kg-width-full {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  transform: none;
}
.gh-content .kg-gallery-container { max-width: 100%; }
.gh-content figcaption { overflow-wrap: anywhere; }
.mobile-reader-actions { display: none; }
@media (max-width: 980px) {
  .main-nav { max-height: calc(100dvh - 72px); overflow-y: auto; }
  .mobile-reader-actions {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
    margin-top: .5rem;
    padding-top: .5rem;
  }
  .mobile-reader-actions .text-button {
    min-height: 48px;
    padding: 1rem 0;
    text-align: left;
    font-weight: 700;
  }
}
.gallery-image-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.gallery-image-button img { width: 100%; height: auto; }
.gallery-image-button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.gallery-viewer {
  width: min(1200px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 16px;
  border: 0;
  border-radius: 4px;
  background: #111;
  color: #fff;
}
.gallery-viewer::backdrop { background: rgb(0 0 0 / .85); }
.gallery-viewer__controls { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gallery-viewer button { min-height: 44px; padding: 8px 12px; color: #fff; background: #333; border: 1px solid #777; border-radius: 3px; cursor: pointer; }
.gallery-viewer button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gallery-viewer__image { display: block; width: 100%; height: auto; max-height: calc(100dvh - 190px); object-fit: contain; }
.gallery-viewer__caption { margin: 12px 0 0; font-size: .85rem; overflow-wrap: anywhere; }
.gallery-viewer__status { margin: 0; white-space: nowrap; font-size: .85rem; }
@media (max-width: 480px) {
  .gallery-viewer { padding: 12px; }
  .gallery-viewer__controls { flex-wrap: wrap; gap: 8px; }
  .gallery-viewer button { padding-inline: 8px; font-size: .8rem; }
}

.kg-gallery-image { position: relative; }
.kg-gallery-image > .gallery-image-button { position: absolute; inset: 0; z-index: 1; }
