a[data-photo-src] { cursor: zoom-in; }
.company-products article > a[data-photo-src] { position: relative; z-index: 1; display: block; }
figure > a[data-photo-src], .book-viewport > a, .project-images a, .case-photo, .pattern-enlarge { display: block; }
.case-photo-open, .case-photo-open body { overflow: hidden; }
dialog.case-photo-viewer:not([open]), .case-photo-viewer [hidden] { display: none !important; }
.case-photo-viewer[open], .photo-standalone .case-photo-viewer {
  box-sizing: border-box; position: fixed; inset: 0; margin: auto; z-index: 10;
  width: min(100%, 1240px); height: min(94vh, 960px); height: min(94dvh, 960px);
  max-width: 100%; max-height: 100%; padding: 0; border: 0; border-radius: 4px;
  background: #201e1c; color: #fff8e8; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0; font: 16px/1.5 "Microsoft YaHei", "PingFang SC", sans-serif;
}
.case-photo-viewer::backdrop { background: rgb(16 14 12 / 86%); }
.case-photo-viewer :is(.photo-bar, header, .photo-controls) {
  position: static; width: auto; height: auto; display: flex; align-items: center; gap: 12px;
  justify-content: space-between; background: #322e29; color: inherit; padding: 10px 16px;
}
.case-photo-viewer .photo-controls { justify-content: center; flex-wrap: wrap; }
.case-photo-viewer :is(button, .photo-dismiss, .photo-reading) {
  box-sizing: border-box; flex: none; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid #a99d88; background: transparent; color: inherit;
  border-radius: 3px; padding: 5px 12px; min-height: 44px; font: inherit; line-height: 1.3; text-decoration: none;
}
.case-photo-viewer :focus-visible { outline: 2px solid #ffce74; outline-offset: 2px; }
.case-photo-viewer button:disabled { opacity: .4; cursor: default; }
.case-photo-viewer .photo-name { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.case-photo-viewer .photo-stage { position: relative; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.case-photo-viewer .photo-stage img { display: block; max-width: none; max-height: none; width: 100%; height: 100%; object-fit: contain; }
.case-photo-viewer .photo-stage.enlarged img { width: auto; height: auto; min-width: 140%; margin: 0 auto; }
.case-photo-viewer .photo-error { padding: 20px; text-align: center; }
.photo-standalone { margin: 0; background: #211e1c; }
.photo-standalone .case-photo-viewer { grid-template-rows: auto minmax(0, 1fr); }
article.catalog-art > .catalog-caption { display: flex; }
@media (max-width: 720px), (max-height: 500px) {
  .case-photo-viewer[open], .photo-standalone .case-photo-viewer { width: 100%; height: 100%; border-radius: 0; }
  .case-photo-viewer :is(.photo-bar,header) { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
  .case-photo-viewer .photo-controls { gap: 6px; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); }
  .case-photo-viewer :is(button,.photo-reading) { padding-inline: 9px; }
}
