/*
 * HimTrails Destination Photo Gallery 1.7.0
 * Desktop: five-tile destination collage with a compact +more treatment.
 * Mobile: Travel Coffee-style 4:3 hero image with an overlaid View All control.
 * Lightbox: same-size full-screen stage, desktop thumbnail filmstrip, and all-photos grid.
 */

/* ---------- Widget shell and script-stripped failsafe ---------- */
.htc-gallery,
.htc-gallery * {
  box-sizing: border-box;
}

.htc-gallery[hidden],
.htc-gallery [hidden] {
  display: none !important;
}

.htc-gallery .htc-skeleton,
.htc-gallery .htc-output,
.htc-gallery .htc-editor-note {
  width: 100%;
  margin: 24px 0;
}

/* If a page builder removes JavaScript, hide the skeleton after about ten seconds. */
.htc-gallery .htc-skeleton {
  animation-name: htcSkeletonFailsafe;
  animation-duration: 0s;
  animation-delay: 10s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.htc-gallery[data-htc-js="1"] .htc-skeleton {
  animation: none;
}

@keyframes htcSkeletonFailsafe {
  to {
    height: 0;
    min-height: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
  }
}

/* ---------- Loading skeleton ---------- */
.htc-gallery .htc-skeleton {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  height: clamp(420px, 50vw, 600px);
  overflow: hidden;
}

.htc-gallery .htc-skeleton-piece {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #17382d;
}

.htc-gallery .htc-skeleton-piece::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 15%,
    rgba(255, 255, 255, 0.11) 45%,
    rgba(255, 255, 255, 0) 75%
  );
  animation: htcSkeletonShimmer 1.35s ease-in-out infinite;
}

.htc-gallery .htc-skeleton-small-1 { grid-column: 1; grid-row: 1; }
.htc-gallery .htc-skeleton-small-2 { grid-column: 2; grid-row: 1; }
.htc-gallery .htc-skeleton-small-3 { grid-column: 1; grid-row: 2; }
.htc-gallery .htc-skeleton-small-4 { grid-column: 2; grid-row: 2; }
.htc-gallery .htc-skeleton-hero    { grid-column: 3; grid-row: 1 / 3; }

@keyframes htcSkeletonShimmer {
  100% { transform: translateX(110%); }
}

/* ---------- Static note shown only inside Elementor/Gutenberg editors ---------- */
.htc-gallery .htc-editor-note {
  padding: 22px;
  border: 2px dashed #2d6952;
  border-radius: 16px;
  background: rgba(60, 202, 152, 0.07);
  color: #17382d;
  font: 600 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

/* ---------- Desktop collage ---------- */
.htc-gallery .htc-collage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  height: clamp(420px, 50vw, 600px);
  overflow: hidden;
}

.htc-gallery .htc-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #10271f;
  color: #ffffff;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.htc-gallery button.htc-tile-action {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.htc-gallery button.htc-tile-action:focus-visible {
  outline: 3px solid #d79a42;
  outline-offset: -3px;
}

.htc-gallery button.htc-tile-action > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 360ms ease;
}

.htc-gallery button.htc-tile-action:hover > img,
.htc-gallery button.htc-tile-action:focus-visible > img {
  transform: scale(1.045);
}

.htc-gallery .htc-hero {
  grid-column: 3;
  grid-row: 1 / 3;
}

.htc-gallery .htc-small-1 { grid-column: 1; grid-row: 1; }
.htc-gallery .htc-small-2 { grid-column: 2; grid-row: 1; }
.htc-gallery .htc-small-3 { grid-column: 1; grid-row: 2; }
.htc-gallery .htc-small-4 { grid-column: 2; grid-row: 2; }

.htc-gallery button.htc-view-pill {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: inline-flex;
  max-width: calc(100% - 32px);
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid rgba(16, 39, 31, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 18px rgba(16, 39, 31, 0.22);
  color: #10271f;
  font: 700 14px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.htc-gallery button.htc-view-pill:hover,
.htc-gallery button.htc-view-pill:focus-visible {
  background: #ffffff;
  outline: 3px solid rgba(215, 154, 66, 0.56);
  outline-offset: 2px;
}

.htc-gallery .htc-more-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(7, 17, 13, 0.58);
  color: #ffffff;
  font: 400 clamp(14px, 1.25vw, 18px)/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42);
  text-align: center;
  pointer-events: none;
}

/* Exactly one photo. */
.htc-gallery .htc-count-1 {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.htc-gallery .htc-count-1 .htc-hero { grid-column: 1; grid-row: 1; }

/* Exactly two photos. */
.htc-gallery .htc-count-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  grid-template-rows: minmax(0, 1fr);
}
.htc-gallery .htc-count-2 .htc-hero { grid-column: 2; grid-row: 1; }
.htc-gallery .htc-count-2 .htc-small-1 { grid-column: 1; grid-row: 1; }

/* Exactly three photos. */
.htc-gallery .htc-count-3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.htc-gallery .htc-count-3 .htc-hero { grid-column: 2; grid-row: 1 / 3; }
.htc-gallery .htc-count-3 .htc-small-1 { grid-column: 1; grid-row: 1; }
.htc-gallery .htc-count-3 .htc-small-2 { grid-column: 1; grid-row: 2; }

/* Exactly four photos. */
.htc-gallery .htc-count-4 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.htc-gallery .htc-count-4 .htc-hero { grid-column: 3; grid-row: 1 / 3; }
.htc-gallery .htc-count-4 .htc-small-1 { grid-column: 1; grid-row: 1; }
.htc-gallery .htc-count-4 .htc-small-2 { grid-column: 2; grid-row: 1; }
.htc-gallery .htc-count-4 .htc-small-3 { grid-column: 1 / 3; grid-row: 2; }

/* ---------- Mobile Travel Coffee-style main gallery ---------- */
@media (max-width: 760px) {
  .htc-gallery .htc-skeleton,
  .htc-gallery .htc-output {
    margin-top: 16px;
    margin-bottom: 16px;
  }

  .htc-gallery .htc-skeleton {
    display: block;
    height: auto;
    overflow: visible;
  }

  .htc-gallery .htc-skeleton-small-1,
  .htc-gallery .htc-skeleton-small-2,
  .htc-gallery .htc-skeleton-small-3,
  .htc-gallery .htc-skeleton-small-4 {
    display: none;
  }

  .htc-gallery .htc-skeleton-hero {
    display: block;
    width: 100%;
    min-height: 230px;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  /* Safe fallback during a desktop-to-mobile viewport change. */
  .htc-gallery .htc-collage,
  .htc-gallery .htc-count-1,
  .htc-gallery .htc-count-2,
  .htc-gallery .htc-count-3,
  .htc-gallery .htc-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 7px;
    height: auto;
  }

  .htc-gallery .htc-collage .htc-hero {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .htc-gallery .htc-collage .htc-small {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 1 / 1;
  }

  .htc-gallery .htc-tile,
  .htc-gallery .htc-skeleton-piece {
    border-radius: 13px;
  }

  .htc-gallery .htc-mobile-gallery {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 230px;
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #10271f;
    color: #ffffff;
    isolation: isolate;
    box-shadow: 0 8px 24px rgba(16, 39, 31, 0.12);
    -webkit-tap-highlight-color: transparent;
  }

  .htc-gallery .htc-mobile-gallery::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    height: 42%;
    background: linear-gradient(0deg, rgba(7, 17, 13, 0.3) 0%, rgba(7, 17, 13, 0) 100%);
    pointer-events: none;
  }

  .htc-gallery button.htc-mobile-photo,
  .htc-gallery button.htc-mobile-view-all {
    all: unset;
    box-sizing: border-box;
    margin: 0;
    border: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
  }

  .htc-gallery button.htc-mobile-photo {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: #10271f;
    cursor: pointer;
  }

  .htc-gallery button.htc-mobile-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(16, 39, 31, 0.08);
    border-radius: inherit;
    pointer-events: none;
  }

  .htc-gallery button.htc-mobile-photo:focus-visible {
    outline: 3px solid #d79a42;
    outline-offset: -3px;
  }

  .htc-gallery button.htc-mobile-photo > img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 280ms ease;
  }

  .htc-gallery button.htc-mobile-photo:active > img,
  .htc-gallery button.htc-mobile-photo:focus-visible > img {
    transform: scale(1.018);
  }

  .htc-gallery button.htc-mobile-view-all {
    position: absolute;
    right: 15px;
    bottom: 15px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 12px;
    background: rgba(65, 53, 45, 0.62);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
  }

  .htc-gallery button.htc-mobile-view-all:hover,
  .htc-gallery button.htc-mobile-view-all:focus-visible {
    background: rgba(42, 33, 28, 0.82);
    outline: 3px solid rgba(215, 154, 66, 0.62);
    outline-offset: 2px;
  }

  .htc-gallery .htc-mobile-view-icon {
    display: inline-flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
  }

  .htc-gallery .htc-mobile-view-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (max-width: 380px) {
  .htc-gallery .htc-mobile-gallery,
  .htc-gallery .htc-skeleton-hero {
    min-height: 215px;
    border-radius: 14px;
  }

  .htc-gallery button.htc-mobile-view-all {
    right: 12px;
    bottom: 12px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 11px;
    font-size: 14px;
  }

  .htc-gallery .htc-mobile-view-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  .htc-gallery .htc-mobile-view-icon svg {
    width: 21px;
    height: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .htc-gallery .htc-skeleton-piece::before {
    animation: none;
  }

  .htc-gallery button.htc-tile-action > img,
  .htc-gallery button.htc-mobile-photo > img {
    transition: none;
  }

  .htc-gallery button.htc-tile-action:hover > img,
  .htc-gallery button.htc-tile-action:focus-visible > img,
  .htc-gallery button.htc-mobile-photo:active > img,
  .htc-gallery button.htc-mobile-photo:focus-visible > img {
    transform: scale(1.001);
  }
}

/* ---------- Theme-CSS-proof full-screen viewer ---------- */
#htc-lightbox {
  --htc-lb-visible-height: 100vh;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  z-index: 2147483647 !important;
  display: block !important;
  width: 100vw !important;
  height: var(--htc-lb-visible-height, 100vh) !important;
  min-height: 0 !important;
  max-height: var(--htc-lb-visible-height, 100vh) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  overscroll-behavior: contain !important;
  isolation: isolate !important;
  background: rgba(4, 7, 6, 0.985) !important;
  color: #ffffff !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1.4 !important;
  text-align: left !important;
  -webkit-font-smoothing: antialiased !important;
}

@supports (height: 100dvh) {
  #htc-lightbox {
    --htc-lb-visible-height: 100dvh;
  }
}

#htc-lightbox,
#htc-lightbox * {
  box-sizing: border-box !important;
}

#htc-lightbox button {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

#htc-lightbox .htc-lb-counter {
  position: absolute !important;
  top: 18px !important;
  left: 22px !important;
  z-index: 31 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 66px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 9px 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 999px !important;
  background: rgba(20, 24, 22, 0.72) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}

#htc-lightbox .htc-lb-close,
#htc-lightbox .htc-lb-arrow {
  width: 50px !important;
  height: 50px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px !important;
  background: rgba(20, 24, 22, 0.72) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3) !important;
  user-select: none !important;
}

#htc-lightbox .htc-lb-close svg,
#htc-lightbox .htc-lb-arrow svg {
  display: block !important;
  width: 25px !important;
  height: 25px !important;
  margin: 0 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

#htc-lightbox .htc-lb-arrow svg {
  width: 27px !important;
  height: 27px !important;
  stroke-width: 1.8 !important;
}

#htc-lightbox .htc-lb-close:hover,
#htc-lightbox .htc-lb-close:focus-visible,
#htc-lightbox .htc-lb-arrow:hover,
#htc-lightbox .htc-lb-arrow:focus-visible {
  border-color: rgba(255, 255, 255, 0.78) !important;
  background: rgba(38, 44, 41, 0.94) !important;
  outline: 3px solid rgba(215, 154, 66, 0.42) !important;
  outline-offset: 2px !important;
}

#htc-lightbox .htc-lb-close {
  position: absolute !important;
  top: 14px !important;
  right: 20px !important;
  z-index: 32 !important;
}

#htc-lightbox .htc-lb-arrow {
  position: absolute !important;
  top: calc(50% - 28px) !important;
  z-index: 12 !important;
  transform: translateY(-50%) !important;
}

#htc-lightbox .htc-lb-prev { left: 20px !important; }
#htc-lightbox .htc-lb-next { right: 20px !important; }

#htc-lightbox .htc-lb-stage {
  position: absolute !important;
  top: 66px !important;
  right: 82px !important;
  bottom: 122px !important;
  left: 82px !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
}

#htc-lightbox .htc-lb-figure {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#htc-lightbox .htc-lb-image-wrap {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#htc-lightbox #htc-lightbox-image {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#htc-lightbox #htc-lightbox-image[data-loading="1"] {
  opacity: 0.16 !important;
}

#htc-lightbox .htc-lb-caption {
  position: absolute !important;
  right: 50% !important;
  bottom: 8px !important;
  z-index: 3 !important;
  display: block !important;
  width: auto !important;
  max-width: min(880px, 86vw) !important;
  max-height: 54px !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  overflow: auto !important;
  border-radius: 10px !important;
  background: rgba(5, 8, 7, 0.68) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.42 !important;
  text-align: center !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  transform: translateX(50%) !important;
}

/* The compact all-photos control is used only on mobile. */
#htc-lightbox .htc-lb-mobile-toolbar {
  display: none !important;
}

/* ---------- Desktop thumbnail filmstrip ---------- */
#htc-lightbox .htc-lb-filmstrip-shell {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 15 !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 116px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 9px 18px 13px !important;
  overflow: hidden !important;
  background: linear-gradient(0deg, rgba(3, 5, 4, 0.99) 0%, rgba(3, 5, 4, 0.94) 68%, rgba(3, 5, 4, 0) 100%) !important;
}

#htc-lightbox .htc-lb-filmstrip {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 88px !important;
  margin: 0 !important;
  padding: 6px 2px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain !important;
  scroll-snap-type: x proximity !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.38) transparent !important;
  -webkit-overflow-scrolling: touch !important;
}

#htc-lightbox .htc-lb-filmstrip::-webkit-scrollbar {
  height: 5px !important;
}

#htc-lightbox .htc-lb-filmstrip::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.38) !important;
}

#htc-lightbox button.htc-lb-film-thumb {
  position: relative !important;
  display: block !important;
  flex: 0 0 92px !important;
  width: 92px !important;
  height: 70px !important;
  min-width: 92px !important;
  overflow: hidden !important;
  border: 2px solid transparent !important;
  border-radius: 9px !important;
  background: #17201c !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28) !important;
  opacity: 0.72 !important;
  scroll-snap-align: center !important;
}

#htc-lightbox button.htc-lb-film-thumb[aria-selected="true"] {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(215, 154, 66, 0.72), 0 5px 18px rgba(0, 0, 0, 0.36) !important;
  opacity: 1 !important;
}

#htc-lightbox button.htc-lb-film-thumb:hover,
#htc-lightbox button.htc-lb-film-thumb:focus-visible {
  border-color: #d79a42 !important;
  outline: 2px solid rgba(215, 154, 66, 0.36) !important;
  outline-offset: 2px !important;
  opacity: 1 !important;
}

#htc-lightbox button.htc-lb-film-thumb > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  object-fit: cover !important;
}

#htc-lightbox button.htc-lb-filmstrip-all {
  position: sticky !important;
  right: 0 !important;
  z-index: 4 !important;
  display: flex !important;
  flex: 0 0 132px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  width: 132px !important;
  min-width: 132px !important;
  height: 70px !important;
  margin-left: 3px !important;
  padding: 8px 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.26) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: -12px 0 24px rgba(3, 5, 4, 0.82), 0 5px 18px rgba(0, 0, 0, 0.34) !important;
  color: #101713 !important;
}

#htc-lightbox button.htc-lb-filmstrip-all:hover,
#htc-lightbox button.htc-lb-filmstrip-all:focus-visible {
  background: #ffffff !important;
  outline: 3px solid rgba(215, 154, 66, 0.56) !important;
  outline-offset: 2px !important;
}

#htc-lightbox .htc-lb-filmstrip-all-icon {
  display: inline-flex !important;
  width: 25px !important;
  height: 25px !important;
  flex: 0 0 25px !important;
  align-items: center !important;
  justify-content: center !important;
}

#htc-lightbox .htc-lb-filmstrip-all-icon svg {
  display: block !important;
  width: 23px !important;
  height: 23px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
}

#htc-lightbox .htc-lb-filmstrip-all-copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 3px !important;
  min-width: 0 !important;
  line-height: 1 !important;
}

#htc-lightbox .htc-lb-filmstrip-all-copy strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

#htc-lightbox .htc-lb-filmstrip-all-copy small {
  color: rgba(16, 23, 19, 0.68) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

/* ---------- Full-screen all-photos grid ---------- */
#htc-lightbox .htc-lb-grid-panel {
  position: absolute !important;
  inset: 0 !important;
  z-index: 24 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: rgba(3, 4, 4, 0.965) !important;
  color: #ffffff !important;
}

#htc-lightbox .htc-lb-grid-header {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 76px !important;
  margin: 0 !important;
  padding: 12px 88px 12px 24px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(4, 5, 5, 0.82) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}

#htc-lightbox .htc-lb-grid-title {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

#htc-lightbox .htc-lb-grid {
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  align-items: start !important;
  gap: 10px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 16px 20px 28px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.42) transparent !important;
  -webkit-overflow-scrolling: touch !important;
}

#htc-lightbox .htc-lb-grid::-webkit-scrollbar {
  width: 7px !important;
}

#htc-lightbox .htc-lb-grid::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.42) !important;
}

#htc-lightbox button.htc-lb-grid-thumb {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  align-self: start !important;
  overflow: hidden !important;
  border: 2px solid transparent !important;
  border-radius: 11px !important;
  background: #161a18 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

#htc-lightbox button.htc-lb-grid-thumb[aria-selected="true"] {
  border-color: #d79a42 !important;
  box-shadow: 0 0 0 2px rgba(215, 154, 66, 0.22) !important;
}

#htc-lightbox button.htc-lb-grid-thumb:hover,
#htc-lightbox button.htc-lb-grid-thumb:focus-visible {
  border-color: #ffffff !important;
  outline: 3px solid rgba(255, 255, 255, 0.22) !important;
  outline-offset: 1px !important;
}

#htc-lightbox button.htc-lb-grid-thumb > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  opacity: 1 !important;
}

/* ---------- Mobile viewer and mobile all-photos grid ---------- */
@media (max-width: 760px) {
  #htc-lightbox {
    width: 100% !important;
    min-width: 0 !important;
    background: rgba(0, 0, 0, 0.955) !important;
  }

  #htc-lightbox .htc-lb-counter {
    top: calc(11px + env(safe-area-inset-top, 0px)) !important;
    left: calc(12px + env(safe-area-inset-left, 0px)) !important;
    min-width: 58px !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  #htc-lightbox .htc-lb-close {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    right: calc(10px + env(safe-area-inset-right, 0px)) !important;
    width: 44px !important;
    height: 44px !important;
    border-color: transparent !important;
    background: rgba(20, 20, 20, 0.54) !important;
    box-shadow: none !important;
  }

  #htc-lightbox .htc-lb-close svg {
    width: 25px !important;
    height: 25px !important;
    stroke-width: 1.8 !important;
  }

  #htc-lightbox .htc-lb-arrow {
    display: none !important;
  }

  #htc-lightbox .htc-lb-stage {
    top: calc(58px + env(safe-area-inset-top, 0px)) !important;
    right: calc(7px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    left: calc(7px + env(safe-area-inset-left, 0px)) !important;
    width: auto !important;
    height: auto !important;
  }

  #htc-lightbox #htc-lightbox-image {
    border-radius: 7px !important;
  }

  #htc-lightbox .htc-lb-caption {
    right: 50% !important;
    bottom: 6px !important;
    display: -webkit-box !important;
    width: calc(100% - 18px) !important;
    max-width: none !important;
    max-height: 46px !important;
    padding: 7px 9px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  #htc-lightbox .htc-lb-filmstrip-shell {
    display: none !important;
  }

  #htc-lightbox .htc-lb-mobile-toolbar {
    position: absolute !important;
    right: calc(8px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    left: calc(8px + env(safe-area-inset-left, 0px)) !important;
    z-index: 16 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
  }

  #htc-lightbox button.htc-lb-mobile-all {
    gap: 7px !important;
    min-height: 44px !important;
    padding: 9px 14px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 11px !important;
    background: rgba(47, 42, 38, 0.68) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
  }

  #htc-lightbox button.htc-lb-mobile-all:hover,
  #htc-lightbox button.htc-lb-mobile-all:focus-visible {
    background: rgba(25, 24, 22, 0.88) !important;
    outline: 3px solid rgba(215, 154, 66, 0.52) !important;
    outline-offset: 2px !important;
  }

  #htc-lightbox .htc-lb-mobile-all-icon {
    display: inline-flex !important;
    width: 23px !important;
    height: 23px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #htc-lightbox .htc-lb-mobile-all-icon svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  #htc-lightbox .htc-lb-grid-panel {
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.94) !important;
  }

  #htc-lightbox .htc-lb-grid-header {
    min-height: calc(82px + env(safe-area-inset-top, 0px)) !important;
    padding: calc(15px + env(safe-area-inset-top, 0px)) calc(72px + env(safe-area-inset-right, 0px)) 12px calc(18px + env(safe-area-inset-left, 0px)) !important;
    border-bottom-color: rgba(255, 255, 255, 0.13) !important;
    background: rgba(0, 0, 0, 0.56) !important;
  }

  #htc-lightbox .htc-lb-grid-title {
    font-size: 21px !important;
    font-weight: 400 !important;
  }

  #htc-lightbox .htc-lb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 18px calc(18px + env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) calc(18px + env(safe-area-inset-left, 0px)) !important;
    scrollbar-width: none !important;
  }

  #htc-lightbox .htc-lb-grid::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  #htc-lightbox button.htc-lb-grid-thumb {
    border-width: 2px !important;
    border-radius: 10px !important;
  }

  /* Match the clean mobile reference grid; selection is announced to assistive
   * technology but does not add a persistent coloured border. */
  #htc-lightbox button.htc-lb-grid-thumb[aria-selected="true"] {
    border-color: transparent !important;
    box-shadow: none !important;
  }

  #htc-lightbox button.htc-lb-grid-thumb > img {
    border-radius: 7px !important;
  }

  #htc-lightbox[data-htc-view="grid"] .htc-lb-close {
    top: calc(10px + env(safe-area-inset-top, 0px)) !important;
    right: calc(10px + env(safe-area-inset-right, 0px)) !important;
    background: transparent !important;
  }
}

@media (max-width: 380px) {
  #htc-lightbox .htc-lb-grid {
    gap: 6px !important;
    padding-right: calc(13px + env(safe-area-inset-right, 0px)) !important;
    padding-left: calc(13px + env(safe-area-inset-left, 0px)) !important;
  }
}

@media (max-width: 900px) and (max-height: 560px) {
  #htc-lightbox .htc-lb-counter {
    top: calc(7px + env(safe-area-inset-top, 0px)) !important;
  }

  #htc-lightbox .htc-lb-close {
    top: calc(4px + env(safe-area-inset-top, 0px)) !important;
    width: 42px !important;
    height: 42px !important;
  }

  #htc-lightbox .htc-lb-stage {
    top: calc(50px + env(safe-area-inset-top, 0px)) !important;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #htc-lightbox .htc-lb-caption {
    max-height: 30px !important;
    -webkit-line-clamp: 1 !important;
  }

  #htc-lightbox .htc-lb-mobile-toolbar {
    bottom: calc(3px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #htc-lightbox .htc-lb-grid-header {
    min-height: calc(56px + env(safe-area-inset-top, 0px)) !important;
    padding-top: calc(7px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 6px !important;
  }

  #htc-lightbox .htc-lb-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    padding-top: 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #htc-lightbox * {
    scroll-behavior: auto !important;
  }
}

/* Keep hidden elements hidden even when a theme or media rule sets display. */
#htc-lightbox[hidden],
#htc-lightbox [hidden] {
  display: none !important;
}

