#galeri-icerik {
  --abg-gap: clamp(8px, 1.2vw, 16px);
  --abg-ink: var(--green, #384e39);
}
.abg-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--abg-gap);
  align-items: start;
}
.abg-grid > li {
  flex: 0 0 calc((100% - 3 * var(--abg-gap)) * var(--abg-wide) - .06px);
  min-width: 0;
  margin: 0;
  padding: 0;
}
.abg-photo {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #eae5d9;
  color: #fff;
  isolation: isolate;
  cursor: zoom-in;
}
.abg-photo img {
  display: block;
  width: 100%;
  height: auto;
}
.abg-expand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: rgb(37 47 34 / 78%);
  transition: background .18s ease;
}
.abg-expand svg { width: 15px; height: 15px; }
.abg-photo:hover .abg-expand,
.abg-photo:focus-visible .abg-expand { background: #273925; }
.abg-photo:focus-visible, .abg-toggle:focus-visible { outline: 3px solid #986233; outline-offset: 3px; }
.abg-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin: 24px auto 0;
  min-height: 46px;
  padding: 10px 23px;
  border: 1px solid #78866d;
  border-radius: 100px;
  background: transparent;
  color: var(--abg-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.abg-toggle:hover, .abg-toggle:focus-visible { background: #e7ebdd; }
.abg-toggle svg { width: 16px; height: 16px; }
.abg-toggle[aria-expanded=true] svg { transform: rotate(180deg); }
html.abg-dialog-open { overflow: hidden; }
dialog.abg-viewer {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  width: min(92vw, 1100px);
  max-width: 100vw;
  height: min(91vh, 1000px);
  height: min(91dvh, 1000px);
  max-height: 100dvh;
  border: 1px solid rgba(240, 242, 227, .2);
  border-radius: 14px;
  background: #1b221e;
  color: #fffcf3;
  overflow: hidden;
  box-shadow: 0 16px 90px #131b16a8;
}
dialog.abg-viewer:not([open]) {display: none;}
dialog.abg-viewer::backdrop { background: rgb(13 20 17 / 87%); }
.abg-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  padding: 8px 14px 12px;
}
.abg-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 5px;
}
.abg-count {
  font-size: .85rem;
  letter-spacing: .035em;
  font-variant-numeric: tabular-nums;
  padding-left: 4px;
}
.abg-tool {
  display: grid;
  place-items: center;
  border: 1px solid #78857b;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: #29362c;
  cursor: pointer;
}
.abg-tool:hover, .abg-tool:focus-visible { background: #415545; }
.abg-tool:focus-visible { outline: 2px solid #e4c58c; outline-offset: 2px; }
.abg-tool svg { width: 19px; height: 19px; }
.abg-figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
}
.abg-frame { min-height: 0; width: 100%; touch-action: pan-y pinch-zoom; }
.abg-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.abg-caption { align-self: center; font-size: .92rem; line-height: 1.45; margin: 10px 106px 0 4px; min-height: 42px; display: grid; align-content: center; }
.abg-pager { position: absolute; right: 14px; bottom: 10px; display: flex; gap: 8px; }
@media(max-width: 700px) {
  .abg-grid > li { flex-basis: calc((100% - var(--abg-gap)) * var(--abg-small) - .06px); }
  .abg-photo { border-radius: 7px; }
  .abg-expand { width: 25px; height: 25px; right: 6px; bottom: 6px; }
  dialog.abg-viewer {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .abg-shell { padding: max(8px, env(safe-area-inset-top)) 8px max(12px, env(safe-area-inset-bottom)); }
  .abg-pager { right: 8px; bottom: max(10px, env(safe-area-inset-bottom)); gap: 5px; }
  .abg-caption { margin-right: 96px; }
}
@media(prefers-reduced-motion: reduce) { .abg-expand { transition: none; } }
