.system-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.system-gallery-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.system-gallery-thumb {
  position: relative;
  width: 100%;
  padding-top: 62.5%;
  background-color: #e6f2ee;
}

.system-gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.system-gallery-card button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
}

.system-gallery-caption {
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #1b3c33;
  font-weight: 600;
}

.proposal-gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
}

.proposal-gallery-lightbox.is-open {
  display: flex;
}

.proposal-gallery-lightbox-content {
  position: relative;
  max-width: 960px;
  width: min(90vw, 960px);
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.proposal-gallery-lightbox-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.proposal-gallery-lightbox-caption {
  padding: 14px 18px;
  color: #f2f2f2;
  font-size: 1rem;
  background: #0b1410;
}

.proposal-gallery-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
}

.proposal-gallery-lightbox-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.proposal-gallery-lightbox-controls button {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.proposal-gallery-lock {
  overflow: hidden;
}

main > section.card {
  width: min(var(--maxw), calc(100% - 32px));
  margin: 14px auto 0;
}
