.nonkit-gallery { max-width: 720px; margin: 12px auto 28px; color: #17334a; }
.nonkit-gallery__stage { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f4f7f9; border: 1px solid #e4ebef; border-radius: 20px; box-shadow: 0 12px 32px rgba(14, 47, 73, .09); }
.nonkit-gallery__image-button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.nonkit-gallery__main { width: 100%; height: 100%; object-fit: contain; display: block; }
.nonkit-gallery__stage.is-loading .nonkit-gallery__main { opacity: .68; }
.nonkit-gallery__stage.is-loading::after { content: ''; position: absolute; top: calc(50% - 15px); left: calc(50% - 15px); width: 30px; height: 30px; border: 3px solid #d9e9f2; border-top-color: #1687cf; border-radius: 50%; animation: nonkit-gallery-spin .75s linear infinite; pointer-events: none; }
@keyframes nonkit-gallery-spin { to { transform: rotate(360deg); } }
.nonkit-gallery__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.93); color: #174564; box-shadow: 0 3px 14px rgba(0,0,0,.16); font-size: 22px; cursor: pointer; }
.nonkit-gallery__arrow--prev { left: 12px; }
.nonkit-gallery__arrow--next { right: 12px; }
.nonkit-gallery__arrow[hidden], .nonkit-gallery__dialog-nav button[hidden] { display: none; }
.nonkit-gallery__count { position: absolute; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: 20px; background: rgba(19, 46, 67, .78); color: white; font-size: 13px; }
.nonkit-gallery__rail { display: flex; gap: 9px; overflow-x: auto; padding: 14px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.nonkit-gallery__thumb { flex: 0 0 70px; width: 70px; height: 70px; padding: 3px; border: 2px solid transparent; border-radius: 12px; background: #f5f7f8; overflow: hidden; cursor: pointer; scroll-snap-align: start; }
.nonkit-gallery__thumb[aria-current="true"] { border-color: #1687cf; box-shadow: 0 0 0 2px #d7efff; }
.nonkit-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.nonkit-gallery__videos { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 2px; }
.nonkit-gallery__video { padding: 8px 13px; border: 1px solid #c6ddea; border-radius: 999px; background: #eff8fd; color: #125987; cursor: pointer; }
.nonkit-gallery__video span { margin-right: 6px; }
.nonkit-gallery button:focus-visible { outline: 3px solid #1687cf; outline-offset: 2px; }
.nonkit-gallery__dialog { width: min(96vw, 960px); max-width: none; max-height: 96vh; padding: 48px 12px 12px; border: 0; border-radius: 16px; background: #111c25; color: white; text-align: center; }
.nonkit-gallery__dialog::backdrop { background: rgba(5, 15, 24, .9); }
.nonkit-gallery__large, .nonkit-gallery__player { display: block; max-width: 100%; max-height: calc(96vh - 125px); margin: auto; object-fit: contain; }
.nonkit-gallery__player[hidden], .nonkit-gallery__large[hidden], .nonkit-gallery__dialog-nav[hidden] { display: none; }
.nonkit-gallery__close { position: absolute; right: 12px; top: 5px; border: 0; background: none; color: white; font-size: 32px; cursor: pointer; }
.nonkit-gallery__dialog-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 6px 0; }
.nonkit-gallery__dialog-nav button { width: 42px; height: 38px; border: 1px solid #667986; border-radius: 8px; background: #273b49; color: white; cursor: pointer; }
@media (max-width: 600px) {
  .nonkit-gallery { margin: 8px auto 20px; }
  .nonkit-gallery__stage { border-radius: 14px; }
  .nonkit-gallery__arrow { width: 38px; height: 38px; }
  .nonkit-gallery__thumb { flex-basis: 62px; width: 62px; height: 62px; }
  .nonkit-gallery__rail { margin-right: -12px; padding-right: 12px; }
}
