.lc-launcher {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50;
    display: inline-flex; align-items: center; gap: .5rem;
    height: 2.75rem; padding: 0 1rem 0 .875rem; border-radius: 10px;
    background: #0A7FD0; color: #fff; border: 0;
    font-size: .8125rem; font-weight: 600; letter-spacing: 0; cursor: pointer;
    box-shadow: 0 1px 2px rgba(10,22,40,.2), 0 8px 24px -8px rgba(10,22,40,.45);
    transition: background-color .15s, transform .15s;
}
.lc-launcher:hover { background: #0868AE; }
.lc-launcher:active { transform: scale(.97); }
.lc-launcher:focus-visible { outline: 2px solid #8CC8F2; outline-offset: 3px; }
.lc-launcher svg { width: 1.0625rem; height: 1.0625rem; flex-shrink: 0; }
.lc-launcher[aria-expanded="true"] { visibility: hidden; }
.lc-badge {
    position: absolute; top: -.3rem; right: -.3rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem;
    border-radius: 999px; background: #EF4444; color: #fff; font-size: .6875rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border: 2px solid var(--lt-bg, #050505);
}
.lc-badge[hidden] { display: none; }

.lc-panel {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 51;
    width: min(23.5rem, calc(100vw - 2rem)); height: min(38rem, calc(100vh - 2.5rem));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--lt-surface, #111114); color: var(--lt-text, #E5E7EB);
    border: 1px solid var(--lt-line, rgba(55,65,81,.7)); border-radius: 12px;
    box-shadow: 0 1px 2px rgba(10,22,40,.12), 0 20px 48px -12px rgba(10,22,40,.45); letter-spacing: 0;
    transform: translateY(1rem) scale(.98); opacity: 0; visibility: hidden;
    transition: transform .2s cubic-bezier(.4,0,.2,1), opacity .2s, visibility 0s linear .2s;
}
.lc-panel [hidden] { display: none !important; }
.lc-panel.is-open { transform: none; opacity: 1; visibility: visible; transition: transform .2s cubic-bezier(.4,0,.2,1), opacity .2s, visibility 0s; }
@media (max-width: 480px) {
    .lc-panel { inset: 0; width: auto; height: 100vh; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
    .lc-launcher { right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
}
@media (pointer: coarse) {
    .lc-send, .lc-attach, .lc-icon-btn { min-width: 2.75rem; min-height: 2.75rem; }
    .lc-panel .lc-send, .lc-panel .lc-attach { width: 2.75rem; height: 2.75rem; }
    .lc-launcher { height: 3rem; }
}

.lc-head { display: flex; align-items: center; gap: .75rem; padding: .875rem .75rem .875rem 1rem; background: #0A1628; color: #E9EEF5; border-bottom: 1px solid rgba(148,178,230,.12); }
html[data-theme="dark"] .lc-head { background: #0B111B; border-bottom-color: #1E2836; }
.lc-head-icon { width: 2.25rem; height: 2.25rem; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); color: #8CC8F2; flex-shrink: 0; }
.lc-head-icon svg { width: 1.05rem; height: 1.05rem; }
.lc-head-text { flex: 1; min-width: 0; }
.lc-head-title { font-size: .875rem; font-weight: 600; color: #FFFFFF; }
.lc-head-status { display: flex; align-items: center; gap: .4rem; font-size: .71875rem; color: #A8B4C7; margin-top: .125rem; }
.lc-head .lc-icon-btn { color: #A8B4C7; }
.lc-head .lc-icon-btn:hover { color: #FFFFFF; background: rgba(255,255,255,.08); }
.lc-dot { width: .4rem; height: .4rem; border-radius: 999px; background: #10b981; flex-shrink: 0; }
.lc-dot.is-away { background: #f59e0b; }
.lc-icon-btn { display: flex; padding: .4rem; border-radius: 6px; color: var(--lt-faint, #858b94); background: none; border: 0; cursor: pointer; transition: color .15s, background-color .15s; }
.lc-icon-btn:hover { color: var(--lt-text, #E5E7EB); background: var(--lt-w06, rgba(255,255,255,.06)); }
.lc-icon-btn:focus-visible { outline: 2px solid #0A7FD0; outline-offset: 1px; }
.lc-icon-btn svg { width: 1.05rem; height: 1.05rem; }

.lc-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.lc-form { padding: 1rem; display: flex; flex-direction: column; gap: .875rem; }
.lc-intro { font-size: .8125rem; line-height: 1.55; color: var(--lt-muted, #9CA3AF); }
.lc-warning { display: flex; gap: .65rem; padding: .75rem .875rem; border-radius: 8px; background: var(--lt-raised, #16171b); border: 1px solid var(--lt-line, rgba(31,41,55,.7)); border-left: 3px solid #F59E0B; color: var(--lt-text, #E5E7EB); font-size: .78125rem; line-height: 1.5; }
.lc-warning svg { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: .1rem; color: #F59E0B; }
.lc-warning strong { display: block; font-weight: 650; margin-bottom: .1rem; }
.lc-warning span { color: var(--lt-muted, #9CA3AF); }
.lc-field { display: flex; flex-direction: column; gap: .35rem; }
.lc-label { font-size: .71875rem; font-weight: 600; color: var(--lt-muted, #9CA3AF); }
.lc-hint { font-size: .6875rem; color: var(--lt-faint, #858b94); line-height: 1.45; }
.lc-input {
    width: 100%; background: var(--lt-surface, #0A0A0C); border: 1px solid var(--lt-line, rgba(31,41,55,.7)); border-radius: 8px;
    padding: .6rem .75rem; color: var(--lt-text, #E5E7EB); font-size: .875rem; font-family: inherit; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.lc-input:focus { border-color: #0A7FD0; box-shadow: 0 0 0 3px rgba(10,127,208,.15); }
.lc-input[readonly] { opacity: .7; cursor: default; }
.lc-input[aria-invalid="true"] { border-color: rgba(248,113,113,.7); }
.lc-input::placeholder { color: var(--lt-faint, #6B7280); }
textarea.lc-input { resize: none; min-height: 5.5rem; line-height: 1.5; }
select.lc-input { appearance: auto; }
.lc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lc-error { font-size: .75rem; color: var(--lt-red, #F87171); }
.lc-error:empty { display: none; }
.lc-privacy { font-size: .6875rem; color: var(--lt-faint, #858b94); line-height: 1.5; }
.lc-privacy a { color: var(--lt-muted, #9CA3AF); text-decoration: underline; text-underline-offset: 2px; }
.lc-privacy a:hover { color: var(--lt-text, #E5E7EB); }
.lc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; width: 100%;
    padding: .625rem 1rem; border-radius: 8px; border: 0; cursor: pointer;
    background: #0A7FD0; color: #fff; font-size: .8125rem; font-weight: 600; font-family: inherit;
    transition: background-color .15s, opacity .15s;
}
.lc-btn:hover:not(:disabled) { background: #0868AE; }
.lc-btn:disabled { opacity: .6; cursor: progress; }
.lc-btn:focus-visible { outline: 2px solid #8CC8F2; outline-offset: 2px; }

.lc-body { background: var(--lt-page, #0B0B0E); }
.lc-thread { padding: 1rem 1rem .5rem; display: flex; flex-direction: column; gap: .75rem; }
.lc-msg { display: flex; flex-direction: column; max-width: 85%; }
.lc-msg.is-customer { align-self: flex-end; align-items: flex-end; }
.lc-msg.is-staff { align-self: flex-start; align-items: flex-start; }
.lc-bubble { padding: .5625rem .75rem; border-radius: 10px; font-size: .8125rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.lc-msg.is-customer .lc-bubble { background: #0A7FD0; color: #fff; border-bottom-right-radius: 3px; }
.lc-msg.is-staff .lc-bubble { background: var(--lt-surface, #1c1d22); color: var(--lt-text, #E5E7EB); border: 1px solid var(--lt-line, rgba(31,41,55,.7)); border-bottom-left-radius: 3px; }
.lc-bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lc-msg.is-staff { flex-direction: row; align-items: flex-end; gap: .5rem; max-width: 90%; }
.lc-msg-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.lc-avatar { width: 1.75rem; height: 1.75rem; border-radius: 999px; object-fit: cover; flex-shrink: 0; background: var(--lt-sunken, #0A0A0C); margin-bottom: 1.15rem; }
.lc-author { font-size: .71875rem; font-weight: 600; color: var(--lt-text, #E5E7EB); margin: 0 0 .25rem .2rem; }
.lc-signature { display: block; margin-top: .45rem; font-weight: 500; opacity: .75; }
.lc-typing .lc-avatar { width: 1.25rem; height: 1.25rem; margin: 0; }
.lc-meta { font-size: .65625rem; color: var(--lt-faint, #858b94); margin-top: .25rem; padding: 0 .2rem; }
.lc-files { display: flex; flex-direction: column; gap: .25rem; margin-top: .4rem; }
.lc-files a { font-size: .75rem; }
.lc-system { align-self: stretch; text-align: center; font-size: .71875rem; line-height: 1.5; color: var(--lt-muted, #9CA3AF); padding: .25rem .75rem; background: none; }
.lc-system.is-warn { color: var(--lt-text, #E5E7EB); padding: .5rem .75rem; border-radius: 8px; background: var(--lt-surface, #16171b); border: 1px solid var(--lt-line, rgba(31,41,55,.7)); border-left: 3px solid #F59E0B; text-align: left; }
.lc-typing { display: flex; align-items: center; gap: .5rem; padding: 0 1.125rem .5rem; font-size: .75rem; color: var(--lt-muted, #9CA3AF); min-height: 1.4rem; }
.lc-typing[hidden] { display: none; }
.lc-dots { display: inline-flex; gap: 3px; }
.lc-dots span { width: 4px; height: 4px; border-radius: 999px; background: currentColor; animation: lc-bounce 1.2s infinite; }
.lc-dots span:nth-child(2) { animation-delay: .15s; }
.lc-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes lc-bounce { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.lc-composer { display: flex; align-items: flex-end; gap: .375rem; padding: .625rem .75rem .75rem; background: var(--lt-surface, #16171b); }
.lc-composer textarea { flex: 1; min-height: 2.5rem; max-height: 8rem; resize: none; }
.lc-send { width: 2.5rem; height: 2.5rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 0; background: #0A7FD0; color: #fff; cursor: pointer; transition: background-color .15s, opacity .15s; }
.lc-send:hover:not(:disabled) { background: #0868AE; }
.lc-send:disabled { opacity: .5; cursor: default; }
.lc-send svg { width: 1rem; height: 1rem; }
.lc-attach { width: 2.5rem; height: 2.5rem; flex-shrink: 0; justify-content: center; align-items: center; }
.lc-composer-wrap { background: var(--lt-surface, #16171b); border-top: 1px solid var(--lt-line, rgba(31,41,55,.7)); }
.lc-composer-wrap.is-drop { outline: 2px dashed #0A7FD0; outline-offset: -4px; }
.lc-pending { display: flex; flex-wrap: wrap; gap: .35rem; padding: .6rem .75rem 0; }
.lc-pending[hidden] { display: none; }
.lc-chip { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; font-size: .71875rem; color: var(--lt-text, #E5E7EB); padding: .2rem .25rem .2rem .55rem; border-radius: 6px; background: var(--lt-w06, rgba(255,255,255,.06)); }
.lc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12rem; }
.lc-chip small { color: var(--lt-faint, #858b94); font-size: inherit; }
.lc-chip button { display: flex; padding: .1rem; border: 0; background: none; color: var(--lt-faint, #858b94); cursor: pointer; border-radius: 4px; }
.lc-chip button:hover { color: var(--lt-text, #E5E7EB); }
.lc-chip svg { width: .8rem; height: .8rem; }
.lc-closed { padding: .875rem 1rem 1rem; background: var(--lt-surface, #16171b); border-top: 1px solid var(--lt-line, rgba(31,41,55,.7)); display: flex; flex-direction: column; gap: .6rem; }
.lc-closed p { font-size: .78125rem; color: var(--lt-muted, #9CA3AF); line-height: 1.5; text-align: center; }
.lc-rate { padding: .875rem 1rem 1rem; border-top: 1px solid var(--lt-line, rgba(31,41,55,.5)); background: var(--lt-surface, #16171b); display: flex; flex-direction: column; gap: .625rem; }
.lc-rate[hidden], .lc-rate-thanks[hidden] { display: none; }
.lc-rate-title { font-size: .8125rem; font-weight: 600; color: var(--lt-text, #E5E7EB); }
.lc-rate-row { display: flex; align-items: center; gap: .625rem; }
.lc-rate-stars { display: inline-flex; gap: .0625rem; }
.lc-rate-star { display: inline-flex; padding: .125rem; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--lt-line-strong, #374151); transition: color .12s ease, transform .12s ease; }
.lc-rate-star svg { width: 1.375rem; height: 1.375rem; fill: currentColor; }
.lc-rate-star:hover { transform: scale(1.08); }
.lc-rate-star:focus-visible { outline: 2px solid #0A7FD0; outline-offset: 1px; }
.lc-rate-star.is-on { color: #F5A524; }
.lc-rate-label { font-size: .75rem; font-weight: 600; color: var(--lt-muted, #9CA3AF); }
.lc-rate-comment[hidden] { display: none; }
.lc-rate .lc-foot-error { padding: 0; }
.lc-rate-actions { display: flex; align-items: center; justify-content: flex-end; gap: .875rem; flex-wrap: wrap; }
.lc-rate-actions .lc-rate-send { width: auto; padding-inline: 1rem; }
.lc-rate-link { margin-right: auto; padding: 0; border: 0; background: none; font: inherit; font-size: .75rem; color: var(--lt-muted, #9CA3AF); cursor: pointer; }
.lc-rate-link + .lc-rate-link { margin-right: 0; }
.lc-rate-link:hover { color: var(--lt-text, #E5E7EB); text-decoration: underline; }
.lc-rate-thanks { padding: .625rem 1rem; font-size: .78125rem; color: var(--lt-muted, #9CA3AF); text-align: center; background: var(--lt-surface, #16171b); border-top: 1px solid var(--lt-line, rgba(31,41,55,.7)); }
.lc-foot-error { padding: 0 1rem .5rem; font-size: .75rem; color: var(--lt-red, #F87171); }
.lc-foot-error:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
    .lc-panel, .lc-panel.is-open { transition: none; }
    .lc-dots span { animation: none; }
}
