/* A real link box keeps each image reachable by keyboard. */
.image-preview-trigger { display:block; }
.image-preview-trigger:has(> .flatlay) { position:absolute; inset:0; }
.atmosphere-image-frame > .image-preview-trigger,.post-image > .image-preview-trigger { height:100%; }
[data-image-preview] img { cursor:zoom-in; }
[data-image-preview]:focus-visible img { outline:3px solid #1648ce; outline-offset:5px; }
body.image-preview-open { position:fixed; top:var(--image-preview-scroll-y); left:0; right:0; overflow:hidden; }
.image-lightbox { position:fixed; inset:0; box-sizing:border-box; width:100%; max-width:none; height:100%; height:100dvh; max-height:none; margin:0; padding:20px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border:0; background:transparent; color:#fff; overflow:hidden; }
.image-lightbox::backdrop { background:rgb(6 19 47 / .9); }
.image-lightbox-panel { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:16px; height:100%; max-width:1440px; margin:auto; }
.image-lightbox-toolbar { display:flex; justify-content:flex-end; }
.image-lightbox-close { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:6px 18px; border:1px solid #ffffff9c; border-radius:999px; background:#fffdf7; color:#102b81; font:500 15px/1.5 "Noto Sans JP", sans-serif; cursor:pointer; }
.image-lightbox-close span { font:30px/1 Arial,sans-serif; }
.image-lightbox-close:hover { background:#ffdc58; }
.image-lightbox-close:focus-visible { outline:3px solid #ffdc58; outline-offset:4px; }
.image-lightbox-stage { display:flex; align-items:center; justify-content:center; min-width:0; min-height:0; }
.image-lightbox-stage img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; border-radius:4px; }
.image-lightbox #image-lightbox-caption { margin:0; text-align:center; color:#fff; font:400 14px/1.7 "Noto Sans JP", sans-serif; overflow-wrap:anywhere; }
@media(max-width:600px) { .image-lightbox { padding-top:max(12px, env(safe-area-inset-top)); padding-inline:12px; } .image-lightbox-panel { gap:12px; } .image-lightbox #image-lightbox-caption { font-size:12px; } }
@media print { .image-lightbox { display:none!important; } }
