.mp-gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  position: relative;
  cursor: zoom-in;
  text-align: left;
}

.mp-gallery-open img { display: block; }

.mp-gallery-open:focus-visible,
.mp-thumbs button:focus-visible,
.mp-lightbox button:focus-visible {
  outline: 3px solid #1466a0;
  outline-offset: 3px;
}

.mp-gallery-hint,
.mp-gallery-position {
  position: absolute;
  z-index: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(8, 30, 52, 0.86);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
}

.mp-gallery-hint { right: 12px; bottom: 12px; }
.mp-gallery-position { top: 12px; right: 12px; }
.mp-gallery-open:hover .mp-gallery-hint { background: #06385c; }

.mp-thumbs button { width: 86px; height: 72px; }
.mp-thumbs button[aria-pressed="true"] { border-color: var(--mp-yellow, #ffbf00); }

.mp-lightbox {
  width: min(96vw, 1200px);
  max-width: none;
  max-height: 96vh;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: #f8fafc;
  color: #10263b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.mp-lightbox::backdrop { background: rgba(3, 14, 29, 0.88); }
.mp-lightbox-toolbar,
.mp-lightbox-actions { display: flex; align-items: center; gap: 10px; }
.mp-lightbox-toolbar { justify-content: space-between; margin-bottom: 12px; font-weight: 700; }
.mp-lightbox-actions button,
.mp-lightbox-arrow {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #10263b;
  cursor: pointer;
}
.mp-lightbox-actions button { padding: 9px 12px; }
.mp-lightbox-actions button[aria-pressed="true"] { background: #dff3ff; border-color: #1466a0; }
.mp-lightbox-view { display: flex; align-items: center; gap: 10px; }
.mp-lightbox-arrow { flex: 0 0 42px; height: 52px; font-size: 2rem; line-height: 1; }
.mp-lightbox-image-wrap {
  flex: 1 1 0;
  min-width: 0;
  height: min(72vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border-radius: 10px;
  background: #101820;
}
.mp-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.mp-lightbox.is-zoomed .mp-lightbox-image-wrap { display: block; }
.mp-lightbox.is-zoomed .mp-lightbox-image {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
}
.mp-lightbox-caption { margin: 10px 4px 0; text-align: center; font-weight: 600; }

@media (max-width: 600px) {
  .mp-lightbox { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); padding: 8px; }
  .mp-lightbox-view { gap: 4px; }
  .mp-lightbox-arrow { flex-basis: 32px; height: 44px; }
  .mp-lightbox-image-wrap { height: min(68dvh, 650px); }
  .mp-lightbox-actions button { padding: 7px; font-size: 0.85rem; }
  .mp-lightbox-caption { font-size: 0.85rem; }
}
