@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

/* 1. 변수 설정 */
:root {
    --primary: #B2A4FF;
    --primary-dark: #8F7DF5;
    --text-main: #333333;
    --text-sub: #767676;
    --white: #ffffff;
    --border: rgba(255, 255, 255, 0.6);
    --bg-start: #F3F5FF;
    --bg-end: #EAE8FF;

    /* 상태 컬러 */
    --danger-red: #FF4B4B;
    /* 출금 (빨강) */
    --success-green: #00C46B;
    /* 입금 (초록) - 수정됨 */
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* 2. 초기화 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #e0e0e0;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

/* 3. 앱 컨테이너 */
.app-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 유틸리티 */
.bg-gradient {
    background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 4. 헤더 */
.page-header {
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
    margin-top: 10px;
    flex-shrink: 0;
}

.page-header.transparent {
    background: transparent;
}

.header-left {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: start;
    font-size: 28px;
    color: var(--text-main);
    cursor: pointer;
    z-index: 20;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    width: 100%;
}

/* Header Profile Section */
.header-profile-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #eee;
    object-fit:cover;
}

.header-profile-info {
    display: flex;
    flex-direction: column;
}

.header-profile-greeting {
    font-size: 12px;
    color: var(--text-sub);
}

.header-nickname {
    text-align: left;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-icon {
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
}

/* 5. 시작 페이지 스타일 */
.top-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 20px;
}

.mascot-img {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

.title-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 10px;
}

.highlight {
    color: var(--primary-dark);
    font-weight: 900;
}

.sub-text {
    font-size: 14px;
    color: var(--text-sub);
}

/* 6. 입력 폼 & 버튼 */
.form-area {
    padding: 10px 25px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow-y: auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.label {
    font-size: 14px;
    font-weight: 700;
    color: #555;
    margin-left: 5px;
}

.label span {
    color: var(--primary-dark);
}

.input-field {
    width: 100%;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.input-field:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(178, 164, 255, 0.2);
}

.btn-mini {
    position: absolute;
    right: 10px;
    top: 40px;
    background: #333;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.9;
}

/* 약관 박스 */
.terms-box {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 16px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    cursor: pointer;
}

.check-row.all {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    font-weight: 700;
    color: #333;
}

input[type="checkbox"] {
    accent-color: var(--primary-dark);
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.term-text {
    font-size: 14px;
    color: #666;
    flex: 1;
}

.term-link {
    font-size: 12px;
    color: #999;
    text-decoration: underline;
}

.bottom-section {
    padding: 0 25px 40px 25px;
    text-align: center;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(178, 164, 255, 0.4);
    cursor: pointer;
    transition: transform 0.1s;
    margin-top: 10px;
}

.btn-primary:active {
    transform: scale(0.98);
    background-color: var(--primary-dark);
}

.login-link {
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-sub);
}

.login-link span {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* =========================================
   8. 로그인 페이지 (Login Page) 전용 스타일
   ========================================= */
/* 로그인 컨텐츠 중앙 정렬 */
.login-content {
    flex: 1;
    /* 남은 공간 다 차지 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* 수직 중앙 정렬 */
    align-items: center;
    /* 수평 중앙 정렬 */
    padding: 30px 40px;
    /* 좌우 여백을 좀 더 줌 */
    padding-bottom: 80px;
    /* 하단 여백 확보 */
}

/* 로그인용 작은 로고 */
.login-logo {
    width: 180px;
    height: 180px;
    /* 시작 페이지보다 작게 */
    object-fit: contain;
    margin-bottom: 25px;
    animation: float 3s ease-in-out infinite;
}

/* 환영 문구 */
.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.3;
}

/* 로그인 폼 영역 (기존 form-area와 다르게 중앙 집중형) */
.login-form-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

/* 하단 링크들 (아이디찾기 / 회원가입) */
.login-links {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 20px;
}

.link-item {
    cursor: pointer;
    transition: color 0.2s;
}

.link-item:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.link-divider {
    color: var(--border);
}

/* =========================================
   9. 메인 화면 (Main Page) 전용
   ========================================= */
/* 메인 컨텐츠 영역 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 80px;
    /* 네비게이션 바 높이만큼 여백 */
}

/* 메인 텍스트 */
.main-greeting {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 20px;
    text-align: center;
    line-height: 1.4;
}

/* =========================================
   10. 하단 네비게이션 (움푹 파인 디자인)
   ========================================= */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    height: calc(80px + env(safe-area-inset-bottom));
    z-index: 50;
    color: #ffffff;
    backdrop-filter: blur(7px) saturate(160%) brightness(0.98);
    /* backdrop-filter: blur(10px) saturate(160%) brightness(0.95); */
    /* backdrop-filter: blur(10px) saturate(160%) brightness(1.05); */
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    box-shadow: inset 0 4px 20px rgba(255, 255, 255, 0.3);
    border: rgba(255, 255, 255, 0.8);
    /* 하단 네비게이션 바 곡률 수정*/
    border-radius: 50px 50px 50px 50px;

    /* ✅ 핵심 1: 가운데 구멍 뚫기 (배경 그라데이션 활용) */
    /* circle at 50% -5px: 원의 중심을 약간 위로 올려서 자연스러운 곡선 만들기 */
    background: radial-gradient(circle at 50% 6px, transparent 38px, rgba(255, 255, 255, 0.1) 38.5px);
    /* ✅ 핵심 2: 구멍 모양대로 그림자 주기 */
    filter: drop-shadow(0 -5px 10px rgba(0, 0, 0, 0.05));

    /* 아이템 배치 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px env(safe-area-inset-bottom);
    /* 양옆 여백 */
}

/* 네비게이션 아이템 (버튼들) */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #363636;
    font-size: 11px;
    gap: 5px;
    cursor: pointer;
    width: 60px;
    height: 100%;
    /* 터치 영역 확보 */
    margin-top: 10px;
    /* 구멍 때문에 전체적으로 내용을 약간 내림 */
}

.nav-item.active {
    color: #745cfa;
    font-weight: 700;
}

.nav-item ion-icon {
    font-size: 24px;
}

/* 중앙 AI 버튼 (공중에 뜸) */
.nav-center-btn {
    position: absolute;
    left: 50%;
    top: -24px;
    /* 네비게이션 바 위로 솟아오름 */
    transform: translateX(-50%);
    /* 정확한 중앙 정렬 */

    width: 60px;
    height: 60px;
    background: var(--primary);
    /* 보라색 */
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 28px;

    /* 버튼 자체의 그림자 */
    box-shadow: 0 5px 15px rgba(178, 164, 255, 0.6);
    cursor: pointer;
    transition: transform 0.1s;
}

.nav-center-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* ... (이전 코드들 그대로 유지) ... */
/* =========================================
   11. 채팅 오버레이 & 디자인 (수정됨)
   ========================================= */
.page-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F8F9FD;
    /* 채팅방 배경색 */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.page-layer.active {
    transform: translateY(0);
}

/* 채팅 헤더 */
.chat-header {
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

/* ✅ 채팅 내용 영역 */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* 말풍선 간격 넓힘 */
    background: #F8F9FD;
}

/* ✅ 말풍선 공통 스타일 */
.bubble-row {
    display: flex;
    gap: 10px;
    max-width: 100%;
    align-items: flex-start;
}

.bubble-row.me {
    justify-content: flex-end;
}

.chat-profile {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: white;
    flex-shrink: 0;
}

.bubble {
    max-width: 72%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14.5px;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* AI 말풍선 (왼쪽) */
.bubble.ai {
    background: var(--white);
    color: var(--text-main);
    border-top-left-radius: 4px;
    /* 프로필 쪽 모서리만 살짝 각지게 */
}

/* 내 말풍선 (오른쪽) */
.bubble.me {
    background: var(--primary);
    color: white;
    border-top-right-radius: 4px;
    /* 내 쪽 모서리만 살짝 각지게 */
}


/* ✅ 입력창 영역 (바닥에서 띄우기) */
.chat-input-area {
    padding: 15px 20px;
    padding-bottom: 30px;
    /* 아이폰 하단 바 고려 + 띄움 효과 */
    background: transparent;
    /* 배경 투명하게 */
    flex-shrink: 0;
}

/* ✅ 둥근 입력 박스 (알약 모양 컨테이너) */
.chat-input-box {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 30px;
    /* 완전 둥글게 */
    padding: 5px 5px 5px 20px;
    /* 내부 여백 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    /* 그림자로 띄움 효과 */
}

/* 실제 입력 필드 */
.chat-input {
    flex: 1;
    height: 40px;
    background: none;
    border: none;
    outline: none;
    /* 배경, 테두리 제거 */
    font-size: 15px;
    color: var(--text-main);
}

.chat-input::placeholder {
    color: #aaa;
}

/* 아이콘 버튼들 */
.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: #999;
    cursor: pointer;
}

/* 전송 버튼 (보라색 동그라미) */
.btn-send-circle {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    margin-left: 5px;
    transition: transform 0.1s;
}

.btn-send-circle:active {
    transform: scale(0.95);
}

/* ===== Main Page Styles ===== */



/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.mascot-img-large {
    width: 200px;
    height: 200px;
}

.main-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin-top: 10px;
    display: block;
    text-align: center;
}

/* Chat Layer */
.chat-header-spacer {
    width: 28px;
}

.chat-close-btn {
    font-size: 28px;
    cursor: pointer;
}

/* ========== Signup Form Styles ========== */

/* 이메일 인증 섹션 */
.email-section {
    margin-bottom: 24px;
}

/* 인증 코드 입력 섹션 */
.verification-section {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 16px;
    border-left: 4px solid var(--primary-dark);
}

/* 인증 코드 발송 버튼 */
.btn-send-code {
    width: 100%;
    padding: 14px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.btn-send-code:active {
    transform: scale(0.98);
    background: var(--primary);
}

.btn-send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 이메일 인증 버튼 */
.btn-verify-code {
    width: 100%;
    padding: 14px;
    background: var(--primary-dark);
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-verify-code:active {
    transform: scale(0.98);
    background: var(--primary);
}

/* 주소 검색 버튼 */
.geocode_btn {
    padding: 12px 0;
    width: 80px;
    background: #555;
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.geocode_btn:active {
    transform: scale(0.98);
    background: #444;
}

/* 닉네임 중복확인 버튼 */
.btn-check-nickname {
    padding: 12px 0;
    width: 80px;
    background: #555;
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-check-nickname:active {
    transform: scale(0.98);
    background: #444;
}

/* 닉네임 상태 메시지 */
.nickname-status {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* 회원가입 폼 섹션 */
.signup-form-section {
    animation: slideUp 0.3s ease-out;
    margin-bottom: 40px;
}

.signup-form-section .btn-primary {
    margin-top: 20px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fab-write {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-write:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* =========================================
   12. 공통 컴포넌트 - 드롭다운 메뉴
   ========================================= */

.custom-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    min-width: 140px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.custom-dropdown-menu.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.custom-dropdown-menu.hide {
    display: none;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 12px 0;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.1s;
}

.menu-item:active {
    background-color: #f5f5f5;
}

.menu-item.danger {
    color: #ff4d4f;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* =========================================
   13. 공통 컴포넌트 - 이미지 첨부/업로드
   ========================================= */

.image-attach-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.image-attach-row::-webkit-scrollbar {
    display: none;
}

.camera-btn {
    width: 70px;
    height: 70px;
    border: 1px solid #eee;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #aaa;
    cursor: pointer;
    background: #fafafa;
    flex-shrink: 0;
}

.camera-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.camera-count {
    font-size: 11px;
}

.preview-box {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
}

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

.btn-remove-img {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
}

/* =========================================
   14. AI 채팅 레이어 (#chatLayer)
   ========================================= */

#chatLayer {
    position: fixed;
    left: 50%;
    top: 0;
    bottom: 0;
    z-index: 1000;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    opacity: 0;
}

#chatLayer.active {
    transform: translate(-50%, 0);
    pointer-events: auto;
    opacity: 1;
}

/* AI 채팅 헤더 */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(178, 164, 255, 0.2);
    flex-shrink: 0;
}

.ai-chat-close-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 22px;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
}

.ai-chat-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    background: #f3f0ff;
    padding: 2px;
}

.ai-chat-header-spacer {
    width: 40px;
}

.ai-chat-clear-btn {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.ai-chat-clear-btn:hover {
    background: rgba(143, 125, 245, 0.12);
    color: var(--primary);
}

/* AI 채팅 바디 */
.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent;
}

/* #chatLayer 내 말풍선 테마 오버라이드 */
#chatLayer .bubble.ai {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    white-space: pre-wrap;
    /* \n → 줄바꿈 렌더링 */
    font-size: 14px;
    line-height: 1.7;
    color: #3a3a4a;
}

#chatLayer .bubble.me {
    background: var(--primary-dark);
    box-shadow: 0 3px 10px rgba(143, 125, 245, 0.35);
    white-space: pre-wrap;
}

#chatLayer .chat-input-box {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

/* 타이핑 인디케이터 */
.ai-typing-indicator {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.ai-typing-dots {
    display: flex;
    gap: 5px;
    background: var(--white);
    padding: 14px 18px;
    border-radius: 4px 18px 18px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ai-typing-dots span {
    width: 7px;
    height: 7px;
    background: #ccc;
    border-radius: 50%;
    animation: aiTypingBounce 1.2s ease-in-out infinite;
}

.ai-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes aiTypingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        background: #ccc;
    }

    30% {
        transform: translateY(-6px);
        background: var(--primary);
    }
}

/* AI 채팅 입력 영역 */
.ai-chat-input-area {
    padding: 12px 16px 24px;
    background: transparent;
    flex-shrink: 0;
}