.case-gallery-shot .case-fullscreen-open {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #252019;
  cursor: zoom-in;
}
/* Keep the click target invisible over the image in every button state. */
:root[data-theme] .case-gallery-shot .case-fullscreen-open,
:root[data-theme] .case-gallery-shot .case-fullscreen-open:hover {
  --button-fill: transparent;
  --button-line: transparent;
  --button-ink: var(--site-button-ink);
}
:root[data-theme="dark"] .case-gallery-shot .case-fullscreen-open span {
  border-color: var(--site-button-line);
  background: var(--site-button-fill);
  color: var(--site-button-ink);
}
@media (hover: hover) {
  :root[data-theme="dark"] .case-gallery-shot .case-fullscreen-open:hover span {
    border-color: var(--site-button-hover);
    background: var(--site-button-hover);
    color: var(--site-button-hover-ink);
  }
}
.case-fullscreen-open[hidden] { display: none; }
.case-fullscreen-open span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d8cfc1;
  border-radius: 9px;
  background: #faf7f0;
  font-size: 22px;
  line-height: 1;
}
.case-fullscreen-open:hover span { background: #f4e6d6; }
.case-fullscreen-open:focus-visible { outline: 2px solid var(--orange-text); outline-offset: -3px; }

:root.case-fullscreen-active { overflow: hidden; }
.case-fullscreen {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 0;
  background: #1a1919;
  color: #f7f0e6;
}
.case-fullscreen[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.case-fullscreen:not([open]) { display: none; }
.case-fullscreen::backdrop { background: #1a1919; }
.case-fullscreen-bar {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: max(9px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 9px max(10px, env(safe-area-inset-left));
  border-bottom: 1px solid #514942;
  background: #252221;
}
.case-fullscreen-bar .case-fullscreen-title {
  margin: 0;
  color: inherit;
  font-size: clamp(14px, 2.25vw, 22px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.case-fullscreen-controls { display: flex; align-items: center; gap: clamp(3px, .8vw, 10px); }
.case-fullscreen-controls button {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #70645a;
  border-radius: 10px;
  background: #302b28;
  color: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.case-fullscreen-controls button:hover { background: #473b32; }
.case-fullscreen-controls button:focus-visible { outline: 2px solid #ffb78a; outline-offset: 2px; }
.case-fullscreen-controls output {
  min-width: 43px;
  color: #e6d9cc;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.case-fullscreen-controls [data-case-full-close] { margin-inline-start: 3px; }
.case-fullscreen-image {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.case-fullscreen-image picture {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.case-fullscreen-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-fullscreen-image[data-case-full-swipe],
[data-case-inline-swipe].is-ready .case-gallery-shot {
  touch-action: pan-y;
  touch-action: pan-y pinch-zoom;
}
