@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.65px;
}

:root {
    --bg-body: #f8f9fb;
    --bg-container: #ffffff;
    --text-main: #1a1a1b;
    --text-sub: #8e8e93;
    --border-line: #f2f2f7;
    --btn-bg: #ffffff;
    --btn-blue: #0075e4;
    --btn-hover: #f0f4f9;
    --chat-ai-bg: #ffffff;
    --chat-ai-border: #eaeaea;
    --chat-user-bg: #f0f4f9;
    --input-bg: #f0f4f9;
    --box-bg: #f0f4f9;
    --accent: #6ca52a;
    --accent-light: #f0f7e9;
    --shadow: rgba(0, 0, 0, 0.08);
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --card-shadow: 0 8px 24px rgba(149, 157, 165, 0.1);

    --scale: 1;
}

#product-detail-modal .modal-box {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

@keyframes voicePulse {
    0% {
        transform: scale(0.95);
        box-shadow:
            0 0 0 0 rgba(255, 95, 95, 0.8),
            0 0 0 0 rgba(255, 95, 95, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow:
            0 0 0 6px rgba(255, 95, 95, 0.3),
            0 0 0 12px rgba(255, 95, 95, 0.05);
    }
    100% {
        transform: scale(0.95);
        box-shadow:
            0 0 0 0 rgba(255, 95, 95, 0),
            0 0 0 0 rgba(255, 95, 95, 0);
    }
}

.btn-submit,
.btn-line-buy {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.ai-summary-card {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border-left: 4px solid var(--accent);
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
}

body.dark-mode {
    --bg-body: #0a0a0a;
    --bg-container: #141516;
    --text-main: #f1f1f1;
    --text-sub: #9aa0a6;
    --border-line: #2a2b2c;
    --btn-bg: #1e1f20;
    --btn-blue: #ffffff;
    --btn-hover: #2a2b2c;
    --chat-ai-bg: #1e1f20;
    --chat-ai-border: #2a2b2c;
    --chat-user-bg: #2c3e20;
    --input-bg: #1e1f20;
    --box-bg: #292b2c;
    --accent: #7ec934;
    --shadow: rgba(0, 0, 0, 0.5);
    --modal-overlay: rgba(0, 0, 0, 0.8);
    --card-shadow: rgba(0, 0, 0, 0.4);
}

body[data-font-level='1'] {
    --scale: 1;
}
body[data-font-level='2'] {
    --scale: 1.1;
}
body[data-font-level='3'] {
    --scale: 1.3;
}
body[data-font-level='4'] {
    --scale: 1.45;
}
body[data-font-level='5'] {
    --scale: 1.65;
}

body {
    position: relative;
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    transition: 0.3s;
}
.body-wrap {
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
    max-width: 500px;
    height: 100%;
    max-height: calc(100vh - 52px);
    margin: 0 auto;
}

.mobile-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-container);
    position: relative;
    box-shadow: 0 0 30px var(--shadow);
    transition: 0.3s;
}
.hidden {
    display: none !important;
}
.blind {
    display: block !important;
    position: absolute !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
}
.scroll-area {
    padding: 20px 20px;
    padding-bottom: 100px;
}
.maxWd {
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
}

::-webkit-scrollbar {
    display: none;
    width: 6px;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: var(--text-sub);
}
/* 대안: 스크롤바를 아예 투명하게 숨기기 */
.scroll-area::-webkit-scrollbar {
    display: none;
} /* 1. 크롬, 엣지, 사파리 (Webkit 계열 브라우저) 스크롤바 자체를 표시하지 않음 */
.scroll-area {
    scrollbar-width: none;
} /* 2. 파이어폭스 (Firefox) 스크롤바를 표시하지 않음 */

.ip_radio {
}
.ip_radio:has(input:checked) {
    border-color: var(--accent) !important;
}

.menu-card {
    background: var(--btn-bg);
    border: 1px solid var(--border-line);
    border-radius: 18px;
    padding: calc(12px * var(--scale)) calc(14px * var(--scale));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 8px var(--card-shadow);
}
.menu-card:hover {
    box-shadow: 0 4px 12px var(--card-shadow);
    transform: translateY(-2px);
}
.menu-card:active {
    background: var(--btn-hover);
    transform: scale(0.97);
}
.menu-card i {
    font-size: calc(20px * var(--scale));
}
.menu-card-title {
    font-size: calc(11px * var(--scale)) !important;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}
.menu-card-title span {
    font-size: calc(11px * var(--scale)) !important;
}

.menu-btn {
    width: 100%;
    background-color: var(--btn-bg);
    color: var(--text-main);
    border: 1px solid var(--border-line);
    padding: calc(12px * var(--scale)) 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 6px var(--card-shadow);
}
.menu-btn:hover {
    box-shadow: 0 4px 10px var(--card-shadow);
    transform: translateY(-1px);
}
.menu-btn:active {
    background: var(--btn-hover);
    transform: scale(0.98);
}
.menu-btn i {
    width: 20px;
    text-align: center;
    font-size: calc(18px * var(--scale));
}
.btn-text {
    flex: 1;
    line-height: 1.4;
    word-break: keep-all;
    font-weight: 600;
    font-size: calc(10px * var(--scale)) !important;
}

.bottom-fixed-area {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(to top, var(--bg-container) 80%, transparent);
    z-index: 10;
    transition: 0.3s;
    pointer-events: none;
}
.bottom-fixed-area * {
    pointer-events: auto;
}
.btn-logout {
    width: 100%;
    background: var(--input-bg);
    border: none;
    color: var(--text-sub);
    padding: 12px;
    border-radius: 12px;
    font-size: calc(13px * var(--scale));
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

#chat-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-container);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
#chat-screen.active {
    transform: translateX(0);
}

/* 👇 [수정됨] .chat-header가 숨겨질 때 상단 여백(레이아웃 공간)도 같이 사라지도록 margin-bottom 추가 */
.chat-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px;
    transition:
        transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        margin-bottom 0.3s;
    z-index: 2;
}
.chat-header-inner {
    height: 100%;
    background: var(--bg-container);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    position: sticky;
    top: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 👇 [수정됨] 헤더가 위로 숨겨질 때 레이아웃 공간을 0으로 만들어 아래 영역이 자연스럽게 올라오도록 변경 */
.chat-header.hide-header {
    transform: translateY(-100%);
    margin-bottom: -55px;
}

/* 👇 [수정됨] 헤더 공간이 유동적이므로 기존 margin-top 조절 대신 레이아웃 흐름을 따름 */
.chat-box {
    overflow-y: auto;
    padding: 70px 15px 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.header-btn {
    width: 17px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
    background: transparent;
    color: var(--text-sub);
}
.header-btn:active {
    background: var(--btn-hover);
    color: var(--text-main);
}
.tts-active {
    color: var(--accent);
}

.msg-wrapper {
    display: flex;
    width: 100%;
}
.ai-wrapper {
    justify-content: flex-start;
}
.user-wrapper {
    justify-content: flex-end;
}

/* 👇 [수정됨] AI 채팅 글자: 상품명과 완벽히 똑같은 13px, 굵기 500, 깔끔한 줄간격(1.5) 및 여백 적용 */
.msg-ai {
    padding: 5px 8px;
    background: var(--chat-ai-bg);
    color: var(--text-main);
    border: 1px solid var(--chat-ai-border);
    border-radius: 4px 14px 14px 14px;
    max-width: 98% !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: 0.3s;
    font-size: calc(13px * var(--scale)) !important;
    font-weight: 500 !important;
    line-height: 1.5;
    word-break: keep-all;
}
.msg-ai:has(.chatProduct) {
    width: 100%;
}
/* 👇 [수정됨] 고객 채팅 글자: 기존의 얇은 굵기(200)를 버리고, 상품명과 동일한 13px, 굵기 500으로 변경 */
.msg-user {
    padding: 6px 10px;
    background: var(--chat-user-bg);
    color: var(--text-main);
    border-radius: 16px 6px 16px 16px;
    max-width: 95% !important;
    transition: 0.3s;
    font-size: calc(13px * var(--scale)) !important;
    font-weight: 500 !important;
    line-height: 1.5;
    word-break: keep-all;
}

.msg-ai [style*='font-size:8px'] {
    font-size: calc(8px * var(--scale)) !important;
}
.msg-ai [style*='font-size:11px'] {
    font-size: calc(11px * var(--scale)) !important;
}
.msg-ai [style*='font-size:12px'] {
    font-size: calc(12px * var(--scale)) !important;
}
.msg-ai [style*='font-size:13px'] {
    font-size: calc(13px * var(--scale)) !important;
}
.msg-ai [style*='font-size:14px'] {
    font-size: calc(14px * var(--scale)) !important;
}
.msg-ai [style*='font-size:15px'] {
    font-size: calc(15px * var(--scale)) !important;
}

.openChat_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 10px;
    margin-top: auto;
    padding: 0 20px 90px 20px;
}
.openChat_btn {
    overflow: hidden;
    display: flex;
    align-items: center;
    align-self: flex-start;
    position: relative;
    gap: 12px;
    padding: 12px 18px;
    border: 0;
    border-radius: 30px;
    background: var(--border-line);
    font-weight: 400;
    font-size: calc(14px * var(--scale));
    color: var(--text-main);
    cursor: pointer;
    transition: background0.2s;
}
.openChat_btn-emphasis {
    display: block;
    position: relative;
    margin: 1px;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: #6ca52a;
    font-weight: 600;
    font-size: calc(16px * var(--scale));
    color: #fbfcfa;
    z-index: 1;
}
.openChat_btn:has(.openChat_btn-emphasis) {
    padding: 0;
    background-color: #6ca52a;
}
.openChat_btn:has(.openChat_btn-emphasis)::after {
    content: '';
    opacity: 0;
    display: block;
    position: absolute;
    top: -70px;
    left: 0;
    width: 70px;
    height: 120px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), #fff, #fff, rgba(255, 255, 255, 0));
    transform: rotate(30deg) translateX(-64px);
    animation: liveIng 1.6s infinite;
}
@keyframes liveIng {
    0% {
        transform: rotate(30deg) translateX(-60px);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(30deg) translateX(210px);
        opacity: 0;
    }
}

.input-area-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    transition: 0.3s;
    z-index: 20;
}
.gemini-input-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
    border-radius: 20px 20px 0 0;
    backgroud: var(--btn-hover);
}
.gemini-input-pill:focus-within {
    border-color: var(--accent);
}
.gemini-input {
    margin-right: auto;
    padding-right: 5px;
    padding-left: calc(4px * var(--scale));
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    font-size: calc(13px * var(--scale)) !important;
    color: #9ba0a6;
    word-break: keep-all;
}
.gemini-input::placeholder {
    color: var(--text-sub);
}
.gemini-icon-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.gemini-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: var(--btn-blue);
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}
.gemini-icon-btn:active {
    background: var(--btn-hover);
    color: var(--text-main);
}
.gemini-icon-btn.recording {
    background: #ff5f5f !important;
    color: white !important;
    animation: pulse 1.5s infinite;
}
.gemini-icon-btn-text,
.gemini-icon-btn-microphone {
    font-size: 16px;
}
.dark-mode :is(#micBtn, .gemini-icon-btn) {
    background-color: var(--modal-overlay);
}

#homeMicBtn,
#micBtn {
    transition: 0.3s;
}
#micBtn.recording {
    background: #ff5f5f !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 95, 95, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 95, 95, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 95, 95, 0);
    }
}

#review-modal .modal-box {
    background: #f4f6f8;
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    border-radius: 24px;
    overflow: hidden;
}
.review-header {
    padding: 18px 20px;
    background: var(--bg-container);
    border-bottom: 1px solid var(--bg-body);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.review-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--border-line);
    scrollbar-width: thin;
}
.review-body::-webkit-scrollbar {
    width: 6px;
}
.review-body::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}
.review-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f3f5;
}
.review-stars {
    color: #f1c40f;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.review-text {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    word-break: keep-all;
}
.review-author {
    font-size: 11px;
    color: #999;
    margin-top: 12px;
    text-align: right;
}
.clickable-stat {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}
.clickable-stat:active {
    background: #f0f4f9;
}

.chat-product-line {
    background: var(--btn-bg);
    border-radius: 10px;
    padding: calc(10px * var(--scale)) calc(12px * var(--scale)) !important;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-line);
    gap: 6px;
    transition: 0.2s;
    letter-spacing: -0.3px;
}
.chat-product-line-name {
    font-weight: 700;
    font-size: calc(13px * var(--scale)) !important;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-decoration-color: #eee;
    text-underline-offset: 3px;
}
.chat-product-line-price {
    font-weight: 900;
    font-size: calc(14px * var(--scale)) !important;
    color: var(--accent);
    white-space: nowrap;
    margin-left: 6px;
    flex-shrink: 0;
}
.btn-line-buy {
    padding: calc(8px * var(--scale)) calc(12px * var(--scale)) !important;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: calc(12px * var(--scale)) !important;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: calc(75px * var(--scale));
}
.btn-line-buy:active {
    transform: scale(0.92);
}

.btn-view-history {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: var(--input-bg);
    color: var(--text-main);
    padding: calc(8px * var(--scale)) !important;
    border-radius: 8px;
    border: 1px solid var(--border-line);
    cursor: pointer;
    font-size: calc(12px * var(--scale)) !important;
    font-weight: bold;
    transition: 0.2s;
}
.btn-view-history:active {
    transform: scale(0.98);
}

#login-screen {
    justify-content: center;
    align-items: center;
    display: flex;
    height: 100%;
    flex-direction: column;
    background: var(--bg-container);
    transition: 0.3s;
    z-index: 50;
}
.login-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--input-bg);
    border: 1px solid transparent;
    color: var(--text-main);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}
.login-input:focus {
    border-color: var(--accent);
    background: var(--bg-container);
}
.btn-submit {
    width: 100%;
    padding: calc(10px * var(--scale)) !important;
    background: linear-gradient(135deg, #7ec934 0%, #5a8e22 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: calc(13px * var(--scale)) !important;
    cursor: pointer;
    margin-top: 6px;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(108, 165, 42, 0.3);
}
.btn-submit:active {
    transform: scale(0.97);
}

.admin-box {
    background: var(--input-bg);
    border: 1px dashed var(--border-line);
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 15px;
}
.btn-excel {
    width: 100%;
    background: var(--bg-container);
    color: var(--text-main);
    border: 1px solid var(--border-line);
    padding: 10px;
    border-radius: 10px;
    margin-top: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 4px var(--card-shadow);
}
.btn-excel:active {
    transform: scale(0.98);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
    z-index: 10000 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}
.modal-box {
    background: var(--bg-container);
    width: 90%;
    max-width: 400px;
    padding: 15px;
    border-radius: 20px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--modal-overlay);
    transition: 0.3s;
}

.list-item {
    background: var(--btn-bg);
    padding: calc(14px * var(--scale)) calc(16px * var(--scale)) !important;
    margin-bottom: 6px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-line);
    letter-spacing: -0.3px;
}
.list-item span,
.list-item div {
    font-size: calc(14px * var(--scale)) !important;
}

.custom-popup-box {
    width: 85%;
    max-width: 320px;
    background: var(--bg-container);
    padding: 25px 20px;
    border-radius: 20px;
    text-align: center;
}
.custom-popup-msg {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 20px;
    word-break: keep-all;
    font-weight: 600;
}
.btn-view-history {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: var(--input-bg);
    color: var(--text-main);
    padding: calc(8px * var(--scale)) !important;
    border-radius: 8px;
    border: 1px solid var(--border-line);
    cursor: pointer;
    font-size: calc(12px * var(--scale)) !important;
    font-weight: bold;
    transition: 0.2s;
}
.btn-confirm-ok {
    background: var(--accent);
    color: white;
}
.btn-confirm-cancel {
    background: var(--input-bg);
    color: var(--text-sub);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px;
    width: 40px;
    height: 20px;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes typingBounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.cart-badge {
    position: absolute;
    top: -10px;
    right: -13px;
    background: #ff5f5f;
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50px;
    padding: 2px 6px;
    box-shadow: 0 2px 4px rgba(255, 95, 95, 0.4);
}

.recommend-section {
    margin-bottom: 25px;
}
.recommend-header {
    margin-bottom: 12px;
    padding: 0 5px;
}
.recommend-title {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-main);
}
.recommend-wrapper {
    width: 100%;
    overflow-x: auto;
    display: flex;
    gap: 12px;
    padding: 5px 5px 15px 5px;
    scroll-snap-type: x mandatory;
}
.recommend-wrapper::-webkit-scrollbar {
    display: none;
}
.recommend-card {
    min-width: 130px;
    max-width: 130px;
    background: var(--btn-bg);
    border-radius: 16px;
    padding: 12px;
    border: 1px solid var(--border-line);
    box-shadow: 0 4px 10px var(--card-shadow);
    scroll-snap-align: start;
    cursor: pointer;
    transition: 0.2s;
}
.recommend-card:active {
    transform: scale(0.96);
}
.recommend-card img {
    width: 100%;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 8px;
    background: #eee;
}
.recommend-card-title {
    font-size: calc(12px * var(--scale)) !important;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recommend-card-price {
    font-size: calc(14px * var(--scale)) !important;
    font-weight: 900;
    color: var(--accent);
    margin-top: 4px;
}

.custom-slider {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff5f5f 50%, #eee 50%);
    cursor: pointer;
}
.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ff5f5f;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: 0.2s;
}
.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(255, 95, 95, 0.3);
}

.mainBox {
    padding: 44px 20px 38px 20px;
}
.mainBox_inner {
    padding: 20px 15px;
    border-radius: 14px;
    background: var(--box-bg);
}
.mainBox_title {
    display: block;
    padding-left: 49px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_oasis_68.png) no-repeat left center/34px auto;
    font-weight: 500;
    font-size: 16px;
}
.mainBox_title em {
    font-style: normal;
    font-weight: 700;
}
.mainBox_title b {
    display: block;
    width: 100%;
    margin-top: 3px;
    font-weight: 700;
    font-size: 26px;
}
.mainBox_tip {
    margin-top: 24px;
}
.mainBox_tip_title {
    display: block;
    font-weight: 700;
    font-size: 13px;
}
.mainBox_tip_rolling {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    margin-top: 10px;
    padding: 0 10px;
    border-radius: 20px;
    background: var(--bg-body);
    text-align: center;
}
.mainBox_tip_rolling::before {
    content: '';
    width: 8px;
    height: 12px;
    margin-right: 8px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_mic_16.png) no-repeat left center/100% auto;
    filter: brightness(0);
}
.dark-mode .mainBox_tip_rolling::before {
    filter: brightness(1);
}
.mainBox_tip_desc {
    font-size: 13px;
    letter-spacing: -0.3px;
}
.mainBox_tip_desc b {
    font-weight: 700;
}

.tg_badge {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.tg_badge_bdg {
    padding: 2px 4px;
    border-radius: 2px;
    background: #eeeeee;
    font-weight: 400;
    font-size: 11px;
    color: #545454;
}

/* 채팅입력창 */
.chatGroup {
    display: flex;
    justify-content: center;
    position: relative;
    /* bottom: 0;
    left: 0;
    right: 0; */
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    /* border-radius: 34px 34px 0 0; */
    background: var(--bg-container);
    transform: translateZ(0);
    z-index: 9999;
}
.chatGroup_inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 6px;
    width: 100%;
    padding: 5px 20px 5px 20px;
    border: 1px solid var(--chat-ai-bg);
    border-radius: 34px 34px 0 0;
    background: var(--chat-ai-bg);
    box-shadow: 0px 3px 6px var(--shadow);
}
body:not(.dark-mode) .chatGroup_inner {
    border-color: var(--border-line);
}
body:not(.dark-mode) .chatGroup_volume {
    color: var(--text-main);
}
.chatGroup_volume {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-line);
    border-radius: 50%;
    background: var(--chat-ai-bg);
    font-size: 16px;
    color: #c4c7c6;
}
.chatGroup_ip {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: #9ba0a6;
    text-align: left;
    outline: none;
}
.chatGroup_btn {
    flex-shrink: 0;
    display: flex;
    column-gap: 6px;
    margin-left: auto;
}
.chatGroup_cta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background-color: var(--bg-body);
    font-size: 16px;
    color: var(--text-main);
}
.chatGroup_cta-mic {
    font-size: 18px;
}

.chatProduct {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
    padding: calc(10px * var(--scale)) calc(4px * var(--scale));
    border: 1px solid var(--border-line);
    border-radius: 10px;
    background: var(--border-line);
    transition: 0.2s;
}
.chatProduct_thumb {
    overflow: hidden;
    flex-shrink: 0;
    width: 70px;
    height: 66px;
    margin-right: 8px;
    border-radius: 10px;
}
.chatProduct_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chatProduct_info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding-right: 10px;
}
.chatProduct_name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 100%;
    font-size: 13px;
}
.chatProduct_price {
    font-weight: 700;
    font-size: 13px;
    line-height: 19px;
}
.chatProduct_price b {
    font-weight: 700;
    font-size: 16px;
}
.chatProduct_review {
    display: flex;
    align-items: center;
    gap: 3px;
    border: 0;
    background: none;
    font-size: 13px;
    color: var(--text-main);
    text-align: left;
}
.chatProduct_review::before {
    content: '\f4ad';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 13px;
    transform: scaleX(-1);
}
.dark-mode .chatProduct_review::before {
    font-weight: 700;
}
.chatProduct_btn {
    display: flex;
    flex-direction: column;
    row-gap: 6px;
}
.chatProduct_cta {
    display: flex;
    align-items: center;
    height: 28px;
    padding: 0 9px 0px 6px;
    border: 1px solid #639a35;
    border-radius: 4px;
    background: var(--bg-container);
    font-weight: 500;
    font-size: 13px;
    color: #639a35;
    text-align: center;
}
.chatProduct_cta-cart::before {
    content: '';
    width: 20px;
    height: 20px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_cart_39.png) no-repeat center/100% auto;
}
.chatProduct_cta-gift {
    background: #639a35;
    color: #ffffff;
}
.chatProduct_cta-gift::before {
    content: '';
    width: 20px;
    height: 20px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_gift_39.png) no-repeat center/100% auto;
}
.chatProduct_cta-cancel::before {
    content: '';
    width: 20px;
    height: 20px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_prohibition_40.png) no-repeat center/19px auto;
}
.chatProduct_cta-refund::before {
    content: '';
    width: 20px;
    height: 20px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_point_38.png) no-repeat center/100% auto;
}
.chatProduct_cta-order::before {
    content: '';
    width: 20px;
    height: 20px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_wallet_38.png) no-repeat center/19px auto;
}
.chatProduct_cta .fa-check {
    display: none;
}
.chatProduct_more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 10px;
    border: 1px solid var(--chat-ai-border);
    border-radius: 20px;
    background: #ffffff;
    font-weight: 500;
    font-size: 14px;
    color: #639a35;
    animation: floatBtn 2s infinite ease-in-out;
    transition: all 0.2s ease;
}
.chatProduct_more::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 600;
    font-size: 13px;
}
@keyframes floatBtn {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.modal_inner {
    position: relative;
}
.modal_close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--modal-overlay);
    font-size: 14px;
    color: #ffffff;
    z-index: 1;
}
.modal_body {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(85vh - 55px);
    padding-bottom: 5px;
    letter-spacing: -0.65px;
}
.modal_footer {
    display: flex;
    border-top: 1px solid var(--chat-ai-border);
}
.modal_footer :where(a, button) {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    border: 0;
    background-color: #ffffff;
    font-weight: 500;
    font-size: 15px;
}
.modal_footer .modal_cta {
    background-color: var(--accent);
    color: #ffffff;
}

.tg_sect {
    padding: 18px 15px 16px 15px;
}
.tg_sect ~ .tg_sect {
    border-top: 8px solid var(--bg-body);
}
.tg_sect_title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    line-height: 18px;
}
.tg_summary .tg_sect_title::before {
    content: '';
    width: 17px;
    height: 17px;
    margin-right: 4px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_sparkle_34.png) no-repeat center/100% auto;
}
.tg_thumb {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 83.1%;
}
.tg_thumb img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tg_title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: hidden;
    overflow: hidden;
    max-height: 42px;
    font-weight: 600;
    font-size: 18px;
    line-height: 21px;
}
.tg_desc {
    display: block;
    margin-top: 7px;
    font-size: 13px;
    line-height: 16px;
    color: var(--text-sub);
    word-break: keep-all;
}
.tg_price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 17px;
    letter-spacing: -1px;
}
.tg_price-per {
    margin-right: 4px;
    font-weight: 700;
    font-size: 20px;
    color: var(--accent);
}
.tg_price-current {
    font-weight: 700;
    margin-right: 6px;
    font-size: 18px;
}
.tg_price-current b {
    margin-right: 1px;
    font-weight: 700;
    font-size: 20px;
}
.tg_price-original {
    font-size: 14px;
    color: #adadad;
}
.tg_ai {
    overflow: hidden;
    border: 1px solid #f6faef;
    border-radius: 6px;
}
.tg_ai_box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 14px 14px 14px;
    background-color: #f6faef;
    font-weight: 500;
    font-size: 13px;
    line-height: 16px;
}
.tg_ai_box .emphasis {
    font-weight: 700;
    color: var(--accent);
}
.tg_ai_dl {
    padding: 3px 20px 12px 15px;
    word-break: keep-all;
}
.tg_ai_dl dt {
    display: block;
    margin: 12px 0 5px 0;
    padding-left: 8px;
    font-weight: 600;
    font-size: 13px;
}
.tg_ai_dl dt::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 6px 5px 0 -8px;
    border-radius: 50%;
    background-color: var(--text-main);
    vertical-align: top;
}
.tg_ai_dl dd {
    display: block;
    padding-left: 8px;
    font-size: 13px;
    line-height: 18px;
}
.tg_ai_dl dd .emphasis {
    font-weight: 700;
    color: #b20000;
}
.tg_basicInfo {
    display: block;
}
.tg_basicInfo .tg_basicInfo_title {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 14px;
}
.tg_basicInfo .tg_basicInfo_title-rgt {
    margin-left: auto;
    font-weight: 400;
    font-size: 12px;
    color: #adadad;
}
.tg_basicInfo .tg_dl {
    display: flex;
    flex-wrap: wrap;
}
.tg_basicInfo .tg_dl dt {
    flex-shrink: 0;
    width: 77px;
    padding-right: 10px;
    font-weight: 500;
    font-size: 13px;
    color: #828282;
}
.tg_basicInfo .tg_dl dd {
    width: calc(100% - 77px);
    font-size: 13px;
    line-height: 18px;
}
.tg_basicInfo .tg_dl :where(dt, dd):nth-of-type(n + 2) {
    margin-top: 12px;
}
.tg_comment {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    padding: 0 1px 2px 1px;
    border: 0;
    background-color: transparent;
    font-size: 14px;
    color: var(--text-main);
}
.tg_comment::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_comment_32_2.png) no-repeat center/100% auto;
}
.tg_comment::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    margin-left: auto;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_arr_right_32.png) no-repeat center/100% auto;
}
.tg_comment b {
    font-weight: 700;
}
.msg.msg-ai:has(.tg_full) {
    max-width: none !important;
    width: 100%;
    padding: 20px 0 30px 0;
    border: 0;
    background: none;
    box-shadow: none;
}
.tg_arr-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    column-gap: 4px;
}
.tg_arr-right::after {
    content: '';
    width: 12px;
    height: 12px;
    background: url(https://oasisprodcom.edge.naverncp.com/mobile/ico/ico_arr_last_24.png) no-repeat center/100% auto;
    filter: brightness(0);
}
.tg_full {
}

.scroll-area {
    &::-webkit-scrollbar {
        display: none; /* 스크롤바 자체를 표시하지 않음 */
    }
    scrollbar-width: none; /* 스크롤바를 표시하지 않음 */
}

.receiverUser_list {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    margin-top: 4px;
}
.receiverUser_item {
    list-style: none;
}
.receiverUser_label {
    display: flex;
    align-items: center;
    column-gap: 8px;
    font-size: 13px;
}
.receiverUser_label:has(input:checked) {
    font-weight: 700;
}
.recent {
    display: flex;
    align-items: center;
    font-weight: 500;
}
.recent_badge {
    margin-right: 4px;
    color: var(--text-sub);
}

.gift_tab {
    overflow-x: auto;
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-line);
}
.gift_tab_item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 42px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}
.gift_tab_item i {
    margin-right: 4px;
    color: var(--accent);
}
.gift_tab_item.acitve {
    font-weight: 700;
}
.gift_tab_item.active::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}
.gift_item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
    margin-top: 10px;
    padding: calc(14px * var(--scale)) calc(16px * var(--scale));
    border: 1px solid var(--border-line);
    border-radius: 10px;
    background: var(--btn-bg);
}
.gift_from {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: hidden;
    overflow: hidden;
    max-width: calc(100% - 80px);
    font-size: 13px;
    color: var(--text-sub);
}
.gift_sender {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}
.gift_date {
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 10px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-sub);
}
.gift_product {
    display: flex;
    align-items: center;
    width: 100%;
}
.gift_product_thumb {
    overflow: hidden;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    margin-right: 8px;
    border-radius: 8px;
}
.gift_product_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gift_product_info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    row-gap: 2px;
}
.gift_product_title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 100%;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.2;
}
.gift_product_title.line-1 {
    -webkit-line-clamp: 1;
}
.gift_product_price {
    font-weight: 500;
    font-size: 14px;
    color: var(--accent);
}
.gift_product_status {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-sub);
}
.gift_msg {
    flex-shrink: 0;
    display: flex;
    column-gap: 4px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--border-line);
    font-size: 13px;
    color: var(--text-sub);
}
.gift_msg i {
    margin-top: 2px;
    color: var(--accent);
}

.dark-mode .modal_inner {
    border: 1px solid #222222;
}
.dark-mode .tg_comment::after {
    filter: invert(1) brightness(1);
}
.dark-mode .tg_sect ~ .tg_sect {
    border-color: #202020;
}
.dark-mode .tg_ai {
    border-color: #222222;
}
.dark-mode .tg_ai_box {
    background-color: #222222;
}
.dark-mode .modal_footer :where(a, button):not(.modal_cta) {
    background-color: #333333;
    color: #ffffff;
}
.dark-mode .tg_arr-right::after {
    filter: brightness(1);
}

#micBtn.recording,
#homeMicBtn.recording,
.gemini-icon-btn.recording {
    background: linear-gradient(135deg, #0bc466, #1db954) !important;
    color: white !important;
    border: 2px solid #b9fbc0 !important;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4) !important;
    transition: all 0.3s ease !important;
}

#micBtn.recording.speaking,
#homeMicBtn.recording.speaking,
.gemini-icon-btn.recording.speaking {
    animation: angryGreenMonster 0.4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

@keyframes angryGreenMonster {
    0% {
        transform: scale(0.9) rotate(-3deg);
        box-shadow:
            0 0 0 0 rgba(0, 230, 118, 0.8),
            0 0 15px rgba(0, 230, 118, 0.8);
    }
    30% {
        transform: scale(1.3) rotate(3deg);
        box-shadow:
            0 0 0 15px rgba(0, 230, 118, 0.5),
            0 0 35px rgba(0, 230, 118, 0.8);
    }
    50% {
        transform: scale(0.95) rotate(-3deg);
        box-shadow:
            0 0 0 25px rgba(0, 230, 118, 0.2),
            0 0 45px rgba(0, 230, 118, 0.5);
    }
    80% {
        transform: scale(1.15) rotate(3deg);
        box-shadow:
            0 0 0 40px rgba(0, 230, 118, 0),
            0 0 10px rgba(0, 230, 118, 0.2);
    }
    100% {
        transform: scale(0.9) rotate(0deg);
        box-shadow:
            0 0 0 0 rgba(0, 230, 118, 0),
            0 0 0 rgba(0, 230, 118, 0);
    }
}

#menu-screen .recommend-card-price {
    color: #8ab4f8 !important;
}

button,
.openChat_btn,
.btn-submit,
i[onclick],
div[onclick] {
    transition:
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.1s !important;
    -webkit-tap-highlight-color: transparent !important;
}

button:active,
.openChat_btn:active,
.btn-submit:active,
i[onclick]:active,
div[onclick]:active {
    transform: scale(0.95) !important;
    opacity: 0.7 !important;
}

.fancy-mic-wrapper {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fancy-mic-btn {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #6ca52a 0%, #345a08 100%);
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    z-index: 5;
    box-shadow:
        0 10px 30px rgba(11, 196, 102, 0.4),
        inset 0 -4px 8px rgba(0, 0, 0, 0.1),
        inset 0 4px 8px rgba(255, 255, 255, 0.4);
    transition:
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fancy-mic-btn i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.fancy-mic-btn:active {
    transform: scale(0.85);
}

.fancy-mic-ripple {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #0bc466;
    border-radius: 50%;
    z-index: 1;
    animation: hologram-ripple 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.fancy-mic-ripple:nth-child(2) {
    animation-delay: 0.5s;
}
.fancy-mic-ripple:nth-child(3) {
    animation-delay: 1s;
}

@keyframes hologram-ripple {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.fancy-mic-btn.recording {
    background: linear-gradient(135deg, #1d5f3e, #083c22) !important;
    box-shadow:
        0 10px 30px rgba(227, 250, 229, 0.5),
        inset 0 -4px 8px rgba(0, 0, 0, 0.2) !important;
    animation: listening-heartbeat 0.8s infinite alternate !important;
}
.fancy-mic-btn.recording ~ .fancy-mic-ripple {
    background: #ff5f5f !important;
    animation-duration: 1.5s;
}

@keyframes listening-heartbeat {
    0% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1.05);
    }
}

@keyframes floatUpToMic {
    0% {
        transform: translateY(160px);
        opacity: 0;
    }
    15% {
        transform: translateY(100px);
        opacity: 1;
    }
    85% {
        transform: translateY(-60px);
        opacity: 1;
    }
    100% {
        transform: translateY(-110px);
        opacity: 0;
    }
}

/*  AI 음성 출력 시 스피커 임팩트 애니메이션 */
@keyframes speaker-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(108, 165, 42, 0));
    }
    50% {
        transform: scale(1.3) rotate(-10deg);
        color: #6ca52a !important;
        filter: drop-shadow(0 0 8px rgba(108, 165, 42, 0.6));
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 0 rgba(108, 165, 42, 0));
    }
}
.speaker-playing i {
    animation: speaker-pulse 0.6s infinite ease-in-out;
    color: #6ca52a !important;
}

.gift-scroll-menu::-webkit-scrollbar {
    display: none;
}

/* ---  이미지 우측상단 뱃지 스타일 --- */
.prod-badge {
    position: absolute;
    top: 4px; /* 위에서 4px 여백 */
    right: 4px; /* 오른쪽에서 4px 여백 */
    font-size: 10x;
    font-weight: 300;
    color: white;
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1.2;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* 그림자 효과로 고급스럽게 */
}

/* 상태별 색상 (원하시는 색으로 변경 가능!) */
.badge-frozen {
    background-color: #007bff;
} /* 냉동: 파란색 */
.badge-chilled {
    background-color: #28a745;
} /* 냉장: 초록색 */
.badge-room {
    background-color: #fd7e14;
} /* 상온: 주황색 */
.badge-fresh {
    background-color: #ffc107;
    color: black;
} /* 신선: 노란색(글씨는 검정) */
.badge-dawn5 {
    background-color: #dc3545;
} /* 일반 택배(DT5): 빨간색 */

/* ==============================================================
    [버튼 다이어트 & 완벽한 수직 정중앙 정렬 패치]
   ============================================================== */

/* 1. 채팅창 안의 버튼, 하단 메인 버튼들을 모두 완벽한 정중앙으로 맞춥니다. */
.msg-ai button,
.btn-submit,
.custom-popup-btn,
.btn-view-history {
    padding: 12px 14px !important; /* 위, 아래 여백을 12px로 자로 잰 듯 동일하게! */
    font-size: 13px !important;
    line-height: 1 !important; /* 폰트가 기본적으로 가진 위아래 숨은 빈 공간을 완전히 제거! */

    display: flex !important;
    align-items: center !important; /*  글씨를 수직 정중앙에 완벽하게 꽂아버리는 핵심 코드 */
    justify-content: center !important; /* 가로 중앙 정렬 */

    gap: 6px !important; /* 아이콘과 글자 사이의 간격 */
    border-radius: 10px !important; /* 모서리를 살짝 덜 둥글게 하여 슬림한 느낌 강조 */
    height: auto !important; /* 높이를 글자+패딩 크기에 딱 맞게 자동 조절 */
}

/* 2. 버튼과 말풍선 사이의 넓은 바깥 여백(Margin)도 슬림하게 줄여줍니다. */
.msg-ai div[style*='margin-top: 15px'] {
    margin-top: 10px !important;
}

.header {
    position: sticky;
    top: 0;
    /* 브라우저가 알아서 부드럽게 고정해주며 무한 루프가 생기지 않습니다. */
}

/* ========================================================================
    [강제 덮어쓰기] 민원 접수 팝업창 완벽 밀착 & 대형 버튼 패치
   (이 코드는 파일 맨 밑에 있어야 가장 강력한 힘을 발휘합니다!)
   ======================================================================== */

/* 1. 팝업창 위쪽 텅 빈 여백을 완전히 날려버려서 위로 바짝 붙입니다! */
#refund-full-screen {
    align-items: flex-start !important;
    padding-top: 54px !important; /* 위쪽 여백을 15px로 최소화 */
}

#refund-full-screen .chat-header {
    margin: 0 !important; /* 환불/누락 팝업에서는 헤더 고정 */
    transform: none !important;
}

/* 2. 팝업 박스 안쪽의 불필요한 여백(찌꺼기 마진)을 싹 깎아냅니다! */
#refund-full-screen .modal-box {
    margin-top: 0 !important;
    padding-top: 20px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding-bottom: 25px !important;
}

/* 3. 보이지 않는 숨은 박스들이 차지하던 투명한 공간을 압축합니다! */
#refund-full-screen .modal-box > div {
    margin-bottom: 12px !important;
}

/* 4. 대망의 '접수 버튼' 빵빵하게 키우기! (위쪽의 방해 코드를 강제로 이깁니다) */
#refund-full-screen .btn-submit {
    padding: 18px 20px !important; /* 위아래 여백을 18px로 듬뿍! */
    font-size: 16px !important; /* 글자 크기를 시원하게! */
    font-weight: 900 !important;
    border-radius: 14px !important;
    margin-top: 20px !important;
    height: auto !important; /* 높이 제한 해제 */
}
/* ========================================================================
    [강제 덮어쓰기 2탄] 공간 부족 시 할인전 금액 완벽 숨김 & 레이아웃 방어!
   ======================================================================== */

/* 1. 상품명과 가격 사이 여백 축소 */
.chatProduct_name {
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

/* 2. 가격 표시 영역 강제 1줄 & 남은 공간 안에서만 존재하도록 설정 */
.chatProduct_price {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: nowrap !important; /* 절대 줄바꿈 금지! */
    gap: 3px !important;
    width: 100% !important;
    overflow: hidden !important; /* 넘치는 내용은 숨김 */
}

/* 3. 현재 가격 (절대 크기 양보 불가) */
.chatProduct_price-current {
    font-size: 13px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important; /* 수축 금지 */
    letter-spacing: -0.5px !important;
}
.chatProduct_price-current b {
    font-size: 14px !important;
}

/* 4. 할인율 (절대 크기 양보 불가) */
.chatProduct_price-current + span[style*='color:#6ca52a'],
.chatProduct_price span[style*='color:#6ca52a'] {
    font-size: 12px !important;
    font-weight: 800 !important;
    margin-left: 2px !important;
    margin-right: 2px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important; /* 수축 금지 */
}

/* 5.  [최종 수술] 할인 전 금액 (공간이 부족하면 가차없이 사라짐!) */
.chatProduct_price del {
    font-size: 10px !important;
    color: var(--text-sub) !important;
    text-decoration: line-through !important;
    white-space: nowrap !important;

    /*  유일하게 수축(shrink)을 허용하여, 공간이 부족하면 자신의 크기를 줄입니다. */
    flex-shrink: 1 !important;
    min-width: 0 !important;

    /*  크기가 줄어들다가 공간이 아예 없으면 텍스트를 자르고 말줄임표(...)조차 안 보이게 날려버림 */
    overflow: hidden !important;
    text-overflow: clip !important; /* ellipsis(...) 대신 clip으로 깔끔하게 자름 */

    opacity: 0.6 !important;
}

/* 6. 담기 버튼을 감싸는 전체 박스 레이아웃 방어! */
.chatProduct {
    flex-wrap: nowrap !important; /*  담기 버튼이 다음 줄로 떨어지는 것을 원천 차단! */
}

/* 7. 상품 정보 영역 (이름, 가격)이 남는 공간을 모두 차지하도록 설정 */
.chatProduct_info {
    flex: 1 !important;
    min-width: 0 !important; /* 자식이 너무 커도 부모를 뚫고 나가지 못하게 방어 */
    padding-right: 8px !important;
}

/* 8. 우측 담기 버튼 영역 - 크기 고정 및 찌그러짐 방지! */
.chatProduct_btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    width: 55px !important; /*  가로 폭 고정! */
    min-width: 55px !important;
    flex-shrink: 0 !important; /*  담기 버튼 영역은 절대 찌그러지지 않음! */
    margin-top: 0 !important;
}

/* 9. 담기/결제 버튼 초슬림 다이어트 */
.chatProduct_cta {
    padding: 5px 6px !important; /* 상하 5px로 조절 */
    font-size: 12px !important;
    height: auto !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 10. 담기 버튼 바로 밑에 리뷰(💬) 아이콘 찰싹 붙이기 */
.chatProduct_btn > div[onclick*='openProductDetail'] {
    margin-top: 2px !important;
    font-size: 11px !important;
    color: var(--text-sub) !important;
    white-space: nowrap !important;
}

/* ========================================================================
    [강제 덮어쓰기 3탄] 우측 버튼 영역 3단 세로 정렬 (담기/직송/후기)
   ======================================================================== */

/* 1. 새로운 우측 3단 컨테이너 */
.chatProduct_btn_vertical {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important; /* 상중하 간격 균등 분배 */
    width: 60px !important; /* 가로폭 고정 */
    min-width: 60px !important;
    height: 100% !important; /* 부모 높이에 맞춤 */
    min-height: 70px !important; /* 최소 높이 보장 */
    flex-shrink: 0 !important;
    border-left: 1px dashed var(--border-line) !important; /* 왼쪽 점선 구분선 추가 (선택사항) */
    padding-left: 5px !important;
}

/* 2. 상단: 담기 버튼 (아이콘 위주로 작게) */
.chatProduct_btn_vertical .chatProduct_cta {
    padding: 6px 0 !important;
    width: 36px !important; /* 버튼 가로 크기 축소 */
    height: 28px !important;
    border-radius: 8px !important;
    font-size: 14px !important; /* 아이콘 크기 */
    background: transparent !important; /* 배경 투명하게 */
    border: 1px solid var(--accent) !important; /* 테두리만 */
    color: var(--accent) !important; /* 아이콘 색상 */
    margin: 0 auto !important;
}

/* 3. 중단: 배송 타입 (오아시스 / 업체직송) */
.chatProduct_delivery_type {
    font-size: 10px !important;
    font-weight: 800 !important;
    text-align: center !important;
    letter-spacing: -0.5px !important;
    white-space: nowrap !important;
    margin: 4px 0 !important;
}

/* 4. 하단: 후기 (리뷰 수) */
.chatProduct_review_count {
    font-size: 11px !important;
    color: var(--text-sub) !important;
    text-align: center !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}
.chatProduct_review_count i {
    font-size: 10px !important;
    margin-right: 2px !important;
}
/* ========================================================================
    [강제 덮어쓰기 4탄] 우측 버튼 영역 확대 및 중복 아이콘 완벽 제거!
   ======================================================================== */

/* 1. 우측 3단 컨테이너 폭 약 25% 시원하게 확대 (60px -> 75px) */
.chatProduct_btn_vertical {
    width: 75px !important;
    min-width: 75px !important;
}

/* 2.  [핵심!] 기존 CSS에 숨어있던 '가짜 장바구니 이미지' 완벽 제거 (아이콘 중복 해결) */
.chatProduct_btn_vertical .chatProduct_cta::before,
.chatProduct_btn_vertical .chatProduct_cta::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* 3. 담기 버튼 크기를 폭에 맞게 살짝 키우고 아이콘 정중앙 배치 */
.chatProduct_btn_vertical .chatProduct_cta {
    width: 44px !important; /* 36px -> 44px */
    height: 32px !important; /* 28px -> 32px */
    font-size: 16px !important; /* 가운데 진짜 아이콘 크기도 시원하게 확대 */
    padding: 0 !important; /* 불필요한 패딩 없애서 정중앙 정렬 */
}

/* 4. 배송 타입 (오아시스 / 업체직송) 글자 크기 확대! */
.chatProduct_delivery_type {
    font-size: 12px !important; /* 10px -> 12px 로 눈에 띄게 키움! */
    margin: 5px 0 !important; /* 위아래 간격 확보 */
}

/* 5. 하단 후기(리뷰) 폰트 크기도 밸런스에 맞게 확대 */
.chatProduct_review_count {
    font-size: 12px !important; /* 11px -> 12px */
}
.chatProduct_review_count i {
    font-size: 11px !important;
}

/* ========================================================================
    [강제 덮어쓰기 5탄] 우측 버튼 영역 2단(담기/후기) 정중앙 배치!
   ======================================================================== */

.chatProduct_btn_vertical {
    justify-content: center !important; /* 상중하 분배에서 정중앙 모으기로 변경! */
    gap: 10px !important; /* 담기 아이콘과 후기 사이의 간격을 예쁘게 띄움 */
}

/* 혹시 캐시에 남아있을 기존 배송 타입 텍스트 완벽 숨김 처리 */
.chatProduct_delivery_type {
    display: none !important;
}

/*  활성화 시 진초록색 마이크 주변으로 빛이 퍼져나가는 애니메이션 */
@keyframes pulse-green-mic {
    0% {
        box-shadow: 0 0 0 0 rgba(126, 201, 52, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(126, 201, 52, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(126, 201, 52, 0);
    }
}
