.chat-attachment img, .chat-intro__media img, [data-article-images] img { cursor: zoom-in; }
.chat-attachment img:focus-visible, .chat-intro__media img:focus-visible, [data-article-images] img:focus-visible {
    outline: 2px solid #7beaf5;
    outline-offset: 3px;
}
dialog.chat-image-viewer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(5, 10, 15, .97);
    color: #f0fcff;
    overflow: hidden;
    overscroll-behavior: contain;
}
dialog.chat-image-viewer[open] { display: flex; flex-direction: column; }
.chat-image-viewer::backdrop { background: #050a0f; }
.chat-image-viewer__toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
    background: #101c25;
    z-index: 1;
}
.chat-image-viewer__toolbar button {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #47616c;
    border-radius: 10px;
    background: #1d303a;
    color: #f0fcff;
    font: 500 22px/1 system-ui, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}
.chat-image-viewer__toolbar [data-image-action="reset"] { min-width: 80px; font-size: 16px; }
.chat-image-viewer__toolbar [data-image-action="close"] { margin-inline-start: 12px; font-size: 30px; }
.article-image-viewer .chat-image-viewer__toolbar { direction: ltr; }
.article-image-viewer [data-image-action="close"] {
    width: 56px;
    height: 56px;
    font-size: 40px;
    border: 2px solid #7beaf5;
}
.article-image-viewer-open { overflow: hidden; }
.chat-image-viewer__toolbar button:disabled { opacity: .4; cursor: default; }
.chat-image-viewer__toolbar button:focus-visible { outline: 2px solid #7beaf5; outline-offset: 2px; }
.chat-image-viewer__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    margin-bottom: env(safe-area-inset-bottom);
}
.chat-image-viewer__stage.is-zoomed { cursor: grab; }
.chat-image-viewer__stage.is-zoomed:active { cursor: grabbing; }
.chat-image-viewer__stage img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform-origin: center;
    pointer-events: none;
    -webkit-user-drag: none;
}
