.cs-inline-gallery { width:100%; min-width:0; margin:28px 0 36px; }
.cs-inline-gallery .cs-inline-main { position:relative; display:block; width:100%; aspect-ratio:3/2; overflow:hidden; padding:0!important; border:0!important; border-radius:14px!important; background:#e7e9e4!important; color:#fff; box-shadow:none!important; cursor:zoom-in; }
.cs-inline-main > img { display:block; width:100%; height:100%; object-fit:contain; }
.cs-inline-main > img[hidden] { display:none; }
.cs-inline-maximise { position:absolute; right:12px; bottom:12px; display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:rgba(33,52,65,.88); color:#fff; font:600 12px/1.5 'DM Sans',sans-serif; }
.cs-inline-thumbnails { position:relative; display:flex; gap:10px; overflow-x:auto; overscroll-behavior-x:contain; padding:12px 2px 8px; scrollbar-width:thin; scrollbar-color:#b9c2b5 transparent; }
.cs-inline-gallery .cs-inline-thumbnail { display:block; flex:0 0 88px; width:88px; height:64px; overflow:hidden; padding:0!important; border:2px solid transparent!important; border-radius:8px!important; background:#e7e9e4!important; box-shadow:none!important; cursor:pointer; }
.cs-inline-gallery .cs-inline-thumbnail[aria-pressed="true"] { border-color:#c28f00!important; }
.cs-inline-thumbnail img { display:block; width:100%; height:100%; object-fit:cover; }
.cs-inline-gallery button:focus-visible { outline:3px solid #c28f00!important; outline-offset:3px; }
.cs-story .cs-inline-error { margin:10px 0 0; color:#65737a; font-size:13px; line-height:1.5; }
.cs-inline-error[hidden] { display:none; }
@media(max-width:640px) {
  .cs-inline-gallery .cs-inline-thumbnail { flex-basis:76px; width:76px; height:54px; }
}
.cs-gallery-dialog {
  --gallery-ink: #f7f5ef;
  --gallery-muted: #b9c2c6;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(19, 31, 40, .97);
  color: var(--gallery-ink);
}

.cs-gallery-dialog::backdrop { background: rgba(19, 31, 40, .97); }
.cs-gallery-dialog[open] { display: grid; place-items: center; }
.cs-gallery-dialog__surface {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 18px;
  padding: 52px 28px 26px;
}

.cs-gallery-frame {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  place-items: center;
  grid-column: 2;
  grid-row: 1;
}

.cs-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 112px);
  object-fit: contain;
}

.cs-gallery-image[hidden] { display: none; }
.cs-gallery-close,
.cs-gallery-arrow {
  display: grid !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 48px !important;
  height: 48px !important;
  place-items: center;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.3) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.08) !important;
  color: var(--gallery-ink) !important;
  font: 400 26px/1 'DM Sans', sans-serif !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.cs-gallery-close:hover,
.cs-gallery-arrow:hover { background: rgba(255,255,255,.2) !important; }
.cs-gallery-close:focus-visible,
.cs-gallery-arrow:focus-visible { outline: 3px solid #ffc002 !important; outline-offset: 3px; }
.cs-gallery-close { position: absolute; z-index: 2; top: 22px; right: 24px; font-size: 32px !important; }
.cs-gallery-prev { grid-column: 1; grid-row: 1; }
.cs-gallery-next { grid-column: 3; grid-row: 1; }
.cs-gallery-arrow[hidden] { display: none !important; }
.cs-gallery-counter {
  grid-column: 2;
  grid-row: 2;
  padding-top: 14px;
  color: var(--gallery-muted);
  font: 500 .88rem/1.4 'DM Sans', sans-serif;
  letter-spacing: .08em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cs-gallery-error {
  max-width: 320px;
  padding: 18px 22px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: var(--gallery-ink);
  font: 500 1rem/1.5 'DM Sans', sans-serif;
  text-align: center;
}
.cs-gallery-error[hidden] { display: none; }

@media (max-width: 640px) {
  .cs-gallery-dialog__surface {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 60px 12px 20px;
  }
  .cs-gallery-frame, .cs-gallery-counter { grid-column: 1; }
  .cs-gallery-arrow { position: absolute; z-index: 2; top: 50%; }
  .cs-gallery-prev { left: 12px; }
  .cs-gallery-next { right: 12px; }
  .cs-gallery-image { max-height: calc(100dvh - 130px); }
  .cs-gallery-close { top: 12px; right: 12px; width: 42px !important; height: 42px !important; }
  .cs-gallery-arrow { width: 42px !important; height: 42px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-gallery-close, .cs-gallery-arrow { transition: none; }
}
