/* =========================================
   1. 확인/종료 모달창 
========================================= */
.ai_overlay {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.85);
    z-index: 9999998 !important;   /* 💡 메인 모달(999999)보다 위에 표시 */
    display: none;
    align-items: center;
    justify-content: center;
}

#ai_exit_overlay {
    z-index: 9999999 !important;   /* 💡 모든 것 위에 */
}

.ai_confirm_box {
    width: 95%;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, rgba(0,0,0,0) 100%), linear-gradient(203.96deg, #070707 0%, #3B3B3B 100%);
    border: 1.15px solid rgba(255,255,255,0.25);
    box-shadow: 0 9px 36px rgba(0, 0, 0, 0.4);
    border-radius: 28px;
    padding: 40px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(20px);
    opacity: 0;
    animation: popupAnim 0.4s forwards;
    max-width: 465px;
}

@keyframes popupAnim {
    to { transform: translateY(0); opacity: 1; }
}

.ai_modal_icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1.15px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0px 0px 22px rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 27px;
}

.ai_modal_icon img { object-fit: contain; }

.ai_text_box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 27px;
}

.ai_confirm_box h3 {
    color: #fff;
    font-size: clamp(19px, 2.5vw, 24px);
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    letter-spacing: -0.69px;
    line-height: 1.4;
    margin: 0;
    text-align: center;
}

.ai_modal_desc {
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.ai_confirm_btns { display: flex; gap: 13.7px; justify-content: center; width: 100%; }
.ai_confirm_btns button { flex: 1; height: 48px; border-radius: 38px; font-size: 18px; font-weight: 600; cursor: pointer; transition: 0.3s; font-family: 'Pretendard', sans-serif; }

.ai_exit_btns { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ai_exit_btns button { width: 100%; height: 54px; border-radius: 999px; font-size: 18px; font-weight: 600; cursor: pointer; transition: 0.3s; font-family: 'Pretendard', sans-serif; }

.btn_no, .btn_exit_no { background: rgba(255,255,255,0.08); border: 1.15px solid rgba(255,255,255,0.25); color: #fff; }
.btn_no:hover, .btn_exit_no:hover { background: rgba(255,255,255,0.15); }

.btn_yes, .btn_exit_yes { background: #F94543; border: 1.15px solid rgba(255,255,255,0.3); box-shadow: 0 4.6px 18.3px rgba(249,69,67,0.3); color: #fff; }
.btn_yes:hover, .btn_exit_yes:hover { background: #e03432; box-shadow: 0px 4.5px 22px rgba(249, 69, 67, 0.5); }

/* =========================================
   2. 메인 대형 팝업 (헤더 아래 공간 활용)
========================================= */
.ai_large_wrapper {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.88) !important;     /* 💡 진한 배경으로 푸터 완전히 가림 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999 !important;                     /* 💡 최상위 - 헤더(9999), 푸터 모두 위에 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
}

.ai_large_inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1460px;
    max-height: 800px;
    border: 6px solid transparent;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(#0d0d0f, #0D0D0F) padding-box, linear-gradient(140deg, rgba(255, 255, 255, 0.85) 0%, rgba(160, 160, 160, 0.35) 25%, rgba(240, 240, 240, 0.75) 50%, rgba(90, 90, 90, 0.25) 75%, rgba(210, 210, 210, 0.7) 100%) border-box;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn_main_close {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    transition: 0.3s;
}

.btn_main_close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

#ai_step_container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
    box-sizing: border-box;
}

/* 🔥 스텝 전환 시 부드러운 페이드인 애니메이션 추가 */
.form_step, .bg_view_step {
    animation: aiFadeIn 0.5s ease-out forwards;
}
@keyframes aiFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 1. 왼쪽 영역의 가위(hidden)를 치워줍니다 */
.ai_c_left_bg {
    flex: 1;
    position: relative;
    height: 100%;
    /* overflow: hidden; <--- 삭제!! (이게 썸네일을 잘라먹은 범인입니다) */
    overflow: visible; /* 썸네일이 우측으로 넘어갈 수 있게 허용 */
}

.bg_view_step {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    font-family: 'Pretendard', sans-serif;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

/* 2. 썸네일 배경을 우측 폼 뒤까지 닿도록 1500px로 확 늘려줍니다 */
.ai_rolling_bg {
    position: absolute;
    left: 0;
    top: -50px;
    width: 1320px; /* 원래 1400px이었던 것을 모달 전체 폭에 맞게 확장 */
    height: 120%;
    display: flex;
    gap: 68px;
    opacity: 0.5; /* 썸네일이 잘 보이도록 불투명도 약간 상향 */
    pointer-events: none;
    justify-content: center;
    align-items: center;
}

.r_col { width: 210px; display: flex; flex-direction: column; gap: 28px; }
.r_track { display: flex; flex-direction: column; gap: 28px; }
.r_track img { width: 210px; height: 140px; border-radius: 12px; object-fit: cover; }

.r_col.down .r_track { animation: rollDown 40s linear infinite; }
.r_col.up .r_track { animation: rollUp 40s linear infinite; }

@keyframes rollDown { 0% { transform: translateY(-50%); } 100% { transform: translateY(0%); } }
@keyframes rollUp { 0% { transform: translateY(0%); } 100% { transform: translateY(-50%); } }

/* 3. 오버레이(그라데이션)도 1500px로 넓혀서 오른쪽까지 부드럽게 덮어줍니다 */
.ai_rolling_overlay {
    position: absolute;
    inset: 0;
    width: 1390px; /* 롤링 배경과 크기 맞춤 */
    background: linear-gradient(90deg, #0d0d0f80 10%, rgb(13 13 15 / 0%) 45%, rgb(13 13 15 / 0%) 100%);
    z-index: 2;
    pointer-events: none;
}
.bg_text_area { position: absolute; left: 0; z-index: 10; width: 100%; max-width: 600px; }

.ai_c_title { font-size: clamp(40px, 4vw, 72px); font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 24px; letter-spacing: -1px; }
.ai_c_title span { color: #f94543; }
.ai_c_desc { font-size: clamp(16px, 1.5vw, 24px); color: #fff; line-height: 1.6; font-weight: 600; letter-spacing: -0.6px; margin: 0; word-break: keep-all; }


.ai_c_title_en {font-size: clamp(40px, 3.5vw, 60px);font-weight: 700;color: #fff;margin-bottom: 10px;font-family: 'Pretendard', sans-serif;}
.ai_c_title_en span { color: #f94543; }
.ai_c_desc_step2 {font-size: clamp(14px, 1.2vw, 18px);color: #fff;line-height: 1.6;font-weight: 500;word-break: keep-all;}

/* =========================================
   🔥 스텝 2: 갤러리
========================================= */
#bg_step2 {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.bg_text_area_step2 {
    width: 100%;
    z-index: 10;
    margin-bottom: 60px;
    text-align: left;
    flex-shrink: 0;
    position: relative;
}
.ai_gallery_swiper {
    --ch: clamp(180px, 38vh, 411px);
    --cw: calc(var(--ch) * 0.633);
    position: relative;
    width: 100%;
    height: var(--ch);
    overflow: hidden;
    flex-shrink: 0;
}

/* track 제거 — 아래 통째로 삭제 */
/* .ai_gallery_track { ... } */

.ai_gallery_swiper .g_slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    transition: left 0.6s cubic-bezier(0.25,1,0.5,1),
                width 0.6s cubic-bezier(0.25,1,0.5,1),
                height 0.6s cubic-bezier(0.25,1,0.5,1),
                opacity 0.6s ease,
                filter 0.6s ease;
}

.ai_gallery_swiper .g_slide img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

/* g_card 관련 전부 삭제 */

@media (max-width: 1280px) { .ai_gallery_swiper { --ch: clamp(160px, 32vh, 360px); } }
@media (max-width: 1024px) {
    #bg_step2 {padding: 20px 15px 16px;display: flex;justify-content: space-around;height: 220px;flex-direction: column;}
    .bg_text_area_step2 { margin-bottom: 20px; }
    .ai_gallery_swiper { --ch: 180px; }
}
@media (max-width: 768px)  { .ai_gallery_swiper {--ch: 150px;} }
@media (max-width: 480px)  { .ai_gallery_swiper { --ch: 120px; } }
/* =========================================
   🔥 스텝 3: 섹션이란? — 2-column grid layout
========================================= */
.bg_step3_layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 0 16px;
    box-sizing: border-box;
    overflow: hidden;
}
.s3_top {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
    flex-shrink: 0;
}
.s3_title {
    font-size: clamp(34px, 3vw, 60px);
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    line-height: 1.1;
    letter-spacing: -1px;
    flex-shrink: 0;
}
.s3_title span { color: #f94543; }
.s3_top_desc { padding-top: 8px; }
.s3_top_desc p {
    font-size: clamp(12px, 1vw, 14px);
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin: 0 0 5px;
    word-break: keep-all;
    font-weight: 400;
}
.s3_grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 14px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.s3_img_col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}
.s3_img_item {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: #1a1a1c;
    min-height: 0;
}
.s3_img_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.s3_desc_col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    overflow: hidden;
}
.s3_item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 12px 14px;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.s3_item:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.2);
}
.s3_item_icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.s3_image_box img {width: 100%;object-fit: cover;height: auto;display: block;}
.s3_item_icon img { width: 16px; height: 16px; opacity: 0.85; }
.s3_item_txt h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
}
.s3_item_txt p {
    font-size: 11.5px;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    margin: 0;
    word-break: keep-all;
}
.s3_caption {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    font-weight: 400;
    margin-top: 10px;
    flex-shrink: 0;
}

/* =========================================
   🔥 스텝 4: 동적효과란? — video layout
========================================= */
.bg_step4_layout {
    width: 100%;
    /* height: 100%; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 0;
    box-sizing: border-box;
    overflow: hidden;
}
.s4_header {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 40px;
    flex-shrink: 0;
}
.s4_title {
    font-size: clamp(34px, 3vw, 60px);
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    line-height: 1.1;
    letter-spacing: -1px;
    flex-shrink: 0;
}
.s4_title span { color: #f94543; }
.s4_desc {
    font-size: clamp(13px, 1.1vw, 18px);
    color: rgb(255 255 255);
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
    padding-top: 10px;
    word-break: keep-all;
}
.s4_video_box {
    flex: 1;
    min-height: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    background: #111;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.s4_video_box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================
   3. 우측 네비게이터 폼
========================================= */
.ai_form_area {width: 340px;flex-shrink: 0;z-index: 20;margin-left: 40px;}
.nav_box { width: 340px; background: linear-gradient(180deg, #1E1E21 0%, #131315 100%); border: 1px solid rgba(255,255,255,0.18); box-shadow: 0px 20px 50px rgba(0, 0, 0, 0.7); border-radius: 24px; padding: 24px; box-sizing: border-box; display: flex; flex-direction: column; font-family: 'Pretendard', sans-serif; }
.nav_header { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.nh_left{    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;}
.nh_icon {width: 36px;height: 36px;background: rgba(255, 255, 255, 0.05);border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;display: flex;align-items: center;justify-content: center;}
.nh_icon img {width: 64px;height: 64px;}
.nh_title { color: #fff; font-size: 20px; font-weight: 600; }

.nav_progress_wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.progress_track { flex: 1; display: flex; align-items: center; justify-content: space-between; position: relative; }
.progress_line_bg { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 2px; background: rgba(255,255,255,0.15); z-index: 1; }
.progress_line_fill { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 2px; background: #fff; z-index: 2; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); width: 0%; }
.p_dot { width: 8px; height: 8px; background: #333; border: 2px solid #1A1A1C; border-radius: 50%; position: relative; z-index: 3; box-sizing: content-box; transition: 0.3s; }
.p_dot.active { background: #fff; outline: 1px solid rgba(255,255,255,0.4); outline-offset: 2px; }
.nav_badge { padding: 4px 10px; background: rgba(255,255,255,0.1); border-radius: 20px; color: #fff; font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

.nav_body {flex: 0.5;position: relative;}
.q_box_card.horizontal { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 16px; margin-bottom: 20px; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 14px; }
.q_icon { width: 36px; height: 36px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q_icon img, .q_icon svg { width: 64px; height: 64px; opacity: 0.8; }
.q_box_card.horizontal p { color: #fff; font-size: 14px; font-weight: 500; line-height: 1.4; margin: 0; }

.opt_list { display: flex; flex-direction: column; gap: 8px; position: relative; }
.opt_pill { width: 100%; height: 50px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; color: #ddd; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; position: relative; }
.opt_pill:hover, .opt_pill.active { background: #F94543; border-color: #F94543; color: #fff; font-weight: 700; box-shadow: 0 4px 15px rgba(249, 69, 67, 0.3); }
.opt_pill:hover .help_icon, 
.opt_pill.active .help_icon { 
    opacity: 1 !important; 
    color: #fff !important; 
    border-color: #fff !important;
}
.opt_step2 { font-weight: 400; color: rgba(255,255,255,0.8); }
.help_icon {
    border: 1px solid #fff;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: 0.2s;
    pointer-events: none;
    width: 24px;
    height: 24px;
    background-color: #ffffff2e;
    border-radius: 100%;
}
.opt_step2:hover .help_icon, .opt_step2.active .help_icon { opacity: 1; color: #fff; }
.opt_wrap { position: relative; width: 100%; }

.ai_purple_tooltip { opacity: 0; visibility: hidden; position: absolute; bottom: calc(100% + 12px); left: 0; right: 0; background: #5b46ff; border-radius: 12px; padding: 14px; box-shadow: 0 10px 25px rgba(91,70,255,0.5); text-align: center; z-index: 100; transition: 0.2s; pointer-events: none; }
.ai_purple_tooltip::after { content: ''; position: absolute; bottom: -5px; left: 50%; margin-left: -6px; width: 10px; height: 10px; background: #5b46ff; transform: rotate(45deg); }
.opt_wrap:hover .ai_purple_tooltip { opacity: 1; visibility: visible; bottom: calc(100% + 16px); }
.tt_title { display: block; color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.tt_desc { color: rgba(255, 255, 255, 0.9); font-size: 11px; line-height: 1.4; margin: 0; word-break: keep-all; }

.step3_input_group { margin-bottom: 16px; }
.step3_input_group label { display: block; font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 6px; font-weight: 400; }
.input_box_dark { display: flex; align-items: center; justify-content: space-between; background: #1c1c1e; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 0 16px; height: 46px; }
.input_box_dark input {background: transparent;border: none;color: #fff;font-size: 16px;font-weight: 600;width: 80%;outline: none;font-family: 'Pretendard', sans-serif;}
.input_box_dark input[type="number"]::-webkit-inner-spin-button, .input_box_dark input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input_box_dark span { color: rgba(255,255,255,0.4); font-size: 12px; font-weight: 400; }

.btn_step_confirm { width: 100%; height: 46px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; color: #aaa; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.3s; font-family: 'Pretendard', sans-serif; margin-bottom: 10px; }
.btn_step_confirm.active {background: #ffffff2e;color: #fff;border-color: #ffffff63;}
.btn_step_confirm.active:hover{background-color: #F94543;}

/* Step 5 - 개인정보 입력 폼 */
.step5_input_group { margin-bottom: 14px; }
.step5_input_group label { display: block; font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 6px; margin-top: 10px; font-weight: 400; }
.step5_input_group label:first-child { margin-top: 0; }
.step5_input_group .input_box_dark { margin-bottom: 4px; }
.step5_input_group .input_box_dark input { width: 100%; font-size: 16px; }
.step5_input_group .agree_label { display: flex; align-items: center; gap: 8px; margin-top: 14px; cursor: pointer; font-size: 12px; color: rgba(255,255,255,0.7); }
.step5_input_group .agree_label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #5A46F8; cursor: pointer; }
#btn_submit_step5 { background: #5A46F8; color: #fff; border-color: #5A46F8; opacity: 1; cursor: pointer; }
#btn_submit_step5:hover { background: #4835c9; }
.nav_footer { display: flex; gap: 8px; margin-top: 20px; }
.btn_nav_close_purple { flex: 1; height: 50px; background: #5A46F8; border: none; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.3s; letter-spacing: -0.3px; }
.btn_nav_close_purple:hover { background: #4835c9; box-shadow: 0 4px 20px rgba(90,70,248,0.4); }
.btn_nav_back { flex: 1; height: 50px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; transition: 0.3s; }
.btn_nav_back:hover { background: rgba(255,255,255,0.15); }

/* =========================================
   4. 최종 결과 화면 
========================================= */
.result_view_layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    font-family: 'Pretendard', sans-serif;
    text-align: center;
    background:
        radial-gradient(ellipse at 22% 70%, rgba(200, 100, 20, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 30%, rgba(120, 60, 10, 0.15) 0%, transparent 45%);
}
.btn_res_back { position: absolute; left: 30px; top: 30px; height: 40px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 0 16px 0 10px; display: flex; align-items: center; gap: 4px; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; z-index: 110; transition: 0.3s; }
.btn_res_back:hover { background: rgba(255,255,255,0.15); }
.res_content_wrapper { z-index: 10; animation: fadeInResult 0.8s ease-out forwards; }

@keyframes fadeInResult { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

.res_sub_t { font-size: 16px; color: rgba(255,255,255,0.8); margin-bottom: 12px; font-weight: 500; }
.res_main_t { font-size: 40px; font-weight: 400; color: #fff; margin-bottom: 24px; }
.res_main_t strong { font-weight: 800; font-size: 56px; }
.res_desc { font-size: 16px; color: rgba(255,255,255,0.9); margin-bottom: 50px; font-weight: 400; }
.res_data_boxes { display: flex; justify-content: center; gap: 16px; margin-bottom: 60px; }
.r_box { width: 160px; height: 100px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.r_lbl { font-size: 12px; color: rgba(255,255,255,0.5); }
.r_val { font-size: 18px; color: #fff; font-weight: 700; }
.res_footer_txt p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.6; margin-bottom: 24px; }
.btn_contact_scroll { padding: 0 32px; height: 50px; border-radius: 999px; background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.3s; font-family: 'Pretendard', sans-serif; }
.btn_contact_scroll:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.res_logo { position: absolute; right: 40px; bottom: 30px; color: #fff; font-size: 18px; font-weight: 800; opacity: 0.4; text-align: left; line-height: 1.1; font-family: 'Montserrat', sans-serif; }


/* =========================================
   🔥 AI 모달창 모바일 완벽 핏 (1024px 이하) 
   - 🚨 치명적 겹침 버그 완벽 해결 (display !important 완전 삭제)
   - JS의 hide/show를 절대 방해하지 않음
========================================= */
@media screen and (max-width: 1024px) {

    /* 1. 모달 껍데기 (하단 독바 피하기) */
    .ai_large_wrapper {
        position: fixed !important;
        padding: 0 10px !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        box-sizing: border-box !important;
        background: rgba(0, 0, 0, 0.92) !important;   /* 💡 더 진하게 */
        z-index: 999999 !important;                   /* 💡 최상위 */
    }

    .ai_large_inner {
        border-radius: 12px !important;
        flex-direction: column !important;
        overflow: hidden !important;
        width: 100% !important;
        height: 87.5% !important;
    }

    .btn_main_close { top: 8px !important; right: 8px !important; width: 28px !important; height: 28px !important; z-index: 9999 !important; }

    /* 🚨 겹침의 원흉이었던 display 강제 지정 속성 완전 삭제 */
    #ai_step_container {
        flex-direction: column !important;
        padding: 16px 10px 10px !important;
        box-sizing: border-box !important;
        justify-content: flex-start !important; /* 위에서부터 차곡차곡 쌓기 */
        gap: 8px !important; /* 위아래 박스 사이의 정확한 여백 설정 (원하는 대로 조절 가능) */
        display: flex;
    }

    /* 2. 상단 비주얼 영역 */
    .ai_c_left_bg {
        width: 100% !important;
        flex: 0 0 140px !important;
        position: relative !important;
        overflow: hidden !important; /* 썸네일 탈출 방지 */
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 🚨 JS가 컨트롤할 수 있게 냅둠 (절대 display 속성 안 넣음) */
    .bg_view_step {
        position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
        flex-direction: column !important; align-items: center !important; justify-content: center !important;
    }

    .ai_rolling_bg {opacity: 1;top: 0;width: 100%;align-items: flex-start;}

    .bg_text_area, .bg_text_area_step2 {width: 100% !important;text-align: center !important;margin: 0!important;z-index: 10 !important;}
    .ai_c_title, .ai_c_title_en, .s3_title, .s4_title {font-size: 18px !important;line-height: 1.2 !important;text-align: center !important;margin: 0;}
    .ai_c_desc, .ai_c_desc_step2, .s3_top_desc p, .s4_desc { display: none !important; } /* 좁은 공간을 위해 설명 숨김 */

    /* 갤러리 미니 핏 */
    .ai_gallery_swiper { width: 100% !important; height: 100px !important; position: relative !important; margin-top: 5px !important; }
    .custom_3d_gallery { width: 100% !important; height: 100px !important; position: relative !important; }
    .custom_3d_gallery .g_card { width: 65px !important; height: 95px !important; top: 50% !important; transform-origin: center center !important; border-radius: 6px !important; }
    .custom_3d_gallery .g_card.pos_0 { left: 50% !important; margin-left: -32px !important; transform: translateY(-50%) scale(1) !important; z-index: 50 !important; opacity: 1 !important; filter: brightness(1) !important; }
    .custom_3d_gallery .g_card.pos_1 { left: 50% !important; margin-left: 10px !important;  transform: translateY(-50%) scale(0.85) !important; z-index: 40 !important; opacity: 0.85 !important; filter: brightness(0.6) !important; }
    .custom_3d_gallery .g_card.pos_2 { left: 50% !important; margin-left: 40px !important; transform: translateY(-50%) scale(0.7) !important; z-index: 30 !important; opacity: 0.5 !important; filter: brightness(0.3) !important; }
    .custom_3d_gallery .g_card.pos_3 { left: 50% !important; margin-left: 65px !important; transform: translateY(-50%) scale(0.5) !important; z-index: 20 !important; opacity: 0 !important; }
    .custom_3d_gallery .g_card.pos_out { left: -100px !important; transform: translateY(-50%) scale(0.5) !important; z-index: 60 !important; opacity: 0 !important; }

    /* 스텝 3/4 콘텐츠 미니 핏 */
    .bg_step3_layout, .bg_step4_layout {padding: 0 !important;justify-content: center !important;align-items: center !important;flex-direction: column !important;height: 100% !important;width: 100% !important;}
    .s3_top, .s4_header { flex-direction: column !important; gap: 0 !important; margin-bottom: 5px !important; align-items: center !important; text-align: center !important; }
    .s3_img_col { display: none !important; }
    .s3_item { padding: 6px 10px !important; gap: 6px !important; border-radius: 8px !important; margin-bottom: 4px !important; width: 100% !important; box-sizing: border-box !important; }
    .s3_item_icon { width: 20px !important; height: 20px !important; }
    .s3_item_icon img { width: 10px !important; height: 10px !important; }
    .s3_item_txt h4 { font-size: 11px !important; margin-bottom: 2px !important; }
    .s3_item_txt p { font-size: 10px !important; line-height: 1.2 !important; margin: 0 !important; }
    .s4_video_box, .s4_image_box {width: 100% !important;max-width: 260px !important;hei;height: auto !important;min-height: 0;border-radius: 8px !important;/* margin-top: 5px !important; */}

    /* 3. 하단 폼 영역 */
    .ai_form_area {width: 100% !important;min-height: 0 !important;margin: 0 !important;padding: 0 !important;display: flex !important;flex-direction: column !important;background: transparent !important;}
    .nav_box {width: 100% !important;height: 100% !important;padding: 0 !important;background: transparent !important;border: none !important;box-shadow: none !important;display: flex !important;flex-direction: column !important;}

    .nav_header {justify-content: center !important;padding: 8px !important;margin-bottom: 10px !important;display: flex;border: 1px solid #6b6b6b52;background-color: #ffffff1c;border-radius: 4px;}
    .nh_icon { width: 20px !important; height: 20px !important; }
    .nh_icon img, .nh_icon svg {width: 36px !important;height: 36px !important;}
    .nh_title { font-size: 15px !important; }
    .nav_progress_wrap { margin-bottom: 10px !important; }

    .q_box_card.horizontal { padding: 8px 10px !important; margin-bottom: 10px !important; gap: 8px !important; border-radius: 8px !important; min-height: 36px !important; }
    .q_box_card.horizontal p { font-size: 13px !important; margin: 0 !important; line-height: 1.2 !important; }

    .opt_list {display: flex !important;flex-direction: column !important;justify-content: center !important;flex: 1 !important;min-height: 0 !important;gap: 8px !important;}
    .opt_pill {flex: 1 !important;min-height: 40px !important;max-height: 43px !important;height: auto !important;font-size: 13px !important;border-radius: 10px !important;}
    .help_icon { width: 18px !important; height: 18px !important; right: 10px !important; }

    .step3_input_group { margin-bottom: 6px !important; }
    .input_box_dark { height: 42px !important; border-radius: 10px !important; }
    .btn_step_confirm { height: 42px !important; font-size: 14px !important; border-radius: 10px !important; margin-bottom: 0 !important; }

    .nav_footer {display: flex !important;gap: 8px !important;flex: 0 0 auto !important;margin-top: 16px;}
    .btn_nav_close_purple, .btn_nav_back { height: 42px !important; font-size: 13px !important; border-radius: 10px !important; flex: 1 !important; margin: 0 !important; }

    /* 4. 결과창 */
    /* 🚨 결과창에도 절대 display !important 넣지 않음! JS가 제어합니다. */
    .result_view_layer {
        position: absolute !important; inset: 0 !important; background: #0D0D0F !important;
        padding: 20px 15px !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; z-index: 100 !important; box-sizing: border-box !important;
    }
    .btn_res_back { top: 15px !important; left: 15px !important; height: 32px !important; font-size: 12px !important; z-index: 110 !important; position: absolute !important;}
    .res_main_t { font-size: 20px !important; margin-bottom: 10px !important; margin-top: 0 !important; }
    .res_main_t strong { font-size: 28px !important; }
    .res_desc { font-size: 13px !important; margin-bottom: 25px !important; }
    .res_data_boxes { width: 100% !important; max-width: 320px !important; display: flex !important; flex-wrap: wrap !important; gap: 8px !important; margin-bottom: 25px !important; justify-content: center !important; }
    .r_box { width: calc(50% - 4px) !important; height: 60px !important; padding: 0 !important; border-radius: 10px !important; gap: 2px !important; }
    .r_lbl { font-size: 10px !important; }
    .r_val { font-size: 14px !important; }
    .btn_contact_scroll { height: 46px !important; font-size: 14px !important; width: 100% !important; max-width: 280px !important; border-radius: 10px !important; }
    .res_logo { display: none !important; }
}

.ai_purple_tooltip { display: none !important; visibility: hidden !important; pointer-events: none !important; }

/* Step 5 - 제출 완료 상태 (중복 방지) */
#btn_submit_step5.is-submitted,
#btn_submit_step5:disabled {
    background: rgba(90, 70, 248, 0.3) !important;
    border-color: rgba(90, 70, 248, 0.3) !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}
#btn_submit_step5.is-submitted:hover {
    background: rgba(90, 70, 248, 0.3) !important;
}
/* 💡 iOS Safari: input focus 시 자동 확대(zoom) 방지
   font-size가 16px 이상이면 iOS가 zoom-in 안 함 */
@media screen and (max-width: 1024px) {
    .ai_large_wrapper input[type="text"],
    .ai_large_wrapper input[type="tel"],
    .ai_large_wrapper input[type="email"],
    .ai_large_wrapper input[type="number"],
    .ai_large_wrapper textarea,
    .step5_input_group input,
    .input_box_dark input,
    #info_name, #info_phone, #info_email,
    #section_count {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100%;
    }
}

/* 결과 화면 - 확인 버튼 (모달 닫기 + 리셋) */
.btn_res_confirm {
    margin-top: 16px;
    padding: 0 40px;
    height: 50px;
    border-radius: 999px;
    background: #5A46F8;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Pretendard', sans-serif;
    box-shadow: 0 8px 24px rgba(90, 70, 248, 0.35);
}
.btn_res_confirm:hover {
    background: #4835c9;
    box-shadow: 0 12px 32px rgba(90, 70, 248, 0.5);
    transform: translateY(-2px);
}
@media screen and (max-width: 1024px) {
    .btn_res_confirm { height: 44px !important; font-size: 14px !important; padding: 0 32px !important; }
}