[data-layer_key="instagram"] {
    max-width: 1280px;
    margin: 20px auto;
    height: 100% !important;
    width: 100% !important;
}

[data-layer_key="instagram"] .insta-pagination.pagenation-cont {
    display: none !important;
}


/* 모바일 분기 */
.cont-module[data-layer_key="instagram"][data-device_type='m'] {
    padding: 0 20px;
}

/* 인스타그램 피드 컨테이너 스타일 */
.insta-feed-container.user {
    position: relative;
}

.insta-feed-container.insta-feed-loading {
    min-height: 104px;
}

.insta-feed-container.insta-feed-loading .insta-feed-wrapper {
    visibility: hidden;
    position: absolute;
}

/* 피드 로딩 스피너: 배경 없음, 인스타그램 아이콘, 트렌디 스타일 */
.insta-feed-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 104px;
    padding: 20px 0;
    background: transparent;
}

.insta-feed-spinner__icon {
    width: 48px;
    height: 48px;
    animation: insta-spinner-pulse 1.2s ease-in-out infinite;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .12));
}

.insta-feed-spinner__icon svg {
    width: 100%;
    height: 100%;
}

.insta-feed-spinner__text {
    font-size: 14px;
    color: #737373;
    font-weight: 600;
    letter-spacing: -0.01em;
}

@keyframes insta-spinner-pulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(0.96);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.insta-feed-wrapper {
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
}

.insta-feed-carousel-shell {
    position: relative;
}

/* 그리드 레이아웃 */
.insta-feed-wrapper.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
}

/* 모자이크 레이아웃 (Masonry.js 사용) */
.insta-feed-wrapper.masonry {
    position: relative;
}

.insta-feed-wrapper.masonry .insta-item {
    display: block;
}

.insta-feed-wrapper.masonry .insta-image {
    padding-bottom: 0;
    height: auto;
}

/* 실제 이미지 비율 사용 */
.insta-feed-wrapper.masonry .insta-image img,
.insta-feed-wrapper.masonry .insta-image video.post-image {
    position: static;
    width: 100%;
    height: auto;
}

/* 이미지 실제 높이 사용 */


/* 슬라이드 레이아웃 */
.insta-feed-wrapper.carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    gap: 10px;
    scrollbar-width: none;
    padding: 0 42px;
    box-sizing: border-box;
}

.insta-feed-wrapper.carousel .insta-item {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
}

.insta-feed-wrapper.carousel::-webkit-scrollbar {
    display: none;
}

.insta-feed-wrapper.carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.insta-feed-wrapper.carousel.is-marquee {
    scroll-snap-type: none;
    scroll-behavior: auto;
    padding: 0;
}

/* 원형 스토리 레이아웃 */
.insta-feed-wrapper.story_circle {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    gap: 10px;
    scrollbar-width: none;
    padding: 0 42px;
    box-sizing: border-box;
}

.insta-feed-wrapper.story_circle::-webkit-scrollbar {
    display: none;
}

.insta-feed-wrapper.story_circle .insta-item {
    flex: 0 0 auto;
    width: 72px;
    min-width: 72px;
}

.insta-feed-wrapper.story_circle .insta-image {
    width: 72px;
    height: 72px;
    padding-bottom: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) border-box;
    box-sizing: border-box;
}

.insta-feed-wrapper.story_circle .insta-image img,
.insta-feed-wrapper.story_circle .insta-image video.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.insta-feed-wrapper.story_circle .insta-caption {
    display: none !important;
}

.insta-feed-carousel-shell.is-story-circle .insta-carousel-pagination {
    display: none !important;
}

@media (max-width: 767px) {
    .insta-feed-wrapper.story_circle {
        padding: 0 8px;
    }

    .insta-feed-wrapper.story_circle .insta-item {
        width: 60px;
        min-width: 60px;
    }

    .insta-feed-wrapper.story_circle .insta-image {
        width: 60px;
        height: 60px;
    }

    .insta-feed-carousel-shell.is-story-circle .insta-carousel-nav {
        display: none !important;
    }
}

.insta-feed-carousel-shell.is-marquee .insta-carousel-nav,
.insta-feed-carousel-shell.is-marquee .insta-carousel-pagination {
    display: none !important;
}

.insta-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.82);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.insta-carousel-nav.prev {
    left: 0;
}

.insta-carousel-nav.next {
    right: 0;
}

.insta-carousel-nav:hover {
    background: rgba(17, 24, 39, 0.96);
}

.insta-carousel-pagination {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    z-index: 5;
}

.insta-carousel-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, width 0.18s ease;
}

.insta-carousel-dot.is-active {
    width: 18px;
    background: rgba(37, 99, 235, 0.92);
}

.insta-carousel-dot:hover {
    background: rgba(71, 85, 105, 0.8);
}

/* 리스트 레이아웃 */
.insta-feed-wrapper.list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.insta-feed-wrapper.list .insta-item {
    display: flex;
    gap: 15px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.insta-feed-wrapper.list .insta-image {
    flex: 0 0 150px;
    height: 150px;
    padding-bottom: 0;
}

/* 리스트 레이아웃에서는 고정 크기 */
.insta-feed-wrapper.list .insta-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* 인스타그램 피드 아이템 스타일 */
.insta-item {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.insta-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.insta-image {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
}

/* 정사각형 비율 유지 */
.insta-image img,
.insta-image video.post-image {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.insta-image video.insta-grid-video {
    background: #111827;
}

/* cover로 정사각형 영역 채우기 */
.insta-item:hover .insta-image img,
.insta-item:hover .insta-image video.post-image {
    transform: scale(1.03);
}

.insta-item.is-reels-grid-playing .insta-overlay {
    opacity: 0;
}

.insta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.insta-item:hover .insta-overlay {
    opacity: 1;
}

.insta-hover-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    transform: scale(0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.insta-item:hover .insta-hover-icon {
    transform: scale(1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.insta-item .insta-caption {
    display: none !important;
    padding: 0;
    font-size: 14px;
    color: #262626;
    margin: 0;
}

.insta-item .insta-caption.hover {
    display: none !important;
}

.insta-item .insta-caption.always {
    display: none !important;
}

.insta-item .insta-caption.none {
    display: none !important;
}

.insta-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.insta-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
}

.insta-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insta-user-name {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
}

/* 앨범 아이콘 스타일 추가 */
.insta-album-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 2;
}

.insta-album-icon i {
    font-size: 14px;
    margin-right: 4px;
}

/* 섹션 타이틀 스타일 추가 */
.insta-section-title {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #262626;
}

.insta-section-title-main {
    margin: 0;
    font: inherit;
    color: inherit;
}

.insta-section-subtitle {
    font-size: 14px;
    color: rgb(145, 145, 145);
    font-weight: 500;
    margin-top: 10px;
}

.insta-section-title.text-left {
    text-align: left;
}

.insta-section-title.text-center {
    text-align: center;
}

.insta-section-title.text-right {
    text-align: right;
}

/* PC/모바일 자동 전환을 위한 미디어 쿼리 */
@media (max-width: 992px) {
    .insta-feed-wrapper.grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insta-dashboard {
        flex-direction: column;
    }

    .insta-sidebar {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 20px;
        width: 100%;
    }

    .insta-section-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .insta-feed-wrapper.grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insta-guide-steps {
        flex-direction: column;
    }

    .insta-section-title {
        font-size: 18px;
    }

    .insta-feed-wrapper.carousel {
        padding: 0;
    }

    .insta-carousel-nav {
        width: 30px;
        height: 30px;
        background: rgba(17, 24, 39, 0.74);
    }

    .insta-carousel-nav.prev {
        left: 4px;
    }

    .insta-carousel-nav.next {
        right: 4px;
    }

    .insta-carousel-pagination {
        bottom: 2px;
        padding: 5px 8px;
    }

    /* 모바일에서 hover 효과 비활성화 */
    .insta-item:hover {
        transform: none;
        box-shadow: none;
    }

    .insta-item:hover .insta-image img {
        transform: none;
    }

    .insta-item:hover .insta-overlay {
        opacity: 0 !important;
    }
}

@media (max-width: 576px) {
    .insta-feed-wrapper.grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 8px;
    }

    .insta-feed-wrapper.list .insta-item {
        flex-direction: column;
    }

    .insta-feed-wrapper.list .insta-image {
        flex: 0 0 auto;
    }

    .insta-feed-wrapper.carousel .insta-item {
        width: 180px;
    }
}

/* 🔼 변경: 비율 박스(padding-bottom) 안에서만 채우도록 absolute 고정 — static+min-height 는 타일·iframe 높이를 부풀림 */
.insta-media-fallback--preview { box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; width: 100%; height: 100%; min-height: 0; padding: 12px; text-align: center; background: #f3f4f6; color: #111827; border-radius: 8px; font-size: 13px; line-height: 1.45; position: absolute; inset: 0; z-index: 2; }
/* 🔼 추가됨: 미디어만 제거된 실패 타일은 finalize 전·후 흰 공백으로 남지 않게 접음 */
.insta-item.insta-item--media-load-failed { display: none !important; }
.insta-media-fallback__title { font-weight: 700; font-size: 13px; color: #111827; }
.insta-media-fallback__hint { font-size: 12px; color: #6b7280; }
.insta-media-fallback__cta { font-size: 12px; font-weight: 700; color: #0095f6; text-decoration: underline; }
.insta-feed-admin-media-banner { margin-bottom: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid #fcd34d; background: #fffbeb; color: #92400e; font-size: 13px; line-height: 1.5; }
.insta-feed-admin-media-banner__title { margin: 0 0 6px 0; font-weight: 700; }
.insta-feed-admin-media-banner__hint { margin: 0; font-size: 12px; color: #78350f; }
.insta-feed-shop-media-unavailable { margin-bottom: 14px; padding: 16px; border-radius: 10px; background: #f9fafb; border: 1px solid #e5e7eb; text-align: center; font-size: 14px; color: #374151; }
.insta-feed-shop-media-unavailable__text { margin: 0 0 10px 0; }
.insta-feed-shop-media-unavailable__link { font-weight: 700; color: #0095f6; text-decoration: underline; }