.cg-dialog{box-sizing:border-box;width:min(1500px,96vw);max-width:96vw;max-height:96dvh;margin:auto;padding:0;border:1px solid #768d9e;border-radius:16px;background:#f7fafc;color:#123b55;font:16px Arial,sans-serif;letter-spacing:normal;box-shadow:0 24px 90px #00142666;overflow:auto}.cg-dialog::backdrop{background:#071a2bd9}.cg-dialog *{box-sizing:border-box}.cg-shell{padding:20px 26px}.cg-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.cg-head h2{font-size:27px;line-height:1.2;margin:0;color:#123b55}.cg-dialog button{font:inherit;cursor:pointer;border:1px solid #49677d;border-radius:7px;background:#fff;color:#123b55}.cg-dialog button:hover{background:#e4f6fb}.cg-dialog button:focus-visible,.cg-open:focus-visible{outline:3px solid #1689a7;outline-offset:3px}.cg-close{font-size:30px!important;width:44px;height:44px;flex:none}.cg-stage{max-height:60dvh;overflow:auto;background:#e3e9ed;border:1px solid #c1cdd4;border-radius:5px;text-align:center;touch-action:pan-y pinch-zoom}.cg-image{display:block;width:100%;height:auto;max-height:60dvh;object-fit:contain;margin:auto}.cg-zoomed{touch-action:auto}.cg-zoomed .cg-image{width:3318px;max-width:none;max-height:none}.cg-controls{display:flex;align-items:center;justify-content:center;gap:12px;margin:12px 0}.cg-controls button{min-width:44px;min-height:40px;padding:6px 14px}.cg-count{min-width:48px;text-align:center;font-variant-numeric:tabular-nums}.cg-zoom{margin-left:12px}#cg-description{font-size:15px;line-height:1.5;margin:10px auto 16px;max-width:1000px;text-align:center}.cg-open{display:block;position:relative;z-index:2;margin:12px auto 0;padding:11px 18px;border:1px solid #1689a7;border-radius:7px;color:#123b55;background:#fff;font:inherit;font-size:15px;cursor:pointer}@media(max-width:600px){.cg-dialog{width:96vw;max-height:96dvh}.cg-shell{padding:12px}.cg-head h2{font-size:23px}.cg-stage,.cg-image{max-height:49dvh}#cg-description{font-size:14px;text-align:left}.cg-controls{gap:7px}.cg-zoom{margin-left:3px}}

/* Shared gallery: fit the complete image and controls inside the viewport. */
.cg-dialog{width:min(1760px,98vw);max-width:98vw;height:98dvh;max-height:98dvh;overflow:hidden}
.cg-shell{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto;padding:16px 22px;gap:8px}
.cg-head{margin:0}.cg-stage{display:flex;align-items:center;justify-content:center;min-height:0;height:100%;max-height:none;overflow:visible;padding:10px;background:transparent;border:0;border-radius:0}
.cg-stage .cg-image{flex:0 1 auto;width:auto;height:auto;min-width:0;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 6px 16px #09273c3d,0 2px 5px #09273c20;border-radius:3px;outline:1px solid #7e94a57a}
.cg-stage.cg-zoomed{display:block;overflow:auto;touch-action:auto}.cg-stage.cg-zoomed .cg-image{max-width:none;max-height:none;margin:0;height:auto}
.cg-controls{margin:0}.cg-dialog #cg-description{margin:0 auto;line-height:1.4}
@media(max-width:600px){.cg-dialog{width:98vw;height:98dvh;max-height:98dvh}.cg-shell{padding:12px;gap:8px;grid-template-rows:auto minmax(0,1fr) auto auto auto}.cg-stage{max-height:none;padding:6px}.cg-stage .cg-image{max-height:100%}.cg-dialog #cg-description{font-size:13px;line-height:1.35}.cg-head h2{font-size:22px}.cg-controls button{padding:5px 10px}}
@media(max-height:500px){.cg-shell{gap:4px;padding:8px 14px}.cg-head h2{font-size:20px}.cg-dialog #cg-description{font-size:12px}.cg-controls button{min-height:32px}.cg-close{height:32px;width:36px}}
.cg-dialog button{font-weight:600;color:#0a2b43}.cg-dialog #cg-description{font-weight:500;color:#0a2b43}.cg-count{font-weight:600;color:#0a2b43}.cg-head h2{font-weight:700;color:#0a2b43}
.cg-head{position:relative;justify-content:center;min-height:44px;padding-inline:52px}.cg-head>div{width:100%;text-align:center}.cg-head .cg-close{position:absolute;right:0;top:0}.cg-head h2{text-align:center}@media(max-width:600px){.cg-head{padding-inline:46px}}

.cg-strip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid #d6e3eb;
}
.cg-strip-prev, .cg-strip-next {
  width: 100%;
  min-height: 42px;
  padding: 0;
  font-size: 25px !important;
  line-height: 1;
}
.cg-strip button[aria-disabled=true] {
  color: #738592;
  border-color: #ccd9e2;
  background: #f7fafc;
  cursor: default;
}
.cg-thumbs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 6px;
  scrollbar-width: thin;
  scrollbar-color: #7190a4 #e5edf2;
  overscroll-behavior-x: contain;
  user-select: none;
}
.cg-thumbs.cg-scrollable,
.cg-thumbs.cg-scrollable .cg-thumb {
  cursor: grab;
}
.cg-thumbs.cg-dragging,
.cg-thumbs.cg-dragging .cg-thumb {
  cursor: grabbing;
}
.cg-dialog .cg-thumb {
  flex: 0 0 132px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 4px;
  border-color: #c1d0da;
}
.cg-thumb img {
  display: block;
  width: 100%;
  height: 58px;
  object-fit: contain;
}
.cg-thumb span {
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}
.cg-dialog .cg-thumb[aria-current=true] {
  border-color: #08738e;
  box-shadow: inset 0 0 0 1px #08738e;
  background: #e4f6fb;
}
.cg-strip button:focus-visible {
  outline-offset: 1px;
}
@media (max-width: 600px) {
  .cg-strip {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 4px;
  }
  .cg-dialog .cg-thumb { flex-basis: 104px; }
  .cg-thumb img { height: 46px; }
  .cg-thumb span { font-size: 11px; }
}
@media (max-height: 500px) {
  .cg-strip { padding-top: 3px; }
  .cg-dialog .cg-thumb { gap: 3px; padding: 3px; }
  .cg-thumb img { height: 30px; }
  .cg-thumb span { font-size: 11px; }
}