#llm-chat-widget {
    --llm-accent: #d1af6f;
    --llm-accent-hover: #b8924f;
    --llm-cta-secondary-bg: #f8f3ea;
    --llm-cta-secondary-text: #5f4c33;
    max-width: 720px;
    margin: 48px auto 64px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media ( min-width: 1200px ) {
    #llm-chat-widget {
        max-width: 920px;
    }

    #llm-chat-widget .llm-card-header {
        padding: 32px 46px 26px;
    }

    #llm-chat-widget .llm-card-header h2 {
        font-size: 30px;
    }

    #llm-chat-widget .llm-card-body {
        padding: 34px 46px 40px;
    }

    #llm-chat-widget .llm-answer-scroll {
        max-height: 500px;
    }

    #llm-chat-widget .llm-answer-body {
        font-size: 17px;
        line-height: 1.9;
    }
}

#llm-chat-widget .llm-card {
    background: #fff;
    border: 1px solid #e2ddd8;
    border-top: 3px solid #2c2c2a;
    border-radius: 4px;
    overflow: hidden;
}

#llm-chat-widget .llm-card-header {
    padding: 26px 36px 22px;
    border-bottom: 1px solid #f0ede9;
}

#llm-chat-widget .llm-card-header span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a09890;
    margin-bottom: 6px;
}

#llm-chat-widget .llm-card-header h2 {
    font-size: 20px;
    font-weight: 400;
    color: #1a1a18;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.3;
    margin: 0;
}

#llm-chat-widget .llm-card-body {
    padding: 28px 36px 32px;
}

#llm-chat-widget #llm-question {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd8d2;
    border-radius: 3px;
    font-size: 17px;
    line-height: 1.65;
    resize: none;
    color: #1a1a18;
    font-family: Georgia, serif;
    background: #faf9f7;
    transition: border-color 0.2s, background 0.2s;
    min-height: 100px;
    box-sizing: border-box;
}

#llm-chat-widget #llm-question:focus {
    outline: none;
    border-color: #2c2c2a;
    background: #fff;
}

#llm-chat-widget #llm-question.llm-invalid {
    border-color: #c0392b;
    background: #fdf6f6;
}

#llm-chat-widget #llm-question::placeholder {
    color: #b8b0a8;
    font-style: italic;
}

/* ── Buttons ── */
#llm-chat-widget .llm-btn-outline {
    width: 100% !important;
    padding: 14px !important;
    background: var( --llm-cta-secondary-bg ) !important;
    color: var( --llm-cta-secondary-text ) !important;
    border: 1px solid var( --llm-accent ) !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.2s, color 0.2s !important;
    display: block !important;
    margin-top: 12px !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#llm-chat-widget .llm-btn-outline:hover {
    background: #efe4d4 !important;
    border-color: var( --llm-accent-hover ) !important;
    color: #4f3f2c !important;
}

#llm-chat-widget .llm-btn-primary {
    width: 100% !important;
    padding: 14px !important;
    background: var( --llm-accent ) !important;
    color: #f5f3f0 !important;
    border: none !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#llm-chat-widget .llm-btn-primary:hover {
    background: var( --llm-accent-hover ) !important;
}

/* ── Loading ── */
#llm-chat-widget .llm-loading {
    text-align: center;
    padding: 24px 0;
}

#llm-chat-widget .llm-dots {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

#llm-chat-widget .llm-dots span {
    width: 7px;
    height: 7px;
    background: #4a4845;
    border-radius: 50%;
    animation: llm-pulse 1.3s infinite ease-in-out;
}

#llm-chat-widget .llm-dots span:nth-child(2) { animation-delay: 0.2s; }
#llm-chat-widget .llm-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes llm-pulse {
    0%, 80%, 100% { transform: scale(0.55); opacity: 0.35; }
    40%           { transform: scale(1);    opacity: 1;    }
}

#llm-chat-widget .llm-loading-text {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: #a09890;
    font-style: italic;
}

/* ── Answer ── */
#llm-chat-widget .llm-q-bubble {
    background: #f7f5f2;
    border-left: 2px solid #c8c4bf;
    border-radius: 0 3px 3px 0;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 16px;
    color: #6b6560;
    font-style: italic;
    font-family: Georgia, serif;
    line-height: 1.6;
}

#llm-chat-widget .llm-response-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a09890;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#llm-chat-widget .llm-mode-pill {
    font-size: 9px;
    background: var( --llm-accent );
    color: #ffffff;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

#llm-chat-widget .llm-answer-scroll {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #ddd8d2 transparent;
}

#llm-chat-widget .llm-answer-scroll::-webkit-scrollbar {
    width: 4px;
}

#llm-chat-widget .llm-answer-scroll::-webkit-scrollbar-thumb {
    background: #ddd8d2;
    border-radius: 4px;
}

#llm-chat-widget .llm-answer-body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.85;
    color: #1a1a18;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#llm-chat-widget .llm-answer-section {
    background: #fbf9f5;
    border: 1px solid #ece5da;
    border-left: 2px solid #ccb489;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0 0 14px;
}

#llm-chat-widget .llm-answer-body p {
    margin: 0 0 14px;
}

#llm-chat-widget .llm-answer-body .llm-subtitle {
    font-size: 19px;
    line-height: 1.45;
    font-weight: 600;
    color: #1a1a18;
    margin: 0 0 10px;
}

#llm-chat-widget .llm-answer-body ul,
#llm-chat-widget .llm-answer-body ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

#llm-chat-widget .llm-answer-body li {
    margin-bottom: 6px;
}

#llm-chat-widget .llm-answer-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: #f3f1ee;
    border-radius: 3px;
    padding: 0 4px;
}

#llm-chat-widget .llm-answer-body p:last-child {
    margin-bottom: 0;
}

#llm-chat-widget .llm-answer-body h1,
#llm-chat-widget .llm-answer-body h2,
#llm-chat-widget .llm-answer-body h3,
#llm-chat-widget .llm-answer-body h4,
#llm-chat-widget .llm-answer-body h5,
#llm-chat-widget .llm-answer-body h6 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1a18;
    margin: 0 0 12px;
    line-height: 1.35;
}

#llm-chat-widget .llm-answer-body h1,
#llm-chat-widget .llm-answer-body h2,
#llm-chat-widget .llm-answer-body h3,
#llm-chat-widget .llm-answer-body h4,
#llm-chat-widget .llm-answer-body h5,
#llm-chat-widget .llm-answer-body h6 {
    font-size: 19px;
    color: #1a1a18;
}

#llm-chat-widget .llm-answer-body hr {
    border: 0;
    border-top: 1px solid #e5e1dc;
    margin: 16px 0;
}

#llm-chat-widget .llm-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 0 0 14px;
}

#llm-chat-widget .llm-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.6;
}

#llm-chat-widget .llm-table th,
#llm-chat-widget .llm-table td {
    border: 1px solid #e5e1dc;
    padding: 8px 10px;
    vertical-align: top;
    text-align: left;
}

#llm-chat-widget .llm-table th {
    background: #f4ede3;
    color: var( --llm-accent );
    font-weight: 700;
}

#llm-chat-widget .llm-disclaimer {
    font-size: 11px;
    color: #b8b0a8;
    font-style: italic;
    line-height: 1.6;
    padding-top: 14px;
    border-top: 1px solid #f0ede9;
    margin-bottom: 20px;
}

#llm-chat-widget .llm-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#llm-chat-widget .llm-actions .llm-btn-outline {
    margin-top: 0 !important;
}

/* ── Error ── */
#llm-chat-widget .llm-error-box {
    padding: 13px 16px;
    background: #fdf6f6;
    border: 1px solid #e8c8c8;
    border-left: 3px solid #a83232;
    border-radius: 0 3px 3px 0;
    color: #a83232;
    font-size: 13px;
    margin-bottom: 14px;
}

/* ── Animation ── */
@keyframes llm-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0);   }
}

#llm-chat-widget .llm-animate {
    animation: llm-fadein 0.35s ease;
}

/* ── Mobile ── */
@media ( max-width: 600px ) {
    #llm-chat-widget .llm-card-body   { padding: 20px 20px 24px; }
    #llm-chat-widget .llm-card-header { padding: 20px 20px 16px; }
    #llm-chat-widget .llm-answer-scroll { max-height: 260px; }
}

#llm-chat-widget .llm-hint {
    font-size: 11px;
    color: #a09890;
    margin: 6px 0 0;
    min-height: 16px;
    font-family: -apple-system, sans-serif;
}

#llm-chat-widget .llm-hint-error {
    color: #c0392b;
}