.tsr-pods-gallery {
  --tsr-gallery-min: 180px;
  --tsr-gallery-gap: 14px;
  --tsr-gallery-radius: 18px;
  --tsr-gallery-aspect: 4 / 3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--tsr-gallery-min), 1fr));
  gap: var(--tsr-gallery-gap);
  margin: 32px 0;
}

.tsr-pods-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: var(--tsr-gallery-radius);
  aspect-ratio: var(--tsr-gallery-aspect);
  background: #f4f4f4;
  text-decoration: none;
}

.tsr-pods-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .28s ease, filter .28s ease;
}

.tsr-pods-gallery__item:hover .tsr-pods-gallery__img {
  transform: scale(1.04);
  filter: brightness(.95);
}

.tsr-pods-gallery-notice {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff8e5;
  color: #5f4500;
}

.tsr-pods-gallery__item[data-tsr-gallery-modal="1"] { cursor: zoom-in; }

.tsr-pods-gallery-modal-open { overflow: hidden; }

.tsr-pods-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.86);
}

.tsr-pods-gallery-modal.is-open { display: flex; }

.tsr-pods-gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.tsr-pods-gallery-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: min(1120px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.tsr-pods-gallery-modal__img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
}

.tsr-pods-gallery-modal__close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #65171e;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.tsr-pods-gallery-modal__actions {
  display: flex;
  justify-content: center;
}

.tsr-pods-gallery-modal__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg,#f5e9cc,#e6d2a5);
  color: #65171e !important;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(0,0,0,.32);
}

@media (max-width: 700px) {
  .tsr-pods-gallery-modal { padding: 16px; }
  .tsr-pods-gallery-modal__close { top: 8px; right: 8px; }
  .tsr-pods-gallery-modal__img { max-height: 72vh; }
}
