.lb-modal { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(17,19,18,.97); color: #fff; font-family: Roboto,Arial,sans-serif; opacity: 0; transition: opacity .18s ease; }
.lb-modal[open] { display: grid; grid-template-rows: 78px minmax(0,1fr) 64px; }
.lb-modal.is-visible { opacity: 1; }
.lb-modal::backdrop { background: #000a; }
html:has(.lb-modal[open]) { overflow: hidden; scrollbar-gutter: stable; }
.lb-modal button { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lb-modal button { touch-action: manipulation; }
.lb-modal button:active { transform: none; }
.lb-header { display: flex; align-items: center; gap: 22px; padding: 15px 24px 12px; min-width: 0; }
.lb-heading { min-width: 0; margin-right: auto; }
.lb-heading p { margin: 0 0 3px; color: #a6b3ab; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.8px; }
.lb-heading h2 { margin: 0; max-width: 800px; color: #f8faf8; font-size: 16px; line-height: 1.4; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-counter { color: #d8ded9; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-header button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 15px; border: 1px solid #ffffff2c; border-radius: 24px; background: #ffffff08; font-size: 12px; white-space: nowrap; }
.lb-header button:hover { background: #ffffff16; border-color: #ffffff55; }
.lb-header button:disabled { opacity: .4; cursor: default; }
.lb-header button.lb-close { width: 44px; padding: 0; border: 0; background: #fff; color: #202823; }
.lb-close:hover { background: #eaf5ee !important; }
.lb-icon { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lb-body { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 28px; min-height: 0; padding: 4px 30px 0; width: min(100%,calc(100dvh + 142px)); justify-self: center; }
.lb-thumbs { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 3px; overflow: auto; align-self: start; max-height: 100%; scrollbar-width: thin; scrollbar-color: #ffffff3b transparent; }
.lb-thumb { display: block; flex: none; width: 70px; height: 70px; padding: 3px; border: 1px solid #ffffff3a; border-radius: 7px; background: transparent; opacity: .62; transition: opacity .15s, border-color .15s; }
.lb-thumb:hover { opacity: 1; border-color: #ffffff9a; }
.lb-thumb[aria-pressed=true] { border: 2px solid #65c194; padding: 2px; opacity: 1; }
.lb-thumb img { display: block; width: 100%; height: 100%; border-radius: 3px; object-fit: contain; }
.lb-stage { position: relative; min-height: 0; min-width: 0; }
.lb-viewport { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 6px; }
.lb-image { display: block; width: var(--lb-image-width,0px); height: var(--lb-image-height,0px); max-width: none; max-height: none; object-fit: contain; border-radius: 4px; transform: translate(var(--lb-x,0px),var(--lb-y,0px)) scale(var(--lb-scale,1)); transform-origin: center; cursor: zoom-in; -webkit-user-drag: none; }
.lb-viewport.is-zoomed .lb-image { cursor: grab; }
.lb-viewport.is-dragging .lb-image { cursor: grabbing; }
.lb-viewport.is-animating .lb-image { transition: transform .2s ease, opacity .15s; }
.lb-stage[aria-busy=true] .lb-image { opacity: .25; }
.lb-loading { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 10px 14px; border-radius: 7px; background: #19231fee; color: #e5eee8; font-size: 12px; pointer-events: none; }
.lb-stage[aria-busy=true] .lb-loading { display: block; }
.lb-nav { position: absolute; top: 0; bottom: 0; margin-block: auto; transform: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #fff2; border-radius: 50%; background: #ffffffed; color: #19231f !important; box-shadow: 0 3px 15px #0003; transition: background-color .12s, opacity .15s; }
.lb-nav:hover { background: #fff; }
.lb-modal .lb-nav:active { background: #eaf4ee; }
.lb-modal .lb-nav:focus:not(:focus-visible) { outline: none; }
.lb-modal button svg { pointer-events: none; }
.lb-prev { left: max(12px,calc((100% - var(--lb-photo-width,100%))/2 - 60px)); }.lb-next { right: max(12px,calc((100% - var(--lb-photo-width,100%))/2 - 60px)); }
.lb-stage.is-zoomed .lb-nav { opacity: 0; pointer-events: none; visibility: hidden; }
.lb-modal > .lb-caption { margin: 0; border: 0; background: transparent; box-shadow: none; }
.lb-modal > .lb-caption::before, .lb-modal > .lb-caption::after { content: none; display: none; }
.lb-caption { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 8px 20px 10px 124px; text-align: center; }
.lb-caption strong { color: #e8ede9; font-size: 13px; line-height: 1.4; font-weight: 500; }
.lb-hint { color: #a4ada7; font-size: 11px; line-height: 1.4; }
.lb-modal :focus-visible { outline: 2px solid #8fd7ae; outline-offset: 3px; }
.lb-modal .lb-nav[hidden] { display: none; }
@media (max-width: 900px) {
 .lb-modal[open] { grid-template-areas: "header" "stage" "caption" "thumbs"; grid-template-rows: 72px minmax(0,1fr) 54px 82px; }
 .lb-header { grid-area: header; padding: 12px 14px; gap: 12px; }
 .lb-heading h2 { max-width: 47vw; font-size: 14px; }
 .lb-heading p { font-size: 9px; letter-spacing: 1.3px; }
 .lb-header button { width: 44px; height: 44px; padding: 0; }
 .lb-header .lb-close { width: 44px; height: 44px; }
 .lb-zoom span { display: none; }
 .lb-counter { font-size: 11px; }
 .lb-body { display: contents; }
 .lb-stage { grid-area: stage; margin: 0 10px; }
 .lb-thumbs { grid-area: thumbs; flex-direction: row; justify-content: safe center; gap: 9px; width: 100%; max-height: none; padding: 5px 15px calc(12px + env(safe-area-inset-bottom)); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
 .lb-thumbs::-webkit-scrollbar { display: none; }
 .lb-thumb { width: 58px; height: 58px; }
 .lb-caption { grid-area: caption; padding: 7px 14px; gap: 3px; }
 .lb-caption strong { font-size: 12px; }.lb-hint { font-size: 10px; }
 .lb-nav { width: 44px; height: 44px; }.lb-prev { left: 2px; }.lb-next { right: 2px; }
}
@media(max-width:350px) { .lb-header { gap: 8px; padding-inline: 10px; }.lb-heading h2 { font-size: 13px; max-width: 42vw; }.lb-heading p { letter-spacing: .8px; }.lb-thumb { width: 52px; height: 52px; } }
@media(max-height:500px) and (max-width:900px) { .lb-modal[open] { grid-template-areas: "header header" "thumbs stage" "thumbs caption"; grid-template-columns: 68px minmax(0,1fr); grid-template-rows: 54px minmax(0,1fr) 40px; }.lb-header { padding-block: 6px; }.lb-heading p { display: none; }.lb-heading h2 { max-width: 50vw; }.lb-thumbs { flex-direction: column; align-self: start; justify-content: start; max-height: 100%; width: 68px; padding: 3px 8px; overflow-x: hidden; overflow-y: auto; }.lb-thumb { width: 48px; height: 48px; }.lb-stage { margin-right: 18px; }.lb-caption { gap: 1px; padding: 3px; }.lb-caption strong { font-size: 11px; } }
@media(prefers-reduced-motion:reduce) { .lb-modal,.lb-modal * { transition: none !important; scroll-behavior: auto !important; } }
