#ssdmac-gallery-overlay{
  position:fixed;inset:0;background:rgba(11,17,28,.97);
  z-index:2147483000;display:none;align-items:center;justify-content:center;
  padding:clamp(6px,1.5vw,18px);box-sizing:border-box;
  color:#f8fafc;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif
}
#ssdmac-gallery-overlay.open{display:flex}
#ssdmac-gallery-dialog{
  display:flex;flex-direction:column;gap:10px;
  width:min(1210px,100%);height:min(930px,97dvh);
  max-height:97dvh;min-width:0;min-height:0
}
#ssdmac-gallery-toolbar{
  display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;
  gap:8px;min-height:46px
}
#ssdmac-gallery-toolbar .group,#ssdmac-gallery-edit-actions .group{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap
}
#ssdmac-gallery-overlay button{
  appearance:none;border:1px solid #4f6075;border-radius:10px;background:#263447;
  color:#f8fafc;min-height:40px;padding:8px 13px;cursor:pointer;
  font:600 12.5px -apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  transition:background .12s,border-color .12s
}
#ssdmac-gallery-overlay button:hover:not(:disabled){background:#334b67;border-color:#8096b2}
#ssdmac-gallery-overlay button:focus-visible,#ssdmac-gallery-overlay input:focus-visible{
  outline:2px solid #9bc6ec;outline-offset:2px
}
#ssdmac-gallery-overlay button:disabled{opacity:.34;cursor:not-allowed}
#ssdmac-gallery-overlay button.primary{background:#4682b4;border-color:#4682b4}
#ssdmac-gallery-overlay button.primary:hover{background:#37729f}
#ssdmac-gallery-close{font-size:23px!important;min-width:44px;padding:4px!important;line-height:1}
#ssdmac-gallery-count{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
#ssdmac-editor-title{font-size:15px;font-weight:650;color:#fff}
#ssdmac-gallery-stage{
  flex:1 1 0;min-height:70px;min-width:0;display:flex;
  justify-content:center;align-items:center;position:relative;
  overflow:hidden;border:1px solid #263344;border-radius:14px;
  background:radial-gradient(ellipse at center,#1d2a3b 0%,#0a1421 100%);
  touch-action:pan-y
}
#ssdmac-gallery-stage img,#ssdmac-gallery-stage canvas{
  max-height:100%;max-width:100%;height:auto;width:auto;
  object-fit:contain;box-shadow:0 10px 36px rgba(0,0,0,.4);
  border-radius:3px
}
#ssdmac-gallery-stage img[hidden],#ssdmac-gallery-stage canvas[hidden]{display:none!important}
#ssdmac-gallery-stage canvas{touch-action:none;cursor:crosshair}
#ssdmac-gallery-stage .nav{
  position:absolute;top:50%;transform:translateY(-50%);
  z-index:3;width:42px;height:58px;border-radius:30px;
  background:rgba(28,42,62,.83);font-size:27px;padding:0
}
#ssdmac-gallery-prev{left:7px}#ssdmac-gallery-next{right:7px}
#ssdmac-gallery-edit-actions{
  display:none;flex:none;max-height:min(40vh,310px);overflow-y:auto;
  background:#192637;border:1px solid #364a60;border-radius:14px;
  padding:13px 15px;box-sizing:border-box
}
#ssdmac-gallery-overlay.editing #ssdmac-gallery-edit-actions{display:block}
#ssdmac-gallery-overlay.editing #ssdmac-gallery-prev,
#ssdmac-gallery-overlay.editing #ssdmac-gallery-next,
#ssdmac-gallery-overlay.editing #ssdmac-gallery-count,
#ssdmac-gallery-overlay.editing #ssdmac-gallery-edit{display:none}
.ssdmac-editor-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.ssdmac-editor-row+.ssdmac-editor-row{margin-top:10px;padding-top:11px;border-top:1px solid #35445a}
.ssdmac-editor-title{font-weight:600;color:#cfdeef;font-size:12px;white-space:nowrap}
.ssdmac-editor-row:first-child{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.ssdmac-editor-row:first-child label{display:flex;justify-content:space-between;align-items:center}
#ssdmac-angle-value{font-weight:700;font-variant-numeric:tabular-nums;color:#a8d7ff;font-size:18px}
.ssdmac-slider-row{display:flex;gap:9px;align-items:center;width:100%}
.ssdmac-slider-row input[type=range]{
  flex:1 1 auto;min-width:65px;accent-color:#75b8ed;height:30px;cursor:pointer
}
.ssdmac-slider-row input[type=number]{
  color:#fff;border:1px solid #5b6a81;background:#102133;border-radius:8px;
  height:39px;box-sizing:border-box;padding:7px;width:63px;
  text-align:right;font:600 14px system-ui
}
#ssdmac-angle-minus,#ssdmac-angle-plus{
  width:39px;min-width:39px;padding:4px!important;font-size:22px!important
}
#ssdmac-gallery-overlay button.aspect.active{
  background:#4682b4;border-color:#a8d7ff;box-shadow:inset 0 0 0 1px #a8d7ff
}
.ssdmac-editor-line{gap:7px}
.ssdmac-editor-line .ssdmac-editor-title:not(:first-child){margin-left:8px}
.ssdmac-editor-last{justify-content:space-between}
#ssdmac-gallery-bottom{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:8px;min-height:30px
}
#ssdmac-gallery-note{font-size:12px;line-height:1.4;color:#c1d4e7}
#ssdmac-gallery-error{font-size:12px;color:#ffafaf;line-height:1.4;font-weight:600}
@media(max-width:710px){
  #ssdmac-gallery-overlay{padding:5px}
  #ssdmac-gallery-dialog{height:99dvh;max-height:99dvh;gap:6px}
  #ssdmac-gallery-overlay button{min-height:38px;padding:7px 9px;font-size:11.5px}
  #ssdmac-gallery-edit-actions{padding:9px;max-height:min(44vh,355px)}
  .ssdmac-editor-row+.ssdmac-editor-row{margin-top:8px;padding-top:8px}
  .ssdmac-editor-last{justify-content:center}
  #ssdmac-gallery-stage .nav{width:34px;height:50px}
  #ssdmac-gallery-note{font-size:11px}
  #ssdmac-angle-minus,#ssdmac-angle-plus{width:36px;min-width:36px}
  #ssdmac-gallery-dialog{gap:5px}
}
