.news-image-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #071014;
  color: #f4f7f5;
  cursor: zoom-in;
  text-align: inherit;
}

.news-image-open img {
  display: block;
  width: 100%;
  transition: transform 220ms cubic-bezier(.25, 1, .5, 1), filter 220ms cubic-bezier(.25, 1, .5, 1);
}

.news-image-open__hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 6px;
  background: rgba(7, 16, 20, .82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  color: #f4f7f5;
  font-size: 1.05rem;
  pointer-events: none;
  transition: background-color 180ms ease, transform 180ms cubic-bezier(.25, 1, .5, 1);
}

.news-image-open:hover img {
  transform: scale(1.015);
  filter: brightness(.88);
}

.news-image-open:hover .news-image-open__hint {
  transform: translateY(-2px);
  background: rgba(7, 16, 20, .96);
}

.news-image-open:focus-visible {
  outline: 3px solid #8bdec4;
  outline-offset: 3px;
}

.news-image-open--article {
  max-height: none;
}

body.news-image-modal-open {
  overflow: hidden;
}

.news-image-dialog {
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(12px, 3vw, 40px);
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #f4f7f5;
}

.news-image-dialog::backdrop {
  background: rgba(3, 8, 11, .92);
  backdrop-filter: blur(8px);
}

.news-image-dialog[open] {
  display: grid;
  place-items: center;
  animation: news-modal-fade-in 220ms cubic-bezier(.25, 1, .5, 1);
}

.news-image-dialog__surface {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  place-items: center;
}

.news-image-dialog__photo {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - clamp(24px, 6vw, 80px));
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
}

.news-image-dialog__close {
  position: fixed;
  z-index: 1;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 6px;
  background: rgba(7, 16, 20, .92);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms cubic-bezier(.25, 1, .5, 1);
}

.news-image-dialog__close:hover {
  background: #172b32;
  transform: translateY(-1px);
}

.news-image-dialog__close:focus-visible {
  outline: 3px solid #8bdec4;
  outline-offset: 3px;
}

@keyframes news-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (pointer: coarse) {
  .news-image-open__hint {
    right: 10px;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-image-open img,
  .news-image-open__hint,
  .news-image-dialog__close {
    transition: none;
  }

  .news-image-dialog[open] {
    animation: none;
  }
}
