:root {
    /* ==================================================
       Brand
       대표색: 선명한 주황색
    ================================================== */
    --brand: #ec6100;
    --brand-dark: #c94f00;
    --brand-hover: #b74600;

    --brand-rgb: 236, 97, 0;
    --brand-dark-rgb: 201, 79, 0;

    --brand-soft: #fff1e8;
    --brand-soft-2: #fff8f3;

    /* ==================================================
       State
       상태 색상은 의미 구분을 위해 고유 색상을 유지
    ================================================== */
    --state-on: #22c55e;
    --state-on-rgb: 34, 197, 94;

    --state-disabled: #9a7663;
    --state-disabled-rgb: 154, 118, 99;

    --state-info: #2563eb;
    --state-info-rgb:37,99, 235;

    --state-warning: #d97706;
    --state-warning-rgb:217, 119, 6;

    --state-success:#16a34a;
    --state-success-rgb:22, 163, 74;

    --state-error: #dc2626;
    --state-error-rgb:220, 38, 38;

    /* 상태 배지 점 색상 */
    --state-idle-dot:#d6c4ba;
    --state-info-dot:#bfdbfe;
    --state-warning-dot:#fef3c7;
    --state-success-dot:#bbf7d0;
    --state-error-dot:#fecaca;

    /* ==================================================
       Accent
       대표 주황색과 충돌하지 않도록 보조색을 청색으로 설정
    ================================================== */
    --accent: #2563eb;
    --accent-soft: #dbeafe;

    /* ==================================================
       Neutral RGB
    ================================================== */
    --white-rgb: 255, 255, 255;
    --dark-rgb: 28, 24, 21;
    --slate-rgb: 87, 72, 63;

    /* ==================================================
       Background & Surface
       따뜻한 아이보리·주황 계열
    ================================================== */
    --bg: #f7ede6;
    --bg-deep: #ead8cb;

    --surface: #ffffff;
    --surface-soft: #fff8f3;
    --surface-glass: rgba(var(--white-rgb), 0.94);

    --surface-overlay : rgba(var(--white-rgb), 0.95);
    --surface-popup:rgba(var(--white-rgb), 0.94);

    /* 채팅 영역 배경 */
    --chat-background-start: rgba(255, 248, 243, 0.88);
    --chat-background-end:rgba(var(--white-rgb), 0.95);

    /* ==================================================
       Text
       붉은 기운 대신 따뜻한 짙은 갈색 계열
    ================================================== */
    --text: #241b16;
    --text-sub: #51382b;
    --text-muted: #806251;
    --text-light: #b4927f;
    --text-white: #ffffff;
    --text-dark-navy: #1d2e73;
    --text-light-red:#D9531E;

    /* 흰색 텍스트 투명도 */
    --text-white-strong:rgba(var(--white-rgb), 0.92);
    --text-white-muted:rgba(var(--white-rgb), 0.82);

    /* ==================================================
       Border
    ================================================== */
    --border: #efded2;
    --border-strong: #dec4b3;
    --border-soft: #f8eee8;

    --border-glass:rgba(var(--white-rgb), 0.75);
    --border-white-subtle:rgba(var(--white-rgb), 0.12);
    --border-white-soft: rgba(var(--white-rgb), 0.18);
    --border-white-medium:rgba(var(--white-rgb), 0.22);
    --border-white-strong: rgba(var(--white-rgb), 0.28);
    --border-white-preview:rgba(var(--white-rgb), 0.35);

    /* ==================================================
       Bubble
    ================================================== */
    --bubble-bot: #fff8f3;
    --bubble-user: var(--brand);

    /* ==================================================
       Interactive
    ================================================== */
    --interactive-white-bg: rgba(var(--white-rgb), 0.14);
    --interactive-white-hover: rgba(var(--white-rgb), 0.22);

    --brand-border-hover: rgba(var(--brand-rgb), 0.38);
    --brand-border-focus: rgba(var(--brand-rgb), 0.65);

    /* ==================================================
       Overlay & Camera
    ================================================== */
    --camera-background: rgba(var(--dark-rgb), 0.85);
    --camera-badge-background: rgba(var(--dark-rgb), 0.72);

    --overlay-background: rgba(var(--dark-rgb), 0.38);

    --badge-idle-background: rgba(var(--slate-rgb), 0.78);
    --badge-info-background: rgba(var(--state-info-rgb), 0.82);
    --badge-warning-background: rgba(var(--state-warning-rgb), 0.88);
    --badge-success-background: rgba(var(--state-success-rgb), 0.88);
    --badge-error-background: rgba(var(--state-error-rgb), 0.88);

    /* ==================================================
       Gradient
    ================================================== */
    --glass-highlight-start: rgba(var(--white-rgb), 0.75);
    --glass-highlight-end: rgba(var(--white-rgb), 0.05);

    /* ==================================================
       Shadow
       대표 주황색보다 어두운 갈색 계열 사용
    ================================================== */
    --shadow-color-rgb: 142, 65, 17;

    --shadow-sm: 0 4px 14px rgba(var(--shadow-color-rgb), 0.08);

    --shadow-md: 0 14px 38px rgba(var(--shadow-color-rgb), 0.14);

    --shadow-lg: 0 24px 70px rgba(var(--shadow-color-rgb), 0.20);

    --shadow-button: 0 10px 22px rgba(var(--brand-rgb), 0.28);

    --shadow-button-hover: 0 14px 28px rgba(var(--brand-rgb), 0.32);

    --shadow-button-active: 0 8px 18px rgba(var(--brand-rgb), 0.22);

    --shadow-quick: 0 3px 10px rgba(var(--dark-rgb), 0.05);

    --shadow-quick-hover: 0 8px 18px rgba(var(--brand-rgb), 0.22);

    --shadow-user-bubble: 0 10px 22px rgba(var(--brand-rgb), 0.25);

    --shadow-camera: 0 18px 42px rgba(var(--dark-rgb), 0.30);

    --shadow-camera-badge: 0 0.5rem 1.5rem rgba(var(--dark-rgb), 0.22);

    --shadow-popup:0 1.8rem 4rem rgba(var(--dark-rgb), 0.25);

    /* ==================================================
       Focus
    ================================================== */
    --focus-ring: rgba(var(--brand-rgb), 0.42);
    --focus-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.15);

    /* ==================================================
       Radius
    ================================================== */
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --radius-pill: 999px;

    /* ==================================================
       Transition
    ================================================== */
    --transition-fast: 0.16s ease;
    --transition-base: 0.18s ease;
    --transition-slow: 0.22s ease;
}

/* ==============================
   Base
============================== */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

/* ==============================
   Layout
============================== */

.chat-page {
    min-height: 100vh;
    padding: 34px 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-shell {
    position: relative;

    width: 100%;
    max-width: 780px;
    height: 86vh;
    min-height: 660px;

    display: flex;
    flex-direction: column;
    overflow: hidden;

    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter:blur(14px);
    backdrop-filter: blur(14px);
}

.chat-shell::before {
    content: "";
    position: absolute;
    inset: 0;

    pointer-events: none;
    border-radius: inherit;

    background: linear-gradient(
        135deg,
        var(--glass-highlight-start),
        var(--glass-highlight-end)
    );
}

/* ==============================
   Header
============================== */

.chat-header {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 22px 26px;

    color: var(--text-white);
    background: var(--brand);
    border-bottom: 1px solid var(--border-white-subtle);
}

.chat-header-left {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header-icon {
    position: relative;
    flex-shrink: 0;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-white);
    background: var(--surface);
    border: 1px solid var(--border-white-medium);
    border-radius: 7px;
    box-shadow: inset 0 1px 0 var(--border-white-soft);
}

.chat-header-icon img,
.chat-header-icon svg {
    position: relative;
    z-index: 2;
}

.chat-header-text {
    min-width: 0;
}

.chat-header-text h1 {
    margin: 0;

    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.45px;
}

.chat-header-text p {
    margin: 5px 0 0;

    color: var(--text-white-muted);
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: -0.2px;
}

/* =========================================================
   헤더 카메라·마이크 버튼
   ========================================================= */

.chat-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.chat-header-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;

    color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;

    cursor: pointer;

    transition:
        color var(--transition-base),
        background-color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.chat-header-status .status-icon {
    width: 21px;
    height: 21px;
    pointer-events: none;
}

/*
 * 비활성 상태를 나타내는 대각선
 */
.chat-header-status .status-off-line {
    opacity: 1;
    stroke-width: 2.4;
    transition: opacity var(--transition-base);
}

/* =========================================================
   비활성 상태
   ========================================================= */

.chat-header-status.is-disabled {
    color: rgba(255, 255, 255, 0.68);
    background: rgba(15, 23, 42, 0.18);
    border-color: rgba(255, 255, 255, 0.2);
}

.chat-header-status.is-disabled:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.36);
}

/* =========================================================
   활성 상태
   ========================================================= */

.chat-header-status.is-on {
    color: #ffffff;
    background: rgba(22, 163, 74, 0.92);
    border-color: rgba(255, 255, 255, 0.52);

    box-shadow:
        0 0 0 3px rgba(74, 222, 128, 0.2),
        0 5px 14px rgba(15, 23, 42, 0.18);
}

.chat-header-status.is-on .status-off-line {
    opacity: 0;
}

.chat-header-status.is-on:hover {
    background: #16a34a;
    border-color: rgba(255, 255, 255, 0.72);
}

/*
 * 활성 상태 표시점
 */
.chat-header-status.is-on::after {
    position: absolute;
    top: -3px;
    right: -3px;

    width: 9px;
    height: 9px;

    content: "";

    background: #4ade80;
    border: 2px solid #ffffff;
    border-radius: 50%;

    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

/* =========================================================
   마이크 녹음 상태 애니메이션
   ========================================================= */

.mic-status.is-on {
    animation: mic-status-pulse 1.8s ease-in-out infinite;
}

@keyframes mic-status-pulse {
    0%,
    100% {
        box-shadow:
            0 0 0 3px rgba(74, 222, 128, 0.16),
            0 5px 14px rgba(15, 23, 42, 0.18);
    }

    50% {
        box-shadow:
            0 0 0 6px rgba(74, 222, 128, 0.04),
            0 5px 14px rgba(15, 23, 42, 0.18);
    }
}

/* =========================================================
   공통 상호작용
   ========================================================= */

.chat-header-status:hover {
    transform: translateY(-1px);
}

.chat-header-status:active {
    transform: translateY(0) scale(0.94);
}

.chat-header-status:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.42);
    outline-offset: 3px;
}

/*
 * 실제 HTML disabled 속성이 적용된 경우
 */
.chat-header-status:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

/*
 * 화면에는 보이지 않지만 스크린 리더가 읽는 텍스트
 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
}

/* =========================================================
   작은 화면
   ========================================================= */

@media (max-width: 480px) {
    .chat-header-actions {
        gap: 6px;
    }

    .chat-header-status {
        width: 36px;
        min-width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .chat-header-status .status-icon {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-header-status,
    .chat-header-status .status-off-line,
    .mic-status.is-on {
        transition: none;
        animation: none;
    }
}

.chat-header-status:hover {
    background: var(--interactive-white-hover);
    border-color: var(--border-white-strong);
    transform: translateY(-1px);
}

.chat-header-status:active {
    transform: translateY(0);
}

.chat-header-status:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

/* ==============================
   Header Status Dot
============================== */

.status-dot {
    width: 16px;
    height: 9px;

    border-radius: 3px;

    transition:
        background var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.status-text {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.chat-header-status.is-disabled .status-dot {
    background: var(--state-disabled);
    box-shadow:
        0 0 0 4px rgba(var(--state-disabled-rgb), 0.22),
        0 0 12px rgba(var(--state-disabled-rgb), 0.35);
}

.chat-header-status.is-on .status-dot {
    background: var(--state-on);
    box-shadow:
        0 0 0 4px rgba(var(--state-on-rgb), 0.22),
        0 0 16px rgba(var(--state-on-rgb), 0.60);
}

/* ==============================
   Notice
============================== */

.notice-card {
    position: relative;
    z-index: 1;

    margin: 16px 24px 0;
    padding: 13px 15px;

    display: flex;
    align-items: flex-start;
    gap: 10px;

    color: var(--text-sub);
    background: linear-gradient(135deg, var(--brand-soft), var(--surface));
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.notice-icon {
    flex-shrink: 0;

    width: 28px;
    height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--brand);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.notice-card p {
    margin: 1px 0 0;

    font-size: 13px;
    line-height: 1.55;
    word-break: keep-all;
}

/* ==============================
   Quick Questions
============================== */

.quick-question-area {
    position: relative;
    z-index: 1;

    padding: 16px 24px 15px;

    display: flex;
    gap: 9px;

    overflow-x: auto;
    border-bottom: 1px solid var(--border-soft);
    scrollbar-width: none;
}

.quick-question-area::-webkit-scrollbar {
    display: none;
}

.quick-question {
    min-height: 38px;
    padding: 8px 14px 8px 11px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--text-sub);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-quick);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background var(--transition-base),
        color var(--transition-base),
        border-color var(--transition-base),
        transform var(--transition-base),
        box-shadow var(--transition-base);
}

.quick-question:hover {
    color: var(--text-white);
    background: var(--brand);
    border-color: var(--brand);
    transform: translateY(-1px);
    box-shadow: var(--shadow-quick-hover);
}

.quick-question:active {
    transform: translateY(0);
}

.quick-question:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.quick-icon {
    flex-shrink: 0;

    width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--brand);
    background: var(--brand-soft);
    border-radius: var(--radius-pill);
    stroke-width: 1;
}

/* .quick-icon svg { */
/*     width: 1em; */
/*     height: 1em; */
/* } */

.quick-question:hover .quick-icon {
    color: var(--text-white);
    background: var(--interactive-white-hover);
}

/* ==============================
   Messages
============================== */

.chat-messages {
    position: relative;
    z-index: 1;
    flex: 1;

    padding: 26px 24px;
    overflow-y: auto;

    background: linear-gradient(
        180deg,
        var(--chat-background-start),
        var(--chat-background-end)
    );
}

.chat-messages::-webkit-scrollbar {
    width: 7px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-pill);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.message {
    margin-bottom: 18px;

    display: flex;
    gap: 11px;

    animation: fadeUp 0.25s ease both;
}

.message.user {
    justify-content: flex-end;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   Avatar
============================== */

.avatar {
    width: 41px;
    height: 41px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 5px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.bot-avatar {
    color: var(--text-white);
    background: var(--brand);
}

.bot-avatar img {
    display: block;
}

.message.user .avatar {
    display: none;
}

/* ==============================
   Bubble
============================== */

.bubble {
    max-width: 72%;
    padding: 13px 16px;

    border-radius: var(--radius-lg);

    font-size: 14.5px;
    line-height: 1.68;
    letter-spacing: -0.2px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.bubble p {
    margin: 0;
}

.bubble p + p {
    margin-top: 6px;
}

.message.bot .bubble {
    color: var(--text);
    background: var(--bubble-bot);
    border: 1px solid var(--border);
    border-top-left-radius: var(--radius-xs);
    box-shadow: var(--shadow-sm);
}

.message.user .bubble {
    color: var(--text-white);
    background: linear-gradient(135deg, var(--bubble-user), var(--brand-dark));
    border-top-right-radius: var(--radius-xs);
    box-shadow: var(--shadow-user-bubble);
}

/*
   챗봇 답변 본문
   - DB에 저장된 줄바꿈을 화면에 그대로 표시한다.
   - chatbot.js에서는 .html()이 아니라 .text()를 유지한다.
*/

/* .message.bot .answer-text { */
/*     white-space: pre-line; */
/*     line-height: 1.7; */
/* } */

.message.bot .answer-text {
    white-space: normal;
    line-height: 1.5;
    overflow-wrap:anywhere;
}
/* ------------------------------------------------------ */
/* ------------------------------------------------------ */

/* ==============================
   Chatbot Loading
============================== */

.loading-message .bubble {
    min-width: 250px;
}

.loading-content {
    min-height: 25px;

    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-text {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.loading-dots {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dots i {
    width: 6px;
    height: 6px;

    display: block;

    background: var(--brand);
    border-radius: var(--radius-pill);

    animation: chatbot-loading-bounce 1.2s infinite ease-in-out;
}

.loading-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-dots i:nth-child(3) {
    animation-delay: 0.30s;
}

@keyframes chatbot-loading-bounce {
    0%,
    60%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* 답변 오류 말풍선 */
.message.bot.error-message .bubble {
    color: var(--state-error);
    background: #fff5f5;
    border-color: var(--state-error-dot);
}

/* 입력창 비활성화 */
.chat-input-box:has(input:disabled) {
    opacity: 0.68;
    background: var(--border-soft);
}

.chat-input-area input:disabled {
    cursor: not-allowed;
}

/* 전송 버튼 처리 중 상태 */
.chat-input-area button:disabled {
    cursor: not-allowed;
}

#sendBtn:disabled {
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

#sendBtn.is-loading svg {
    animation: chatbot-send-pulse 1.2s infinite ease-in-out;
}

@keyframes chatbot-send-pulse {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.92);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 추천 질문 비활성화 */
.quick-question:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quick-question:disabled:hover {
    color: inherit;
    transform: none;
}

/* 화면에는 보이지 않고 스크린리더에만 전달 */
.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;

    border: 0;
}

/* 동작 감소 설정 사용자 지원 */
@media (prefers-reduced-motion: reduce) {
    .loading-dots i,
    #sendBtn.is-loading svg {
        animation: none;
    }

    .loading-dots i {
        opacity: 0.75;
    }
}


/* ==============================
   Input
============================== */

.chat-input-area {
    position: relative;
    z-index: 1;

    padding: 17px 22px 22px;

    display: flex;
    gap: 11px;

    background: var(--surface-overlay);
    border-top: 1px solid var(--border-soft);
}

.chat-input-box {
    flex: 1;

    height: 50px;
    padding: 0 15px;

    display: flex;
    align-items: center;
    gap: 10px;

    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 17px;

    transition:
        border-color var(--transition-base),
        background var(--transition-base),
        box-shadow var(--transition-base);
}

.chat-input-box:focus-within {
    background: var(--surface);
    border-color: var(--brand-border-focus);
    box-shadow: var(--focus-shadow);
}

.input-icon {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--text-light);
}

.chat-input-box:focus-within .input-icon {
    color: var(--brand);
}

.chat-input-area input {
    flex: 1;

    width: 100%;
    min-width: 0;
    height: 100%;

    color: var(--text);
    background: transparent;
    border: none;
    outline: none;

    font-size: 14.5px;
    font-weight: 500;
}

.chat-input-area input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.chat-input-area input:focus-visible {
    outline: none;
}

.chat-input-area button {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-white);
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border: none;
    border-radius: 17px;
    box-shadow: var(--shadow-button);

    cursor: pointer;

    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        background var(--transition-base);
}

.chat-input-area button:hover {
    background: linear-gradient(135deg, var(--brand-hover), var(--brand-dark));
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.chat-input-area button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-button-active);
}

.chat-input-area button:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

/* ==============================
   Camera Preview
============================== */

.camera-preview-wrap {
    position: absolute;
    right: 22px;
    bottom: 92px;
    z-index: 20;

    width: 360px;
    max-width: calc(100vw - 44px);
    height: auto;
    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: var(--camera-background);
    border: 1px solid var(--border-white-preview);
    border-radius: 20px;
    box-shadow: var(--shadow-camera);
}

.camera-preview-wrap.is-hidden {
    display: none;
}

.camera-preview-video,
.camera-preview-canvas {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.camera-preview-video {
    opacity: 0;
}

.camera-preview-canvas {
    opacity: 1;
}

/* ==============================
   Camera Recognition Badge
============================== */

.camera-recognition-badge {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 5;

    padding: 0.45rem 0.75rem;

    display: inline-flex;
    align-items: center;
    gap: 0.45rem;

    color: var(--text-white);
    background: var(--camera-badge-background);
    border: 1px solid var(--border-white-strong);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-camera-badge);
    -webkit-backdrop-filter:blur(8px);
    backdrop-filter: blur(8px);

    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

.camera-recognition-badge .recog-dot {
    width: 0.55rem;
    height: 0.55rem;

    border-radius: var(--radius-pill);
    background: var(--text-light);
}
.camera-recognition-badge.recog-idle {
    background: var(--badge-idle-background);
}

.camera-recognition-badge.recog-idle .recog-dot {
    background: var(--state-idle-dot);
}

.camera-recognition-badge.recog-start {
    background: var(--badge-info-background);
}

.camera-recognition-badge.recog-start .recog-dot {
    background: var(--state-info-dot);
}

.camera-recognition-badge.recog-recognizing {
    background: var(--badge-warning-background);
}

.camera-recognition-badge.recog-recognizing .recog-dot {
    background: var(--state-warning-dot);
    animation: recogPulse 0.9s infinite ease-in-out;
}

.camera-recognition-badge.recog-done {
    background: var(--badge-success-background);
}

.camera-recognition-badge.recog-done .recog-dot {
    background: var(--state-success-dot);
}

.camera-recognition-badge.recog-error {
    background: var(--badge-error-background);
}

.camera-recognition-badge.recog-error .recog-dot {
    background: var(--state-error-dot);
}

@keyframes recogPulse {
    0% {
        transform: scale(1);
        opacity: 0.65;
    }

    50% {
        transform: scale(1.45);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.65;
    }
}

/* ==============================
   Recognition Popup
============================== */

.recognition-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    background: var(--overlay-background);
    -webkit-backdrop-filter:blur(3px);
    backdrop-filter: blur(3px);
}

.recognition-popup.is-visible {
    display: flex;
}

.recognition-popup-box {
    min-width: 28rem;
    max-width: 90vw;
    padding: 2.2rem 2.4rem;

    text-align: center;

    background: var(--surface-popup);
    border-radius: 1.8rem;
    box-shadow: var(--shadow-popup);
    animation: recognitionPopupIn var(--transition-slow) ease-out;
}

.recognition-popup-title {
    margin-bottom: 0.8rem;

    color: var(--text);
    font-size: 1.7rem;
    font-weight: 800;
}

.recognition-popup-message {
    margin-bottom: 0.7rem;

    color: var(--text-sub);
    font-size: 1.35rem;
}

.recognition-popup-message strong {
    color: var(--brand);
    font-size: 1.55rem;
}

.recognition-popup-sub {
    color: var(--text-muted);
    font-size: 1rem;
}

@keyframes recognitionPopupIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==============================
   Responsive
============================== */

@media (max-width: 768px) {
    .chat-page {
        padding: 0;
    }

    .chat-shell {
        max-width: none;
        height: 100vh;
        min-height: 100vh;
        height:100dvh;
        min-height:100dvh;

        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .chat-header {
        padding: 17px 18px;
    }

    .chat-header-icon {
        width: 43px;
        height: 43px;
        border-radius: 14px;
    }

    .chat-header-text h1 {
        font-size: 16px;
    }

    .chat-header-text p {
        font-size: 12px;
        line-height: 1.35;
    }

    .chat-header-actions {
        gap: 7px;
    }

    .chat-header-status {
        min-width: auto;
        height: 36px;
        padding: 0 0.65rem;
    }

    .status-text {
        font-size: 0.78rem;
    }

    .notice-card {
        margin: 13px 16px 0;
        padding: 12px 13px;
    }

    .notice-card p {
        font-size: 12.5px;
    }

    .quick-question-area {
        padding: 13px 16px;
    }

    .quick-question {
        min-height: 36px;
        padding: 7px 12px 7px 10px;
        font-size: 12.5px;
    }

    .chat-messages {
        padding: 20px 16px;
    }

    .avatar {
        width: 33px;
        height: 33px;
        border-radius: 12px;
    }

    .bubble {
        max-width: 82%;
        padding: 12px 14px;
        font-size: 14px;
    }

    .chat-input-area {
        padding: 12px 14px 16px;
        gap: 9px;
    }

    .chat-input-box {
        height: 48px;
        padding: 0 13px;
        border-radius: 15px;
    }

    .chat-input-area button {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .camera-preview-wrap {
        right: 14px;
        bottom: 82px;

        width: min(360px, calc(100vw - 28px));
        aspect-ratio: 4 / 3;

        border-radius: 17px;
    }
}

@media (max-width: 420px) {
    .chat-header-left {
        gap: 11px;
    }

    .chat-header-text p {
        display: none;
    }

    .chat-header-status {
        width: 36px;
        min-width: 36px;
        padding: 0;
    }

    .chat-header-status .status-text {
        display: none;
    }

    .notice-card {
        display: none;
    }

    .bubble {
        max-width: 86%;
    }

    .camera-preview-wrap {
        right: 10px;
        bottom: 76px;

        width: min(260px, calc(100vw - 20px));
        aspect-ratio: 4 / 3;

        border-radius: 15px;
    }

    .camera-recognition-badge {
        left: 0.65rem;
        top: 0.65rem;

        padding: 0.36rem 0.58rem;
        gap: 0.35rem;

        font-size: 0.74rem;
    }

    .camera-recognition-badge .recog-dot {
        width: 0.45rem;
        height: 0.45rem;
    }


}    

/* ==============================
   답변 기능 영역
============================== */

.answer-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

/* 음성안내, 수어영상, 홈페이지 공통 스타일 */
.answer-actions button,
.answer-actions .source-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;
    padding: 6px 11px;

    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

.answer-actions button:hover:not(:disabled),
.answer-actions .source-link-btn:hover {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: var(--brand-border-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

.answer-actions button:focus-visible,
.answer-actions .source-link-btn:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.answer-actions button:active:not(:disabled),
.answer-actions .source-link-btn:active {
    transform: translateY(0);
}

.answer-actions button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.answer-actions .sign-video-btn.is-active {
    color: var(--text-white);
    background: var(--brand);
    border-color: var(--brand);
}

/* ==============================
   음성안내 상태
============================== */

	.voice-btn.is-loading::before {
	    display: inline-block;

	    width: 14px;
	    height: 14px;
	    margin-right: 7px;

    border: 2px solid rgba(var(--brand-rgb), 0.25);
    border-top-color: var(--brand);
	    border-radius: 50%;

	    vertical-align: -2px;
	    content: "";
	    animation: voice-loading-spin 0.8s linear infinite;
	}
	
	.voice-status {
	    margin-top: 8px;

    color: var(--text-muted);
	    font-size: 13px;
	    line-height: 1.5;
	}
	
	.voice-status:empty {
	    display: none;
	}
	
	.voice-status.is-loading {
    color: var(--state-warning);
	}
	
	.voice-status.is-success {
    color: var(--state-success);
	}
	
	.voice-status.is-error {
    color: var(--state-error);
	}
	
	@keyframes voice-loading-spin {
	    to {
	        transform: rotate(360deg);
	    }
	}

/* ==============================
   수어영상 플레이어
============================== */

.sign-video-wrap {
    width: 100%;
    max-width: 560px;
    margin-top: 12px;
    padding: 10px;

    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);

/*     background: #111111; */
    background: #f8ba91;
}

.sign-video-wrap[hidden] {
    display: none;
}

.sign-video-player {
    display: block;

    width: 100%;
    max-height: 420px;
    aspect-ratio: 16 / 9;

    border: 0;
    border-radius: 8px;

    background: #000000;
    object-fit: contain;
}

.sign-video-status {
    margin-top: 8px;

    color: var(--text-white);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.sign-video-status:empty {
    display: none;
}

.sign-video-status.is-error {
    color: #ffb4b4;
}

@media (max-width: 420px) {
    .answer-actions {
        gap: 6px;
    }

    .answer-actions button,
    .answer-actions .source-link-btn {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .sign-video-wrap {
        padding: 7px;
        border-radius: 10px;
    }

    .sign-video-player {
        max-height: 300px;
        border-radius: 7px;
    }
}


/* ------------------------------------------ */
.quick-icon svg{
    width:20px;
    height:20px;
    stroke-width:1.8;
    flex-shrink:0;
}

/* ------------------------------------------ */
.voice-btn,
.sign-video-btn,
.source-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.answer-action-icon {
    display: block;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.voice-btn-text,
.sign-video-btn-text,
.source-link-btn-text {
    line-height: 1;
    white-space: nowrap;
}

/* ---------------------------------------- */
/* .notice-card { */
/*     기존 스타일 유지 */

/*     margin-top: 6px; */
/*     margin-bottom: 6px; */
/* } */

/* .quick-question-area { */
/*     기존 스타일 유지 */

/*     margin-top: 0; */
/* } */

/* -------------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------------- */

/* =========================================================
   음성인식 팝업
   ========================================================= */

.recognition-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.recognition-popup.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.recognition-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
}

.recognition-popup-panel {
    position: relative;
    width: min(100%, 360px);
    padding: 30px 26px 24px;
    text-align: center;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.22),
        0 8px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s ease;
}

.recognition-popup.is-visible .recognition-popup-panel {
    transform: translateY(0) scale(1);
}

.recognition-popup-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 18px;
    color: #ffffff;
    background: #ec6100;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(236, 97, 0, 0.3);
}

.recognition-popup-icon svg {
    position: relative;
    z-index: 2;
    width: 34px;
    height: 34px;
}

.recognition-wave {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(236, 97, 0, 0.42);
    border-radius: 50%;
    animation: recognition-wave 1.8s ease-out infinite;
}

.recognition-wave.wave-2 {
    animation-delay: 0.6s;
}

.recognition-wave.wave-3 {
    animation-delay: 1.2s;
}

.recognition-popup-title {
    margin: 0 0 10px;
    color: #111827;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.35;
}

.recognition-popup-message {
    margin: 0;
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

.recognition-popup-message strong {
    display: block;
    margin-top: 7px;
    color: #ec6100;
    font-size: 16px;
    font-weight: 750;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.recognition-popup-sub {
    margin: 7px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.recognition-popup-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 34px;
    margin: 12px 0 14px;
}

.recognition-popup-progress span {
    width: 5px;
    height: 10px;
    background: #ec6100;
    border-radius: 999px;
    animation: recognition-level 1s ease-in-out infinite;
}

.recognition-popup-progress span:nth-child(2) {
    animation-delay: 0.1s;
}

.recognition-popup-progress span:nth-child(3) {
    animation-delay: 0.2s;
}

.recognition-popup-progress span:nth-child(4) {
    animation-delay: 0.3s;
}

.recognition-popup-progress span:nth-child(5) {
    animation-delay: 0.4s;
}

.recognition-popup-cancel {
    min-width: 140px;
    min-height: 42px;
    padding: 9px 18px;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.recognition-popup-cancel:hover {
    color: #c2410c;
    background: #fff7ed;
    border-color: #fb923c;
}

.recognition-popup-cancel:active {
    transform: scale(0.97);
}

.recognition-popup-cancel:focus-visible {
    outline: 3px solid rgba(236, 97, 0, 0.28);
    outline-offset: 3px;
}

/* 인식 완료 상태 */
.recognition-popup.is-complete .recognition-popup-icon {
    background: #16a34a;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.26);
}

.recognition-popup.is-complete .recognition-wave,
.recognition-popup.is-complete .recognition-popup-progress,
.recognition-popup.is-complete .recognition-popup-cancel {
    display: none;
}

/* 오류 상태 */
.recognition-popup.is-error .recognition-popup-icon {
    background: #dc2626;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.24);
}

.recognition-popup.is-error .recognition-wave,
.recognition-popup.is-error .recognition-popup-progress {
    display: none;
}

@keyframes recognition-wave {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.65);
    }
}

@keyframes recognition-level {
    0%,
    100% {
        height: 9px;
        opacity: 0.45;
    }

    50% {
        height: 28px;
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .recognition-popup {
        padding: 16px;
    }

    .recognition-popup-panel {
        padding: 26px 20px 22px;
        border-radius: 18px;
    }

    .recognition-popup-title {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .recognition-popup,
    .recognition-popup-panel,
    .recognition-wave,
    .recognition-popup-progress span {
        transition: none;
        animation: none;
    }
}


/* ===================================================================
   						챗봇 Markdown 답변 스타일
   ================================================================= */

.message.bot .answer-text {
    white-space:normal;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* -----------------------------------------
   제목 h1 ~ h6
   ----------------------------------------- */

.message.bot .answer-text h1,
.message.bot .answer-text h2,
.message.bot .answer-text h3,
.message.bot .answer-text h4,
.message.bot .answer-text h5,
.message.bot .answer-text h6 {
    color:var(--text-light-red);
    font-weight:600;
    line-height:1.4;
    word-break:keep-all;
    margin:12px 0 6px;
}

.message.bot .answer-text h1{
    font-size:1.35em;
}

.message.bot .answer-text h2{
    font-size:1.25em;
}

.message.bot .answer-text h3{
    font-size:1.15em;
}

.message.bot .answer-text h4{
    font-size:1.08em;
}

.message.bot .answer-text h5{
    font-size:1em;
}

.message.bot .answer-text h6{
    font-size:0.95em;
    color:var(--text);
}

/* 첫 번째 제목의 상단 여백 제거 */
.message.bot .answer-text > :first-child {
    margin-top:0;
}

/* -----------------------------------------
   문단
   ----------------------------------------- */

.message.bot .answer-text p {
    margin: 0 0 6px;
    line-height:1.6;
}

/* -----------------------------------------
   목록 ul, ol, li
   ----------------------------------------- */

.message.bot .answer-text ul,
.message.bot .answer-text ol {
    margin: 4px 0 8px;
    padding-left: 20px;
}

.message.bot .answer-text ul {
    list-style-type:disc;
}

.message.bot .answer-text ol {
    list-style-type:decimal;
}

.message.bot .answer-text li {
    margin: 0 0 3px;
    padding:0;
    line-height:1.6;
}

.message.bot .answer-text li:last-child{
    margin-bottom:0;
}

/* 중첩 목록 */
.message.bot .answer-text li > ul,
.message.bot .answer-text li > ol {
    margin:3px 0 5px;
    padding-left:20px;
}

.message.bot .answer-text ul ul {
    list-style-type: circle;
}

.message.bot .answer-text ul ul ul{
    list-style-type: square;
}

.message.bot .answer-text li > p {
    margin: 0;
}

/* -----------------------------------------
   텍스트 강조
   ----------------------------------------- */

.message.bot .answer-text strong,
.message.bot .answer-text b{
    font-weight:500;
    color:var(--text-dark-navy);
    font-size: 1.00em;
}

.message.bot .answer-text em,
.message.bot .answer-text i {
    font-style:italic;
}

.message.bot .answer-text del,
.message.bot .answer-text s {
    text-decoration:line-through;
}    

/* -----------------------------------------
   홈페이지 링크
   ----------------------------------------- */

.message.bot .answer-text a {
    color: #1765b3;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap:anywhere;
}

.message.bot .answer-text a:hover {
    color: #0d467f;
}

.message.bot .answer-text a:focus-visible {
    outline: 2px solid #1765b3;
    outline-offset: 2px;
}

/* -----------------------------------------
   인라인 코드
   ----------------------------------------- */

.message.bot .answer-text :not(pre) > code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f1f3f5;
    color: #b42318;
    font-size: 0.9em;
    font-family: Consolas, monospace;
    overflow-wrap: anywhere;
}

/* -----------------------------------------
   코드 블록
   ----------------------------------------- */

.message.bot .answer-text pre {
    margin: 8px 0;
    padding: 12px;
    background: #f5f7fa;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.5;
}

.message.bot .answer-text pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 0.9em;
    font-family: Consolas, monospace;
    white-space: inherit;
}

/* -----------------------------------------
   인용문
   ----------------------------------------- */

.message.bot .answer-text blockquote {
    margin: 8px 0;
    padding: 8px 12px;
    border-left: 4px solid #8ba9c8;
    background: #f5f8fc;
    color: #49566a;
}

.message.bot .answer-text blockquote p {
    margin: 0;
}

/* -----------------------------------------
   구분선
   ----------------------------------------- */

.message.bot .answer-text hr {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

/* -----------------------------------------
   테이블
   ----------------------------------------- */

.message.bot .answer-text table {
    width: 100%;
    margin: 8px 0;
    border-collapse: collapse;
    font-size: 0.95em;
}

.message.bot .answer-text th,
.message.bot .answer-text td {
    padding: 8px 10px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.message.bot .answer-text th {
    background: #f2f5f9;
    color: var(--text-dark-navy);
    font-weight: 600;
}

.message.bot .answer-text tr:nth-child(even) td {
    background: #fafbfd;
}

/* -----------------------------------------
   이미지
   ----------------------------------------- */

.message.bot .answer-text img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border-radius: 6px;
}

/* -----------------------------------------
   기타 Markdown 태그
   ----------------------------------------- */

.message.bot .answer-text mark {
    background: #fff0a8;
    padding: 0 2px;
}

.message.bot .answer-text sub,
.message.bot .answer-text sup {
    font-size: 0.75em;
}

.message.bot .answer-text kbd {
    padding: 2px 5px;
    border: 1px solid #ccd2da;
    border-radius: 4px;
    background: #f5f6f8;
    font-family: Consolas, monospace;
    font-size: 0.9em;
}

/* 마지막 요소의 하단 여백 제거 */
.message.bot .answer-text > :last-child {
    margin-bottom: 0;
}

/* ------------------------------------------- */

/* .message.bot .answer-text { */
/*     outline: 2px solid blue; */
/* } */

/* .message.bot .answer-text ul { */
/*     outline: 2px solid red; */
/* } */

/* .message.bot .answer-text li { */
/*     outline: 1px solid green; */
/* } */



/* ==========================================
   답변 평가 영역 (좋아요 / 싫어요)
   ========================================== */

/* 답변 평가 영역 */
.answer-actions .answer-feedback {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 평가 버튼 공통 */
.answer-actions .answer-feedback .feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width:30px;
    height:30px;
    min-height:0;
    padding:0;    

    /* 테두리 및 배경 제거 */
    border:none;
    border-radius:50%;
    background:transparent;

    font-family:inherit;
    line-height: 1;
    cursor: pointer;

    transition:
        background-color 0.15s ease,
        opacity 0.15s ease,
        transform 0.15s ease;
}

/* 좋아요 / 싫어요 텍스트 숨김 */
.answer-actions .answer-feedback .feedback-btn span{
    display:none;
}

/* 평가 아이콘 크기 */
.answer-actions .answer-feedback .feedback-btn .answer-action-icon {
    display:block;
    width:19px;
    height:19px;
    flex-shrink:0;
}

/* 좋아요 - 파란색 */
.answer-actions .answer-feedback .feedback-like {
    color: #2563eb;
}

/* 좋아요 마우스 오버 및 선택 상태 */
.answer-actions .answer-feedback .feedback-like:hover,
.answer-actions .answer-feedback .feedback-like.is-selected {
    color:#2563eb;
    background-color: #dbeafe;
}

/* 싫어요 - 빨간색 */
.answer-actions .answer-feedback .feedback-dislike {
    color: #dc2626;
}

/* 싫어요 마우스 오버 및 선택 상태 */
.answer-actions .answer-feedback .feedback-dislike:hover,
.answer-actions .answer-feedback .feedback-dislike.is-selected {
    color:#dc2626; 
    background-color: #fee2e2;
}

/* 선택 상태 - 아이콘 강조 */
.answer-actions .answer-feedback .feedback-btn.is-selected 
.answer-action-icon{
    stroke-width:1.0;
}

/* 클릭 효과 */
.answer-actions .answer-feedback .feedback-btn:active {
    transform:scale(0.92);
}

/* 전송 중 */
.answer-actions .answer-feedback .feedback-btn:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* 키보드 접근성 */
.answer-actions .answer-feedback .feedback-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ------------------------------------------------------------- */

.feedback-statistics {
    margin: 24px 0 30px;
}

.feedback-summary-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(170px, 1fr)
    );
    gap: 14px;
    margin-top: 16px;
}

.feedback-summary-card {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

.feedback-summary-label {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
}

.feedback-summary-value {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
}

.feedback-summary-value.like {
    color: #2563eb;
}

.feedback-summary-value.dislike {
    color: #dc2626;
}

.feedback-summary-value small {
    font-size: 14px;
    font-weight: 400;
}

.feedback-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.feedback-badge.like {
    color: #1d4ed8;
    background: #dbeafe;
}

.feedback-badge.dislike {
    color: #b91c1c;
    background: #fee2e2;
}

.feedback-badge.unrated {
    color: #64748b;
    background: #f1f5f9;
}

/* ------------------------------------- */
.survey-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 12px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #ffffff;
    color: #374151;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition: background-color 0.2s;
}

.survey-open-btn:hover {
    background: #f3f4f6;
}

.survey-open-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}