.fune-gallery-block{min-width:0}
.fune-gallery-layout{display:grid;grid-template-columns:72px minmax(0,1fr);grid-template-areas:"thumbs main" "thumbs tools";gap:12px}
.fune-gallery-main{grid-area:main;position:relative;min-width:0}
.fune-gallery-layout .smp-gallery{border-radius:16px;scrollbar-width:none;overscroll-behavior-inline:contain}
.fune-gallery-layout .smp-gallery::-webkit-scrollbar{display:none}
.fune-gallery-layout .smp-gallery img{cursor:zoom-in}
.fune-gallery-thumbs{grid-area:thumbs;display:flex;flex-direction:column;gap:10px;max-height:560px;overflow:auto;scrollbar-width:thin;padding:3px;overscroll-behavior:contain}
.smp .fune-gallery-thumb{position:relative;display:block;flex:0 0 66px;width:66px;height:66px;min-height:66px;padding:3px;border:1px solid var(--smp-line);border-radius:10px;background:white;overflow:hidden}
.smp .fune-gallery-thumb::before{display:none!important}
.fune-gallery-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.fune-gallery-thumb span{position:absolute;bottom:2px;right:2px;border-radius:4px;padding:1px 4px;background:#fffef8;color:#252824;font:10px/1.4 Arial,sans-serif}
.smp .fune-gallery-thumb[aria-current=true]{border:2px solid var(--fune-brand-red);box-shadow:0 0 0 1px var(--fune-brand-red)}
.smp .fune-gallery-enlarge,.fune-gallery-toolbar button,.fune-photo-dialog button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:10px;border:1px solid var(--smp-line,#938b7d);border-radius:10px;color:var(--smp-navy,#eeeae0);background:var(--fune-surface,#252824);font:500 13px/1.4 Arial,sans-serif;cursor:pointer}
.smp .fune-gallery-enlarge{position:absolute;right:12px;bottom:12px;color:#22251f;background:#fffdf7f2;border-color:#938b7d}
.fune-gallery-block svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.fune-gallery-toolbar{grid-area:tools;display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;align-items:center;gap:8px}.fune-gallery-count{text-align:center}.fune-gallery-toolbar:has([data-gallery-prev][hidden]){grid-template-columns:1fr}
.fune-gallery-count,.fune-photo-toolbar>span{font:500 13px/1.5 Arial,sans-serif;font-variant-numeric:tabular-nums}
.fune-gallery-autoplay{display:flex;align-items:center;justify-content:center;margin:0}
.smp .fune-gallery-autoplay button{display:inline-flex;align-items:center;gap:6px;width:44px;min-height:44px;padding:10px;color:var(--smp-navy);background:none;border:1px solid var(--smp-line);border-radius:10px;font:500 12px/1.4 Arial,sans-serif}
.fune-gallery-autoplay svg{width:16px;height:16px}
.fune-gallery-block [hidden]{display:none!important}
.fune-gallery-block:not([data-gallery-ready]) .fune-gallery-layout{display:block}
.fune-gallery-block:not([data-gallery-ready]) .fune-gallery-hint{display:none}
.fune-gallery-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.fune-photo-dialog{width:min(1200px,96vw);max-width:96vw;max-height:94vh;padding:16px;border:1px solid #8c8475;border-radius:16px;background:var(--fune-page,#111512);color:var(--smp-navy,#eeeae0);overflow:auto}
.fune-photo-dialog::backdrop{background:#000b}
.fune-photo-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-bottom:12px}
.fune-photo-toolbar>span{margin-right:auto}
.fune-photo-canvas{height:min(68vh,800px);overflow:auto;overscroll-behavior:contain;border-radius:10px;background:white}
.fune-photo-canvas img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;aspect-ratio:auto}
.fune-photo-canvas[data-zoomed=true] img{width:200%;height:auto;max-width:none;max-height:none}
.fune-photo-navigation{display:flex;justify-content:space-between;margin-top:12px}
.fune-gallery-block button:focus-visible,.fune-photo-canvas:focus-visible{outline:3px solid var(--fune-accent,#e4ac7b);outline-offset:3px}
@media(max-width:749px){.fune-gallery-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "tools" "thumbs";gap:10px}.fune-gallery-thumbs{flex-direction:row;max-height:none;max-width:100%;padding:4px 3px 8px}.smp .fune-gallery-thumb{flex-basis:60px;width:60px;height:60px;min-height:60px}.fune-gallery-block .fune-gallery-hint{font-size:12px;line-height:1.6}.fune-photo-dialog{padding:10px}.fune-photo-toolbar{gap:6px}.fune-photo-canvas{height:60vh}.fune-photo-toolbar>span{font-size:12px}}
