.dec-photo-viewer {
  max-width: none;
  max-height: none;
  width: min(94vw, 75rem);
  padding: 0;
  border: 0;
  border-radius: .75rem;
  color: #fff8ef;
  background: #26191e;
}

.dec-photo-viewer::backdrop { background: rgb(20 12 15 / 88%); }
html:has(.dec-photo-viewer[open]) { overflow: hidden; }

.dec-photo-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  padding: .5rem;
}

.dec-photo-panel img {
  grid-column: 2;
  width: 100%;
  height: min(68vh, 68dvh);
  object-fit: contain;
}

.dec-photo-panel p {
  grid-column: 1 / -1;
  padding: 0 .5rem .4rem;
  margin: 0;
  text-align: center;
  font-size: 1rem;
}

.dec-photo-panel button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #d8b7bb;
  border-radius: 50%;
  background: #572d37;
  color: #fff;
  cursor: pointer;
  font: 1.25rem/1 system-ui, sans-serif;
}

.dec-photo-panel button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dec-photo-panel [data-close] { grid-column: 3; justify-self: end; grid-row: 1; }
.dec-photo-panel [data-prev] { grid-column: 1; grid-row: 2; }
.dec-photo-panel [data-next] { grid-column: 3; grid-row: 2; }
.dec-photo-panel img { grid-row: 2; }

@media (max-width: 38rem) {
  .dec-photo-panel img { grid-row: 2; grid-column: 1 / -1; height: min(59vh, 59dvh); }
  .dec-photo-panel [data-prev], .dec-photo-panel [data-next] { grid-row: 3; }
  .dec-photo-panel p { grid-row: 3; grid-column: 2; }
}
