/* Asisten pustakawan LLG — overlay + modal pengumuman */

.llg-ai-launcher {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1040;
    width: 88px;
    height: 88px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    transform-origin: center;
    transition:
        opacity 0.28s ease,
        transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.llg-ai-launcher.is-panel-open {
    opacity: 0;
    transform: scale(0.18);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.26s cubic-bezier(0.4, 0, 1, 1);
}

.llg-ai-launcher img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(97, 30, 41, 0.28));
    transition: transform 0.28s ease;
}

.llg-ai-launcher:hover img {
    transform: translateY(-3px);
}

.llg-ai-launcher:focus-visible {
    outline: 3px solid #EAAA0F;
    outline-offset: 3px;
}

.llg-ai-root.llg-ai--survey-open .llg-ai-launcher,
.llg-ai-root.llg-ai--survey-open .llg-ai-panel {
    bottom: calc(16px + var(--llg-survey-h, 180px));
}

body.llg-ai-ready .back-to-top {
    right: 112px;
}

.llg-ai-panel {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1041;
    width: 400px;
    max-width: calc(100vw - 24px);
    max-height: min(calc(100vh - 32px), 720px);
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #333;
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(97, 30, 41, 0.08),
        0 20px 48px rgba(97, 30, 41, 0.2);
    overflow: hidden;
    opacity: 0;
    transform: translate(12px, 28px) scale(0.36);
    transform-origin: bottom right;
    transition:
        opacity 0.34s ease 0.08s,
        transform 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

.llg-ai-panel.is-open {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.llg-ai-panel.is-closing {
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        transform 0.3s cubic-bezier(0.4, 0, 1, 1);
}

.llg-ai-panel[hidden] {
    display: none !important;
}

.llg-ai-panel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    background: linear-gradient(165deg, #7a2835 0%, #611e29 55%, #3f1219 100%);
    color: #fff;
    flex-shrink: 0;
}

.llg-ai-panel__avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(234, 170, 15, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.llg-ai-panel__avatar img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.llg-ai-panel__heading {
    flex: 1;
    min-width: 0;
}

.llg-ai-panel__kicker {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #EAAA0F;
}

.llg-ai-panel__title {
    margin: 1px 0 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.llg-ai-panel__status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.82);
}

.llg-ai-panel__dot {
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #16a34a;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    animation: llg-status-pulse 2s ease-out infinite;
}

.llg-ai-panel.is-thinking .llg-ai-panel__dot {
    background: #fff;
    animation-duration: 0.9s;
}

.llg-ai-icon-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.18s ease;
}

.llg-ai-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.llg-ai-icon-btn--close {
    font-size: 1.35rem;
    font-weight: 400;
}

.llg-ai-icon-btn:focus-visible {
    outline: 2px solid #EAAA0F;
    outline-offset: 2px;
}

.llg-ai-panel__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 12px;
    background:
        linear-gradient(180deg, rgba(97, 30, 41, 0.04), transparent 48px),
        #faf6f4;
}

.llg-ai-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    background: none;
    padding: 0;
    font-size: 0.93rem;
    line-height: 1.45;
}

.llg-ai-msg--user {
    justify-content: flex-end;
}

.llg-ai-msg--bot {
    justify-content: flex-start;
}

.llg-ai-msg__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #efe4dc;
    box-shadow: 0 0 0 2px rgba(234, 170, 15, 0.85);
}

.llg-ai-msg--user .llg-ai-msg__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #611e29;
    color: #fff;
    box-shadow: 0 0 0 2px #EAAA0F;
}

.llg-ai-msg__avatar img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.llg-ai-msg__bubble {
    max-width: calc(100% - 52px);
    min-width: 0;
    padding: 10px 12px;
    border-radius: 16px;
}

.llg-ai-msg__bubble > p {
    margin: 0;
}

.llg-ai-msg--user .llg-ai-msg__bubble {
    background: linear-gradient(165deg, #7a2835, #611e29);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.llg-ai-msg--bot .llg-ai-msg__bubble {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    border: 1px solid #efe4dc;
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 12px rgba(97, 30, 41, 0.05);
    padding: 12px;
}

.llg-ai-msg--in {
    animation: llg-msg-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.llg-ai-msg--typing .llg-ai-msg__bubble {
    width: fit-content;
    padding: 12px 16px;
}

.llg-ai-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 14px;
}

.llg-ai-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #611e29;
    opacity: 0.3;
    animation: llg-typing 1.1s ease-in-out infinite;
}

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

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

.llg-ai-answer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.llg-ai-answer p {
    margin: 0;
    line-height: 1.55;
}

.llg-ai-answer strong {
    font-weight: 700;
    color: #3a1a20;
}

.llg-ai-answer em {
    font-style: italic;
}

.llg-ai-answer__kicker {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
    color: #611e29;
}

.llg-ai-answer__heading {
    margin: 4px 0 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    color: #611e29;
}

.llg-ai-answer__list {
    margin: 0;
    padding-left: 1.15em;
}

.llg-ai-answer__list li + li {
    margin-top: 4px;
}

.llg-ai-answer__doc {
    margin: 0;
    padding: 10px 12px;
    background: #faf6f4;
    border: 1px solid #efe4dc;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #3f2e32;
}

.llg-ai-fold {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.llg-ai-fold__body.is-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.llg-ai-fold__toggle {
    border: 0;
    background: transparent;
    color: #c74724;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

.llg-ai-fold__toggle:hover,
.llg-ai-fold__toggle:focus-visible {
    text-decoration: underline;
    outline: 0;
}

.llg-ai-block-title {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a6a6e;
}

.llg-ai-quotes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.llg-ai-quote {
    padding: 10px 12px;
    background: #faf6f4;
    border: 1px solid #efe4dc;
    border-left: 3px solid #c74724;
    border-radius: 0 12px 12px 0;
}

.llg-ai-quote__title {
    display: block;
    margin: 0 0 6px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #611e29;
    text-decoration: none;
    line-height: 1.35;
}

a.llg-ai-quote__title:hover,
a.llg-ai-quote__title:focus-visible {
    color: #c74724;
    text-decoration: underline;
    outline: 0;
}

.llg-ai-quote__excerpt {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #4a3a3d;
    white-space: normal;
}

button.llg-ai-quote__excerpt--jump {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

button.llg-ai-quote__excerpt--jump:hover,
button.llg-ai-quote__excerpt--jump:focus-visible {
    color: #611e29;
    text-decoration: underline;
}

.llg-ai-quote__open {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: #611e29;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.llg-ai-quote__open:hover,
.llg-ai-quote__open:focus-visible {
    text-decoration: underline;
}

.llg-ai-quote .llg-ai-fold + .llg-ai-fold,
.llg-ai-quote .llg-ai-fold + .llg-ai-quote__excerpt,
.llg-ai-quote .llg-ai-quote__excerpt + .llg-ai-fold {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e6d8d2;
}

.llg-ai-panel__form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid #efe4dc;
    background: linear-gradient(180deg, #fffcfb 0%, #f7f1ee 100%);
    flex-shrink: 0;
}

.llg-ai-panel__form textarea {
    width: 100%;
    min-height: 52px;
    max-height: 120px;
    resize: vertical;
    border: 1px solid #e0d4cc;
    border-radius: 14px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.llg-ai-panel__form textarea:focus-visible {
    outline: 0;
    border-color: #611e29;
    box-shadow: 0 0 0 3px rgba(234, 170, 15, 0.35);
}

.llg-ai-panel__form.is-busy textarea,
.llg-ai-panel__form textarea:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: #f3eeeb;
}

.llg-ai-panel__form.is-busy .llg-ai-mode {
    opacity: 0.65;
    pointer-events: none;
}

.llg-ai-composer-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "mode send"
        "hint send";
    gap: 4px 10px;
    align-items: center;
}

.llg-ai-mode {
    grid-area: mode;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-width: 0;
    padding: 4px 8px 4px 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5d8d1;
    box-shadow: 0 1px 2px rgba(61, 18, 25, 0.04);
}

.llg-ai-mode__label {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.64rem;
    color: #8a6a6e;
    flex-shrink: 0;
}

.llg-ai-mode select {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    border: 0;
    background: transparent;
    color: #3f1219;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 2px 2px 0;
    line-height: 1.3;
    cursor: pointer;
}

.llg-ai-mode select:focus {
    outline: 0;
}

.llg-ai-mode:focus-within {
    border-color: #c74724;
    box-shadow: 0 0 0 3px rgba(199, 71, 36, 0.15);
}

.llg-ai-enter-hint {
    grid-area: hint;
    margin: 0;
    padding-left: 10px;
    font-size: 0.68rem;
    line-height: 1.3;
    color: #9a8589;
}

.llg-ai-mode-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.llg-ai-mode-suggest__btn {
    border: 1px solid #e0d2cb;
    background: #fff;
    color: #611e29;
    border-radius: 12px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.llg-ai-mode-suggest__btn:hover,
.llg-ai-mode-suggest__btn:focus-visible {
    border-color: #c74724;
    background: #fff8f4;
    outline: 0;
}

.llg-ai-mode-suggest__btn--primary {
    background: #611e29;
    border-color: #611e29;
    color: #fff;
}

.llg-ai-mode-suggest__btn--primary:hover,
.llg-ai-mode-suggest__btn--primary:focus-visible {
    background: #7a2835;
    border-color: #7a2835;
    color: #fff;
}

.llg-ai-panel__form button[type="submit"] {
    grid-area: send;
    align-self: stretch;
    background: #c74724;
    color: #fff;
    border: 0;
    border-radius: 14px;
    min-width: 72px;
    min-height: 44px;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(199, 71, 36, 0.28);
    transition: background 0.16s ease, transform 0.16s ease;
}

.llg-ai-panel__form button[type="submit"]:hover {
    background: #b13d1e;
    transform: translateY(-1px);
}

.llg-ai-panel__form button[type="submit"]:focus-visible {
    outline: 2px solid #EAAA0F;
    outline-offset: 2px;
}

.llg-ai-panel__form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.llg-ai-docs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8ddd8;
}

.llg-ai-docs > .llg-ai-block-title {
    color: #9a8589;
    font-weight: 600;
}

.llg-ai-doc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #efe4dc;
    border-radius: 12px;
    color: #611e29;
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.llg-ai-doc-link:hover,
.llg-ai-doc-link:focus-visible {
    background: #fff8f4;
    border-color: #c74724;
    outline: 0;
}

.llg-ai-doc-link__name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.llg-ai-doc-link__hint {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #c74724;
}

.llg-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.llg-ai-chip {
    display: inline-block;
    padding: 5px 11px;
    background: #fff;
    border: 1px solid #611e29;
    color: #611e29;
    border-radius: 999px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease;
}

.llg-ai-chip:hover,
.llg-ai-chip:focus-visible {
    background: #611e29;
    color: #fff;
    outline: 0;
}

.llg-ai-disclaimer {
    margin: 0;
    padding: 8px 10px;
    background: #faf6f4;
    border-radius: 10px;
    font-size: 0.74rem;
    line-height: 1.45;
    color: #6b5a5c;
}

.llg-ai-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
}

.llg-ai-examples button {
    border: 1px solid rgba(199, 71, 36, 0.35);
    background: #fff;
    color: #611e29;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.llg-ai-examples button:hover {
    background: #fff4ef;
    border-color: #c74724;
    transform: translateY(-1px);
}

.llg-ai-examples button:focus-visible {
    outline: 2px solid #EAAA0F;
}

@keyframes llg-status-pulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
    70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

@keyframes llg-msg-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes llg-typing {
    0%, 80%, 100% {
        opacity: 0.28;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.llg-ai-intro {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.llg-ai-intro[hidden] {
    display: none !important;
}

.llg-ai-intro__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(33, 20, 18, 0.52);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.llg-ai-intro.is-open .llg-ai-intro__backdrop {
    opacity: 1;
}

.llg-ai-intro__dialog {
    position: relative;
    z-index: 1;
    width: min(840px, 100%);
    max-height: 90vh;
    overflow: hidden;
    background: #fff;
    color: #333;
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(97, 30, 41, 0.08),
        0 24px 48px rgba(97, 30, 41, 0.22);
    opacity: 0;
    transform: translateY(28px) scale(0.96);
    transition: opacity 0.32s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.llg-ai-intro.is-open .llg-ai-intro__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.llg-ai-intro__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #611e29;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.llg-ai-intro__close:hover {
    background: #fff;
    color: #c74724;
}

.llg-ai-intro__close:focus-visible {
    outline: 2px solid #EAAA0F;
    outline-offset: 2px;
}

.llg-ai-intro__grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 280px;
}

.llg-ai-intro__stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 32px 0 0;
    background: #611e29;
    overflow: hidden;
}

.llg-ai-intro__bubble {
    position: relative;
    z-index: 1;
    width: calc(100% - 56px);
    margin: 0;
    padding: 18px 16px;
    border-radius: 22px;
    background: #fff8ed;
    color: #611e29;
    text-align: center;
    box-shadow: 0 8px 24px rgba(33, 20, 18, 0.14);
}

.llg-ai-intro__bubble::after {
    content: "";
    position: absolute;
    bottom: -13px;
    left: 38%;
    border-top: 16px solid #fff8ed;
    border-right: 18px solid transparent;
}

.llg-ai-intro__bubble strong,
.llg-ai-intro__bubble span {
    display: block;
}

.llg-ai-intro__bubble strong {
    margin-bottom: 5px;
    font-size: 1.3rem;
    line-height: 1.25;
}

.llg-ai-intro__bubble span {
    font-size: 0.95rem;
    line-height: 1.45;
}

.llg-ai-intro__portrait {
    position: relative;
    flex: 0 0 340px;
    width: 100%;
    overflow: hidden;
}

.llg-ai-intro__mascot {
    position: absolute;
    top: 0;
    left: 50%;
    width: 460px;
    max-width: none;
    height: auto;
    transform: translateX(-50%);
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.2));
}

.llg-ai-intro__body {
    padding: 28px 28px 22px;
    overflow-y: auto;
    max-height: 90vh;
}

.llg-ai-intro__kicker {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c74724;
}

.llg-ai-intro__dialog h2 {
    margin: 0 0 10px;
    color: #611e29;
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 700;
}

.llg-ai-intro__welcome {
    margin: 0 0 10px;
    color: #444;
    font-size: 0.98rem;
}

.llg-ai-intro__lead {
    margin: 0 0 14px;
    color: #5a5a5a;
    font-size: 0.92rem;
    line-height: 1.5;
}

.llg-ai-intro__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 18px;
}

.llg-ai-intro__actions a,
.llg-ai-intro__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.84rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #611e29;
    background: #fff;
    color: #611e29;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.llg-ai-intro__actions a:hover,
.llg-ai-intro__actions button:hover {
    background: #f7f1ef;
}

.llg-ai-intro__actions .llg-ai-intro__primary {
    background: #c74724;
    border-color: #c74724;
    color: #fff;
    box-shadow: 0 6px 14px rgba(199, 71, 36, 0.28);
}

.llg-ai-intro__actions .llg-ai-intro__primary:hover {
    background: #b13d1e;
    color: #fff;
    transform: translateY(-1px);
}

.llg-ai-intro__actions a:focus-visible,
.llg-ai-intro__actions button:focus-visible {
    outline: 2px solid #EAAA0F;
    outline-offset: 2px;
}

.llg-ai-limits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.llg-ai-limits li {
    position: relative;
    padding: 10px 12px 10px 36px;
    border-radius: 10px;
    background: #faf6f4;
    color: #4a3d3f;
    font-size: 0.88rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px);
}

.llg-ai-intro.is-open .llg-ai-limits li {
    animation: llg-intro-rise 0.4s ease forwards;
}

.llg-ai-intro.is-open .llg-ai-limits li:nth-child(1) { animation-delay: 0.18s; }
.llg-ai-intro.is-open .llg-ai-limits li:nth-child(2) { animation-delay: 0.28s; }
.llg-ai-intro.is-open .llg-ai-limits li:nth-child(3) { animation-delay: 0.38s; }

.llg-ai-limits li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #EAAA0F;
    box-shadow: inset 0 0 0 3px #fff;
}

@keyframes llg-intro-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes llg-intro-glow {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.12); opacity: 1; }
}

@keyframes llg-intro-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .llg-ai-panel {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: min(88vh, 720px);
        border-radius: 20px 20px 0 0;
        transform-origin: bottom center;
    }

    .llg-ai-root.llg-ai--survey-open .llg-ai-panel {
        bottom: 0;
    }

    .llg-ai-panel__head {
        position: relative;
        padding-top: 18px;
        border-radius: 20px 20px 0 0;
    }

    .llg-ai-panel__head::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 36px;
        height: 4px;
        margin-left: -18px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.38);
    }

    .llg-ai-intro {
        padding: 12px;
        align-items: flex-end;
    }

    .llg-ai-intro__dialog {
        width: 100%;
        max-height: min(92vh, 720px);
        border-radius: 20px 20px 12px 12px;
        overflow-y: auto;
    }

    .llg-ai-intro__grid {
        grid-template-columns: 1fr;
    }

    .llg-ai-intro__stage {
        min-height: 220px;
        flex-direction: row;
        gap: 0;
        padding: 20px 16px 0;
        border-radius: 0;
    }

    .llg-ai-intro__bubble {
        flex: 1;
        width: auto;
        padding: 14px 10px;
        margin: 0 0 20px;
    }

    .llg-ai-intro__bubble strong {
        font-size: 1.05rem;
    }

    .llg-ai-intro__bubble span {
        font-size: 0.85rem;
    }

    .llg-ai-intro__bubble::after {
        left: auto;
        right: -12px;
        bottom: 22px;
        border-top: 12px solid transparent;
        border-bottom: 0;
        border-left: 15px solid #fff8ed;
        border-right: 0;
    }

    .llg-ai-intro__portrait {
        flex: 0 0 52%;
        height: 200px;
        align-self: flex-end;
    }

    .llg-ai-intro__mascot {
        width: 280px;
    }

    .llg-ai-intro__body {
        padding: 16px 16px 18px;
    }

    .llg-ai-intro__lead {
        font-size: 0.86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .llg-ai-launcher,
    .llg-ai-launcher img,
    .llg-ai-panel,
    .llg-ai-intro__backdrop,
    .llg-ai-intro__dialog,
    .llg-ai-intro__actions a,
    .llg-ai-intro__actions button,
    .llg-ai-examples button,
    .llg-ai-chip,
    .llg-ai-panel__form button[type="submit"] {
        transition: none;
    }

    .llg-ai-panel__dot,
    .llg-ai-msg--in,
    .llg-ai-typing span,
    .llg-ai-intro__mascot,
    .llg-ai-intro.is-open .llg-ai-limits li {
        animation: none;
    }

    .llg-ai-panel,
    .llg-ai-panel.is-open,
    .llg-ai-panel.is-closing {
        opacity: 1;
        transform: none;
    }

    .llg-ai-intro__dialog,
    .llg-ai-intro.is-open .llg-ai-intro__dialog {
        transform: none;
        opacity: 1;
    }

    .llg-ai-intro__backdrop,
    .llg-ai-intro.is-open .llg-ai-intro__backdrop,
    .llg-ai-limits li {
        opacity: 1;
        transform: none;
    }
}

button.llg-ai-ask-this {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: auto;
    min-height: 36px;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid #611e29;
    background: #fff;
    color: #611e29;
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
}

button.llg-ai-ask-this:focus-visible {
    outline: 2px solid #EAAA0F;
    outline-offset: 2px;
}

button.llg-ai-ask-this:hover {
    background: #611e29;
    color: #fff;
}

button.llg-ai-ask-this--visual {
    background: #611e29;
    color: #fff;
}

button.llg-ai-ask-this--visual:hover {
    background: #4a1620;
    border-color: #4a1620;
    color: #fff;
}

.llg-ai-facts {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #efe4dc;
    border-left: 3px solid #EAAA0F;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    max-height: 180px;
    overflow-y: auto;
}

.llg-ai-facts__title {
    margin: 0;
    font-weight: 700;
    color: #611e29;
    cursor: pointer;
}

.llg-ai-facts[open] .llg-ai-facts__title {
    margin-bottom: 6px;
}

.llg-ai-facts p {
    margin: 0 0 4px;
}

.llg-ai-facts a {
    color: #611e29;
}

.llg-ai-prefill-banner {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #fff8e6;
    border: 1px solid #EAAA0F;
    border-left: 4px solid #611e29;
    color: #611e29;
    font-size: 0.88rem;
    line-height: 1.45;
    border-radius: 4px;
}

.llg-ai-compare,
.llg-ai-outline {
    margin: 0;
    padding: 10px 12px;
    background: #faf6f4;
    border: 1px solid #efe4dc;
    border-left: 3px solid #611e29;
    border-radius: 0 12px 12px 0;
    font-size: 0.82rem;
    line-height: 1.45;
    max-height: 240px;
    overflow-y: auto;
}

.llg-ai-compare__pair {
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid #efe7df;
}

.llg-ai-compare__pair p {
    margin: 0 0 4px;
}

.llg-ai-compare__changed {
    color: #c74724;
    font-weight: 600;
}

.llg-ai-outline ul {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.llg-ai-outline li {
    margin: 0 0 2px;
}

.llg-ai-visual {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid #efe4dc;
    border-radius: 12px;
    background: #fff;
    scroll-margin-top: 128px;
}

.llg-ai-visual[hidden] {
    display: none !important;
}

.llg-ai-visual__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.llg-ai-visual__title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #611e29;
}

.llg-ai-visual__lead {
    margin: 0;
    max-width: 52ch;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #5a4548;
}

.llg-ai-visual__run {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #c74724;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.llg-ai-visual__run:hover {
    background: #b13d1e;
}

.llg-ai-visual__run:disabled {
    opacity: 0.65;
    cursor: wait;
}

.llg-ai-visual__run:focus-visible {
    outline: 2px solid #EAAA0F;
    outline-offset: 2px;
}

.llg-ai-visual__status {
    margin: 10px 0 0;
    font-size: 0.88rem;
    color: #611e29;
}

.llg-ai-visual__status.is-error {
    color: #c74724;
}

.llg-ai-visual__meta {
    margin-top: 12px;
}

.llg-ai-visual__badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #611e29;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.llg-ai-visual__why,
.llg-ai-visual__caption {
    margin: 8px 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #3a1a20;
}

.llg-ai-visual__why {
    color: #7a6568;
}

.llg-ai-visual__canvas {
    margin-top: 12px;
    overflow: auto;
    padding: 8px;
    border-radius: 10px;
    background: #faf6f4;
}

.llg-ai-visual__svg {
    display: block;
    width: 100%;
    min-width: 320px;
    height: auto;
}

.llg-ai-visual__note {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: #7a6568;
}

.content-list a.modal-loader.is-ai-target {
    outline: 2px solid #EAAA0F;
    outline-offset: 2px;
}

button.llg-ai-doc-link {
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 768px) {
    .llg-ai-visual__run {
        width: 100%;
    }
}
