/* Category and theme share a corner without changing the fitted sticker row. */
.leaflet-container .pin-category-stack{position:relative;flex:0 0 auto}
.leaflet-container .pin-category-stack>.pin-badge{position:static;top:auto;right:auto}
.leaflet-container .pin-category-stack>.marker-category-badge{width:22px;height:22px;background:none;border:0;box-shadow:none}
.leaflet-container .marker-category-badge>.atlas-sticker-artwork{inline-size:76%;block-size:76%}
.leaflet-container .pin-category-stack>.pin-themes{
 position:absolute;top:calc(100% + 2px);left:0;
 display:flex;gap:2px;width:max-content;pointer-events:none;
}
/* Mixed-category clusters still have a theme row on the photo itself. */
.leaflet-container :is(.photo-pin,.photo-stack)>.pin-themes{
 --theme-inset:clamp(3px,calc(2px + 2px * var(--photo-scale,1)),6px);
 position:absolute;left:var(--theme-inset);bottom:var(--theme-inset);
 display:flex;flex-wrap:wrap;align-items:flex-end;gap:2px;
 max-width:calc(100% - 2 * var(--theme-inset));pointer-events:none;
}
.leaflet-container .photo-stack>.pin-themes{left:12%;bottom:9%;max-width:76%}
.leaflet-container .pin-theme>.emoji{
 font-size:clamp(10px,calc(7px + 8px * var(--photo-scale,1)),20px);
}
.leaflet-container .is-photo-preview>:is(.photo-pin,.photo-stack)>.pin-themes{
 left:calc(var(--hover-padding,8px) + 5px);
 top:calc(var(--hover-padding,8px) + var(--hover-photo-height) - 5px);bottom:auto;transform:translateY(-100%);
 max-width:calc(var(--hover-photo-width) - 10px);gap:4px 7px;
}
.leaflet-container .is-photo-preview .pin-theme>.emoji{font-size:clamp(12px,calc(16px * var(--hover-ui-scale,1)),20px)}
.leaflet-container .is-photo-preview .pin-category-stack>.pin-themes{
 flex-wrap:wrap;gap:4px 7px;max-width:calc(var(--hover-photo-width) - 16px);
}

/* The enlarged photo keeps its artwork and gallery controls. */
.leaflet-container[data-marker-hover-mode=photo] .photo-pin,
.leaflet-container[data-marker-hover-mode=photo] .photo-stack{transition:width .22s cubic-bezier(.22,.8,.22,1),height .22s cubic-bezier(.22,.8,.22,1),transform .22s cubic-bezier(.22,.8,.22,1),box-shadow .22s ease}
.leaflet-container[data-marker-hover-mode=photo] .photo-pin>img,
.leaflet-container[data-marker-hover-mode=photo] .photo-stack>img{transition:width .22s cubic-bezier(.22,.8,.22,1),height .22s cubic-bezier(.22,.8,.22,1),left .22s cubic-bezier(.22,.8,.22,1),top .22s cubic-bezier(.22,.8,.22,1),transform .22s cubic-bezier(.22,.8,.22,1),opacity .12s ease,border-radius .22s ease}
.leaflet-container .is-photo-preview>.photo-pin,.leaflet-container .is-photo-preview>.photo-stack{
 position:relative;width:var(--hover-width);height:var(--hover-height);padding:0;
 transform:translate(var(--hover-offset-x),var(--hover-offset-y));transform-origin:0 0;
 border:0;border-radius:calc(20px * var(--hover-ui-scale,1));background:#fff;filter:none;box-shadow:0 7px 28px #00000024;
 overflow:hidden;cursor:pointer;
}
.leaflet-container .is-photo-preview>.photo-pin>img,
.leaflet-container .is-photo-preview>.photo-stack>img:last-of-type{
 position:absolute;left:var(--hover-padding,8px);top:var(--hover-padding,8px);width:var(--hover-photo-width);height:var(--hover-photo-height);
 margin:0;transform:none;border:0;border-radius:calc(14px * var(--hover-gallery-scale,1));box-shadow:none;object-fit:cover;
}
.leaflet-container .is-photo-preview>.photo-stack>img:not(:last-of-type){opacity:0;visibility:hidden;transition:none;pointer-events:none}
.leaflet-container[data-marker-hover-mode=photo] .is-photo-closing>.photo-stack>img:not(:last-of-type){visibility:hidden;transition:none;pointer-events:none}
.leaflet-container .is-photo-preview>.photo-pin>.pin-stickers,
.leaflet-container .is-photo-preview>.photo-stack>.cluster-stickers{
 --map-sticker-gap:7px;--map-pin-trim:0px;--map-sticker-fit:var(--map-preview-sticker-fit,1);
 min-width:calc(var(--hover-photo-width) - 2 * var(--hover-padding,8px));
 right:calc(100% - var(--hover-photo-width));top:calc(12px * var(--hover-ui-scale,1));
}
.leaflet-container .is-photo-preview>:is(.photo-pin,.photo-stack)>.marker-info-label{
 position:absolute;inset:auto;left:var(--hover-info-left);top:var(--hover-info-top);
 display:flex;flex-direction:column;gap:6px;width:var(--hover-info-width);height:var(--hover-info-height);max-width:none;
 margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;transform:none;
 text-align:left;visibility:visible;opacity:1;transition:none;pointer-events:auto;
}
.leaflet-container .is-photo-preview .marker-info-label:before{display:none}
.leaflet-container .is-photo-preview .marker-info-label>.marker-title{
 flex:none;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
 font-size:clamp(12px,calc(15px * var(--hover-ui-scale,1)),15px);font-weight:600;line-height:1.25;white-space:normal;
}
.leaflet-container .is-photo-preview .marker-info-label>.marker-description{
 flex:1 1 auto;display:block;min-height:0;width:100%;max-width:none;margin:0;padding:0;
 color:#555;text-align:left;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;touch-action:pan-y;transition:none;
}
.leaflet-container .is-photo-preview .marker-info-label:not(.has-marker-hover-content)>.marker-description{display:none}
.leaflet-container .is-photo-preview .marker-info-label .marker-info-tags{
 gap:6px;width:100%;max-height:none;overflow:visible;
}
.leaflet-container .is-photo-preview .marker-info-label .marker-hover-extra{order:-1}
.leaflet-container .is-photo-preview .marker-info-label .marker-hover-ratings{order:-2}
.leaflet-container .is-photo-preview .marker-info-label .marker-description-text{text-wrap:pretty}
.leaflet-container .is-photo-preview :is(.cluster-count,.pin-route-count,.pin-like-count){display:none}
.leaflet-container .is-photo-preview.is-selected>.photo-pin,
.leaflet-container .is-photo-preview.is-selected>.photo-stack{box-shadow:var(--map-selection-ring),0 7px 28px #00000024}
@media(prefers-reduced-motion:reduce){
 .leaflet-container[data-marker-hover-mode=photo] .photo-pin,.leaflet-container[data-marker-hover-mode=photo] .photo-stack,
 .leaflet-container[data-marker-hover-mode=photo] .photo-pin>img,.leaflet-container[data-marker-hover-mode=photo] .photo-stack>img{transition:none}
}

/* A zoom layout moves the collapsed markers as a batch. Expanded photos keep their own transitions. */
.leaflet-container[data-marker-hover-mode=photo] .leaflet-marker-pane.is-marker-zoom-layout
:is(.photo-marker,.photo-cluster):not(:where(.is-preview,.is-photo-preview,.is-photo-closing))>:is(.photo-pin,.photo-stack),
.leaflet-container[data-marker-hover-mode=photo] .leaflet-marker-pane.is-marker-zoom-layout
:is(.photo-marker,.photo-cluster):not(:where(.is-preview,.is-photo-preview,.is-photo-closing))>:is(.photo-pin,.photo-stack)>img{
  transition:none;
}
.leaflet-container :is(.photo-pin,.photo-stack)>img:not([src]){color:transparent}
#map .photo-marker:not(:where(.is-preview,.is-photo-preview,.is-photo-closing))>.photo-pin>img[data-marker-photo-pending],
#map .photo-cluster:not(:where(.is-preview,.is-photo-preview,.is-photo-closing))>.photo-stack>img[data-marker-photo-pending]{visibility:hidden}
#map .is-marker-shell,#map .is-marker-shell>.photo-pin{filter:none}
#map .is-marker-shell>.photo-stack>img{box-shadow:none}
