@charset "utf-8";

/* [브랜드 & 시스템 컬러 변수 - Stable Blue Theme] */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --bg-color: #f4f5f9;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-sub: #6b7280;
    --border-color: #e5e7eb;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* [SPA] 서브페이지 오버레이 레이어 */
.sub-page-layer {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(100%) translateX(-50%);
    width: 100%;
    max-width: 700px;
    height: 100vh;
    height: 100dvh;
    /* 유리 질감 배경 */
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s, opacity 0.3s;
    opacity: 0;
}

.sub-page-layer.show {
    transform: translateX(-50%); /* 중앙 입성 */
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.header-sub-nav-layer {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    /* 유리 헤더 강화 */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.70);
    box-shadow: 0 1px 0 rgba(200, 210, 230, 0.30);
    z-index: 10;
}

.sub-back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-sub);
    cursor: pointer;
    padding: 0;
}

.header-sub-title-layer {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

/* [NEW] 서브페이지 헤더 검색바 스타일 */
.header-sub-search-area {
    flex: 1;
    position: relative;
    margin: 0 10px;
    display: none; /* 기본 숨김 */
}

.header-sub-search-area.show {
    display: block;
}

#sub-search-box {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 40px 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.80);
    /* 유리 질감 입력폼 */
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90);
    transition: all 0.2s ease;
}

#sub-search-box:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.sub-search-clear {
    position: absolute;
    right: 4px; /* 우측 끝으로 바짝 밀착 */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    z-index: 2;
}

.sub-page-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px 80px 16px; /* 위아래/좌우 여백 추가 */
    -webkit-overflow-scrolling: touch; /* iOS 관성 스크롤 유지 */
    overscroll-behavior: contain;
}

/* 제품 카드 버튼 그룹 */
.card-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card-btn svg {
    flex-shrink: 0;
}

/* 매뉴얼 버튼 (옐로우 글래스) */
.card-btn-manual {
    background: rgba(254, 240, 138, 0.65);
    color: #854d0e;
    border: 1px solid rgba(253, 224, 71, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.card-btn-manual:active {
    background: rgba(254, 240, 138, 0.85);
    transform: scale(0.96);
}

/* 질문 버튼 (블루 글래스) */
.card-btn-faq {
    background: rgba(239, 246, 255, 0.65);
    color: #1d4ed8;
    border: 1px solid rgba(191, 219, 254, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.card-btn-faq:active {
    background: rgba(219, 234, 254, 0.85);
    transform: scale(0.96);
}

.card-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(241, 245, 249, 0.5);
    color: #94a3b8;
    border-color: rgba(226, 232, 240, 0.5);
}


/* 공통 제품 카드 (유리 질감) */
.unified-product-card {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.80);
    border-radius: 20px;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

/* 썸네일 박스 유리 효과 */
.card-thumb-wrapper {
    width: 100px;
    height: 100px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.75);
    cursor: zoom-in;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

body.sub-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

* {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

html {
    background-color: #f4f5f9;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family:
        "Pretendard Variable",
        "Pretendard",
        -apple-system,
        BlinkMacSystemFont,
        system-ui,
        sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f5f9;
    color: var(--text-main);
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.04em;
    line-height: 1.6;
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

@media (min-width: 701px) {
    html {
        background-color: #0f172a;
    }

    body {
        background-color: #0f172a;
        background-image: radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0, transparent 50%),
            radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.1) 0, transparent 50%);
    }
}

.container {
    width: 100%;
    padding-bottom: 20px;
    background-color: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* [UPDATE] 메인 데스크탑 래퍼 */
@keyframes pageFadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.main-desktop-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    /* overflow-x: hidden 제거 (sticky header 보장) */
}

@media (max-width: 700px) {
    .main-desktop-wrapper {
        box-shadow: none;
        min-height: 100%;
        /* 가변 뷰포트 대응 */
    }
}

/* [1. 상단 헤더 섹션] */
.header-section {
    /* 유리 질감 헤더 - 배경 통일 */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 20px;
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.04);
}

.main-hero-section {
    background-color: var(--card-bg);
    padding: 30px 20px 24px 20px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0; /* 단일 로우이므로 마진 제거 */
}

/* [FIX] 삼성 브라우저 전용: 최상단 스크롤 시 상단 빈틈 가림막 */
.header-section::before {
    content: "";
    position: absolute;
    top: -300px;
    left: 0;
    right: 0;
    height: 300px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1;
}

.header-section>* {
    position: relative;
    z-index: 2;
    /* 컨텐츠가 가림막 위로 올라오도록 함 */
}

/* 로고 영역 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0; /* wrapper에서 조절 */
}

.logo-box {
    background-color: #111827;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
    padding: 6px;
    box-sizing: border-box;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

h1.page-title {
    font-size: 30px;
    /* 28px -> 30px */
    font-weight: 800;
    margin: 0 0 8px 0;
    color: var(--text-main);
    line-height: 1.3;
    text-align: center;
}

p.page-desc {
    font-size: 17px;
    /* 16px -> 17px */
    color: var(--text-sub);
    margin: 0 0 24px 0;
    font-weight: 500;
    text-align: center;
}

/* 회전 애니메이션 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinning-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* [UPDATE] 메인 데스크탑 래퍼 (PC 배경과 컨텐츠 분리) */
.search-container {
    width: 100%;
    margin-bottom: 8px;
}

.search-box-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
    border: 2px solid var(--primary-color);
    border-radius: 18px;
    /* 유리 트랜스파렉시 븰트 으로 유리 질감 */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 20px;
    box-sizing: border-box;
    box-shadow:
        0 4px 20px rgba(37, 99, 235, 0.12),
        0 1px 4px rgba(37, 99, 235, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(37, 99, 235, 0.05);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* 검색창 상단 하이라이트 */
.search-box-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.60) 0%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

.search-box-wrapper:focus-within {
    box-shadow:
        0 8px 28px rgba(37, 99, 235, 0.20),
        0 2px 8px rgba(37, 99, 235, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.90);
}

.search-icon {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
    opacity: 0.7;
    flex-shrink: 0;
}

#search-box {
    width: 100%;
    padding: 18px 0 18px 10px;
    /* 패딩 증가 */
    font-size: 18px;
    /* 16px -> 18px */
    font-weight: 600;
    /* 500 -> 600 */
    border: none;
    background: transparent;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
}

#search-box::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.quick-keywords-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 2px 6px;
    margin: 0 -2px;
}

.quick-keywords-wrapper::-webkit-scrollbar {
    display: none;
}

.keyword-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.keyword-chip {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-sub);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid rgba(226, 232, 240, 0.85);
    transition: all 0.2s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.keyword-chip:active {
    background: rgba(219, 234, 254, 0.90);
    color: var(--primary-color);
}

/* 리퀴드 플로팅 - 형태가 변하며 회전하는 효과 */
@keyframes liquid-morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg);
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: rotate(180deg);
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(360deg);
    }
}

/* 천천히 깜빡이는(숨쉬는) 효과 */
@keyframes liquid-pulse {

    0%,
    100% {
        opacity: 0.1;
        transform: scale(1);
        filter: blur(8px);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
        filter: blur(12px);
    }
}

/* [NEW] 고사양 AI 카드용 애니메이션 (Stable & Premium) */
@keyframes ai-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes ai-mesh-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes ai-scan-line {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    20% {
        left: 100%;
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes ai-core-aura {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
        filter: blur(8px);
    }

    50% {
        transform: scale(1.2);
        opacity: 0.6;
        filter: blur(15px);
    }
}

.ai-answer-header {
    font-weight: 800;
    color: #9333ea;
    margin-bottom: 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-answer-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

/* 콘텐츠 영역 래퍼 */
.content-wrapper {
    padding: 4px 20px 24px;
    background: transparent;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 35px 0;
}

#brand-section,
#easy-find-anchor,
#brand-section-title,
#easy-find-title {
    scroll-margin-top: 92px;
}

/* [3. 메인 카테고리 그리드 (3열 완벽 정렬)] */
#category-grid {
    display: grid;
    grid-template-columns: repeat(3, 76px);
    justify-content: space-between;
    row-gap: 24px;
    margin-bottom: 40px;
}

.cat-card {
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.15s ease;
    width: 76px;
}

.cat-card:active {
    transform: scale(0.94);
}

.cat-icon-wrapper {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 76px;
    height: 76px;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--primary-color);
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}

.cat-card:hover .cat-icon-wrapper {
    background: var(--card-bg);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.cat-icon-svg {
    width: 30px;
    height: 30px;
}

.cat-name {
    font-size: 16px;
    /* 15px -> 16px */
    font-weight: 700;
    /* 600 -> 700 */
    color: var(--text-main);
    text-align: center;
    width: 80px;
    white-space: nowrap;
}

/* [4. 브랜드별 카테고리 섹션] */
#brand-section {
    margin-bottom: 15px;
    background: transparent;
    padding: 0;
    position: static;
    overflow: visible;
    border-radius: 0;
}

#brand-section::before {
    display: none;
}

#brand-section .section-title {
    color: var(--text-main);
    text-shadow: none;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 12px;
    padding: 0;
}

/* 카드: 감싸기 구조 제거 — 투명하게 */
.brand-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.18s ease;
    width: 100%;
    position: relative;
    overflow: visible;
}

/* 카드 pseudo-element 제거 */
.brand-card::before {
    display: none;
}

.brand-card:active {
    transform: scale(0.93);
}

/* 로고 박스: 연한 블루 그라디언트 + 유리 질감 강화 + 흰 실선 테두리 + 넓은 그림자 */
.brand-logo-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px;
    box-sizing: border-box;
    overflow: hidden;
    /* 화이트 글래스 (무채색 유리 질감) */
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* 얇은 화이트 실선 테두리 */
    border: 1px solid rgba(255, 255, 255, 0.85);
    /* 무채색 부드러운 그림자 */
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.05),
        0 4px 10px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

/* 유리 질감 상단 하이라이트 (강화) */
.brand-logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.10) 60%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 24px 24px 0 0;
    pointer-events: none;
}

/* 로고 이미지 → 화이트 (블루 배경 위에서 선명하게) */
.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* [UPDATE] 무채색 테마에 맞게 로고를 다크하게 변경 (가독성 확보) */
    filter: brightness(0) opacity(0.7);
    position: relative;
    z-index: 1;
}

/* 브랜드명 — 다크 컬러 복원 (흰 배경 위) */
.brand-name-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    width: 100%;
    word-break: keep-all;
    line-height: 1.4;
    margin-top: 2px;
    text-shadow: none;
    position: static;
    z-index: auto;
}

/* 기타 카드 SVG → 다크 */
.b-etc .brand-logo-wrapper svg {
    filter: brightness(0.2);
    position: relative;
    z-index: 1;
}

/* 브랜드별 개별 클래스 — 블루 그라디언트 제거 및 글래스로 통합 */
.b-homelia, .b-miraclem, .b-thesing, .b-airsis,
.b-miraclesing, .b-scanner, .b-batterman, .b-etc {
    background: rgba(255, 255, 255, 0.55);
}

/* [서브 네비게이션 (뒤로가기)] */
#nav-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.back-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-sub);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-family: inherit;
}

.back-btn svg {
    margin-right: 2px;
}

.current-cat-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
}

/* FAQ 리스트 */
.faq-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* [FIX] 모달 오픈 시 스크롤 변동 방지 (JS에서 동적 제어) */
body.no-scroll {
    overflow: hidden;
}

.faq-item {
    /* 유리 질감 적용 */
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(37, 99, 235, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.80);
}

.faq-question {
    padding: 22px 20px;
    /* 패딩 증가 */
    font-size: 18px;
    /* 17px -> 18px */
    font-weight: 700;
    /* 600 -> 700 */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.4;
    color: var(--text-main);
    background: transparent;
}

.faq-question:active {
    background: #f9fafb;
}

.q-mark {
    color: var(--primary-color);
    margin-right: 12px;
    font-weight: 800;
    font-size: 16px;
    font-family: sans-serif;
}

.q-text {
    flex: 1;
}

/* 태그 스타일 */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.info-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.tag-brand {
    background: rgba(241, 245, 249, 0.80);
    color: #475569;
    border: 1px solid rgba(226, 232, 240, 0.70);
}

.tag-cat {
    background: rgba(239, 246, 255, 0.80);
    color: var(--primary-color);
    border: 1px solid rgba(147, 197, 253, 0.50);
}

.arrow {
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), color 0.28s ease;
    margin-left: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.faq-question.active .arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        max-height 0.48s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease,
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    /* 유리 질감 답변 영역 */
    background: rgba(248, 250, 252, 0.70);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.faq-answer.open {
    max-height: 1200px;
    opacity: 1;
    transform: translateY(0);
    border-top: 1px solid rgba(226, 232, 240, 0.60);
}

.answer-content {
    padding: 24px 20px;
    font-size: 16.5px;
    /* 15px -> 16.5px */
    line-height: 1.8;
    /* 1.7 -> 1.8 */
    color: #374151;
    /* 색상 대비 강화 */
    word-break: break-word;
    transform: translateY(6px);
    opacity: 0;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
}

.faq-answer.open .answer-content {
    transform: translateY(0);
    opacity: 1;
}

.answer-content p {
    margin-top: 0;
    margin-bottom: 12px;
}

.answer-content p:last-child {
    margin-bottom: 0;
}

.answer-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* FAQ 이미지 갤러리 스타일 */
.faq-gallery {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faq-gallery-item {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    /* 유리 질감 걌러리 타일 */
    border: 1px solid rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: transform 0.2s;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.faq-gallery-item:hover {
    transform: scale(1.05);
    border-color: rgba(147, 197, 253, 0.70);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.faq-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 이미지 라이트박스 모달 */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000; /* 모든 모달 중 최상위 */
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.show {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 85dvh; /* 높이 소폭 확장 */
    overflow: hidden;
    display: flex;
    align-items: center;
}

.lightbox-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform;
}

.lightbox-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 20px; /* 여백 소폭 증가 */
}

.lightbox-img {
    max-width: 95%; /* 좌우 꽉 차지 않게 살짝 여유 */
    max-height: 90%; /* 상하 꽉 차지 않게 살짝 여유 */
    min-width: 300px; /* [NEW] 너무 작은 사진 보정: 최소 300px 확보 */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05); /* 어두운 배경에서 경계선 보정 */
}

.lightbox-close {
    position: fixed;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 10px;
    z-index: 5100;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    padding: 20px 12px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 6px;
    transition: all 0.2s;
    z-index: 5050;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-counter {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
    z-index: 5050;
}

@media (max-width: 700px) {
    .lightbox-nav {
        display: none;
        /* 모바일에서는 스와이프로 대체 */
    }
}

/* [5. 다른 도움이 필요하신가요?] */
/* [AI 챗봇 카드 ✨] */
.ai-chat-card {
    background: linear-gradient(135deg, #2563eb, #1d4ed8, #3b82f6, #2563eb);
    background-size: 300% 300%;
    color: white;
    border-radius: 32px;
    padding: 45px 30px;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* 유리 질감 강화 */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 20px 60px rgba(37, 99, 235, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    z-index: 1;
}

/* 유리 상단 하이라이트 (스캔라인 + 정적 반사광) */
.ai-chat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.08) 60%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 32px 32px 0 0;
    z-index: 2;
    pointer-events: none;
}

/* [NEW] Inner Soft Glow (내부 소프트 글로우) */
.ai-chat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
}

.ai-chat-card-content {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Product Portal Buttons */
.portal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 10px 0 20px 0;
}

.portal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-btn:hover {
    border-color: var(--primary-color);
    background: #fdfdfd;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* [NEW] 관리자 학습데이터 브랜드 필터 탭 */
.brand-filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.brand-filter-tabs::-webkit-scrollbar {
    display: none;
}

.brand-tab {
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.brand-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.portal-btn-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.portal-btn-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.portal-btn-desc {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 5px;
}

/* Card Internal Buttons */
.card-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.card-btn {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 12px 0;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}

.card-btn::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.08) 100%);
    pointer-events: none;
}

.card-btn-manual {
    background: linear-gradient(135deg, rgba(255, 245, 212, 0.72) 0%, rgba(255, 231, 168, 0.42) 100%);
    color: #9a5b07;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.card-btn-faq {
    background: linear-gradient(135deg, rgba(231, 244, 255, 0.72) 0%, rgba(199, 227, 255, 0.42) 100%);
    color: #155eef;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-btn:disabled {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.74) 0%, rgba(241, 245, 249, 0.48) 100%);
    border: 1px solid rgba(203, 213, 225, 0.5);
    color: #94a3b8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 4px 12px rgba(15, 23, 42, 0.04);
    transform: none !important;
}

.ai-chat-icon-wrapper {
    width: 72px;
    height: 72px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    z-index: 3;
}

.ai-chat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.ai-chat-icon-wrapper {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 10px 22px rgba(15, 23, 42, 0.1);
}

.ai-bot-pet-svg {
    width: 50px;
    height: 50px;
    overflow: visible;
    filter: drop-shadow(0 6px 16px rgba(255, 255, 255, 0.22));
}

.ai-bot-float-group {
    animation: ai-bot-float 3s ease-in-out infinite;
}

.ai-bot-action-group {
    transform-origin: 60px 60px;
    animation: ai-bot-pet-actions 10s ease-in-out infinite;
}

.ai-bot-eye {
    transform-origin: center;
    transform-box: fill-box;
    animation: ai-bot-blink 4.5s infinite;
}

@keyframes ai-bot-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes ai-bot-pet-actions {
    0%, 10% { transform: translate(0, 0) rotate(0deg); }
    12% { transform: translate(-5px, 0) rotate(-5deg); }
    14% { transform: translate(5px, 0) rotate(5deg); }
    16% { transform: translate(-3px, 0) rotate(-3deg); }
    18% { transform: translate(0, 0) rotate(0deg); }
    20%, 40% { transform: translate(0, 0) rotate(0deg); }
    42% { transform: rotate(13deg); }
    50% { transform: rotate(13deg); }
    52% { transform: rotate(0deg); }
    54%, 74% { transform: translate(0, 0) rotate(0deg); }
    76% { transform: translate(0, 5px) scale(1.04, 0.96); }
    79% { transform: translate(0, -16px) scale(0.97, 1.04) rotate(6deg); }
    83% { transform: translate(0, 0) scale(1.03, 0.97) rotate(-3deg); }
    86%, 100% { transform: translate(0, 0) scale(1, 1) rotate(0deg); }
}

@keyframes ai-bot-blink {
    0%, 45%, 49%, 55%, 59%, 100% { transform: scaleY(1); }
    47%, 57% { transform: scaleY(0.12); }
}

@media (max-width: 700px) {
    .ai-chat-card {
        padding: 38px 24px;
    }

    .ai-chat-icon-wrapper {
        width: 68px;
        height: 68px;
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .ai-bot-pet-svg {
        width: 46px;
        height: 46px;
    }
}

.ai-chat-text h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.ai-chat-text p {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: 0.85;
    font-weight: 500;
    line-height: 1.4;
}

/* 상담 버튼 — 반투명 흰 유리 */
.ai-chat-btn {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #1d4ed8;
    padding: 14px 40px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.80);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1.00);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    width: fit-content;
    min-width: 160px;
}

@media (max-width: 480px) {
    .ai-chat-card {
        padding: 25px 20px;
    }

    .ai-chat-btn {
        width: 100%;
        box-sizing: border-box;
    }
}

/* --- [NEW] 다크 풋터 (Footer) --- */
.site-footer {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #9ca3af;
    padding: 40px 20px 110px;
    text-align: center;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.footer-links a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 16px 10px;
    border-radius: 16px;
    transition: all 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 버튼 상단 유리 하이라이트 */
.footer-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

/* 주요 버튼 (A/S, 교환/반품) — 밝은 그레이 유리 */
.footer-box-primary {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.footer-box-primary:active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(0);
}

/* 서브 버튼 (제휴, 스토어) — 어두운 그레이 유리 */
.footer-box-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.footer-box-secondary:active {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(0);
}

/* 모바일 레이아웃 최적화 */
@media (max-width: 700px) {
    .site-footer {
        padding-bottom: 140px;
    }
}

.footer-copyright {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer-copyright-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-version {
    font-size: 12px;
    color: #9ca3af;
    letter-spacing: 0.04em;
}

#logout-btn {
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 13px;
    margin-left: 10px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

/* --- 스토어 선택 모달 --- */
.store-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.store-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.store-card {
    position: relative;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    width: 100%;
    max-width: 380px;
    border-radius: 32px;
    padding: 40px 24px 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.50),
        0 8px 24px rgba(37, 99, 235, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
}

/* 카드 상단 유리 하이라이트 */
.store-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 32px 32px 0 0;
    pointer-events: none;
}

/* 카드 내부 블루 글로우 */
.store-card::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 180px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.20) 0%, transparent 70%);
    pointer-events: none;
}

.store-card h3 {
    color: white;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
}

.store-card p {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.5;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 10px;
    position: relative;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.store-btn:active {
    transform: scale(0.97);
}

.store-btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.store-btn-info {
    flex: 1;
    min-width: 0;
}

/* min-width: 0 handles text overflow */
.store-btn-name {
    display: block;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-btn-desc {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.store-arrow {
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.store-close-btn {
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* --- 제휴문의 모달 --- */
.inquiry-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.inquiry-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.inquiry-card {
    position: relative;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    width: 100%;
    max-width: 420px;
    border-radius: 32px;
    padding: 40px 24px 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.50),
        0 8px 24px rgba(37, 99, 235, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    box-sizing: border-box;
    overflow: hidden;
}

.inquiry-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 32px 32px 0 0;
    pointer-events: none;
}

.inquiry-card::after {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 160px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.20) 0%, transparent 70%);
    pointer-events: none;
}

.inquiry-card h3 {
    color: white;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 10px 0;
    text-align: center;
    letter-spacing: -0.02em;
}

.inquiry-card p {
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

.inquiry-form-group {
    margin-bottom: 16px;
}

.inquiry-label {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 8px;
    font-weight: 600;
    padding-left: 4px;
}

.inquiry-input,
.inquiry-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: white;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.inquiry-input:focus,
.inquiry-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.inquiry-textarea {
    height: 120px;
    resize: none;
    line-height: 1.6;
}

.inquiry-submit-btn {
    width: 100%;
    padding: 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 60%, #4338ca 100%);
    border: 1px solid rgba(147, 197, 253, 0.40);
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow:
        0 4px 16px rgba(37, 99, 235, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    position: relative;
    overflow: hidden;
}

.inquiry-submit-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, transparent 100%);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

.inquiry-submit-btn:active {
    transform: scale(0.98);
}

.inquiry-close-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.floating-btn-group {
    position: fixed;
    bottom: 24px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9500; /* 서브레이어(1000) 및 모달(5000)보다 위에 배치 */
    padding-bottom: env(safe-area-inset-bottom);
}

.float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.float-btn:active {
    transform: scale(0.9);
}

.btn-top {
    background-color: rgba(255, 255, 255, 0.3); /* 밝은 유리 */
    color: var(--text-main);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.btn-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-top:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.btn-chat {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(29, 78, 216, 0.9) 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-chat:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

/* --- 정책 팝업 모달 스타일 --- */
.policy-modal {
    position: fixed;
    top: 0;
    left: 50%;
    max-width: 700px;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 5000; /* 서브레이어(1000)보다 높게 */
    /* 채팅보다 위로 */
    display: flex;
    flex-direction: column;
    transform: translate(-50%, 100%);
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.45s;
    /* [FIX] 삼성 브라우저 스크롤 잔상 방지: 실제 보여질 때만 렌더링 */
    visibility: hidden;
    pointer-events: none;
}

.policy-modal.show {
    transform: translate(-50%, 0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.policy-header {
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
    position: relative;
}

.policy-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.policy-close-btn {
    background: none;
    border: none;
    color: #111;
    cursor: pointer;
    padding: 4px;
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    right: 16px;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: rotate(90deg);
}

.policy-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px 24px 60px;
    background: #ffffff;
    text-align: left;
}

.policy-main-heading {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    margin: 0 0 12px 0;
    letter-spacing: -0.03em;
}

.policy-date {
    font-size: 14px;
    color: #888;
    margin: 0 0 32px 0;
}

.policy-section-heading {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 28px 0 12px 0;
    letter-spacing: -0.02em;
}

.policy-text {
    font-size: 14.5px;
    line-height: 1.65;
    color: #666;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    word-break: keep-all;
}

.policy-text b {
    color: #444;
}

/* --- AI 챗봇 모달 전체 화면 스타일 --- */
.ai-chat-modal {
    position: fixed;
    top: 0;
    left: 50%;
    max-width: 700px;
    width: 100%;
    height: 100dvh;
    background: rgba(248, 250, 252, 0.82); /* 반투명 유리 배경 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    transform: translate3d(-50%, 100%, 0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
    visibility: hidden;
    pointer-events: none;
    will-change: transform, height, top;
    backface-visibility: hidden;
    contain: layout paint;
}

.ai-chat-modal.show {
    transform: translate3d(-50%, 0, 0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

.chat-header {
    background: rgba(255, 255, 255, 0.75); /* 헤더 유리 질감 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    z-index: 10;
    flex-shrink: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout paint;
}

.chat-header-title {
    font-weight: 600; /* [REDESIGN] 굵기 조정 */
    font-size: 15px;
    color: var(--text-main); /* [REDESIGN] 파란색 → 진한 텍스트 */
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
}

.chat-header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chat-header-secondary-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.chat-header-secondary-btn:hover {
    background: #f1f5f9;
}

.chat-header-close-btn {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    contain: content;
    /* [OPTIMIZE] 내부 변화가 외부 레이아웃에 영향을 주지 않도록 격리 (깜빡임 방지) */
    -webkit-overflow-scrolling: touch;
    /* 부드러운 스크롤 */
}


/* 말풍선 스타일 */
.msg-row {
    display: flex;
    width: 100%;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.msg-row.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* [NEW] 이미지 전용 컨테이너 (작은 섬네일 박스 형태 유지 및 완전 중앙 정렬) */
.chat-img-container {
    position: relative;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.msg-row img {
    -webkit-filter: brightness(1);
    filter: brightness(1);
    isolation: isolate;
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* 비율 유지하며 중앙 정렬 */
    border-radius: 4px;
    margin: 0 !important;
    /* 이미지 마진 강제 제거 (틀어짐 방지) */
    background: transparent;
    border: none;
}

.msg-bot {
    justify-content: flex-start;
}

.msg-user {
    justify-content: flex-end;
}

.bubble {
    max-width: 85%;
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.75;
    letter-spacing: -0.01em;
    word-break: break-word;
    transition: box-shadow 0.26s ease, transform 0.28s ease;
}

.bubble-bot {
    background: rgba(255, 255, 255, 0.85); /* 봇 말풍선 유리 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 4px 18px 18px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 1);
    min-height: 28px;
}

.bubble-bot .list-line {
    display: block;
    padding-left: 1.1em;
    text-indent: -1.1em;
    margin-bottom: 8px;
}

.bubble-bot p,
.bubble-bot ul,
.bubble-bot ol {
    margin: 0 0 12px 0;
}

.bubble-bot p:last-child,
.bubble-bot ul:last-child,
.bubble-bot ol:last-child {
    margin-bottom: 0;
}

.bubble-bot ul,
.bubble-bot ol {
    padding-left: 1.15em;
}

.bubble-bot li {
    margin-bottom: 6px;
}

.bubble-bot li:last-child {
    margin-bottom: 0;
}

/* [NEW] 기존 디자인과 조화로운 챗봇 팁 스타일 */
.chat-tip {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--primary-light);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px 8px 8px 4px;
    font-size: 13.5px;
    color: var(--primary-dark);
    line-height: 1.5;
}

.chat-inline-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-color);
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
}

.chat-inline-link-btn:active {
    transform: scale(0.985);
}

.chat-msg-block {
    margin-bottom: 14px;
    line-height: 1.75;
    word-break: keep-all;
}

.chat-msg-block:last-child {
    margin-bottom: 0;
}

.chat-msg-title {
    font-weight: 700;
    color: var(--text-main);
}

.chat-msg-list {
    margin: 0;
    padding-left: 1.1em;
}

.chat-msg-list li {
    margin-bottom: 8px;
}

.chat-msg-list li:last-child {
    margin-bottom: 0;
}

/* [NEW] 사진으로 찾기 샘플 슬라이더 */
.chat-sample-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

.chat-sample-slider::-webkit-scrollbar {
    display: none;
}

.chat-sample-card {
    flex: 0 0 auto;
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.chat-sample-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    object-fit: cover;
    cursor: zoom-in;
    background: #f8fafc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-sample-item:hover {
    transform: scale(1.04);
    filter: brightness(0.95);
}

.chat-sample-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

.bubble-user {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(29, 78, 216, 0.85)); /* 유저 말풍선 유리 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    border-radius: 18px 4px 18px 18px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 타이핑 애니메이션 (생각 중...) */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 5px 2px;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    font-size: 24px;
    line-height: 1;
    color: #334155;
    letter-spacing: 0;
}

.typing-ellipsis-dot {
    display: inline-block;
    min-width: 0.28em;
    font-weight: 800;
    transform: translateY(0);
    opacity: 0.48;
    line-height: 1;
    will-change: transform, opacity;
    animation: typingEllipsis 1s infinite cubic-bezier(0.36, 0.1, 0.22, 1);
}

.typing-ellipsis-dot:nth-child(2) {
    animation-delay: 0.14s;
}

.typing-ellipsis-dot:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes typingEllipsis {
    0%,
    100% {
        opacity: 0.38;
        transform: translateY(0);
    }

    25% {
        opacity: 0.72;
        transform: translateY(-2px);
    }

    45% {
        opacity: 1;
        transform: translateY(-4px);
    }

    65% {
        opacity: 0.78;
        transform: translateY(-1px);
    }
}

/* 챗봇 선택지 버튼들 */
.chat-options-grid {
    display: inline-grid;
    grid-template-columns: 1fr; /* [REDESIGN] 1열 그리드 */
    gap: 8px;
    margin-top: 8px;
    width: fit-content;
    max-width: min(100%, 280px);
    box-sizing: border-box;
    animation: chatOptionRise 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatOptionRise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.chat-nav-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    width: 100%;
    box-sizing: border-box;
}

.chat-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.7);
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.24s ease,
        transform 0.18s ease;
    text-align: center;
}

.chat-opt-btn {
    background: rgba(255, 255, 255, 0.65); /* 선택지 유리 버튼 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.26s ease,
        border-color 0.26s ease,
        color 0.22s ease,
        box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.22s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
    line-height: 1.3;
    width: auto;
    min-width: 0;
    max-width: 100%;
}

.chat-opt-btn .opt-icon,
.chat-nav-btn .opt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    min-width: 1.25em;
}

.chat-opt-btn.primary {
    background: #eff6ff;
    color: var(--primary-color);
    border: 1.5px solid #bfdbfe;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.chat-opt-btn.accent-input {
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.98) 0%, rgba(255, 237, 213, 0.92) 100%);
    color: #c2410c;
    border: 1.5px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 4px 14px rgba(251, 146, 60, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* 선택된 버튼 스타일 (클릭 시점에 적용) */
.chat-opt-btn.selected {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    opacity: 1 !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    transform: translateY(-1px);
}

.chat-opt-btn:active {
    transform: scale(0.97);
}

.chat-options-grid.faq-list-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.chat-opt-btn.faq-option-btn {
    position: relative;
    width: 100%;
    max-width: min(100%, 360px);
    min-height: 76px;
    padding: 18px 108px 18px 54px;
    border-radius: 18px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 249, 255, 0.99) 100%);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255,255,255,0.96);
    color: #1f2937;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    transition:
        border-color 0.26s ease,
        background 0.32s ease,
        box-shadow 0.36s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.24s ease,
        color 0.22s ease;
}

.chat-opt-btn.faq-option-btn::before {
    content: "Q";
    position: absolute;
    left: 18px;
    top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.chat-opt-btn.faq-option-btn::after {
    content: "답변 보기";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
    white-space: nowrap;
}

.chat-opt-btn.faq-option-btn.selected {
    background: linear-gradient(180deg, rgba(225, 236, 255, 0.98) 0%, rgba(214, 229, 255, 0.98) 100%) !important;
    color: #1d4ed8 !important;
    border-color: rgba(37, 99, 235, 0.32) !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14), inset 0 1px 0 rgba(255,255,255,0.95) !important;
    transform: translateY(-1px);
}

.chat-opt-btn.faq-option-btn.selected::before {
    background: rgba(37, 99, 235, 0.16);
    color: #1d4ed8;
}

.chat-opt-btn.faq-option-btn.selected::after {
    background: rgba(255, 255, 255, 0.72);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.16);
}

.chat-faq-image-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e5edf8;
}

.chat-faq-image-title {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.chat-faq-image-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.chat-faq-image-item {
    flex: 0 0 min(78%, 220px);
    padding: 0;
    border: 1px solid #dbe7fb;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fbff;
    cursor: zoom-in;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
    scroll-snap-align: start;
}

.chat-faq-image-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.chat-faq-image-grid.is-swipeable {
    scroll-behavior: smooth;
}

.chat-faq-image-grid.is-swipeable::-webkit-scrollbar {
    height: 6px;
}

.chat-faq-image-grid.is-swipeable::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.25);
    border-radius: 999px;
}

.chat-footer {
    background: rgba(255, 255, 255, 0.75); /* 푸터 유리 질감 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    flex-shrink: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 이미지 크게 보기 모달 (Lightbox) */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.image-preview-modal.show {
    display: flex;
    animation: chatFadeIn 0.2s ease;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s;
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes chatFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.7); /* 입력창 반투명 */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.2s;
}

#chat-input:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

#chat-send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
}

#chat-send-btn:active {
    transform: scale(0.9);
}

#chat-send-btn:disabled {
    background: #bfdbfe;
    cursor: not-allowed;
}

/* [관리자 기능 및 모달] */
.admin-fab-group {
    position: fixed;
    bottom: 24px;
    /* AI 챗봇 버튼과 동일한 높이 */
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* 좌측 정렬 */
    gap: 12px;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    pointer-events: none;
}

.chat-header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    z-index: 10;
    flex-shrink: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout paint;
}

.btn-admin {
    background: rgba(17, 24, 39, 0.8); /* 다크 유리 */
    color: white;
    pointer-events: auto;
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.admin-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.admin-menu-item {
    background: rgba(255, 255, 255, 0.85); /* 밝은 유리 */
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
}

.admin-menu-item:active {
    background: #f9fafb;
    transform: scale(0.98);
}

/* 뱃지 스타일 */
.badge-new {
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    line-height: 1;
}

/* 메인 버튼 쪽 뱃지 */
#admin-main-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    border: 2px solid white;
    display: none;
}


.write-modal {
    position: fixed;
    top: 0;
    left: 50%;
    max-width: 700px;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 2000;
    transform: translate(-50%, 100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.write-modal.show {
    transform: translate(-50%, 0);
}

.write-header {
    background: var(--card-bg);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.write-header-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
}

.write-btn-cancel,
.write-btn-save {
    font-family: inherit;
    font-size: 15px;
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
}

.write-btn-cancel {
    color: var(--text-sub);
}

.write-btn-save {
    color: var(--primary-color);
    font-weight: 600;
}

.write-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.write-form-group {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 0 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* 편집기 내부 사진 미리보기 */
.edit-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 12px;
}

.edit-preview-item {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #f8fafc;
}

.edit-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-preview-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 4px;
    width: 18px;
    height: 18px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.edit-preview-item .remove-btn:hover {
    background: var(--danger-color);
}


.write-input,
.write-textarea {
    width: 100%;
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
}

.write-input {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 500;
}

.write-input::placeholder,
.write-textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.write-input:last-child {
    border-bottom: none;
}

.write-textarea {
    padding: 16px 0;
    font-size: 15px;
    min-height: 250px;
    resize: none;
    line-height: 1.6;
}

.pdf-scan-container {
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    display: none;
    /* PDF 선택시에만 표시 */
    align-items: center;
    justify-content: space-between;
    border: 1px dashed #cbd5e1;
}

.ai-btn-small {
    background: #eff6ff;
    color: #2563eb;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.ai-btn-small:hover {
    background: #dbeafe;
}

.admin-controls {
    margin-top: 16px;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.admin-controls button {
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-edit {
    background: var(--card-bg);
    color: var(--text-main);
}

.btn-red {
    background: var(--danger-color);
    color: white;
    border: none;
}

/* [로그인 모달] */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.login-card {
    background: var(--card-bg);
    padding: 30px 24px 24px 24px;
    border-radius: 16px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.login-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.login-desc {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 24px;
}

#login-id,
#login-pw,
#login-mfa-phone,
#login-mfa-enroll-code,
#login-mfa-signin-code {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    background: var(--bg-color);
    font-size: 14px;
    font-family: inherit;
    border-radius: 8px;
}

.login-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.login-feedback {
    margin: -2px 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--primary-dark);
    background: rgba(219, 234, 254, 0.65);
    border: 1px solid rgba(147, 197, 253, 0.45);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
}

.login-step {
    margin-top: 6px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    text-align: left;
}

.login-step-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.login-step-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-sub);
    margin-bottom: 12px;
}

.login-sub-btn {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 10px;
}

.login-sub-btn.primary {
    background: var(--text-main);
    border-color: var(--text-main);
    color: #ffffff;
}

#admin-recaptcha-container {
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
}

.login-btn-group button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#close-modal {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

#login-btn {
    background: var(--text-main);
    border: none;
    color: white;
}

/* 숨겨진 자물쇠 위치 조정 */
.admin-lock-icon {
    position: fixed;
    bottom: 25px;
    left: 25px;
    /* 좌측 이동 */
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 90;
    color: #d1d5db;
    opacity: 0;
    visibility: hidden;
}

.admin-lock-icon.visible {
    opacity: 1;
    visibility: visible;
}

/* [NEW] 최근 FAQ 목록 - 개별 카드 스타일 (3.3 앱 스타일 영감) */
.recent-faq-list {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

/* FAQ 카드 — 글래스모피즘 */
.recent-faq-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 6px 24px rgba(37, 99, 235, 0.07),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
    transition:
        background-color 0.32s ease,
        border-color 0.32s ease,
        box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
    outline: none;
    overflow: hidden;
}

/* 유리 상단 하이라이트 */
.recent-faq-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.50) 0%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 20px 20px 0 0;
    pointer-events: none;
    z-index: 0;
}

.recent-faq-wrapper:last-child {
    margin-bottom: 0;
}

/* 열렸을 때 유리 강화 */
.recent-faq-wrapper.active {
    background: rgba(255, 255, 255, 0.80);
    border-color: rgba(147, 197, 253, 0.50);
    box-shadow:
        0 10px 32px rgba(37, 99, 235, 0.10),
        0 2px 8px rgba(37, 99, 235, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transform: translateY(-1px);
    z-index: 10;
}

.recent-faq-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    z-index: 1;
}

.recent-faq-row:not(.active):hover {
    background: rgba(241, 245, 249, 0.60);
}

/* 카테고리 태그 — 기존 블루 색상 유지 */
.recent-faq-cat {
    display: inline-block;
    vertical-align: top;
    font-size: 11px;
    color: var(--primary-color);
    font-weight: 700;
    background-color: rgba(239, 246, 255, 0.90);
    padding: 3px 8px;
    border-radius: 6px;
    margin-right: 8px;
    white-space: nowrap;
    border: 1px solid rgba(219, 234, 254, 0.80);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.recent-faq-title {
    font-size: 14px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.recent-faq-row.active .recent-faq-title {
    white-space: normal;
    color: var(--primary-color);
    font-weight: 800;
}

.recent-faq-row.active {
    background: transparent;
}

.recent-faq-row .chevron-icon {
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.28s ease;
}

.recent-faq-row.active .chevron-icon {
    transform: rotate(180deg);
    stroke: var(--primary-color);
}

.recent-faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    opacity: 0;
    background: transparent;
    transform: translateY(-6px);
    transition:
        max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease,
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 1;
}

.recent-faq-answer.show {
    max-height: 1000px; /* 답변 내용이 길 수 있으므로 넉넉히 */
    padding: 0 20px 24px 20px;
    opacity: 1;
    transform: translateY(0);
}

.recent-faq-answer-content {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
    transform: translateY(6px);
    opacity: 0;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
}

.recent-faq-answer.show .recent-faq-answer-content {
    transform: translateY(0);
    opacity: 1;
}

.recent-faq-answer-content p {
    margin: 0 0 12px 0;
}

.recent-faq-answer-content img {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

/* FAQ 탭 스크롤 */
.faq-tab-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.faq-tab-scroll::-webkit-scrollbar {
    display: none;
}

/* FAQ 탭 버튼 — 유리 질감 추가 */
.faq-tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.80);
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-sub);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

/* 활성 탭 — 기존 블루 색상 유지 */
.faq-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow:
        0 4px 12px rgba(37, 99, 235, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.faq-tab:hover:not(.active) {
    background: rgba(243, 244, 246, 0.80);
    border-color: rgba(203, 213, 225, 0.80);
}


/* [NEW] 쉽게 찾기 (아코디언) — Glassmorphism 스타일 */

/* 전체 섹션 배경: 연한 블루 그라디언트로 유리 효과 기반 마련 */
#easy-find-list {
    position: relative;
}

#easy-find-anchor {
    height: 1px;
}

.easy-group {
    position: relative;
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.80);
    box-shadow:
        0 8px 32px rgba(37, 99, 235, 0.08),
        0 2px 8px rgba(37, 99, 235, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* 유리 상단 하이라이트 */
.easy-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.00) 100%
    );
    border-radius: 20px 20px 0 0;
    pointer-events: none;
    z-index: 0;
}

.easy-group:last-child {
    margin-bottom: 0;
}

/* 열렸을 때 (무채색 유리 강화) */
.easy-group:has(.easy-sub-list[style*="flex"]) {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 1.00);
}

.easy-header {
    padding: 22px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.24s ease;
    position: relative;
    z-index: 1;
}

.easy-header:active {
    background: rgba(0, 0, 0, 0.02);
}

.easy-header:hover .easy-title {
    color: #111827;
}

.easy-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.24s ease;
}

.easy-sub-list {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 24px;
    opacity: 0;
    transform: translateY(-8px);
    transition:
        max-height 0.52s cubic-bezier(0.22, 1, 0.36, 1), 
        padding 0.52s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.34s ease,
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 1;
}

.easy-group.active .easy-sub-list {
    max-height: 500px; /* 여유 있게 설정 */
    padding: 6px 24px 24px 24px;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.easy-group.active .chevron {
    transform: rotate(180deg) !important;
    stroke: var(--primary-color);
}

/* 칩: 중립적인 그레이 유리 스타일 (크기 확대) */
.easy-chip {
    padding: 10px 20px;
    background: rgba(241, 245, 249, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.90);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.80);
}

.easy-chip:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    border-color: rgba(203, 213, 225, 0.90);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1.00);
}

.hidden {
    display: none !important;
}

/* [NEW] 배경 스크롤 방지 */
html:has(.no-scroll),
.no-scroll {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none;
}

.policy-modal,
.ai-chat-modal {
    touch-action: auto;
}

/* [NEW] 커스텀 확인 모달 */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-confirm-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.custom-confirm-box {
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 28px;
    width: 85%;
    max-width: 320px;
    padding: 36px 24px 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-confirm-overlay.show .custom-confirm-box {
    transform: scale(1) translateY(0) !important;
}

.custom-confirm-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.custom-confirm-desc {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 32px;
    word-break: keep-all;
    letter-spacing: -0.01em;
}

.custom-confirm-buttons {
    display: flex;
    gap: 12px;
}

.custom-confirm-btn {
    flex: 1;
    padding: 16px 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.custom-confirm-btn.cancel {
    background: rgba(241, 245, 249, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.95);
    color: #475569;
    backdrop-filter: blur(5px);
}

.custom-confirm-btn.confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.custom-confirm-btn:active {
    transform: scale(0.985);
}

.support-choice-box {
    max-width: 340px;
}

.support-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-confirm-btn.cancel.soft {
    background: rgba(232, 240, 254, 0.82);
    border: 1px solid rgba(191, 219, 254, 0.95);
    color: #1d4ed8;
}

/* ✨ [NEW] 스플래시 로딩 영역 */
.splash-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 700px;
    height: 100%;
    background-color: #f4f5f9;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.5s;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.25);
}

@media (max-width: 700px) {
    .splash-container {
        box-shadow: none;
    }
}

.splash-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-box {
    width: 60px;
    height: 60px;
    background-color: #111;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: splash-squish-bounce 1.6s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
    transform-origin: center bottom;
}

.splash-logo-img {
    width: 40px;
    height: auto;
    object-fit: contain;
}

@keyframes splash-squish-bounce {
    0% { transform: scale(1, 1) translateY(0); }
    10% { transform: scale(1.12, 0.88) translateY(0); }
    30% { transform: scale(0.9, 1.1) translateY(-20px); }
    50% { transform: scale(1.05, 0.95) translateY(0); }
    65% { transform: scale(0.98, 1.02) translateY(-4px); }
    80% { transform: scale(1, 1) translateY(0); }
    100% { transform: scale(1, 1) translateY(0); }
}

/* ✨ [NEW] 봇 체크(보안 확인) UI 스타일 */
.bot-check-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fadeIn 0.8s ease-out forwards;
    width: 100%;
    padding: 20px;
}

.bot-check-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    width: 320px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bot-check-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-check-header span {
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

.bot-check-widget {
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.bot-check-widget:hover {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bot-check-circle {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    position: relative;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bot-check-widget.verifying .bot-check-circle {
    border: 2px solid #e5e7eb;
    border-top-color: var(--primary-color);
    animation: rotateWidget 0.8s linear infinite;
}

.bot-check-widget.verified {
    pointer-events: none;
    border-color: #10b981;
    background: #f0fdf4;
}

.bot-check-widget.verified .bot-check-circle {
    border-color: #10b981;
    background: #10b981;
}

.bot-check-widget.verified .bot-check-circle::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 4px;
}

.bot-check-text {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.bot-check-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
}

.bot-check-footer span {
    font-size: 10px;
    color: #9ca3af;
}

@keyframes rotateWidget {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#splash-bounce-area.fade-out {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
    display: none !important;
}

.hidden {
    display: none !important;
}

/* [NEW] 햄버거 메뉴 버튼 스타일 */
.btn-hamburger {
    background: transparent !important;
    border: none !important;
    padding: 8px;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 1001;
    box-shadow: none !important;
    outline: none !important;
}

.btn-hamburger:active {
    transform: scale(0.9);
}

/* [NEW] 사이드 메뉴 슬라이드 오버레이 */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    /* 모바일 하단의 다크 푸터 위에서도 과하게 하얗게 뜨지 않도록 중성 다크 톤 사용 */
    background: rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    touch-action: none;
}

.side-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 슬라이드 메뉴 패널 — 훨씬 밝은 화이트 유리 */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    height: 100dvh;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.90) 0%,
            rgba(255, 255, 255, 0.84) 100%
        );
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    z-index: 9999;
    box-shadow: -12px 0 28px rgba(15, 23, 42, 0.08);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.58);
    overflow: hidden;
}

.side-menu::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 42%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.48) 0%,
        rgba(255, 255, 255, 0.16) 45%,
        rgba(255, 255, 255, 0.00) 100%
    );
    pointer-events: none;
}

.side-menu.show {
    right: 0;
}

/* 메뉴 헤더 — 유리 하단 구분선 */
.side-menu-header {
    padding: 24px 20px;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.10);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.38);
    position: relative;
    z-index: 1;
}

.side-menu-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.side-menu-close {
    background: transparent; /* 배경색 통일 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
    color: var(--text-main);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: all 0.2s;
}

.side-menu-close:hover {
    background: rgba(255, 255, 255, 0.85);
}

.side-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0 30px;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

@media (max-width: 700px) {
    .side-menu {
        top: 12px;
        right: -300px;
        bottom: auto;
        height: auto;
        max-height: calc(100dvh - 16px);
        border-radius: 24px 0 0 24px;
        background:
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.94) 0%,
                rgba(255, 255, 255, 0.88) 100%
            );
        box-shadow:
            -12px 0 32px rgba(15, 23, 42, 0.12),
            0 10px 34px rgba(15, 23, 42, 0.08);
    }

    .side-menu-content {
        flex: 0 1 auto;
        max-height: calc(100dvh - 92px);
        padding-bottom: 24px;
    }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.menu-item-link {
    text-decoration: none;
    color: inherit;
}

.menu-item:hover {
    background: rgba(239, 246, 255, 0.55);
}

.menu-item:active {
    background: rgba(219, 234, 254, 0.60);
}

.menu-item svg:first-of-type {
    color: var(--primary-color);
    flex-shrink: 0;
}

.menu-item-label {
    flex: 1;
}

.menu-arrow {
    color: #c0c7d0;
    flex-shrink: 0;
}

@media (hover: none), (pointer: coarse) {
    .unified-product-card,
    .keyword-chip,
    .cat-icon-wrapper,
    .ai-chat-card,
    .portal-btn,
    .card-btn,
    .footer-box-primary,
    .footer-box-secondary,
    .store-btn,
    .store-close-btn,
    .inquiry-submit-btn,
    .inquiry-close-btn,
    .btn-top,
    .btn-chat,
    .modal-close-btn,
    .chat-header-secondary-btn,
    .chat-nav-btn,
    .chat-opt-btn,
    .ai-btn-small,
    .recent-faq-row,
    .faq-tab,
    .easy-chip,
    .custom-confirm-btn,
    .bot-check-widget,
    .side-menu-close,
    .menu-item {
        transition: none;
    }

    .unified-product-card:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(255, 255, 255, 0.80);
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.90);
    }

    .unified-product-card:hover .card-thumb-img {
        transform: translateZ(0);
    }

    .keyword-chip:hover,
    .portal-btn:hover,
    .store-btn:hover,
    .store-close-btn:hover,
    .inquiry-submit-btn:hover,
    .inquiry-close-btn:hover,
    .btn-top:hover,
    .btn-chat:hover,
    .modal-close-btn:hover,
    .chat-header-secondary-btn:hover,
    .chat-nav-btn:hover,
    .chat-opt-btn:hover,
    .ai-btn-small:hover,
    .recent-faq-row:not(.active):hover,
    .faq-tab:hover:not(.active),
    .easy-chip:hover,
    .custom-confirm-btn.cancel:hover,
    .custom-confirm-btn.confirm:hover,
    .bot-check-widget:hover,
    .side-menu-close:hover,
    .menu-item:hover {
        transform: none;
    }

    .keyword-chip:hover {
        background: rgba(255, 255, 255, 0.72);
        color: var(--text-sub);
        border-color: rgba(226, 232, 240, 0.85);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90);
    }

    .cat-card:hover .cat-icon-wrapper {
        background: rgba(255, 255, 255, 0.65);
        transform: none;
        box-shadow: var(--shadow-sm);
        border-color: rgba(255, 255, 255, 0.5);
    }

    .card-btn-manual:hover,
    .card-btn-faq:hover,
    .chat-opt-btn.faq-option-btn:hover,
    .footer-box-primary:hover,
    .footer-box-secondary:hover {
        transform: none;
    }

    .card-btn-manual:hover {
        background: linear-gradient(135deg, rgba(255, 245, 212, 0.72) 0%, rgba(255, 231, 168, 0.42) 100%);
        border-color: rgba(245, 158, 11, 0.22);
        box-shadow:
            0 10px 24px rgba(15, 23, 42, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.95),
            inset 0 -1px 0 rgba(255, 255, 255, 0.18);
    }

    .card-btn-faq:hover {
        background: linear-gradient(135deg, rgba(231, 244, 255, 0.72) 0%, rgba(199, 227, 255, 0.42) 100%);
        border-color: rgba(59, 130, 246, 0.2);
        box-shadow:
            0 10px 24px rgba(15, 23, 42, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.95),
            inset 0 -1px 0 rgba(255, 255, 255, 0.18);
    }

    .chat-opt-btn.faq-option-btn:hover {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 249, 255, 0.99) 100%);
        border-color: rgba(37, 99, 235, 0.16);
        color: #1f2937;
        box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255,255,255,0.96);
    }

    .footer-box-primary:hover {
        background: rgba(255, 255, 255, 0.13);
        border-color: rgba(255, 255, 255, 0.22);
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.20),
            inset 0 1px 0 rgba(255, 255, 255, 0.20),
            inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    }

    .footer-box-secondary:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #94a3b8 !important;
        border-color: rgba(255, 255, 255, 0.10);
        box-shadow:
            0 2px 10px rgba(0, 0, 0, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}
