/* Scoped standalone photo/video gallery fallback. */
html.cws-lb-open { overflow: hidden !important; }
dialog.cws-lb {
  box-sizing: border-box; width: min(96vw, 1200px); max-width: 96vw;
  height: min(92vh, 900px); max-height: 92vh; height: min(92dvh, 900px);
  padding: 0; margin: auto; border: 0; border-radius: 12px;
  color: #fff; background: #141414; overflow: hidden;
  font: 15px/1.4 system-ui, sans-serif; box-shadow: 0 12px 45px #0008;
}
dialog.cws-lb::backdrop { background: rgba(0,0,0,.89); }
dialog.cws-lb[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.cws-lb-top,.cws-lb-bottom { display:flex; align-items:center; gap:12px; padding:10px 14px; background:#141414; }
.cws-lb-count { flex:1; font-variant-numeric:tabular-nums; }
.cws-lb-direct { color:#fff!important; text-decoration:underline!important; padding:8px; }
.cws-lb-button { display:inline-grid!important; place-items:center; min-width:44px; min-height:44px;
  padding:0!important; border:1px solid #666!important; border-radius:7px!important; color:#fff!important;
  background:#2d2d2d!important; font:28px/1 system-ui,sans-serif!important; cursor:pointer; }
.cws-lb-button:disabled { opacity:.35; cursor:default; }
.cws-lb-button:focus-visible,.cws-lb-direct:focus-visible { outline:3px solid #fff; outline-offset:2px; }
.cws-lb-stage { display:grid; place-items:center; min-height:0; padding:8px; }
.cws-lb-image { display:block; max-width:100%!important; max-height:100%!important; min-height:0; object-fit:contain; width:auto; height:auto; }
.cws-lb-video { display:block; width:100%; height:100%; border:0; }
.cws-lb-caption { flex:1; text-align:center; overflow-wrap:anywhere; }
@media(max-width:575px) { dialog.cws-lb { width:100vw; max-width:100vw; height:100vh; height:100dvh; max-height:100dvh; border-radius:0; } .cws-lb-top,.cws-lb-bottom{padding:8px;gap:8px;} }
