/* ===================================================
   精彩回顧 — 無名小站風格相簿
   =================================================== */

/* 標題區 */
.gallery-title-wrap {
  text-align: center;
  margin-bottom: 28px;
}
.gallery-title {
  font-size: 26px !important;
  font-weight: 700;
  color: #6b4f3a;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  font-family: 'Noto Serif TC', 'Source Han Serif TC', serif;
}
.gallery-subtitle {
  font-size: 13px;
  color: #a08a6e;
  letter-spacing: 0.25em;
  margin: 0;
}
.gallery-count {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #9a8872;
  letter-spacing: 0.05em;
}

/* 縮圖網格 */
.wretch-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 0 8px;
}

@media (max-width: 767px) {
  .wretch-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .wretch-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

/* 每張照片的外框 — 仿底片 / 拍立得 */
.wretch-item {
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wretch-item:hover {
  transform: translateY(-4px) rotate(-1deg);
  z-index: 2;
}

.wretch-frame {
  background: #fffef8;
  border: 1px solid #d6cdb9;
  border-radius: 3px;
  padding: 5px 5px 22px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.08),
    1px 2px 6px rgba(120,100,70,0.1);
  position: relative;
  transition: box-shadow 0.25s ease;
  height: 100px;
  width: 100px;
}
.wretch-item:hover .wretch-frame {
  box-shadow:
    0 4px 14px rgba(120,100,70,0.22),
    0 1px 4px rgba(0,0,0,0.1);
}

/* 方形縮圖 */
.wretch-thumb {
  width: 100%;
  padding-bottom: 100%;
  background-size: cover;
  background-position: center;
  border-radius: 1px;
  background-color: #e8e2d6;
}

/* 編號 */
.wretch-num {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 10px;
  color: #b8a78e;
  font-family: 'Georgia', serif;
  letter-spacing: 0.05em;
}

/* ===== Lightbox 燈箱 ===== */
.wretch-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.wretch-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.wretch-lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,25,18,0.88);
  backdrop-filter: blur(4px);
}

.wretch-lb-content {
  position: relative;
  z-index: 2;
  max-width: 88vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wretch-lb-content img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  border: 4px solid #fffef6;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  background: #222;
}

.wretch-lb-counter {
  margin-top: 12px;
  color: #d4c9b0;
  font-size: 14px;
  font-family: 'Georgia', serif;
  letter-spacing: 0.15em;
}

.wretch-lb-close {
  position: absolute;
  top: 16px;
  right: 22px;
  z-index: 5;
  background: none;
  border: none;
  color: #e8dcc8;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}
.wretch-lb-close:hover {
  color: #fff;
  transform: scale(1.15);
}

.wretch-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ede4d0;
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(4px);
}
.wretch-lb-arrow:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.wretch-lb-prev { left: clamp(10px, 3vw, 30px); }
.wretch-lb-next { right: clamp(10px, 3vw, 30px); }

@media (max-width: 576px) {
  .wretch-lb-arrow {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
  .wretch-lb-content img {
    max-width: 95vw;
    max-height: 72vh;
    border-width: 3px;
  }
}
