/* Width containment and intrinsic dimensions are independent of the invitation's layout. */
body.photo-open{overflow:hidden}.ig-shape-natural .ig-photo img{max-height:480px;object-fit:contain}
.inv-gallery{width:100%;max-width:100%;min-width:0;margin:0 auto;box-sizing:border-box;color:inherit;isolation:isolate}.inv-gallery h2{font:500 clamp(26px,6vw,38px)/1.2 var(--cv-display,'Cormorant Garamond',Georgia,serif);margin:0;text-align:center;text-wrap:balance;overflow-wrap:anywhere}.ig-intro{margin:12px 0 22px;white-space:pre-line;line-height:1.6;overflow-wrap:anywhere}.ig-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;max-width:100%;margin:22px 0 0;padding:0;list-style:none;align-items:start}.ig-photo{display:block;min-width:0;max-width:100%;overflow:hidden;text-decoration:none;border-radius:var(--ig-radius,5px);background:color-mix(in srgb,var(--inv-text) 5%,var(--inv-bg));color:inherit}.ig-photo img{display:block;width:100%;max-width:100%;height:auto;box-sizing:border-box;object-fit:cover}.ig-photo:focus-visible{outline:3px solid var(--inv-accent);outline-offset:4px}.ig-shape-natural .ig-wide{grid-column:1/-1}.ig-list[data-photos="1"]{grid-template-columns:minmax(0,1fr);max-width:440px;margin-inline:auto}.ig-shape-square .ig-photo img{aspect-ratio:1;object-fit:cover}.ig-shape-portrait .ig-photo img{aspect-ratio:3/4;object-fit:cover}.ig-fit-contain .ig-photo img{object-fit:contain}.ig-editorial .ig-list{gap:20px 12px}.ig-editorial .ig-photo:nth-child(3n+1){grid-column:1/-1}.ig-album .ig-photo{padding:8px 8px 20px;background:var(--inv-surface,#fff);border:1px solid color-mix(in srgb,var(--inv-text) 16%,transparent);border-radius:2px;box-shadow:0 3px 9px #0000000a}.ig-album .ig-list{gap:16px}.ig-filmstrip .ig-list{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain;padding:8px 2px 16px;align-items:stretch;scrollbar-width:thin}.ig-filmstrip .ig-photo{flex:0 0 76%;scroll-snap-align:center;max-width:360px;min-height:120px;display:grid;place-items:center}.ig-filmstrip .ig-photo img{height:100%;max-height:420px;aspect-ratio:3/4;object-fit:contain}.ig-filmstrip .ig-list[data-photos="1"] .ig-photo{flex-basis:100%;max-width:none}.ig-filmstrip .ig-photo{border:1px solid color-mix(in srgb,currentColor 16%,transparent)}.ig-filmstrip .ig-list{scroll-padding-inline:2px}.inv-gallery-dialog{box-sizing:border-box;width:min(95vw,1000px);max-width:95vw;max-height:94dvh;overflow:auto;border:0;border-radius:12px;margin:auto;padding:14px;background:var(--inv-surface,#fff);color:var(--inv-text,#222)}.inv-gallery-dialog::backdrop{background:#000c}.inv-gallery-dialog [data-photo-image]{display:block;width:auto;height:auto;max-width:100%;max-height:68dvh;object-fit:contain;margin:12px auto}.ig-dialog-head,.ig-dialog-actions{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.inv-gallery-dialog button{min-height:44px;padding:9px 16px;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:30px;background:transparent;color:inherit;font:inherit;max-width:100%;overflow-wrap:anywhere}.inv-gallery-dialog [data-photo-caption]{line-height:1.5;overflow-wrap:anywhere;text-align:center;margin:10px 0}.inv-gallery-dialog button:focus-visible{outline:3px solid var(--inv-accent);outline-offset:3px}.ig-caption{font:400 12px/1.5 'Manrope',sans-serif;opacity:.75;text-align:center;margin:10px 0 0}.ig-list:focus-visible{outline:2px solid var(--inv-accent);outline-offset:3px}.cv-gallery:has(.inv-gallery){min-width:0;max-width:680px}.lv-block-gallery:has(.inv-gallery){min-width:0;width:100%;box-sizing:border-box}.cv-block:has(.inv-gallery):not(:has(.ig-photo)),.lv-block-gallery:not(:has(.ig-photo)){display:none}.cv-gallery .inv-gallery>h2{font-family:var(--cv-display,'Cormorant Garamond',Georgia,serif)}.sc-page-storybook .ig-photo,.sc-page-snowglobe .ig-photo{--ig-radius:18px}.sc-page-ticket .inv-gallery{border-block:1px dashed currentColor;padding-block:20px}.sc-page-editorial .inv-gallery h2{text-align:left}.lv-page .ig-list{margin-top:22px}@media(max-width:360px){.ig-list{gap:8px}.ig-album .ig-photo{padding:5px 5px 14px}.ig-filmstrip .ig-photo{flex-basis:88%}}@media(prefers-reduced-motion:reduce){.ig-list{scroll-behavior:auto}}
/* Keep the viewer geometry stable while switching portrait and landscape photos. */
.ig-shape-natural .ig-photo:first-child:has(+.ig-wide),.ig-shape-natural .ig-wide+.ig-photo:has(+.ig-wide),.ig-shape-natural .ig-wide+.ig-photo:last-child{grid-column:1/-1}
.inv-gallery-dialog [data-photo-image]{width:100%;height:68dvh;max-height:68dvh;object-fit:contain}.inv-gallery-dialog{overscroll-behavior:contain}.inv-gallery{margin-top:40px}.cv-block .inv-gallery,.lv-block .inv-gallery{margin-top:0}
/* Natural film frames follow the source ratio; fixed shapes remain an explicit choice. */
.ig-filmstrip.ig-shape-natural .ig-list{align-items:center}.ig-filmstrip.ig-shape-natural .ig-photo{display:block;min-height:0}.ig-filmstrip.ig-shape-natural .ig-photo img{height:auto;aspect-ratio:auto;max-height:420px;object-fit:contain}.ig-filmstrip.ig-shape-square .ig-photo img{aspect-ratio:1;height:auto}.ig-filmstrip.ig-fit-cover.ig-shape-square .ig-photo img,.ig-filmstrip.ig-fit-cover.ig-shape-portrait .ig-photo img{object-fit:cover}
/* Sample frames for an empty gallery (template sample, owner preview): palette-tinted tiles with a line icon (D209). */
.ig-ph{--ig-ph-bg:linear-gradient(160deg,color-mix(in srgb,currentColor 5%,transparent),color-mix(in srgb,currentColor 12%,transparent));display:grid;place-items:center;aspect-ratio:4/5;color:inherit;background:var(--ig-ph-bg);border:1px solid color-mix(in srgb,currentColor 13%,transparent)}.ig-ph svg{width:clamp(32px,11vw,48px);height:auto;opacity:.42}
.inv-gallery{--ig-card:color-mix(in srgb,currentColor 4%,var(--ig-bg,var(--inv-bg,#fff)))}
.ig-sample-note{margin:14px 0 0;text-align:center;font:400 14px/1.5 'Manrope',sans-serif;opacity:.7}
.ig-viewport{min-width:0;max-width:100%}
/* Five looks (D210). Мозаика: sample frames as a 3-column mosaic, real photos keep the grid. */
.ig-sample:is(.ig-grid,.ig-editorial) .ig-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ig-sample:is(.ig-grid,.ig-editorial) .ig-ph{aspect-ratio:1;grid-column:auto}.ig-sample:is(.ig-grid,.ig-editorial) .ig-ph:first-child{grid-column:1/3;grid-row:1/3}.ig-sample.ig-editorial .ig-ph:first-child{grid-column:2/4}
/* Полароиды: tilted prints. */
.ig-album .ig-photo:nth-child(odd){rotate:-1.4deg}.ig-album .ig-photo:nth-child(even){rotate:1.6deg;translate:0 6px}.ig-album .ig-ph{aspect-ratio:1;background:var(--ig-ph-bg) content-box,var(--ig-card);border-color:color-mix(in srgb,currentColor 16%,transparent)}
.ig-filmstrip .ig-ph.ig-ph{display:grid;aspect-ratio:3/4;min-height:0;max-height:420px}
/* Книжка: pages turn over the left spine. */
.ig-book .ig-viewport{overflow-x:clip;padding:4px 0 12px}.ig-book .ig-list{display:block;position:relative;width:min(76%,340px);aspect-ratio:4/5;margin:22px auto 0;perspective:1600px}.ig-book .ig-list::before{content:"";position:absolute;inset:5px -7px -7px 3px;border-radius:3px 9px 9px 3px;background:var(--ig-card);box-shadow:3px 3px 0 -1px color-mix(in srgb,var(--inv-text,#333) 12%,var(--ig-card)),0 14px 28px -16px #0008}
.inv-gallery.ig-book .ig-photo{position:absolute;inset:0;overflow:visible;padding:12px;box-sizing:border-box;border-radius:2px 8px 8px 2px;transform-origin:left center;transition:transform 1s cubic-bezier(.35,.1,.25,1),opacity 0s;background:var(--ig-card);border:0;box-shadow:0 1px 3px #0002;rotate:none;translate:none}.inv-gallery.ig-book .ig-photo::before{content:"";position:absolute;inset:0 auto 0 0;width:22px;border-radius:2px 0 0 2px;background:linear-gradient(90deg,#0000002e,#0000);pointer-events:none;z-index:2}
.inv-gallery.ig-book .ig-photo img{width:100%;height:100%;max-height:none;object-fit:cover}.inv-gallery.ig-book.ig-fit-contain .ig-photo img{object-fit:contain}.inv-gallery.ig-book .ig-ph{background:var(--ig-ph-bg) content-box,var(--ig-card);aspect-ratio:auto}
.inv-gallery.ig-book .ig-photo.is-turned{transform:rotateY(-172deg);opacity:0;pointer-events:none;transition:transform 1s cubic-bezier(.35,.1,.25,1),opacity .25s .72s}
/* Стопка карточек: the top print flies off and goes under the pile. */
.ig-stack .ig-viewport{overflow-x:clip;padding:6px 0 26px}.ig-stack .ig-list{display:grid;grid-template-columns:100%;place-items:center;width:min(72%,320px);margin:22px auto 0}
.inv-gallery.ig-stack .ig-photo{grid-area:1/1;width:100%;box-sizing:border-box;padding:10px 10px 34px;background:var(--ig-card);border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:4px;box-shadow:0 14px 26px -16px #0008;--r:0deg;transform:translateY(calc(var(--pos,0) * 9px)) rotate(var(--r)) scale(calc(1 - var(--pos,0) * .035));transition:transform .6s cubic-bezier(.3,.7,.3,1),opacity .35s}
.ig-stack .ig-photo:nth-child(4n+1){--r:-5deg}.ig-stack .ig-photo:nth-child(4n+2){--r:4.5deg}.ig-stack .ig-photo:nth-child(4n+3){--r:-3deg}.ig-stack .ig-photo:nth-child(4n){--r:6deg}.inv-gallery.ig-stack .ig-photo.is-top{--r:-.6deg}.ig-stack .ig-photo.is-deep{opacity:0}
.inv-gallery.ig-stack .ig-photo.is-gone{transform:translate(118%,-8%) rotate(18deg);opacity:0;z-index:90!important;transition:transform .6s cubic-bezier(.5,0,.75,.4),opacity .25s .35s}.ig-stack .ig-photo.no-anim{transition:none}
.inv-gallery.ig-stack .ig-photo img{width:100%;max-height:380px;object-fit:cover}.ig-stack .ig-ph{background:var(--ig-ph-bg) content-box,var(--ig-card)}
/* Бегущая строка: a looping ribbon of prints, paused under a finger or the mouse. */
.ig-marquee .ig-viewport{overflow:hidden;padding:4px 0 16px;-webkit-mask-image:linear-gradient(90deg,#0000,#000 7%,#000 93%,#0000);mask-image:linear-gradient(90deg,#0000,#000 7%,#000 93%,#0000)}.ig-marquee .ig-list{display:flex;width:max-content;max-width:none;gap:12px;align-items:flex-start;margin-top:22px}.ig-marquee .ig-list.is-looped{animation:ig-marquee var(--ig-dur,30s) linear infinite}.ig-marquee .ig-viewport:is(:hover,:focus-within,:active) .ig-list{animation-play-state:paused}
.inv-gallery.ig-marquee .ig-photo{flex:none;height:clamp(180px,52vw,240px);width:auto}.ig-marquee .ig-photo:nth-child(even){translate:0 12px}.inv-gallery.ig-marquee .ig-photo img{height:100%;width:auto;max-height:none;max-width:none}.ig-marquee .ig-ph{aspect-ratio:4/5}
@keyframes ig-marquee{to{transform:translateX(calc(-50% - 6px))}}
@media(prefers-reduced-motion:reduce){.ig-marquee .ig-viewport{overflow-x:auto;-webkit-mask-image:none;mask-image:none}.inv-gallery.ig-book .ig-photo,.inv-gallery.ig-stack .ig-photo{transition:none}}
.ig-nav{display:flex;justify-content:center;align-items:center;gap:18px;margin-top:14px}.ig-nav button{width:44px;height:44px;border-radius:50%;border:1px solid color-mix(in srgb,currentColor 30%,transparent);background:color-mix(in srgb,currentColor 6%,transparent);color:inherit;font:400 24px/1 Georgia,serif;cursor:pointer}.ig-nav button:focus-visible{outline:3px solid var(--inv-accent);outline-offset:3px}.ig-nav [data-ig-count]{min-width:52px;text-align:center;font:500 15px/1 'Manrope',sans-serif;opacity:.75}
.ig-book .ig-list,.ig-stack .ig-list{cursor:pointer;touch-action:pan-y;user-select:none;-webkit-user-select:none}
/* Any photo count (D210): an odd last print sits centred, one marquee photo stands still in the middle. */
.inv-gallery:is(.ig-grid,.ig-album):not(.ig-sample) .ig-list>.ig-photo:last-child:nth-child(odd):not(:first-child):not(.ig-wide){grid-column:1/-1;justify-self:center;width:calc(50% - 8px)}
.ig-marquee .ig-list[data-photos="1"]{margin-inline:auto}.ig-marquee .ig-list:not(.is-looped){margin-inline:auto}
/* На верёвочке (D212): prints pinned to a sagging string, swaying a little; the row scrolls sideways. */
.ig-garland .ig-viewport{overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain;scrollbar-width:thin;padding:0 4px 14px}.ig-garland .ig-list{display:flex;gap:18px;width:max-content;max-width:none;margin-top:18px;padding:30px 10px 8px;align-items:flex-start}
.inv-gallery.ig-garland .ig-photo{position:relative;flex:none;width:min(58vw,240px);overflow:visible;padding:8px 8px 22px;box-sizing:border-box;background:var(--ig-card);border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:2px;box-shadow:0 10px 18px -12px #0007;scroll-snap-align:center;transform-origin:50% -24px;animation:ig-sway 4.6s ease-in-out infinite alternate}
.ig-garland .ig-photo:nth-child(odd){--sway:-1.8deg;animation-duration:5.2s}.ig-garland .ig-photo:nth-child(even){--sway:1.6deg;margin-top:10px}.ig-garland .ig-photo:nth-child(3n){animation-delay:-2s}
.ig-garland .ig-photo::before{content:"";position:absolute;left:-19px;right:-19px;top:-30px;height:20px;border-bottom:1.5px solid color-mix(in srgb,currentColor 45%,transparent);border-radius:0 0 50% 50%/0 0 100% 100%;pointer-events:none}.ig-garland .ig-photo:nth-child(even)::before{top:-40px}
.ig-garland .ig-photo::after{content:"";position:absolute;left:50%;top:-16px;width:9px;height:24px;margin-left:-4.5px;border-radius:2px;background:linear-gradient(90deg,color-mix(in srgb,currentColor 30%,var(--ig-card)),color-mix(in srgb,currentColor 16%,var(--ig-card)) 50%,color-mix(in srgb,currentColor 30%,var(--ig-card)));box-shadow:0 1px 2px #0003}
.inv-gallery.ig-garland .ig-photo img{width:100%;height:auto;max-height:300px;object-fit:contain}.ig-garland .ig-ph{aspect-ratio:4/5;background:var(--ig-ph-bg) content-box,var(--ig-card)}
@keyframes ig-sway{from{rotate:var(--sway,-1.5deg)}to{rotate:calc(var(--sway,-1.5deg) * -0.6)}}
/* Слайд-шоу (D212): one frame, photos cross-fade with a slow push-in. */
.ig-slideshow .ig-list{display:block;position:relative;width:min(100%,420px);max-width:100%;aspect-ratio:4/5;margin:22px auto 0;overflow:hidden;border-radius:6px;background:var(--ig-card);box-shadow:0 14px 30px -20px #0009;cursor:pointer;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.inv-gallery.ig-slideshow .ig-photo{position:absolute;inset:0;opacity:0;border:0;border-radius:0;background:transparent;transition:opacity 1.1s ease}.inv-gallery.ig-slideshow .ig-photo.is-active,.ig-slideshow .ig-list:not(.is-ready) .ig-photo:first-child{opacity:1;z-index:1}
.inv-gallery.ig-slideshow .ig-photo img{width:100%;height:100%;max-height:none;object-fit:cover}.inv-gallery.ig-slideshow.ig-fit-contain .ig-photo img{object-fit:contain}.ig-slideshow .ig-photo.is-active>*{animation:ig-push 7s ease-out both}.ig-slideshow .ig-ph{aspect-ratio:auto}
@keyframes ig-push{from{transform:scale(1)}to{transform:scale(1.07) translate(-1%,-1%)}}
@media(prefers-reduced-motion:reduce){.inv-gallery.ig-garland .ig-photo{animation:none}.ig-slideshow .ig-photo.is-active>*{animation:none}.inv-gallery.ig-slideshow .ig-photo{transition:none}}
