/* Native property viewer: use the entire visible viewport in both catalogs. */
#gallery-dialog{
 position:fixed;
 inset:0;
 margin:0;
 padding:0;
 border:0;
 border-radius:0;
 width:100%;
 max-width:100%;
 height:100vh;
 height:100dvh;
 max-height:100vh;
 max-height:100dvh;
 overflow:hidden;
 background:#101412;
 color:#fff;
 box-sizing:border-box;
}
#gallery-dialog[open]{display:block}
#gallery-dialog::backdrop{background:#101412}
#gallery-dialog .gallery-stage{
 position:absolute;
 inset:0;
 display:block;
 width:100%;
 height:100%;
 min-width:0;
 min-height:0;
 gap:0;
 padding:0;
 overflow:hidden;
}
#gallery-dialog #gallery-image{
 position:absolute;
 inset:0;
 display:block;
 width:100%;
 height:100%;
 min-width:0;
 min-height:0;
 max-width:100%;
 max-height:100%;
 margin:0;
 object-fit:contain;
 object-position:50% 50%;
 user-select:none;
 -webkit-user-select:none;
}
#gallery-dialog>header{
 position:absolute;
 inset:0 0 auto;
 z-index:3;
 height:calc(68px + env(safe-area-inset-top, 0px));
 min-height:0;
 padding:env(safe-area-inset-top, 0px) 70px 0;
 border:0;
 background:linear-gradient(#0009,#0000);
 pointer-events:none;
}
#gallery-dialog #gallery-count{
 color:#fff;
 text-shadow:0 1px 4px #000;
 font-size:14px;
}
#gallery-dialog>header .round,
#gallery-dialog .gallery-stage .round{
 width:44px;
 height:44px;
 min-width:44px;
 min-height:44px;
 padding:12px;
 border:1px solid #ffffff50;
 border-radius:50%;
 background:#ffffffed;
 box-shadow:0 2px 12px #0003;
 pointer-events:auto;
 z-index:4;
 display:grid;
 place-items:center;
}
#gallery-dialog>header .round{
 left:max(12px, env(safe-area-inset-left, 0px));
 top:calc(12px + env(safe-area-inset-top, 0px));
}
#gallery-dialog #gallery-prev,
#gallery-dialog #gallery-next{
 position:absolute;
 top:50%;
 transform:translateY(-50%);
}
#gallery-dialog #gallery-prev{left:max(10px, env(safe-area-inset-left, 0px))}
#gallery-dialog #gallery-next{right:max(10px, env(safe-area-inset-right, 0px))}
#gallery-dialog .round img{width:20px;height:20px;max-width:100%;object-fit:contain}
#gallery-dialog .round:focus-visible{outline:3px solid #58d7b8;outline-offset:3px}
