.native-photo-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: clamp(0.75rem, 2.5vw, 2rem);
  background: #0d1937;
  color: #fff;
  overflow: hidden;
}
.native-photo-viewer:not([open]) {
  display: none;
}
.native-photo-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1rem;
}
.native-photo-viewer::backdrop {
  background: rgb(6 16 38 / 90%);
}
.native-photo-viewer__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.native-photo-viewer__counter {
  font-size: clamp(0.875rem, 2vw, 1rem);
}
.native-photo-viewer__button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #9ca9c6;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.native-photo-viewer__button:hover {
  background: #263b69;
}
.native-photo-viewer__button:focus-visible {
  outline: 3px solid #f6d667;
  outline-offset: 3px;
}
.native-photo-viewer__button[hidden] {
  display: none;
}
.native-photo-viewer__stage {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: clamp(0.25rem, 2vw, 1.5rem);
  min-height: 0;
}
.native-photo-viewer__picture {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.native-photo-viewer__picture img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 1rem;
}
.native-photo-viewer__picture img[hidden] {
  display: none;
}
.native-photo-viewer__picture p {
  font-size: 1rem;
}
.native-photo-viewer__picture p[hidden] {
  display: none;
}
.native-photo-viewer__caption {
  min-height: 1.5em;
  margin: 0;
  text-align: center;
  font-size: clamp(0.875rem, 2vw, 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  .native-photo-viewer__button {
    transition: background 180ms ease;
  }
}
.native-video-panel {
  width: 100%;
  max-width: 42rem;
  aspect-ratio: 16 / 9;
  margin: 1rem auto 1.5rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #0d1937;
}
.native-video-panel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.native-content a.native-video-fallback {
  display: inline-flex;
  font-size: 1rem;
}
@media print {
  .native-video-panel {
    display: none;
  }
}
/* Photo expansion is a compact action; philosophical text keeps its disclosure layout. */
.native-content .native-photo-expander {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  margin-block: 1.25rem;
}
.native-expanded-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
  padding-top: 1.25rem;
}
.native-expanded-photos > .native-photo {
  margin: 0;
  max-width: none;
}
.native-expanded-photos > .native-photo img {
  width: 100%;
}
.native-photo-peek {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  display: flex;
  gap: 1.25rem;
  height: 7rem;
  overflow: hidden;
  margin-top: 1.25rem;
  pointer-events: none;
  mask-image: linear-gradient(#000 5%, transparent 100%);
}
.native-photo-peek > img {
  display: block;
  width: 0;
  flex: 1;
  min-width: 0;
  height: 13rem;
  object-fit: cover;
  border-radius: 1.25rem;
}
.native-photo-peek:has(+ .native-photo-expander[open]) {
  display: none;
}
.native-photo-peek + .native-photo-expander {
  margin-top: 0.5rem;
}
@media print {
  .native-photo-peek {
    display: none;
  }
}
/* Keep the reveal action physically attached to its photo preview. */
.native-photo-peek + .native-photo-expander:not([open]) {
  margin-top: -2.25rem;
  position: relative;
}
.native-photo-peek + .native-photo-expander:not([open]) > summary {
  margin-inline: auto;
  background: var(--paper, #f6f5f0);
  box-shadow: 0 0.3rem 1rem #10247115;
}
