html[data-commerce-entry] .loader { visibility: hidden; pointer-events: none; }
html:has(#portfolio-field[data-active]) #sound-cursor { visibility: hidden; pointer-events: none; }

#portfolio-field #commerce-gallery {
  --commerce-edge: #dce7ee30;
  --commerce-tone: #afb9c1;
  position: relative;
  padding: clamp(30px, 5vw, 64px) var(--orch-side) clamp(35px, 6vw, 76px);
  border-top: 1px solid var(--commerce-edge);
  background: radial-gradient(ellipse at 50% 56%, #1c242d, #141a21 72%, #10151b);
  scroll-margin-top: clamp(62px, 10vh, 95px);
}

#portfolio-field #commerce-gallery + .field-intro {
  min-height: auto;
  padding-block: clamp(68px, 13vh, 145px) clamp(42px, 8vh, 100px);
}

#commerce-gallery .commerce-header,
#commerce-gallery .commerce-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

#commerce-gallery .commerce-header { margin-bottom: clamp(22px, 3vw, 40px); }
#commerce-gallery h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.25vw, 4.15rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.065em;
}

#commerce-gallery .commerce-controls { display: flex; align-items: center; gap: 6px; }
#commerce-gallery .commerce-count {
  margin-right: 13px;
  color: var(--commerce-tone);
  font: .72rem/1 Consolas, monospace;
  white-space: nowrap;
}

#commerce-gallery .commerce-count b { color: var(--orch-paper); font-weight: 400; }
#portfolio-field #commerce-gallery .commerce-controls button,
#portfolio-field #commerce-gallery .commerce-full,
#portfolio-field #commerce-gallery .commerce-play,
#portfolio-field #commerce-gallery .commerce-visit,
#portfolio-field #commerce-gallery .commerce-page-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--commerce-edge);
  border-radius: 100px;
  background: #0e141b80;
  transition: background-color .18s ease, border-color .18s ease;
}

#portfolio-field #commerce-gallery .commerce-controls button {
  width: 44px;
  height: 44px;
  padding: 0 0 2px;
  font-size: 1.2rem;
  line-height: 1;
}

#portfolio-field #commerce-gallery :is(.commerce-controls button, .commerce-full, .commerce-play, .commerce-visit, .commerce-page-close):hover {
  background: #edf5fa1c;
  border-color: #dce7ee73;
}

#commerce-gallery .commerce-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#commerce-gallery .commerce-card > a { display: block; }
#commerce-gallery .commerce-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #222a33;
  box-shadow: 0 12px 32px #0005;
}

#commerce-gallery .commerce-media::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #fff3;
  border-radius: inherit;
  pointer-events: none;
}

#portfolio-field #commerce-gallery .commerce-media :is(img, video) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
}

#portfolio-field #commerce-gallery .commerce-media img[src$='/offlist-home.webp'] {
  object-fit: contain;
  object-position: center;
  background: #f8f7f3;
}

#portfolio-field #commerce-gallery .commerce-media img[src$='/electric-hearts.webp'] {
  width: 101.1%;
  max-width: none;
}

#commerce-gallery .commerce-private {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #232d37;
}

#commerce-gallery .commerce-private span {
  font: 400 clamp(1.85rem, 6vw, 5rem)/1 Georgia, serif;
  letter-spacing: -.05em;
}

#commerce-gallery .commerce-private small { color: var(--commerce-tone); font-size: .76rem; }
#commerce-gallery .commerce-card-caption { display: grid; gap: 2px; padding-top: 10px; }
#commerce-gallery .commerce-card-caption strong { font-weight: 500; }
#commerce-gallery .commerce-card-caption span { color: var(--commerce-tone); font-size: .82rem; }

#commerce-gallery[data-ready] {
  --commerce-frame: min(66%, 820px);
  --commerce-step: 82%;
  --commerce-scale: .54;
}

#commerce-gallery[data-ready] .commerce-window {
  display: grid;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

#commerce-gallery[data-ready] .commerce-card a { cursor: inherit; }
#commerce-gallery[data-dragging] .commerce-window { cursor: grabbing; user-select: none; }

#commerce-gallery[data-ready] .commerce-cards {
  position: relative;
  justify-self: center;
  display: block;
  width: var(--commerce-frame);
  aspect-ratio: 16 / 9;
  margin-block: 5px;
}

#commerce-gallery[data-ready] .commerce-card {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(calc(var(--commerce-lane, 0) * var(--commerce-step) + var(--commerce-drag, 0px)), 0, 0) scale(var(--commerce-scale));
}

#commerce-gallery[data-ready] .commerce-card[data-slot='previous'],
#commerce-gallery[data-ready] .commerce-card[data-slot='next'] {
  opacity: .55;
  pointer-events: auto;
}

#commerce-gallery[data-ready] .commerce-card[data-slot='active'] {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(var(--commerce-drag, 0px), 0, 0) scale(1);
}

#commerce-gallery[data-animate]:not([data-dragging]) .commerce-card {
  transition: transform 320ms cubic-bezier(.22,.75,.25,1), opacity 280ms ease;
}

#commerce-gallery[data-ready] .commerce-card-caption { display: none; }
#commerce-gallery .commerce-card a:focus-visible { outline-offset: 3px; border-radius: 4px; }
#commerce-gallery .commerce-caption,
#commerce-gallery .commerce-stops { width: var(--commerce-frame, 100%); margin-inline: auto; }
#commerce-gallery .commerce-caption { min-height: 50px; margin-top: 12px; }

#commerce-gallery .commerce-current {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 12px;
  line-height: 1.2;
}

#commerce-gallery [data-commerce-name] { font-size: clamp(1.06rem, 1.4vw, 1.38rem); letter-spacing: -.03em; }
#commerce-gallery [data-commerce-type] { color: var(--commerce-tone); font-size: .82rem; }
#commerce-gallery .commerce-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#portfolio-field #commerce-gallery :is(.commerce-full, .commerce-play, .commerce-visit, .commerce-page-close) { flex-shrink: 0; gap: 9px; min-height: 42px; padding-inline: 14px; font-size: .79rem; white-space: nowrap; }
#portfolio-field #commerce-gallery .commerce-full { background: #dce7ee; border-color: #dce7ee; color: #141a21; }
#portfolio-field #commerce-gallery .commerce-full:hover { background: #f2f8fc; color: #141a21; }
#commerce-gallery .commerce-visit span { color: #c8d9e6; font-size: .9rem; }

#portfolio-field #commerce-gallery .commerce-page {
  width: min(1140px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  margin: auto;
  border: 1px solid var(--commerce-edge);
  border-radius: 6px;
  background: #111820;
  overscroll-behavior: contain;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #75818c #111820;
}

#commerce-gallery .commerce-page-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(12px, 3vw, 24px);
  border-bottom: 1px solid var(--commerce-edge);
  background: #111820;
}

#commerce-gallery .commerce-page-header h3 { margin: 0; font-size: 1rem; font-weight: 500; }
#commerce-gallery .commerce-page img { width: 100%; height: auto; }

#commerce-gallery .commerce-stops {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 5px;
  margin-top: 3px;
}

#portfolio-field #commerce-gallery .commerce-stops button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

#commerce-gallery .commerce-stops button span {
  position: absolute;
  inset-inline: 0;
  top: calc(50% - 1px);
  height: 2px;
  background: #dce7ee40;
}

#commerce-gallery .commerce-stops button:hover span { background: #dce7ee8c; }
#commerce-gallery .commerce-stops button[aria-current='true'] span { background: #dce7ee; }
#portfolio-field #commerce-gallery [hidden] { display: none; }

#portfolio-field[data-motion='off'] #commerce-gallery .commerce-card { transition: none; }
@media (prefers-reduced-motion: reduce) {
  #commerce-gallery[data-animate]:not([data-dragging]) .commerce-card { transition: none; }
}

@media (max-width: 680px) {
  #portfolio-field #commerce-gallery { padding-inline: 0; }
  #commerce-gallery[data-ready] { --commerce-frame: 87%; --commerce-step: 82%; --commerce-scale: .62; }
  #commerce-gallery .commerce-header { gap: 12px; margin-inline: var(--orch-side); }
  #commerce-gallery:not([data-ready]) .commerce-window { margin-inline: var(--orch-side); }
  #commerce-gallery .commerce-controls { gap: 4px; }
  #commerce-gallery .commerce-count { display: none; }
  #commerce-gallery .commerce-current { align-items: flex-start; flex-direction: column; }
  #commerce-gallery .commerce-caption { gap: 12px; }
  #commerce-gallery[data-full-preview] .commerce-caption { align-items: flex-start; flex-direction: column; }
  #commerce-gallery[data-full-preview] .commerce-actions { justify-content: flex-start; }
  #commerce-gallery .commerce-stops { margin-top: 6px; }
}
