:root {
  --tsg-gap: 8px;
}

.tsg-gallery {
  --columns: var(--tsg-columns, 4);
}

.tsg-accordion-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 0 0 12px 0;
  overflow: hidden;
  background: #fff;
}

.tsg-accordion-header {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 600;
  list-style: none;
}

.tsg-accordion-item[open] .tsg-accordion-header {
  border-bottom: 1px solid #e2e8f0;
}

.tsg-grid {
  display: grid;
  grid-template-columns: repeat(var(--tsg-columns, 4), minmax(0, 1fr));
  gap: var(--tsg-gap);
  padding: var(--tsg-gap);
}

.tsg-thumb {
  display: block;
  position: relative;
  transition: transform 0.2s ease;
}

.tsg-thumb:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.tsg-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f7fafc;
}

/* Lightbox styles */
#tsg-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

#tsg-lightbox img {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

#tsg-lightbox .close-button {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

#tsg-lightbox .close-button:hover {
  opacity: 0.7;
}

.tsg-notice {
  padding: 12px;
  background: #fffbea;
  border: 1px solid #f2d024;
  border-radius: 6px;
}

/* Random grid styles */
.tsg-random-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--tsg-gap);
  max-width: 600px;
  margin: 0 auto;
}

.tsg-random-thumb {
  display: block;
  position: relative;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.tsg-random-thumb:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.tsg-random-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f7fafc;
}

