/* Loaded only on article views. Native dialog keeps the rest of the page inert. */
.gc-lightbox-trigger { cursor: zoom-in; }
.gc-lightbox-trigger:focus-visible { outline: 3px solid var(--gc-accent, #dfb76a); outline-offset: 5px; }
.gc-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border: 0;
  background: rgba(12, 13, 15, .97);
  color: #f2f0e9;
  overflow: hidden;
  font: 16px/1.6 var(--gc-font, system-ui, sans-serif);
}
.gc-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px; }
.gc-lightbox::backdrop { background: #0c0d0f; }
.gc-lightbox__header { display: flex; align-items: center; gap: 16px; width: 100%; }
.gc-lightbox__title { margin: 0; font-size: clamp(16px, 1.2vw, 18px); font-weight: 600; line-height: 1.5; }
.gc-lightbox__counter { margin-left: auto; font-size: 14px; color: #c1bcb3; font-variant-numeric: tabular-nums; }
.gc-lightbox__button {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #5b5243;
  border-radius: 50%;
  background: rgba(30, 30, 31, .9);
  color: #f2f0e9;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gc-lightbox__button:hover { color: #dfb76a; border-color: #dfb76a; background: #302a21; }
.gc-lightbox__button:disabled { opacity: .4; cursor: default; }
.gc-lightbox__button:focus-visible, .gc-lightbox__original:focus-visible { outline: 3px solid #dfb76a; outline-offset: 3px; }
.gc-lightbox__symbol { display: block; font: 36px/1 Arial, sans-serif; transform: translateY(-1px); }
.gc-lightbox__stage { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; grid-template-rows: minmax(0, 1fr); gap: 16px; align-items: center; min-height: 0; }
.gc-lightbox__image-area { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; width: 100%; height: 100%; min-height: 0; min-width: 0; overflow: hidden; touch-action: none; overscroll-behavior: contain; }
.gc-lightbox__image { grid-area: 1 / 1; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; transform-origin: center center; cursor: zoom-in; }
.gc-lightbox__image-area.is-zoomed { cursor: grab; }
.gc-lightbox__image-area.is-zoomed .gc-lightbox__image { cursor: grab; }
.gc-lightbox__image-area.is-dragging, .gc-lightbox__image-area.is-dragging .gc-lightbox__image { cursor: grabbing; }
.gc-lightbox__button--prev { grid-column: 1; grid-row: 1; }
.gc-lightbox__button--next { grid-column: 3; grid-row: 1; }
.gc-lightbox__status { grid-area: 1 / 1; max-width: 32em; margin: 0; padding: 16px; font-size: 16px; text-align: center; color: #d2c9ba; }
.gc-lightbox__toolbar { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
.gc-lightbox__toolbar .gc-lightbox__button { width: 44px; min-width: 44px; height: 44px; }
.gc-lightbox__toolbar .gc-lightbox__symbol { font-size: 28px; }
.gc-lightbox__zoom-level { min-width: 46px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; color: #e6d6b9; }
.gc-lightbox__reset { min-height: 44px; padding: 8px 14px; border: 1px solid #5b5243; border-radius: 22px; background: #1e1e1f; color: #f2f0e9; font: inherit; font-size: 14px; cursor: pointer; touch-action: manipulation; }
.gc-lightbox__reset:hover { border-color: #dfb76a; color: #dfb76a; }
.gc-lightbox__reset:focus-visible { outline: 3px solid #dfb76a; outline-offset: 3px; }
.gc-lightbox__reset:disabled { opacity: .4; cursor: default; }
.gc-lightbox__hint { color: #b6b1a8; font-size: 13px; margin-left: 8px; }
.gc-lightbox__footer { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 0 64px; min-height: 44px; }
.gc-lightbox__caption { margin: 0; max-height: 18vh; max-height: 18dvh; overflow: auto; font-size: clamp(14px, 1vw, 16px); line-height: 1.65; color: #d8d5cf; overflow-wrap: anywhere; }
.gc-lightbox__original { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; font-size: 14px; color: #dfb76a; text-underline-offset: 4px; }
.gc-lightbox__original:hover { color: #f1d198; text-decoration: underline; }
.gc-lightbox [hidden] { display: none !important; }
@media (max-width: 600px) {
  .gc-lightbox { padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .gc-lightbox__stage { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .gc-lightbox__image-area { grid-column: 1; }
  .gc-lightbox__button--prev, .gc-lightbox__button--next { position: absolute; grid-column: auto; z-index: 1; width: 44px; min-width: 44px; height: 44px; background: rgba(20, 20, 22, .82); }
  .gc-lightbox__button--prev { left: 0; }
  .gc-lightbox__button--next { right: 0; }
  .gc-lightbox__footer { padding: 0; gap: 12px; justify-content: space-between; }
  .gc-lightbox__toolbar { gap: 8px; }
  .gc-lightbox__hint { flex-basis: 100%; text-align: center; margin: 0; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .gc-lightbox { gap: 4px; padding-block: 4px; }
  .gc-lightbox__header { min-height: 44px; }
  .gc-lightbox__button--close { width: 44px; min-width: 44px; height: 44px; }
  .gc-lightbox__caption { max-height: 44px; }
  .gc-lightbox__hint { display: none; }
}
@media print { .gc-lightbox { display: none !important; } }
