/* Galerie-Ergänzungen zum Seiten-CSS (../assets/css/style.css). Nutzt dieselben Farb-Tokens. */
.crumbs {
  margin-top: 20px;
  font-size: 0.9rem;
}
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}
.crumbs li {
  display: flex;
  align-items: center;
  color: var(--soft);
}
.crumbs li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--line);
}
.crumbs a {
  color: var(--fg);
  text-decoration: none;
  padding: 6px 0;
}
.crumbs a:hover {
  color: var(--red);
}
/* Albumkacheln */
.g-albums {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.g-album {
  display: grid;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.g-album:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}
.g-cover {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  aspect-ratio: 3/2;
  background: var(--line);
}
.g-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g-cover img:first-child {
  grid-row: span 2;
}
.g-cover img:only-child {
  grid-column: span 2;
}
.g-cover img:nth-child(2):last-child {
  grid-row: span 2;
}
.g-info {
  display: grid;
  gap: 2px;
  padding: 14px 16px 16px;
}
.g-info strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}
.g-count {
  color: var(--soft);
  font-size: 0.88rem;
}
/* Foto-Raster */
.g-photos {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.g-photos a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.g-photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.25s;
}
.g-photos a:hover img {
  transform: scale(1.04);
}
.g-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.g-pages a {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
}
.g-pages a[aria-current="page"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.g-note {
  margin-top: 32px;
  font-size: 0.88rem;
  color: var(--soft);
}
/* Lightbox: immer dunkel, damit Fotos wirken */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 7, 10, 0.96);
  display: grid;
  place-items: center;
  touch-action: pan-y;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.lb[hidden] {
  display: none;
}
.lb-img,
.lb-video {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
}
.lb-video {
  background: #000;
}
.lb [hidden] {
  display: none;
}
/* Video-Vorschaubild mit Abspiel-Symbol */
.g-photos a.g-video {
  position: relative;
}
.g-photos a.g-video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(14, 13, 18, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 26px no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.lb-count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  text-align: center;
  color: #d6d0dc;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.lb-close {
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
  font-size: 1.1rem;
}
.lb-prev {
  left: calc(14px + env(safe-area-inset-left, 0px));
  top: 50%;
  transform: translateY(-50%);
}
.lb-next {
  right: calc(14px + env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 760px) {
  .g-albums {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .g-info {
    padding: 10px 12px 12px;
  }
  .g-info strong {
    font-size: 1rem;
  }
  .g-photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .g-photos a {
    border-radius: 6px;
  }
  .lb-prev,
  .lb-next {
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    transform: none;
  }
}
@media (max-width: 420px) {
  .g-albums {
    grid-template-columns: 1fr;
  }
}
body.lb-open {
  overflow: hidden;
}
