/* CIGallery 1.1.0: extension-owned styles. No template-specific dependencies. */
.ci-gallery { container-type: inline-size; margin-block: 24px; min-width: 0; }
.ci-gallery .ci-gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 175px), 1fr)); gap: 10px; margin: 0; padding: 0; }
.ci-gallery a.ci-gallery__item { display: block; position: relative; aspect-ratio: 3 / 2; min-width: 0; overflow: hidden; margin: 0; padding: 0; border: 0; border-radius: 7px; background: #e3eaf1; text-decoration: none; }
.ci-gallery a.ci-gallery__item > img { display: block; width: 100%; height: 100%; max-width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; transform: scale(1); filter: brightness(.9); transition: transform .35s ease, filter .25s ease; }
.ci-gallery a.ci-gallery__item:hover > img, .ci-gallery a.ci-gallery__item:focus-visible > img { transform: scale(1.1); filter: brightness(1); }
.ci-gallery a.ci-gallery__item:focus-visible { outline: 3px solid #b86e00; outline-offset: 3px; }
.ci-gallery-note { padding: 12px 16px; margin: 16px 0; border-left: 3px solid #b86e00; background: #fff8e7; color: #35445a; line-height: 1.7; }
dialog.ci-viewer { box-sizing: border-box; position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 64px 72px 24px; border: 0; background: transparent; color: white; overflow: auto; overscroll-behavior: contain; font: 16px/1.6 system-ui, sans-serif; }
dialog.ci-viewer:not([open]) { display: none; }
dialog.ci-viewer[open] { display: flex; align-items: center; justify-content: center; }
dialog.ci-viewer::backdrop { background: rgba(4,13,25,.87); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: ci-gallery-fade-in .25s ease both; }
.ci-viewer .ci-viewer__panel { display: grid; place-items: center; width: 100%; min-width: 0; max-height: 100%; }
.ci-viewer .ci-viewer__image-box { display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items: center; width: 100%; min-width: 0; height: calc(100vh - 96px); height: calc(100dvh - 96px); }
.ci-viewer .ci-viewer__image { display: block; grid-area: 1 / 1; width: auto; height: auto; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; object-fit: contain; transform-origin: center; opacity: 1; }
.ci-viewer .ci-viewer__close, .ci-viewer .ci-viewer__arrow { box-sizing: border-box; position: fixed; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; margin: 0; border: 1px solid #ffffff60; border-radius: 50%; background: #132b46; color: #fff; line-height: 1; cursor: pointer; box-shadow: none; z-index: 2; }
.ci-viewer .ci-viewer__close > svg, .ci-viewer .ci-viewer__arrow > svg { display: block; width: 24px; height: 24px; margin: 0; padding: 0; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ci-viewer .ci-viewer__close { top: 12px; right: 16px; border-color: transparent; background: transparent; }
.ci-viewer .ci-viewer__arrow { top: calc(50% - 24px); }
.ci-viewer .ci-viewer__arrow--prev { left: 12px; }
.ci-viewer .ci-viewer__arrow--next { right: 12px; }
.ci-viewer .ci-viewer__arrow:disabled { visibility: hidden; }
.ci-viewer .ci-viewer__close:hover, .ci-viewer .ci-viewer__arrow:hover { background: #315e86; }
.ci-viewer button:focus-visible { outline: 3px solid #ffc56a; outline-offset: 3px; }
.ci-viewer .ci-viewer__status { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); color: #ffe2ad; background: #102237ed; border-radius: 6px; padding: 10px 14px; margin: 0; text-align: center; z-index: 1; }
.ci-viewer .ci-viewer__status:empty { display: none; }
.ci-viewer .ci-viewer__loader { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); display: grid; justify-items: center; gap: 10px; padding: 18px 22px; border-radius: 12px; background: #102237df; color: #fff; pointer-events: none; z-index: 1; }
.ci-viewer .ci-viewer__loader[hidden] { display: none; }
.ci-viewer .ci-viewer__spinner { box-sizing: border-box; display: block; width: 36px; height: 36px; border: 3px solid #ffffff40; border-top-color: #fff; border-radius: 50%; animation: ci-gallery-spin .75s linear infinite; }
.ci-viewer .ci-viewer__loading-text { font-size: .85rem; line-height: 1.5; }
dialog.ci-viewer--closing::backdrop { animation: ci-gallery-fade-out .26s ease both; }
@keyframes ci-gallery-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ci-gallery-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ci-gallery-spin { to { transform: rotate(360deg); } }
dialog.ci-viewer[data-ci-motion="none"]::backdrop,
.ci-viewer[data-ci-motion="none"] .ci-viewer__spinner { animation: none; }
@media (max-width: 575px) {
  dialog.ci-viewer { padding: 64px 10px 80px; }
  .ci-viewer .ci-viewer__image-box { height: calc(100vh - 150px); height: calc(100dvh - 150px); }
  .ci-viewer .ci-viewer__status { bottom: 80px; }
  .ci-viewer .ci-viewer__arrow { top: auto; bottom: 16px; }
  .ci-viewer .ci-viewer__arrow--prev { left: calc(50% - 56px); }
  .ci-viewer .ci-viewer__arrow--next { right: calc(50% - 56px); }
}
@media (prefers-reduced-motion: reduce) {
  .ci-gallery a.ci-gallery__item > img { transition: none; }
  dialog.ci-viewer:not([data-ci-motion="full"])::backdrop,
  .ci-viewer:not([data-ci-motion="full"]) .ci-viewer__spinner { animation: none; }
}
