  .ac-gallery { --ac-gap:14px; --ac-radius:6px; --ac-shadow:0 2px 6px rgba(0,0,0,.12); --ac-shadow-hover:0 6px 18px rgba(0,0,0,.25); --ac-focus:#0066cc; margin:1.5rem 0; }
  .ac-gallery__heading { font-size:1.25rem; margin:0 0 .75rem; }
  .ac-gallery__grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:var(--ac-gap); list-style:none; margin:0; padding:0; }
  .ac-gallery__item { margin:0; }
  .ac-gallery__btn { display:block; width:100%; padding:0; border:0; background:#f3f3f3; border-radius:var(--ac-radius); overflow:hidden; cursor:pointer; box-shadow:var(--ac-shadow); transition:transform .15s ease, box-shadow .15s ease; }
  .ac-gallery__btn:hover, .ac-gallery__btn:focus-visible { transform:translateY(-2px); box-shadow:var(--ac-shadow-hover); }
  .ac-gallery__btn:focus-visible { outline:3px solid var(--ac-focus); outline-offset:2px; }
  .ac-gallery__thumb { display:block; width:100%; aspect-ratio:4 / 3; object-fit:cover; background:#e9e9e9; }
  .ac-modal { width:100vw; max-width:none; height:100vh; max-height:none; margin:0; padding:24px; border:0; background:transparent; overflow:visible; color:#fff; }
  .ac-modal[open] { display:flex; align-items:center; justify-content:center; }
  .ac-modal::backdrop { background:rgba(0,0,0,.85); animation:ac-fade .15s ease-out; }
  @keyframes ac-fade { from { opacity:0 } to { opacity:1 } }
  .ac-modal__inner { position:relative; max-width:min(96vw, 1400px); max-height:92vh; display:flex; flex-direction:column; align-items:center; }
  .ac-modal__img { max-width:100%; max-height:84vh; object-fit:contain; border-radius:4px; box-shadow:0 10px 40px rgba(0,0,0,.6); background:#111; }
  .ac-modal__caption { color:#fff; font-size:.95rem; margin-top:.75rem; text-align:center; max-width:80ch; }
  .ac-modal__counter { color:#ccc; font-size:.85rem; margin-top:.25rem; }
  .ac-modal__btn { position:absolute; top:50%; transform:translateY(-50%); width:48px; height:48px; border-radius:50%; border:0; background:rgba(255,255,255,.9); color:#111; font-size:1.5rem; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(0,0,0,.4); }
  .ac-modal__btn:hover { background:#fff; }
  .ac-modal__btn:focus-visible { outline:3px solid #fff; outline-offset:2px; }
  .ac-modal__prev { left:-64px; }
  .ac-modal__next { right:-64px; }
  .ac-modal__close { position:absolute; top:-48px; right:0; width:40px; height:40px; border-radius:50%; border:0; background:rgba(255,255,255,.9); color:#111; font-size:1.4rem; line-height:1; cursor:pointer; }
  .ac-modal__close:hover { background:#fff; }
  .ac-modal__close:focus-visible { outline:3px solid #fff; outline-offset:2px; }
  @media (max-width:768px) {
    .ac-modal { padding:12px; }
    .ac-modal__prev { left:4px; }
    .ac-modal__next { right:4px; }
    .ac-modal__close { top:4px; right:4px; }
    .ac-modal__btn { width:40px; height:40px; font-size:1.25rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .ac-gallery__btn { transition:none; }
    .ac-modal { animation:none; }
  }
