/* Main page photos, map, and music styles. */
.photo-masonry { column-count: 3; column-gap: 3px; }
.photo-masonry.is-empty { column-count: 1 !important; }
.photo-item {
  break-inside: avoid; margin-bottom: 3px;
  position: relative; cursor: pointer; overflow: hidden;
}
.photo-item img { width: 100%; height: auto; display: block; }
.photo-item .photo-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff; font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 11px; letter-spacing: 0.02em;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.photo-item:hover .photo-info { opacity: 1; transform: translateY(0); }
.photo-item:hover .photo-date { opacity: 1; }
.photo-info .gps-link { pointer-events: auto; }
.photo-batch { display: contents; }
.load-more-btn {
  background: none !important; border: none !important;
  font-family: 'Lora', 'Noto Serif SC', serif !important;
  font-style: italic; font-size: 13px; letter-spacing: 0.1em;
  color: #999; padding: 12px 0; cursor: pointer;
  transition: color .3s ease, transform .3s ease;
}
.load-more-btn:hover { color: var(--fg); transform: translateY(3px); }
.photo-item .photo-date {
position: absolute; top: 8px; right: 10px;
font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
font-size: 10px; color: #fff;
background: rgba(0,0,0,0.45); padding: 2px 8px; border-radius: 3px;
letter-spacing: 0.03em; pointer-events: none; z-index: 2;
opacity: 0; transition: opacity .3s ease;
}

/* Grid/Map toggle */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 48px;
}
.section-header .section-tag { margin-bottom: 0; }
.view-toggle {
  display: inline-flex; align-items: center;
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  user-select: none;
  margin-block: -14px;
}
.view-toggle button {
  background: none; border: 0; padding: 0 6px; margin: 0;
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; letter-spacing: inherit;
  cursor: pointer; transition: color .2s;
}
.view-toggle .active { color: var(--c2); }
.view-toggle .inactive { color: #ccc; }
html.dark .view-toggle .inactive { color: #555; }

/* Map container in photography */
#photo-map-container {
  display: none; width: 100%; height: 55vh;
  scroll-margin-top: 80px;
  border-radius: 12px; overflow: hidden;
  border: 2px solid var(--c2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Custom marker (matching map.html) */
.custom-marker { background: none !important; border: none !important; }
.custom-marker .marker-dot {
  width: 12px; height: 12px;
  background-color: #0066ff;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.custom-marker:hover .marker-dot { transform: scale(1.5); }

/* Dark mode leaflet */
html.dark .leaflet-layer,
html.dark .leaflet-control-zoom-in,
html.dark .leaflet-control-zoom-out,
html.dark .leaflet-control-attribution {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}
html.dark .leaflet-marker-icon,
html.dark .leaflet-marker-shadow,
html.dark .leaflet-popup { filter: none; }
.leaflet-popup-content-wrapper {
  padding: 4px;
  overflow: hidden;
}
.leaflet-popup-content {
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  margin: 8px;
  font-size: 12px; line-height: 1.3; min-width: 0;
}
.leaflet-popup-content img {
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: 180px;
  object-fit: contain;
  border-radius: 4px;
  margin: 0 auto 4px;
  cursor: zoom-in;
}
.leaflet-popup-content b {
  display: block; margin: 0;
}
.leaflet-popup-tip-container {
  width: 20px; height: 10px;
}
.leaflet-popup-close-button {
  padding: 4px 4px 0 0;
  z-index: 10;
  position: relative;
}
@media (max-width: 480px) {
  .leaflet-popup-content img {
    max-width: 160px; max-height: 130px;
  }
}
.leaflet-popup-content .popup-exif { color: #888; font-size: 10px; }
.stars { font-size: 11px; color: #ccc; }
.stars::before { content: '· '; }
