.detail-photo-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  cursor: zoom-in;
}
.detail-photo-open:focus-visible {
  outline: 3px solid #ff7d00;
  outline-offset: 4px;
}
.photo-enlarge-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid #ffffff40;
  border-radius: 7px;
  background: #15181ce8;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
}
.photo-enlarge-label svg {
  width: 18px;
  height: 18px;
}
html.photo-viewer-open {
  overflow: hidden;
}
#photo-viewer {
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px 24px;
  border: 0;
  border-radius: 0;
  background: #15181c;
  color: #fff;
  overflow: hidden;
}
#photo-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}
.photo-viewer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
#photo-viewer .photo-viewer-header h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.4;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#photo-viewer button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid #ffffff40;
  border-radius: 9px;
  background: #ffffff12;
  color: #fff;
  cursor: pointer;
}
#photo-viewer button:hover:not(:disabled) {
  background: #ffffff26;
}
#photo-viewer button:focus-visible {
  outline: 3px solid #ffae00;
  outline-offset: 2px;
}
#photo-viewer button:disabled {
  opacity: 0.35;
  cursor: default;
}
#photo-viewer button svg {
  width: 22px;
  height: 22px;
}
.viewer-previous-icon {
  transform: rotate(180deg);
}
.photo-viewer-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: zoom-in;
}
.photo-viewer-stage.is-zoomed {
  cursor: grab;
}
.photo-viewer-stage.is-zoomed:active {
  cursor: grabbing;
}
.photo-viewer-image {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.photo-viewer-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: #e3e6e9;
}
.photo-viewer-status[hidden] {
  display: none;
}
.photo-viewer-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
}
.photo-viewer-navigation,
.photo-viewer-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.photo-viewer-counter {
  min-width: 100px;
  text-align: center;
  font-size: 14px;
}
.photo-viewer-zoom output {
  min-width: 55px;
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.photo-viewer-instructions {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  color: #c9cdd2;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 600px) {
  #photo-viewer {
    padding: 8px 12px max(12px, env(safe-area-inset-bottom));
  }
  #photo-viewer[open] {
    gap: 8px;
  }
  #photo-viewer .photo-viewer-header h2 {
    font-size: 16px;
  }
  .photo-viewer-footer {
    flex-direction: column;
    gap: 8px;
  }
  .photo-viewer-instructions {
    flex-basis: auto;
    font-size: 12px;
  }
  .photo-enlarge-label {
    right: 8px;
    bottom: 8px;
    padding: 8px 10px;
  }
}
