.aytf-carousel { margin: 24px 0; max-width: 100%; min-width: 0; direction: rtl; }
.aytf-carousel .aytf-carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #003471 #f3f6fa;
    padding: 4px 0 12px;
    direction: rtl;
}
.aytf-carousel .aytf-carousel-item {
    display: block;
    flex: 0 0 calc((100% - 48px) / 4.5);
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 1px solid #dce5ee;
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f6fa;
    scroll-snap-align: start;
    cursor: pointer;
}
.aytf-carousel .aytf-carousel-item img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin: 0; border: 0; border-radius: 0; }
.aytf-carousel-controls { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.aytf-carousel-controls button, .aytf-lightbox button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid #dce5ee;
    border-radius: 8px;
    background: #fff;
    color: #003471;
    font: inherit;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: none;
}
.aytf-carousel-controls button:disabled, .aytf-lightbox button:disabled { opacity: .35; cursor: default; }
.aytf-carousel-controls button, .aytf-lightbox .aytf-image-navigation button {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 32px;
    line-height: 1;
}
.aytf-post-images img, img.aytf-post-image { cursor: pointer; }
.aytf-carousel :focus-visible, .aytf-lightbox :focus-visible { outline: 2px solid #003471; outline-offset: 3px; }
.aytf-lightbox {
    --aytf-stage-height: min(60dvh, 580px);
    box-sizing: border-box;
    width: calc(100% - 24px);
    max-width: none;
    max-height: calc(100dvh - 32px);
    padding: 16px;
    margin: auto;
    border: 1px solid #dce5ee;
    border-radius: 14px;
    background: #fff;
    color: #344457;
    text-align: right;
    font-family: inherit;
    line-height: 1.8;
    overflow: auto;
}
.aytf-lightbox::backdrop { background: rgb(0 15 35 / 78%); }
.aytf-lightbox header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.aytf-lightbox h2 { font: inherit; font-size: 16px; font-weight: bold; color: #003471; margin: 0; }
.aytf-lightbox button[data-action="close"] {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 40px;
    line-height: 1;
    color: #CB0F17;
    border-color: #CB0F17;
    background: #fff5f5;
}
.aytf-lightbox .aytf-image-stage { display: grid; place-items: center; height: var(--aytf-stage-height); width: 100%; overflow: hidden; background: #f3f6fa; border-radius: 8px; touch-action: none; user-select: none; direction: ltr; }
.aytf-lightbox .aytf-image-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--aytf-stage-height); margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: contain; transform-origin: center; user-select: none; -webkit-user-drag: none; cursor: pointer; }
.aytf-lightbox .aytf-image-stage.is-zoomed img { cursor: grab; }
.aytf-lightbox .aytf-image-caption { margin: 8px 0; font-size: 13px; max-height: 3.6em; overflow: auto; }
.aytf-lightbox footer { display: block; margin-top: 10px; }
.aytf-lightbox .aytf-image-navigation { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; align-items: center; width: 100%; direction: rtl; }
.aytf-lightbox .aytf-image-status { font-size: 13px; min-width: 46px; text-align: center; }
.aytf-lightbox .aytf-image-help { margin: 8px 0 0; font-size: 12px; }
.aytf-gallery-scroll-lock { overflow: hidden !important; }
@media (min-width: 768px) {
    .aytf-lightbox { width: 80vw; --aytf-stage-height: min(70dvh, calc(100dvh - 220px)); }
}
@media (max-width: 767px) {
    .aytf-carousel .aytf-carousel-item { flex-basis: calc((100% - 24px) / 2.5); }
    .aytf-carousel-controls { display: none; }
    .aytf-lightbox { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .aytf-carousel-track { scroll-behavior: auto; } }
