/* Scoped integration with Sage: independent of generated Tailwind/Vite classes. */
[data-mv-article-open] { cursor: zoom-in; }
[data-mv-article-open]:focus-visible { outline: 3px solid var(--color-blue, #008ce2); outline-offset: 4px; border-radius: 6px; }
html.mv-article-gallery-open { overflow: hidden; overscroll-behavior: none; }
.mv-article-gallery:not([open]) { display: none; }
.mv-article-gallery[open] {
  position: fixed; inset: 0; margin: 0; box-sizing: border-box;
  width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  display: grid; grid-template-rows: 48px minmax(0, 1fr) auto 100px; gap: 14px;
  padding: 16px 24px max(14px, env(safe-area-inset-bottom)); border: 0;
  color: #f4f7fb; background: rgba(6, 11, 20, .97);
  font-family: inherit; font-size: 14px; line-height: 1.5; overflow: hidden;
}
.mv-article-gallery::backdrop { background: rgba(6, 11, 20, .92); backdrop-filter: blur(3px); }
.mv-article-gallery *, .mv-article-gallery *::before, .mv-article-gallery *::after { box-sizing: border-box; }
.mv-article-gallery__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.mv-article-gallery__heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mv-article-gallery__title { font-size: 14px; font-weight: 600; margin: 0; color: #e6edf5; }
.mv-article-gallery__count { flex-shrink: 0; font-size: 13px; padding: 5px 12px; border: 1px solid #ffffff30; border-radius: 999px; background: #ffffff12; }
.mv-article-gallery__button {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 48px; height: 48px; padding: 0; border: 1px solid #ffffff35; border-radius: 50%;
  background: #ffffff12; color: #fff; cursor: pointer; transition: background .15s;
}
.mv-article-gallery__button:hover { background: #ffffff30; }
.mv-article-gallery__button:focus-visible, .mv-article-gallery__thumb:focus-visible { outline: 3px solid #a6d62b; outline-offset: 3px; }
.mv-article-gallery__button:disabled { opacity: .25; cursor: default; }
.mv-article-gallery__button svg { width: 24px; height: 24px; }
.mv-article-gallery__stage { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 20px; min-height: 0; min-width: 0; }
.mv-article-gallery__photo { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; height: 100%; min-height: 0; }
.mv-article-gallery__image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 16px 60px #0006; }
.mv-article-gallery__image[hidden] { display: none; }
.mv-article-gallery__photo[aria-busy="true"] .mv-article-gallery__image { opacity: .35; }
.mv-article-gallery__loading { position: absolute; padding: 8px 14px; border-radius: 999px; background: #0b162be8; color: #f4f7fb; }
.mv-article-gallery__loading[hidden], .mv-article-gallery__error[hidden] { display: none; }
.mv-article-gallery__error { position: absolute; max-width: 90%; text-align: center; background: #101c30; border-radius: 12px; padding: 20px; }
.mv-article-gallery__error a { color: #b9e5ff; text-decoration: underline; }
.mv-article-gallery__caption { margin: 0 auto; width: min(1100px, 100%); max-height: 72px; overflow-y: auto; text-align: center; color: #cbd5e1; font-size: 13px; line-height: 1.5; padding: 0 6px; }
.mv-article-gallery__thumbs {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%;
  overflow-x: auto; overflow-y: hidden; padding: 6px 4px 12px;
  scrollbar-width: thin; scrollbar-color: #526275 #101a2b; overscroll-behavior-x: contain;
}
.mv-article-gallery__thumb {
  flex: 0 0 112px; width: 112px; height: 76px; padding: 2px; border: 2px solid #ffffff24;
  border-radius: 9px; background: #172236; cursor: pointer; overflow: hidden;
}
.mv-article-gallery__thumb[aria-current="true"] { border-color: #a6d62b; background: #a6d62b; }
.mv-article-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.mv-article-gallery__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .mv-article-gallery[open] { padding: max(10px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom)); grid-template-rows: 44px minmax(0, 1fr) auto 84px; gap: 10px; }
  .mv-article-gallery__stage { position: relative; display: flex; justify-content: center; }
  .mv-article-gallery__photo { width: 100%; }
  .mv-article-gallery__stage > .mv-article-gallery__button { position: absolute; top: calc(50% - 22px); z-index: 1; background: #061020bb; }
  .mv-article-gallery__stage > .mv-article-gallery__button:first-child { left: 0; }
  .mv-article-gallery__stage > .mv-article-gallery__button:last-child { right: 0; }
  .mv-article-gallery__button { width: 44px; height: 44px; }
  .mv-article-gallery__heading { gap: 8px; }
  .mv-article-gallery__title { font-size: 13px; }
  .mv-article-gallery__count { font-size: 12px; padding: 4px 9px; }
  .mv-article-gallery__image { border-radius: 8px; }
  .mv-article-gallery__caption { max-height: 78px; font-size: 12px; }
  .mv-article-gallery__thumbs { gap: 8px; padding-bottom: 10px; }
  .mv-article-gallery__thumb { flex-basis: 86px; width: 86px; height: 60px; }
}
@media (max-height: 480px) {
  .mv-article-gallery[open] { grid-template-rows: 40px minmax(0, 1fr) auto 62px; gap: 6px; padding-top: 6px; padding-bottom: 6px; }
  .mv-article-gallery__button { width: 40px; height: 40px; }
  .mv-article-gallery__caption { max-height: 36px; font-size: 12px; }
  .mv-article-gallery__thumb { height: 44px; flex-basis: 70px; width: 70px; }
}
@media (prefers-reduced-motion: reduce) { .mv-article-gallery__button { transition: none; } }
