/* Scoped country-photo controls; existing page captions and gallery layout remain. */
html.pf-country-lightbox-open { overflow: hidden; }
.pf-page-shell button.pf-country-photo-trigger {
  display: block; width: 100%; min-width: 0; max-width: 100%; height: auto;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  color: inherit; box-shadow: none; line-height: 0; cursor: zoom-in; transform: none;
}
.pf-page-shell button.pf-country-photo-trigger:hover,
.pf-page-shell button.pf-country-photo-trigger:active { background: transparent; box-shadow: none; transform: none; }
.pf-page-shell button.pf-country-photo-trigger:focus-visible { outline: 3px solid #9dba9d; outline-offset: 4px; }
.pf-page-shell button.pf-country-photo-trigger img { display: block; max-width: 100%; }
.pf-country-lightbox {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: #101311; color: #fff; box-shadow: none; overflow: hidden;
  overscroll-behavior: contain; box-sizing: border-box;
}
.pf-country-lightbox::backdrop { background: #101311; }
.pf-country-lightbox .pf-country-lightbox-stage {
  position: absolute; inset: calc(60px + env(safe-area-inset-top, 0px)) 16px calc(76px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0;
  touch-action: auto;
}
.pf-country-lightbox .pf-country-lightbox-stage img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 100%;
  object-fit: contain; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
.pf-country-lightbox button {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 48px; min-width: 48px; height: 48px; min-height: 48px; max-width: none;
  margin: 0; padding: 0; border: 1px solid rgba(255,255,255,.32); border-radius: 50%;
  background: rgba(16,19,17,.72); color: #fff; box-shadow: none;
  font: 38px/1 system-ui, sans-serif; letter-spacing: 0; text-transform: none;
  opacity: 1; cursor: pointer; z-index: 2; transform: none; touch-action: manipulation;
}
.pf-country-lightbox button:hover { background: rgba(55,63,57,.95); color: #fff; transform: none; }
.pf-country-lightbox button:active { background: #39453c; transform: none; }
.pf-country-lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pf-country-lightbox button.pf-country-lightbox-close {
  top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px));
  font-size: 32px;
}
.pf-country-lightbox button.pf-country-lightbox-prev {
  top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: calc(50% - 56px);
}
.pf-country-lightbox button.pf-country-lightbox-next {
  top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); right: calc(50% - 56px);
}
.pf-country-lightbox .pf-country-lightbox-counter {
  position: absolute; top: calc(23px + env(safe-area-inset-top, 0px)); left: calc(16px + env(safe-area-inset-left, 0px));
  color: #d4dbd5; font: 14px/1.2 system-ui, sans-serif; letter-spacing: .04em;
}
.pf-country-lightbox .pf-country-lightbox-status {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.pf-country-lightbox .pf-country-lightbox-message {
  max-width: 28em; margin: 24px; color: #e1e7e2; text-align: center; font: 16px/1.5 system-ui, sans-serif;
}
.pf-country-lightbox [hidden] { display: none !important; }
@media (max-width: 760px) {
  .pf-country-lightbox .pf-country-lightbox-stage {
    left: max(6px, env(safe-area-inset-left, 0px)); right: max(6px, env(safe-area-inset-right, 0px));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .pf-country-lightbox .pf-country-lightbox-stage { top: calc(56px + env(safe-area-inset-top, 0px)); bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .pf-country-lightbox .pf-country-lightbox-counter { text-shadow: 0 1px 4px #000; z-index: 2; }
}

/* Navigation has its own row: no control covers a photograph. */
.pf-country-lightbox button.pf-country-lightbox-prev,
.pf-country-lightbox button.pf-country-lightbox-next {
  width: 44px; min-width: 44px; height: 44px; min-height: 44px; font-size: 34px;
}

/* Photo controls only: defeat the theme button fill in every interaction state.
   The separate dark dialog and keyboard focus outlines remain unchanged. */
.pf-page-shell button.pf-country-photo-trigger { background: transparent !important; }

/* Restore the intended centered 120px desktop breakout for native country grids.
   At narrower widths the existing gallery layout remains unchanged. */
@media (min-width: 1000px) {
  .pf-page-shell .pf-country-gallery .pf-gallery-grid {
    margin-left: -60px !important;
  }
}
