.arc-gallery .arc-main-link { cursor: zoom-in; }
body.arc-image-preview-open { overflow: hidden !important; }
#arc-image-preview:not([open]) { display: none !important; }
#arc-image-preview[open] {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: calc(76px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 0;
    background: rgba(12, 17, 24, .96);
    color: #fff;
    overflow: hidden;
}
#arc-image-preview::backdrop { background: #0c1118; }
#arc-image-preview .arc-image-preview-close {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
    width: auto;
    min-width: 48px;
    height: 48px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid #d6dce4;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font: 600 15px/1.2 system-ui, sans-serif;
    text-transform: none;
    letter-spacing: normal;
    opacity: 1;
    visibility: visible;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}
#arc-image-preview .arc-image-preview-close span[aria-hidden] { font-size: 32px; font-weight: 400; line-height: 1; }
#arc-image-preview .arc-image-preview-close:hover { background: #edf2f7; color: #111827; }
#arc-image-preview .arc-image-preview-close:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
#arc-image-preview .arc-image-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    cursor: zoom-out;
}
#arc-image-preview .arc-image-preview-stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    object-fit: contain;
    border: 0;
    border-radius: 4px;
    cursor: default;
}
#arc-image-preview .arc-image-preview-caption {
    flex: 0 0 auto;
    max-width: 900px;
    max-height: 3em;
    margin: 12px auto 0;
    color: #fff;
    font: 400 14px/1.5 system-ui, sans-serif;
    text-align: center;
    overflow: hidden;
    overflow-wrap: anywhere;
}
