/* Venue prints (core/venue/003) — inv01_v2 w2 (A1397, D-043): a card per venue (up to 3), each with its real photos
   as prints — a 4:3 lead print and one or two small matted prints tilted over its lower edge — then the venue, the
   address, the events held there and Get directions. A venue with no photos shows the skin's medallion, never an empty
   frame. Venues past the third are short lines with a Directions button. A light part over the skin's light ground.
   Still states: the base CSS is the still look (lead image 100% tall, nothing moved). The window parallax switches on
   only when the script adds .is-par, and the lite look switches it straight back off. The viewer (a <dialog>) is made
   by the script on the first tap; without the script the photo link opens the photo itself. */
.vn003 { background: var(--k-light-ground); color: var(--k-ink); }
.vn003__inner {
  position: relative; z-index: 1;
  max-width: calc(1040px + 2 * var(--k-gutter)); margin: 0 auto;
  padding: var(--k-section-pad) var(--k-gutter) 0; text-align: center;
}
.vn003 .k-kicker + .k-title { margin-top: var(--k-s-2); }

/* The cards */
.vn003__list { display: grid; gap: var(--k-s-8); max-width: 640px; margin: var(--k-s-7) auto 0; }
.vn003__card {
  padding: var(--k-s-3);
  background: var(--k-card); border: 1px solid rgb(var(--c-primary-rgb) / .12); border-radius: 6px;
  box-shadow: 0 1px 0 rgb(var(--c-primary-rgb) / .05), 0 24px 48px -30px rgb(var(--c-primary-rgb) / .55);
}
@media (min-width: 768px) { .vn003__card { padding: var(--k-s-4); } }

/* The prints */
.vn003__prints { position: relative; }
.vn003__lead {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px;
  background: rgb(var(--c-secondary-rgb) / .14);
}
.vn003__lead-img {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: var(--vn003-pos, 50% 50%);
}
/* window parallax: the image is taller than its frame and slides inside it (the script tweens yPercent -6 -> 6) */
.vn003.is-par .vn003__lead-img { top: -8%; height: 116%; }
.vn003__rest {
  position: relative; z-index: 1; display: flex; justify-content: space-between; gap: var(--k-s-3);
  margin-top: -28px; padding: 0 6%;
}
.vn003__rest--one { justify-content: flex-end; }
.vn003__small { display: block; width: 42%; }
.vn003__rest--one .vn003__small { width: 46%; }
.vn003__small-img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; padding: 6px; background: #fff; border-radius: 2px;
  object-fit: cover; object-position: var(--vn003-pos, 50% 50%);
  box-shadow: 0 12px 24px -14px rgb(var(--c-primary-rgb) / .6), 0 1px 2px rgb(58 52 49 / .08);
  transform: rotate(-2deg);
}
.vn003__small + .vn003__small .vn003__small-img { transform: rotate(2.5deg); }
.vn003__lead:focus-visible, .vn003__small:focus-visible { outline-offset: 4px; }
html.kjy-lite .vn003.is-par .vn003__lead-img { top: 0; height: 100%; transform: none !important; }
html.kjy-lite .vn003 .vn003__small { transform: none !important; }
.vn003__orn { width: 72px; height: 72px; margin: var(--k-s-5) auto 0; color: var(--c-secondary); }

/* The details */
.vn003__info { padding: var(--k-s-5) var(--k-s-2) var(--k-s-3); }
.vn003__name {
  font: 600 clamp(1.375rem, 5.6vw, 1.75rem)/1.25 var(--k-font-display); color: var(--c-primary-deep);
  overflow-wrap: anywhere; text-wrap: balance;
}
.vn003__addr {
  max-width: 34ch; margin: var(--k-s-2) auto 0;
  font: 500 1rem/1.5 var(--k-font-body); color: var(--k-ink-soft); text-wrap: balance;
}
/* each event on two lines (name, then day and time), so a long line never leaves "pm" on its own */
.vn003__events { display: grid; gap: var(--k-s-3); margin-top: var(--k-s-4); font: 500 1rem/1.45 var(--k-font-body); color: var(--k-ink); }
.vn003__ev, .vn003__when { display: block; }
.vn003__ev { font-weight: 600; }
.vn003__when { color: var(--k-ink-soft); }
.vn003__dot {
  display: inline-block; width: 6px; height: 6px; margin: 0 var(--k-s-2) 2px 0;
  border-radius: 50%; background: var(--c-secondary); vertical-align: middle;
}
.vn003__go { margin-top: var(--k-s-5); }
.vn003__btn { gap: 10px; }
.vn003__ico { width: 18px; height: 18px; flex: none; }

/* Venues past the third */
.vn003__more {
  max-width: 640px; margin: var(--k-s-7) auto 0; border-top: 1px solid var(--k-line);
}
.vn003__more-item { padding: var(--k-s-5) 0; border-bottom: 1px solid var(--k-line); }
.vn003__more-name { font: 600 1.25rem/1.3 var(--k-font-display); color: var(--c-primary-deep); overflow-wrap: anywhere; }
.vn003__more-ev { margin-top: var(--k-s-1); font: 500 1rem/1.45 var(--k-font-body); color: var(--k-ink-soft); text-wrap: balance; }
.vn003__more-btn { margin-top: var(--k-s-3); gap: 10px; }

/* Desktop: photos | details, alternating sides */
@media (min-width: 1200px) {
  .vn003__list { max-width: 1040px; gap: var(--k-s-9); }
  .vn003__card { padding: 20px; }
  .vn003__card:not(.vn003__card--plain) { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--k-s-7); align-items: center; }
  .vn003__card:not(.vn003__card--plain):nth-child(even) { grid-template-columns: 1fr 1.2fr; }
  .vn003__card:not(.vn003__card--plain):nth-child(even) .vn003__prints { order: 2; }
  .vn003__card--plain { width: 100%; max-width: 640px; justify-self: center; }
  .vn003__card:not(.vn003__card--plain) .vn003__info { padding: var(--k-s-4) var(--k-s-4) var(--k-s-6); }
  .vn003__rest { margin-top: -40px; }
}

/* The viewer: the paper covers the whole page (no dark overlay); the photo sits on a white mat */
.vn003__view {
  position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: var(--k-paper, #FBF7F1); color: var(--k-ink);
  overflow: hidden; overscroll-behavior: contain; touch-action: pinch-zoom;
}
.vn003__view::backdrop { background: var(--k-paper, #FBF7F1); }
.vn003__view[open] { animation: vn003-in .22s ease-out; }
@keyframes vn003-in { from { opacity: 0; } }
.vn003__view-in {
  height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "fig fig" "prev next"; align-items: center; gap: var(--k-s-4);
  padding: calc(76px + env(safe-area-inset-top)) var(--k-s-4) calc(var(--k-s-5) + env(safe-area-inset-bottom));
}
.vn003__view-fig {
  grid-area: fig; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 0; min-height: 0; height: 100%; margin: 0;
}
.vn003__view-img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: min(78vh, calc(100vh - 240px)); max-height: min(78svh, calc(100svh - 240px));
  object-fit: contain; padding: var(--k-s-2); background: #fff; border-radius: 2px; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  box-shadow: 0 18px 40px -24px rgb(var(--c-primary-rgb) / .55), 0 1px 2px rgb(58 52 49 / .08);
}
.vn003__view-cap {
  max-width: 60ch; margin-top: var(--k-s-3); text-align: center;
  font: italic 500 1rem/1.45 var(--k-font-body); color: var(--k-ink-soft);
}
.vn003__view-btn {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.vn003__view-btn[hidden] { display: none; }
.vn003__view-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vn003__view-close {
  position: absolute; z-index: 2; top: calc(var(--k-s-4) + env(safe-area-inset-top)); right: calc(var(--k-s-4) + env(safe-area-inset-right));
  background: var(--c-primary); color: #fff; border: 1px solid var(--c-primary);
  box-shadow: 0 8px 20px -10px rgb(var(--c-primary-rgb) / .7);
}
.vn003__view-close:active { background: var(--c-primary-dark); }
.vn003__view-prev, .vn003__view-next {
  background: var(--k-card); color: var(--c-primary); border: 1px solid rgb(var(--c-primary-rgb) / .3);
  box-shadow: 0 8px 20px -12px rgb(var(--c-primary-rgb) / .5);
}
.vn003__view-prev { grid-area: prev; justify-self: end; }
.vn003__view-next { grid-area: next; justify-self: start; }
@media (min-width: 768px) {
  .vn003__view-in {
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "prev fig next"; gap: var(--k-s-5);
    padding: calc(76px + env(safe-area-inset-top)) var(--k-s-5) var(--k-s-5);
  }
  .vn003__view-prev, .vn003__view-next { justify-self: center; }
  .vn003__view-img { padding: var(--k-s-3); max-height: min(78vh, calc(100vh - 180px)); max-height: min(78svh, calc(100svh - 180px)); }
}
@media (min-width: 1200px) {
  .vn003__view-in { padding: var(--k-s-5); }
  .vn003__view-img { max-height: min(84vh, calc(100vh - 130px)); max-height: min(84svh, calc(100svh - 130px)); }
}
