.faq-chat {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--faq-chat-max-width, 960px);
    margin: 0 auto;
    color: #111111;
    font-family: inherit;
}

body.faq-chat-page .faq-chat {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

body.faq-chat-page {
    margin: 0;
    background: #ffffff;
    color: #111111;
    overflow-x: hidden;
}

body.faq-chat-page *,
body.faq-chat-page *::before,
body.faq-chat-page *::after {
    box-sizing: border-box;
}

#pageCnt,
#content.faq-chat-content {
    background: #ffffff;
}

#content.faq-chat-content {
    min-height: 100vh;
    padding-top: 0;
}

.faq-chat-page__shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1040px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 30px 24px 20px;
}

.faq-chat-page__logo {
    display: inline-flex;
    align-items: center;
    align-self: center;
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.faq-chat-page__logo img {
    display: block;
    width: auto;
    height: 44px;
}

.faq-chat-page__lead {
    margin: 56px auto 30px;
    color: #111111;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.42;
    text-align: center;
}

.faq-chat-page__lead p {
    margin: 0;
}

.faq-chat-page__chat {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

#content.faq-chat-content > h1.bars,
#content.faq-chat-content > .breadcrumbs,
body.faq-chat-page .pageBottomBtnArea,
body.faq-chat-page .fixedCvBtn,
body.faq-chat-page .cv-common,
body.faq-chat-page .cv-common.fix,
body.faq-chat-page .hShopList,
body.faq-chat-page header .top .right,
body.faq-chat-page header .top .right .hCvArea,
body.faq-chat-page header .top .center > span,
body.faq-chat-page header .top .center,
body.faq-chat-page header .hShopList,
body.faq-chat-page header #gNav,
body.faq-chat-page header #gNav .gNavCvBtn,
body.faq-chat-page header #gNav .gNavCvBtnBtm,
body.faq-chat-page header #gNav .gNavCoupon,
body.faq-chat-page #pagetop {
    display: none !important;
}

body.faq-chat-page footer,
body.faq-chat-page header {
    display: none !important;
}

#content.faq-chat-content .inner_1120 {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

body.faq-chat-page header .top {
    min-height: 72px;
    align-items: center;
}

body.faq-chat-page header .top .center {
    min-height: 0;
}

.faq-chat *,
.faq-chat *::before,
.faq-chat *::after {
    box-sizing: border-box;
}

.faq-chat__header {
    display: none;
}

.faq-chat__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 360px;
    padding: 0 24px 10px;
}

.faq-chat__intro {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 220px;
    padding-bottom: 24px;
    color: #111111;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 450;
    letter-spacing: 0;
    line-height: 1.35;
    text-align: center;
    white-space: pre-line;
}

.faq-chat__intro[hidden] {
    display: none;
}

body.faq-chat-page .faq-chat__intro {
    display: none;
}

.faq-chat__messages {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 28px;
    min-height: 300px;
    padding: 0;
    scroll-behavior: smooth;
}

.faq-chat__message {
    display: flex;
    width: 100%;
}

.faq-chat__message--user {
    justify-content: flex-end;
}

.faq-chat__message--assistant,
.faq-chat__message--system {
    justify-content: flex-start;
}

.faq-chat__bubble {
    max-width: min(100%, 760px);
    color: #111111;
    font-size: 17px;
    line-height: 1.85;
    letter-spacing: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.faq-chat__message--user .faq-chat__bubble {
    max-width: min(78%, 520px);
    border-radius: 999px;
    background: #000000;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.65;
    padding: 13px 22px;
}

.faq-chat__message--assistant .faq-chat__bubble {
    background: transparent;
    padding: 0;
}

.faq-chat__message--assistant .faq-chat__bubble--loading {
    min-width: 72px;
    padding-top: 8px;
}

.faq-chat__message--system .faq-chat__bubble {
    max-width: min(100%, 760px);
    border-radius: 14px;
    background: #f5f5f5;
    color: #3f3f46;
    font-size: 15px;
    line-height: 1.7;
    padding: 12px 14px;
}

.faq-chat__loading {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    vertical-align: middle;
}

.faq-chat__loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #111111;
    opacity: 0.34;
    transform: translateY(0);
    animation: faq-chat-wave 1.05s ease-in-out infinite;
    will-change: transform, opacity;
}

.faq-chat__loading-dot:nth-child(2) {
    animation-delay: 0.12s;
}

.faq-chat__loading-dot:nth-child(3) {
    animation-delay: 0.24s;
}

.faq-chat__loading-dot:nth-child(4) {
    animation-delay: 0.36s;
}

.faq-chat__error {
    margin: 20px 0 0;
    border-radius: 14px;
    background: #f5f5f5;
    color: #3f3f46;
    font-size: 14px;
    line-height: 1.7;
    padding: 12px 14px;
}

.faq-chat__composer-shell {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 12px 24px 0;
    background: linear-gradient(to top, #ffffff 78%, rgba(255, 255, 255, 0));
}

.faq-chat__form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 64px;
    padding: 8px 10px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(17, 17, 17, 0.08);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.faq-chat__form:focus-within {
    border-color: #a3a3a3;
    box-shadow: 0 14px 42px rgba(17, 17, 17, 0.12);
}

.faq-chat__input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    max-height: 160px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #111111;
    font: inherit;
    font-size: 18px;
    line-height: 1.55;
    padding: 8px 6px;
    resize: none;
}

.faq-chat__input:focus {
    outline: none;
}

.faq-chat__input::placeholder {
    color: #8f8f8f;
}

.faq-chat__tool,
.faq-chat__send {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 0;
}

.faq-chat__tool {
    width: 42px;
    height: 42px;
    background: transparent;
    color: #111111;
    font-size: 32px;
    font-weight: 300;
}

.faq-chat__tool svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.faq-chat__tool:disabled {
    cursor: default;
    opacity: 1;
}

.faq-chat__send {
    width: 50px;
    height: 50px;
    min-height: 50px;
    background: #000000;
    color: #ffffff;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.faq-chat__send:hover {
    transform: translateY(-1px);
}

.faq-chat__send:focus-visible,
.faq-chat__tool:focus-visible {
    outline: 3px solid rgba(17, 17, 17, 0.18);
    outline-offset: 3px;
}

.faq-chat__send-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.faq-chat__send-icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.faq-chat__send:disabled,
.faq-chat__input:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

@keyframes faq-chat-wave {
    0%,
    100% {
        opacity: 0.34;
        transform: translateY(0);
    }

    35% {
        opacity: 1;
        transform: translateY(-5px);
    }

    70% {
        opacity: 0.52;
        transform: translateY(2px);
    }
}

@media (max-width: 640px) {
    .faq-chat-page__shell {
        min-height: 100svh;
        padding: 22px 14px 14px;
    }

    .faq-chat-page__logo img {
        height: 38px;
    }

    .faq-chat-page__lead {
        margin: 46px auto 24px;
        font-size: 24px;
        line-height: 1.5;
    }

    .faq-chat {
        margin: 0 auto;
    }

    #content.faq-chat-content .inner_1120 {
        padding: 0 14px;
    }

    .faq-chat__body {
        min-height: 340px;
        padding: 0 0 8px;
    }

    .faq-chat__intro {
        min-height: 200px;
        padding-bottom: 18px;
        font-size: 26px;
    }

    .faq-chat__messages {
        gap: 24px;
        min-height: 240px;
    }

    .faq-chat__bubble {
        max-width: 100%;
        font-size: 16px;
    }

    .faq-chat__message--user .faq-chat__bubble {
        max-width: 86%;
        font-size: 15px;
        padding: 11px 18px;
    }

    .faq-chat__composer-shell {
        padding: 10px 0 16px;
    }

    .faq-chat__form {
        min-height: 58px;
        padding: 7px 8px;
    }

    .faq-chat__input {
        font-size: 16px;
        min-height: 40px;
    }

    .faq-chat__tool {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    .faq-chat__tool svg {
        width: 21px;
        height: 21px;
    }

    .faq-chat__send {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }
}
