.collection-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(24px,3vw,48px);padding-bottom:100px;align-items:stretch; }
.collection-card { display:block;min-width:0; }
.collection-cover { overflow:hidden;border-radius:10px;background:var(--line);aspect-ratio:4/3; }
.collection-cover img { width:100%;height:100%;object-fit:cover;object-position:50% 58%;transition:transform 800ms var(--motion-ease); }
.collection-card[href="fotografie-luxemburg.html"] .collection-cover img { object-position:center 35%; }
.collection-info { display:grid;grid-template-columns:minmax(0,1fr);gap:10px 0;padding-top:22px;align-items:center; }
.collection-info h2 { letter-spacing:-.035em;min-width:0;overflow-wrap:anywhere; }
.collection-info p { grid-column:1/-1;color:var(--muted); }
.collection-info p span { margin-inline:9px; }
.collection-placeholder { border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px 24px;gap:18px;color:var(--muted); }
.collection-placeholder p { color:var(--ink);letter-spacing:-.035em; }
.collection-back { padding-top:38px; }
.collection-back + .page-title { padding-top:38px; }
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
 .collection-card:hover .collection-cover img { transform:scale(1.035); }
}
@media(min-width:701px) and (max-width:1100px) { .collection-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:700px) {
 .collection-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(12px,3vw,24px);padding-bottom:65px; }
 .collection-placeholder { min-height:220px; }
 .collection-info { padding-top:18px; }
 .collection-back { padding-top:25px; }
 .collection-back + .page-title { padding-top:20px; }
}
.photo-book { columns:4;column-gap:clamp(18px,2.2vw,34px); }
.photo-item { margin-bottom:28px;break-inside:avoid; }
.photo-item[hidden] { display:none!important; }
html[data-collection-filter="architecture"] .photo-book .photo-item:not([data-photo-filters~="architecture"]),
html[data-collection-filter="nature"] .photo-book .photo-item:not([data-photo-filters~="nature"]),
html[data-collection-filter="drone"] .photo-book .photo-item:not([data-photo-filters~="drone"]),
html[data-collection-filter="photography"] .photo-book .photo-item:not([data-photo-filters~="photography"]) { display:none!important; }
.photo-open { border-radius:8px; }
.photo-open img { transition:transform 650ms var(--motion-ease); }
.photo-item figcaption { display:flex;justify-content:space-between;gap:12px;padding-top:11px; }
.gallery-bar { align-items:center;gap:24px; }
.gallery-bar .filters { max-width:100%;min-width:0;flex-wrap:nowrap;overflow-x:auto; }
.gallery-bar .filters button { flex:0 0 auto;white-space:nowrap; }
.carousel-viewer { position:fixed;inset:0;padding:22px var(--gutter);overflow:hidden;background:transparent;isolation:isolate;touch-action:manipulation; }
.carousel-viewer::backdrop { background:transparent; }
.viewer-surface { position:absolute;inset:0;background:var(--paper);z-index:0;pointer-events:none; }
.carousel-viewer > .dialog-top,.carousel-viewer > .dialog-bottom { position:relative;z-index:2; }
.photo-carousel { position:relative;flex:1;min-height:0;overflow:hidden;isolation:isolate;margin-block:16px;touch-action:pan-y pinch-zoom; }
.carousel-scene { position:absolute;inset:0;background:var(--paper);isolation:isolate; }
.carousel-scene--outgoing { z-index:1;pointer-events:none; }
.carousel-scene--incoming { z-index:2; }
.carousel-card { position:absolute;left:50%;top:50%;padding:0;min-height:0;border:0;background:transparent;transform-origin:center;-webkit-tap-highlight-color:transparent; }
.carousel-card img { width:100%;height:100%;object-fit:contain;border-radius:4px;user-select:none; }
.carousel-card[data-role="0"] { cursor:default; }
.carousel-card:not([data-role="0"]) { cursor:pointer; }
.carousel-card:focus-visible { outline:2px solid var(--olive);outline-offset:-4px; }
.carousel-viewer .dialog-bottom { gap:24px; }
#book-status { margin-right:auto; }
.carousel-viewer .dialog-bottom button { min-width:48px; }
.carousel-viewer .photo-morph { z-index:8; }
/* Collection surface stays separate; both viewers share the site buttons. */
.collection-viewer .viewer-surface { overflow:hidden; }
.collection-viewer .viewer-surface::before {
  content:"";position:absolute;inset:-16px;pointer-events:none;
  background-color:var(--paper);
  background-image:linear-gradient(var(--grain-veil),var(--grain-veil)),linear-gradient(var(--paper),var(--paper)),var(--grain-texture);
  background-size:auto,auto,1080px 1080px;background-repeat:no-repeat,no-repeat,repeat;
  background-blend-mode:normal,hard-light,normal;
  filter:blur(3px);
  animation:paper-grain-drift var(--grain-duration) ease-in-out infinite;
}
.collection-viewer .carousel-scene { background:transparent; }
.carousel-viewer .dialog-bottom > div { display:flex;gap:10px; }
.carousel-viewer #previous-photo,.carousel-viewer #next-photo { width:48px;height:44px;padding:10px; }
.carousel-viewer .site-button { white-space:nowrap; }
.carousel-viewer .site-button:focus:not(:focus-visible) { outline:none; }
@media(hover:hover) and (prefers-reduced-motion:no-preference) { .photo-open:hover img { transform:scale(1.025); } }
@media(min-width:1700px) { .photo-book { columns:5; } }
@media(max-width:1100px) { .photo-book { columns:3; } }
@media(max-width:760px) { .photo-book { columns:2;column-gap:18px; } }
@media(max-width:699px) {
  .carousel-viewer { padding:14px; }
  .photo-carousel { margin-inline:-14px; }
  .carousel-viewer .dialog-bottom { gap:10px;flex-wrap:wrap; }
  #book-status:empty { display:none; }
  #photo-original { margin-right:auto; }
}
@media(max-width:620px) {
  .gallery-bar { display:flex;flex-wrap:wrap;gap:8px 18px; }
  .gallery-bar .filters { gap:20px; }
  .gallery-bar #photo-total { margin:0; }
  .photo-item { margin-bottom:22px; }
  .photo-item figcaption { gap:8px; }
}
@media(prefers-reduced-motion:reduce) { .photo-open:hover img { transform:none; } }
@media(prefers-reduced-motion:reduce) { .collection-viewer .viewer-surface::before { animation:none; } }
