.yf-gallery { margin-top: 40px; min-width: 0; }
.yf-gallery__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #dbe5dd; margin-bottom: 20px; }
.yf-gallery__tabs { display: flex; gap: 24px; min-width: 0; }
.yf-gallery button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.yf-gallery__tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: #60786e; font-size: 14px; white-space: nowrap; }
.yf-gallery__tabs button[aria-selected="true"] { color: #116b50; border-color: #168366; }
.yf-gallery__tabs i { font-size: 20px; }
.yf-gallery__viewport { position: relative; }
.yf-gallery__controls { position: absolute; inset: 0 -22px 12px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; z-index: 2; }
.yf-gallery__controls button, .yf-lightbox button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #cbded3; border-radius: 50%; background: transparent; color: #245744; font-size: 22px; flex: none; }
.yf-gallery__controls button { pointer-events: auto; background: #f4f8f5; box-shadow: 0 3px 12px #0b27201c; }
.yf-gallery__controls button:hover:not(:disabled) { background: #e1eee6; }
.yf-gallery__controls button:disabled { visibility: hidden; pointer-events: none; }
.yf-gallery__track { display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #bad0c3 transparent; padding: 2px 2px 12px; }
.yf-gallery__track[hidden] { display: none; }
.yf-gallery__track { cursor: grab; user-select: none; }
.yf-gallery__track.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.yf-gallery__track.is-dragging .yf-gallery__slide { cursor: grabbing; }
.yf-gallery__track img { -webkit-user-drag: none; user-select: none; }
.yf-gallery__slide { position: relative; flex: 0 0 auto; display: block; height: 400px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #e5eee8; scroll-snap-align: start; }
.yf-gallery__slide img { display: block; height: 100%; width: auto; max-width: none; }
.yf-gallery__track--phone .yf-gallery__slide { aspect-ratio: 1080 / 1920; }
.yf-gallery__track--tablet .yf-gallery__slide { aspect-ratio: 1080 / 1920; }
.yf-gallery__track--desktop .yf-gallery__slide { aspect-ratio: 1920 / 1200; }
.yf-gallery__slide img { width: 100%; object-fit: contain; }
.yf-gallery__expand { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #0b2720c9; color: #fff; opacity: 0; transition: opacity .2s; }
.yf-gallery__slide:hover .yf-gallery__expand, .yf-gallery__slide:focus-visible .yf-gallery__expand { opacity: 1; }
.yf-gallery__slide:focus-visible, .yf-gallery button:focus-visible { outline: 2px solid #168366; outline-offset: -3px; }
html:has(.yf-lightbox[open]) { overflow: hidden; }
.yf-lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; color: #f0f8f2; background: #071b16f5; }
.yf-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: yf-gallery-reveal .18s ease-out; }
.yf-lightbox::backdrop { background: #071b16; }
.yf-lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); font-size: 14px; }
.yf-lightbox button { border-color: #ffffff45; color: #f0f8f2; }
.yf-lightbox button:hover { background: #ffffff15; }
.yf-lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 0 20px; touch-action: pan-y pinch-zoom; }
.yf-lightbox__stage img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.yf-lightbox__controls { display: flex; justify-content: center; align-items: center; gap: 24px; padding: 12px 20px max(16px, env(safe-area-inset-bottom)); font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes yf-gallery-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 700px) {
    .yf-gallery { margin-top: 28px; }
    .yf-gallery__heading { flex-wrap: wrap; gap: 8px; }
    .yf-gallery__tabs { width: 100%; justify-content: space-between; gap: 8px; }
    .yf-gallery__tabs button { flex-direction: column; gap: 4px; font-size: 11px; }
    .yf-gallery__controls { display: none; }
    .yf-gallery__slide { height: 340px; }
    .yf-gallery__track--tablet .yf-gallery__slide { height: 320px; }
    .yf-gallery__track--desktop .yf-gallery__slide { height: auto; width: 90%; }
    .yf-lightbox__stage { padding: 0; }
    .yf-lightbox__bar { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .yf-lightbox[open] { animation: none; } .yf-gallery__expand { transition: none; } }
