/* Shared screenshot viewer. The native dialog supplies modality and Escape. */
html.lightbox-open { overflow: hidden; }
[data-lightbox] { cursor: zoom-in; }
.frame-lightbox {
  --lightbox-accent: #2cb4fb;
  color-scheme: dark;
  color: #e9f8ff;
  background: #091c28;
  border: 1px solid #36505f;
  border-top: 2px solid var(--lightbox-accent);
  border-radius: 6px;
  box-shadow: 0 24px 100px rgb(0 0 0 / 65%);
  padding: 0;
  margin: auto;
  width: min(1240px, calc(100% - 48px));
  height: min(940px, calc(100% - 48px));
  height: min(940px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  overflow: hidden;
}
.frame-lightbox[open] { display: flex; flex-direction: column; }
.frame-lightbox::backdrop { background: rgb(1 9 15 / 88%); }
.lightbox-header { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 24px; border-bottom: 1px solid var(--line, #29414f); }
.lightbox-heading { min-width: 0; }
.lightbox-eyebrow { color: var(--lightbox-accent); margin: 0 0 7px; font: 10px/1.5 var(--mono, monospace); text-transform: uppercase; letter-spacing: .1em; }
.lightbox-heading h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.025em; margin: 0; font-weight: 600; }
.lightbox-actions { display: flex; flex-shrink: 0; gap: 10px; }
.frame-lightbox button { min-height: 44px; min-width: 44px; border: 1px solid #486272; border-radius: 4px; background: #102936; color: #e9f8ff; font-family: inherit; font-size: 12px; line-height: 1.4; font-weight: 600; padding: 10px 15px; touch-action: manipulation; cursor: pointer; }
.frame-lightbox button:hover:not(:disabled) { background: #193746; border-color: var(--lightbox-accent); }
.frame-lightbox button:focus-visible, .lightbox-stage:focus-visible, #frame-lightbox-caption:focus-visible { outline: 3px solid var(--lightbox-accent); outline-offset: -4px; }
.frame-lightbox button:disabled { opacity: .4; cursor: default; }
#frame-lightbox-close { display: flex; align-items: center; gap: 8px; border-color: var(--lightbox-accent); }
#frame-lightbox-close > span { font-size: 23px; line-height: 1; font-weight: 400; }
#frame-lightbox-zoom[aria-pressed="true"] { color: var(--lightbox-accent); border-color: var(--lightbox-accent); }
.lightbox-stage { position: relative; flex: 1 1 0; min-height: 0; min-width: 0; width: 100%; padding: 22px; background: #03121a; overflow: auto; overscroll-behavior: contain; }
.lightbox-image-area { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
#frame-lightbox-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.frame-lightbox[data-zoom="full"] .lightbox-image-area { display: block; width: max-content; min-width: 100%; height: max-content; min-height: 100%; }
.frame-lightbox[data-zoom="full"] #frame-lightbox-image { max-width: none; max-height: none; margin: auto; }
.lightbox-feedback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; gap: 10px; }
.lightbox-feedback p { color: #b8ccd8; font-size: 14px; line-height: 1.7; max-width: 430px; margin: 0; }
.lightbox-footer { flex-shrink: 0; padding: 17px 24px; border-top: 1px solid var(--line, #29414f); }
#frame-lightbox-caption { max-height: 19vh; max-height: 19dvh; overflow: auto; overscroll-behavior: contain; margin: 0 0 13px; color: #bfd2de; font-size: 13px; line-height: 1.7; }
.lightbox-navigation-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#frame-lightbox-counter { font: 10px/1.6 var(--mono, monospace); color: var(--lightbox-accent); }
#frame-lightbox-navigation { display: flex; gap: 9px; }
#frame-lightbox-navigation button { padding: 8px 13px; font-size: 20px; line-height: 1; }
@media (max-width: 640px) {
  .frame-lightbox { width: calc(100% - 20px); height: calc(100% - 20px); height: calc(100dvh - 20px); border-radius: 4px; }
  .lightbox-header { flex-wrap: wrap; gap: 13px; padding: 16px; }
  .lightbox-heading { width: 100%; }
  .lightbox-heading h2 { font-size: 18px; }
  .lightbox-eyebrow { font-size: 9px; margin-bottom: 4px; }
  .lightbox-actions { width: 100%; justify-content: space-between; }
  .lightbox-stage { padding: 12px; }
  .lightbox-footer { padding: 13px 16px; }
  #frame-lightbox-caption { font-size: 12px; margin-bottom: 10px; }
}
@media (max-height: 500px) and (min-width: 500px) {
  .frame-lightbox { width: calc(100% - 20px); height: calc(100% - 20px); height: calc(100dvh - 20px); }
  .lightbox-header { padding: 10px 16px; gap: 16px; flex-wrap: nowrap; }
  .lightbox-heading, .lightbox-actions { width: auto; }
  .lightbox-heading h2 { font-size: 16px; }
  .lightbox-eyebrow { display: none; }
  .lightbox-stage { padding: 10px; }
  .lightbox-footer { display: flex; align-items: center; gap: 20px; padding: 10px 16px; }
  #frame-lightbox-caption { margin: 0; font-size: 11px; }
  .lightbox-navigation-row { flex: 0 0 auto; gap: 12px; }
}
@media (forced-colors: active) {
  .frame-lightbox { border: 2px solid CanvasText; background: Canvas; color: CanvasText; }
  .frame-lightbox::backdrop { background: Canvas; opacity: .85; }
  .frame-lightbox button { color: ButtonText; background: ButtonFace; border-color: ButtonText; }
  .frame-lightbox button:focus-visible, .lightbox-stage:focus-visible, #frame-lightbox-caption:focus-visible { outline-color: Highlight; }
}
