.photos-card .chart-title { border-bottom: 1px solid var(--line-soft); }
.photos-thumbs {
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr); /* JS overrides for <4 photos */
}
.photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; cursor: pointer;
  background: var(--panel-sunken);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.photo-thumb:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(15, 110, 111, 0.18), 0 2px 4px rgba(15, 110, 111, 0.1);
}
.photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.photo-thumb-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.photo-thumb-error { color: var(--bad); font-size: 1rem; }

.lightbox {
  position: fixed; inset: 0;
  display: none;
  z-index: 2000;
}
.lightbox.visible { display: block; }
.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 12, 14, 0.92);
  backdrop-filter: blur(3px);
}
.lightbox-img {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 92vw; max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  border-radius: var(--r-sm);
  transition: opacity 0.15s var(--ease);
}
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 1.4rem; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  line-height: 1; padding: 0;
  transition: background var(--t-fast) var(--ease);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 1.8rem; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
  transition: background var(--t-fast) var(--ease);
}
.lightbox-nav:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18); }
.lightbox-nav:disabled { opacity: 0.2; cursor: not-allowed; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter {
  position: absolute; bottom: 22px; left: 50%;
  transform: translateX(-50%);
  color: #fff; font-size: 0.74rem;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 13px; border-radius: 2px;
  letter-spacing: 0.05em;
}
