.rpg-gallery { --rpg-gap: 18px; --rpg-height: clamp(320px, 48vw, 640px); width: 100%; color: #151515; }
.rpg-gallery *, .rpg-gallery *::before, .rpg-gallery *::after { box-sizing: border-box; }
.rpg-track { position: relative; display: flex; gap: var(--rpg-gap); overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rpg-track::-webkit-scrollbar { display: none; }
.rpg-slide { position: relative; flex: 0 0 var(--rpg-slide-width, 78%); min-width: 0; height: var(--rpg-height); margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #e6e6e6; cursor: pointer; scroll-snap-align: center; appearance: none; }
.rpg-slide:first-child { scroll-snap-align: start; }
.rpg-slide:last-child { scroll-snap-align: end; }
.rpg-slide:only-child { flex-basis: 100%; cursor: default; }
.rpg-image { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: grayscale(1); opacity: .55; transition: filter .45s ease, opacity .45s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.rpg-slide.is-active .rpg-image { filter: grayscale(0); opacity: 1; }
.rpg-slide:hover .rpg-image { transform: scale(1.025); }
.rpg-slide:focus-visible, .rpg-arrow:focus-visible { outline: 2px solid #111; outline-offset: -3px; }
.rpg-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 17px; }
.rpg-count { display: inline-flex; align-items: center; gap: 12px; font: 600 12px/1.2 Montserrat, sans-serif; letter-spacing: .08em; }
.rpg-divider { display: block; width: 28px; height: 1px; background: #a6a6a6; }
.rpg-arrows { display: flex; gap: 7px; }
.rpg-arrow { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #1b1b1b; border-radius: 50%; background: transparent; color: #1b1b1b; cursor: pointer; transition: background-color .22s ease, color .22s ease, opacity .22s ease; }
.rpg-arrow:hover:not(:disabled) { background: #1b1b1b; color: #fff; }
.rpg-arrow:disabled { opacity: .28; cursor: default; }
.rpg-arrow svg, .rpg-arrow i { width: var(--rpg-icon-size, 18px); height: var(--rpg-icon-size, 18px); font-size: var(--rpg-icon-size, 18px); line-height: 1; }
.rpg-arrow svg { fill: currentColor; }
.rpg-arrow .rpg-default-icon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 767px) { .rpg-gallery { --rpg-gap: 10px; --rpg-height: clamp(260px, 82vw, 470px); } .rpg-slide { flex-basis: var(--rpg-slide-width, 88%); } .rpg-arrow { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .rpg-image, .rpg-arrow { transition: none; } }

/* Full viewport viewer. The image box always preserves the original ratio. */
.rpg-slide:only-child { cursor: pointer; }
html.rpg-lightbox-open, html.rpg-lightbox-open body { overflow: hidden !important; }
body.rpg-lightbox-open #forma-cursor { opacity: 0 !important; }
/* The site hides the system cursor; the native dialog is above the custom cursor. */
html.rpg-lightbox-open body .rpg-lightbox[open],
html.rpg-lightbox-open body .rpg-lightbox[open] * { cursor: default !important; }
html.rpg-lightbox-open body .rpg-lightbox[open] button:not(:disabled):not([aria-disabled="true"]),
html.rpg-lightbox-open body .rpg-lightbox[open] button:not(:disabled):not([aria-disabled="true"]) * {
  cursor: pointer !important;
}
.rpg-lightbox, .rpg-lightbox * { box-sizing: border-box; }
.rpg-lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%;
  max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--rpg-lightbox-bg, rgba(14, 24, 32, .68)); color: var(--rpg-lightbox-fg, #f7f7f5);
  overflow: auto; cursor: auto; font-family: Montserrat, system-ui, sans-serif;
}
.rpg-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: clamp(8px, 1.5vh, 16px); }
.rpg-lightbox:not([open]), .rpg-lightbox [hidden] { display: none !important; }
.rpg-lightbox::backdrop {
  background: rgba(14, 24, 32, .22);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
}
.rpg-lightbox { --rpg-lb-glass: rgba(255, 255, 255, .10); --rpg-lb-edge: rgba(255, 255, 255, .20); }
.rpg-lightbox .rpg-lb-toolbar,
.rpg-lightbox .rpg-lb-caption,
.rpg-lightbox .rpg-lb-thumbs {
  background: var(--rpg-lb-glass);
  border: 1px solid var(--rpg-lb-edge);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .09);
}
.rpg-lb-toolbar { padding: 6px 8px 6px clamp(10px, 2vw, 18px); border-radius: 16px; display: flex; justify-content: space-between; align-items: center; gap: 14px; min-width: 0; }
.rpg-lb-info { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 16px; min-width: 0; }
.rpg-lightbox .rpg-lb-title { margin: 0; color: inherit; font: 600 clamp(14px, 2vw, 19px)/1.35 Montserrat, system-ui, sans-serif; overflow-wrap: anywhere; }
.rpg-lightbox-count { font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .09em; opacity: .7; white-space: nowrap; }
.rpg-lb-viewport { grid-row: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(6px, 1.2vw, 18px); min-height: 0; }
.rpg-lightbox-stage { position: relative; grid-column: 2; grid-row: 1; height: 100%; min-width: 0; min-height: 0; touch-action: pan-y pinch-zoom; }
.rpg-lightbox .rpg-lightbox-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; opacity: 0; border: 0; border-radius: 0; pointer-events: none; }
.rpg-lightbox .rpg-lightbox-image.is-loaded { opacity: 1; animation: rpg-lb-reveal .26s ease-out; }
@keyframes rpg-lb-reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.rpg-lb-status { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 13px; }
.rpg-lightbox .rpg-lb-button {
  display: grid; place-items: center; flex: none; width: clamp(36px, 4vw, 46px); height: clamp(36px, 4vw, 46px);
  min-width: 0; min-height: 0; padding: 0; margin: 0; border: 1px solid var(--rpg-lb-edge); border-radius: 50%;
  background: var(--rpg-lb-glass); color: inherit; box-shadow: none; cursor: pointer; opacity: .8;
  transition: opacity .18s ease, color .18s ease;
}
.rpg-lightbox .rpg-lightbox-prev { grid-area: 1 / 1; }
.rpg-lightbox .rpg-lightbox-next { grid-area: 1 / 3; }
.rpg-lightbox .rpg-lb-button[aria-disabled="true"] { opacity: .28; cursor: default; }
.rpg-lightbox .rpg-lb-button:not([aria-disabled="true"]):hover { color: var(--rpg-lightbox-accent, #f7cc45); opacity: 1; }
.rpg-lightbox .rpg-lb-button svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rpg-lightbox .rpg-lb-caption { padding: 4px 12px; border-radius: 12px; grid-row: 3; margin: 0 auto; max-width: min(75ch, 100%); max-height: 4.5em; overflow: auto; color: inherit; text-align: center; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.rpg-lb-thumbs { grid-row: 4; display: flex; gap: 8px; width: max-content; max-width: 100%; justify-self: center; overflow-x: auto; padding: 6px; border-radius: 12px; scrollbar-width: thin; overscroll-behavior-inline: contain; }
.rpg-lightbox .rpg-lb-thumb { flex: none; display: block; width: clamp(54px, 8vw, 82px); height: clamp(38px, 5vw, 54px); padding: 0; margin: 0; border: 2px solid transparent; border-radius: 5px; background: transparent; color: inherit; overflow: hidden; opacity: .56; box-shadow: none; cursor: pointer; }
.rpg-lightbox .rpg-lb-thumb:hover { opacity: 1; }
.rpg-lightbox .rpg-lb-thumb[aria-current="true"] { opacity: 1; border-color: var(--rpg-lightbox-accent, #f7cc45); }
.rpg-lightbox .rpg-lb-thumb-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.rpg-lightbox button:focus-visible { outline: 2px solid var(--rpg-lightbox-accent, #f7cc45); outline-offset: 2px; }
@media (max-height: 480px) { .rpg-lightbox[open] { gap: 5px; } .rpg-lightbox .rpg-lb-thumb { height: 32px; } }
@media (prefers-reduced-motion: reduce) { .rpg-lightbox .rpg-lightbox-image.is-loaded { animation: none; } .rpg-lightbox .rpg-lb-button { transition: none; } }

.rpg-gallery[data-rpg-lightbox="no"] .rpg-slide.is-active { cursor: default; }
.rpg-heading { margin: 0 0 16px; }
.rpg-caption { position: absolute; inset: auto 0 0; display: block; padding: 10px 14px; background: rgb(0 0 0 / .65); color: white; font: 500 13px/1.4 Montserrat, sans-serif; text-align: start; white-space: normal; overflow-wrap: anywhere; }
.rpg-arrows { margin-inline-start: auto; }
