/* Isolated under XD prefixes to avoid modifying the Gamelade typography/layout. */
.xd-slideshow,
.xd-slideshow * ,
.xd-lightbox,
.xd-lightbox * { box-sizing: border-box; }
.xd-slideshow { margin: 24px 0; width: 100%; max-width: 100%; }
.xd-slideshow__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 13px; overflow: hidden; background: #13121b; }
.xd-slideshow__slide { position: absolute; inset: 0; width: 100%; height: 100%; will-change: auto; }
.xd-slideshow__slide[hidden], .xd-lightbox[hidden], .xd-lightbox button[hidden] { display: none !important; }
.xd-slideshow__open { appearance: none; display: block; position: relative; background: transparent; border: 0; padding: 0; width: 100%; height: 100%; cursor: zoom-in; }
.xd-slideshow__image { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain; object-position: center; border: 0 !important; box-shadow: none !important; margin: 0 !important; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.xd-slideshow__nav { position: absolute; z-index: 5; top: 50%; transform: translateY(-50%); width: 42px; height: 48px; display: grid; place-items: center; background: rgba(12,12,18,.67); color: #fff !important; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; cursor: pointer; padding: 0; font: 700 22px/1 system-ui,sans-serif; transition: background .15s, transform .15s; }
.xd-slideshow__nav:hover { background: rgba(12,12,18,.9); }
.xd-slideshow__nav:focus-visible, .xd-slideshow__thumb:focus-visible, .xd-slideshow__open:focus-visible { outline: 3px solid #a985e8; outline-offset: -3px; }
.xd-slideshow__nav--prev { left: 12px; }
.xd-slideshow__nav--next { right: 12px; }
.xd-slideshow__counter { position: absolute; z-index: 5; bottom: 11px; right: 13px; color: white; background: rgba(0,0,0,.68); padding: 4px 9px; border-radius: 6px; font: 600 12px/1.3 system-ui,sans-serif; pointer-events: none; }
/* Center the complete thumbnail strip under the stage; only overflow-scroll when needed. */
.xd-slideshow .xd-slideshow__thumbs { display: flex; width: 100%; min-width: 0; max-width: 100%; justify-content: flex-start; align-items: center; margin: 11px 0 0; padding: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; }
.xd-slideshow .xd-slideshow__thumbs-track { display: flex; flex: 0 0 auto; align-items: center; width: max-content; min-width: max-content; gap: 9px; margin-inline: auto; padding: 3px 2px 7px; }
.xd-slideshow__thumb { flex: 0 0 86px; width: 86px; height: 61px; border: 2px solid transparent; padding: 2px; border-radius: 8px; background: #f1f1f4; opacity: .67; cursor: pointer; overflow: hidden; transition: opacity .16s, border-color .16s; }
.xd-slideshow__thumb:hover { opacity: 1; }
.xd-slideshow__thumb.is-active { opacity: 1; border-color: #6437a0; }
.xd-slideshow__thumb-image { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; display: block !important; margin: 0 !important; border: 0 !important; border-radius: 4px; -webkit-user-drag: none; -webkit-touch-callout: none; }
.xd-slideshow__caption { font: inherit; color: inherit; opacity: .8; font-size: .89em; margin: 8px 0 0; text-align: center; }
img.xd-single-image { cursor: zoom-in; -webkit-user-drag: none; -webkit-touch-callout: none; }
img.xd-single-image:focus-visible { outline: 3px solid #8153cb; outline-offset: 3px; }
/* Theme-independent image viewer. The close control uses a centered vector icon,
   avoiding glyph/font baseline misalignment seen with the multiplication sign. */
.xd-lightbox {
  position: fixed !important; z-index: 2147483647 !important; inset: 0 !important;
  width: 100% !important; height: 100dvh; display: flex; align-items: center;
  justify-content: center; overflow: hidden; isolation: isolate;
  background: rgba(5,5,10,.94); padding: 62px 68px 70px;
  color: white; overscroll-behavior: contain;
}
.xd-lightbox__frame {
  min-width: 0; min-height: 0; width: 100%; height: 100%;
  position: relative; overflow: hidden;
}
.xd-lightbox__visual {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.xd-lightbox__image {
  display: block !important; width: auto !important; height: auto !important;
  max-width: 100% !important; max-height: 100% !important;
  object-fit: contain; object-position: center; flex: 0 1 auto;
  border: 0 !important; margin: 0 !important; padding: 0 !important;
  box-shadow: 0 18px 65px rgba(0,0,0,.35);
  -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none;
  pointer-events: auto;
}
.xd-lightbox__close, .xd-lightbox__prev, .xd-lightbox__next {
  appearance: none !important; -webkit-appearance: none !important;
  position: absolute !important; z-index: 10; color: #fff !important;
  border: 1px solid rgba(255,255,255,.23) !important;
  background: rgba(36,36,47,.82) !important;
  border-radius: 50% !important; margin: 0 !important; padding: 0 !important;
  cursor: pointer; display: flex !important; align-items: center !important;
  justify-content: center !important; line-height: 1 !important;
  box-shadow: 0 5px 16px rgba(0,0,0,.2);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.xd-lightbox__close[hidden], .xd-lightbox__prev[hidden], .xd-lightbox__next[hidden] { display: none !important; }
.xd-lightbox__close {
  top: max(18px, env(safe-area-inset-top)) !important;
  right: max(22px, env(safe-area-inset-right)) !important;
  width: 46px !important; height: 46px !important; min-width: 46px; min-height: 46px;
}
.xd-lightbox__close svg { display: block; width: 22px; height: 22px; flex: 0 0 22px; margin: 0; pointer-events: none; }
.xd-lightbox__close::before, .xd-lightbox__close::after { content: none !important; }
.xd-lightbox__prev, .xd-lightbox__next {
  top: 50%; transform: translateY(-50%); width: 44px !important; height: 44px !important;
  font: 400 25px/1 system-ui,sans-serif !important;
}
.xd-lightbox__prev { left: 12px; }
.xd-lightbox__next { right: 12px; }
.xd-lightbox__close:hover, .xd-lightbox__prev:hover, .xd-lightbox__next:hover {
  background: rgba(89,59,141,.96) !important;
  border-color: rgba(255,255,255,.45) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.32);
}
.xd-lightbox button:focus-visible { outline: 3px solid #fff !important; outline-offset: 3px; }
.xd-lightbox__counter {
  position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); font: 600 13px/1 system-ui,sans-serif; letter-spacing: .06em;
  pointer-events: none;
}
@media (max-width: 640px) {
  .xd-slideshow__stage { border-radius: 9px; }
  .xd-slideshow__nav { width: 33px; height: 39px; font-size: 17px; }
  .xd-slideshow__nav--prev { left: 6px; }
  .xd-slideshow__nav--next { right: 6px; }
  .xd-slideshow__thumb { flex-basis: 67px; width: 67px; height: 50px; }
  .xd-lightbox { padding: 62px 12px 77px; }
  .xd-lightbox__prev, .xd-lightbox__next { width: 38px; height: 38px; top: auto; bottom: 12px; transform: none; }
  .xd-lightbox__close { top: max(12px, env(safe-area-inset-top)) !important; right: max(12px, env(safe-area-inset-right)) !important; width: 44px !important; height: 44px !important; min-width: 44px; min-height: 44px; }
  .xd-lightbox__counter { bottom: max(29px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .xd-slideshow__nav, .xd-slideshow__thumb, .xd-lightbox__close, .xd-lightbox__prev, .xd-lightbox__next { transition: none; }
}
