html.jv-locked, .jv-locked body { overflow: hidden; overscroll-behavior: none; }

.jv {
  position: fixed;
  inset: 0;
  z-index: 10000;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
           max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border: 0;
  background: #131311;
  color: #f7f5ef;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
  overflow: hidden;
  overscroll-behavior: contain;
}
.jv:not([open]) { display: none; }
.jv[open] {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px 12px;
}
.jv::backdrop { background: #131311; }
.jv-bar {
  grid-area: 1 / 1 / 2 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.jv-collection {
  flex: 1;
  font-size: .75rem;
  line-height: 1.4;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.jv-position { color: #c6c5bf; font-size: .8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jv .jv-button {
  appearance: none;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid #4a4a45;
  border-radius: 50%;
  background: transparent;
  color: #fbfaf6;
  cursor: pointer;
  touch-action: manipulation;
}
.jv .jv-button:disabled { opacity: .28; cursor: default; }
.jv .jv-button:focus-visible, .jv .jv-error a:focus-visible { outline: 2px solid #f1e5c7; outline-offset: 3px; }
@media (hover: hover) { .jv .jv-button:hover:enabled { background: #343430; border-color: #72726d; } }
.jv-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.jv-next svg { transform: rotate(180deg); }
.jv .jv-close { border-color: transparent; }
.jv-back { grid-area: 2 / 1; align-self: center; justify-self: start; }
.jv-next { grid-area: 2 / 3; align-self: center; justify-self: end; }
.jv-stage {
  grid-area: 2 / 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  touch-action: pan-y pinch-zoom;
}
.jv-stage > .jv-media {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
}
.jv-stage > img { user-select: none; }
.jv-stage > video { background: #060606; }
.jv-caption {
  grid-area: 3 / 1 / 4 / -1;
  max-width: 100%;
  min-width: 0;
  padding: 8px 0;
  text-align: center;
  align-self: center;
}
.jv-title { font-family: "Baskervville", Georgia, serif; font-size: clamp(1.125rem, 2.8vw, 1.625rem); font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.jv-error { margin: 12px; text-align: center; color: #e1dfd7; }
.jv-error a { color: inherit; text-decoration: underline; }

@media (max-width: 700px) {
  .jv { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .jv[open] { grid-template-columns: minmax(0, 1fr) 46px 46px; gap: 8px; }
  .jv-stage { grid-area: 2 / 1 / 3 / -1; margin: 0 -14px; }
  .jv-caption { grid-area: 3 / 1; text-align: left; }
  .jv-back { grid-area: 3 / 2; }
  .jv-next { grid-area: 3 / 3; }
  .jv-bar { gap: 8px; }
}
@media (max-height: 480px) and (min-aspect-ratio: 3/2) {
  .jv { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .jv[open] { gap: 2px 8px; }
  .jv-caption { padding-block: 2px; }
}
