.image-viewer-trigger { cursor: zoom-in; }
button.image-viewer-trigger {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--card-radius);
  background: transparent;
  line-height: 0;
}
.portal-cel-photos .image-viewer-trigger { display: block; border-radius: var(--card-radius); }
html:has(.image-viewer[open]) { overflow: hidden; }
.image-viewer {
  width: min(1360px, calc(100% - 32px));
  height: min(960px, calc(100vh - 32px));
  height: min(960px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff25;
  border-radius: 16px;
  background: #0d1722;
  color: #fff;
  box-shadow: 0 20px 70px #0006;
}
.image-viewer::backdrop { background: #070d16e8; }
.image-viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
}
.image-viewer-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 14px 6px;
}
.image-viewer-stage {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  margin: 0 14px 10px;
  overflow: hidden;
  place-items: center;
  touch-action: pan-y pinch-zoom;
}
.image-viewer-stage img, .image-viewer-status { grid-area: 1 / 1; }
.image-viewer-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.image-viewer-status {
  margin: 0;
  padding: 12px 16px;
  color: #d6e0ea;
  text-align: center;
  font-size: 14px;
}
.image-viewer-status:empty { padding: 0; }
.image-viewer-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 14px 12px;
  border-top: 1px solid #ffffff1c;
}
.image-viewer [hidden] { display: none; }
.image-viewer button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid #ffffff38;
  border-radius: 50%;
  background: #ffffff10;
  color: #fff;
  cursor: pointer;
}
.image-viewer button:is(:hover, :focus-visible) { border-color: #ffffff80; background: #ffffff25; }
.image-viewer button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.image-viewer button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.image-viewer-count {
  min-width: 60px;
  margin: 0;
  color: #e6edf4;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
@media (min-width: 641px) {
  .image-viewer-panel { grid-template-rows: minmax(0, 1fr) auto; }
  .image-viewer-toolbar { position: absolute; z-index: 1; inset: 10px 12px auto auto; padding: 0; }
  .image-viewer-toolbar button { background: #0d1722e6; }
  .image-viewer-toolbar button:is(:hover, :focus-visible) { background: #243649; }
  .image-viewer-stage { margin-top: 10px; }
}
@media (max-width: 640px) {
  .image-viewer {
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .image-viewer-toolbar { padding-top: max(10px, env(safe-area-inset-top)); }
  .image-viewer-stage { margin-inline: 0; }
  .image-viewer-controls { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
