.lcw-root { --lcw-r: 3px; --lcw-color: #2563eb; --lcw-bg: #fff; --lcw-fg: #1f2937; --lcw-muted: #6b7280; --lcw-line: #e5e7eb; --lcw-soft: #f3f4f6; --lcw-surface: #fff; --lcw-input-bd: #cbd5e1; --lcw-sys-bg: #eef2ff; --lcw-sys-bd: #c7d2fe; --lcw-op-bg: #ecfdf5; --lcw-op-bd: #a7f3d0; --lcw-ok-bg: #f0fdf4; --lcw-ok-fg: #166534; --lcw-err-bg: #fef2f2; --lcw-err-fg: #b91c1c; --lcw-fail-bg: #fdecea; --lcw-fail-fg: #7a1c14; --lcw-warn: #b45309; --lcw-star-off: #cfd4da; --lcw-sep: rgba(15, 23, 42, .1); --lcw-hover: rgba(15, 23, 42, .05);
    position: fixed; bottom: 16px; z-index: 2147483000; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--lcw-fg); }
.lcw-root *, .lcw-root *::before, .lcw-root *::after { box-sizing: border-box; }
.lcw-pos-right { right: 16px; }
.lcw-pos-left { left: 16px; }

.lcw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lcw-fab { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 0; border-radius: var(--lcw-r);
    background: var(--lcw-color); color: #fff; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.lcw-pos-right .lcw-fab { margin-left: auto; }
.lcw-fab:focus-visible, .lcw-ibtn:focus-visible, .lcw-btn:focus-visible, .lcw-human:focus-visible, .lcw-send:focus-visible, .lcw-rbtn:focus-visible, .lcw-retry:focus-visible,
.lcw-input:focus-visible, .lcw-log:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.lcw-open .lcw-fab { display: none; }

.lcw-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: var(--lcw-r); background: #dc2626; color: #fff;
    font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.lcw-badge[hidden], .lcw-window[hidden], .lcw-human[hidden], .lcw-count[hidden] { display: none !important; }

.lcw-window { display: flex; flex-direction: column; width: var(--lcw-w, 380px); max-width: calc(100vw - 32px); height: var(--lcw-h, 560px); max-height: calc(100vh - 32px);
    background: var(--lcw-bg); border-radius: var(--lcw-r); box-shadow: 0 12px 40px rgba(0, 0, 0, .28); overflow: hidden; }

.lcw-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--lcw-color); color: #fff; }
.lcw-titles { flex: 1 1 auto; min-width: 0; }
.lcw-title { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcw-sub { font-size: 12px; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcw-tools { display: flex; gap: 2px; flex: 0 0 auto; }
.lcw-ibtn { width: 36px; height: 36px; border: 0; border-radius: var(--lcw-r); background: transparent; color: #fff; font-size: 16px; cursor: pointer; }
.lcw-ibtn:hover { background: rgba(255, 255, 255, .18); }

.lcw-log { flex: 1 1 auto; min-height: 110px; overflow-y: auto; overflow-x: hidden; padding: 12px; background: var(--lcw-soft); overscroll-behavior: contain; }
.lcw-msg { display: flex; flex-direction: column; max-width: 88%; margin-bottom: 10px; }
.lcw-visitor { margin-left: auto; align-items: flex-end; }
.lcw-bot, .lcw-operator, .lcw-system { margin-right: auto; align-items: flex-start; }
.lcw-bubble { padding: 9px 12px; border-radius: var(--lcw-r); background: var(--lcw-surface); border: 1px solid var(--lcw-line, #e5e7eb); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; max-width: 100%; }
.lcw-bubble p { margin: 0 0 6px; white-space: normal; }
.lcw-bubble p:last-child { margin-bottom: 0; }
.lcw-bubble ul, .lcw-bubble ol { margin: 4px 0 4px 18px; padding: 0; white-space: normal; }
.lcw-bubble a { color: var(--lcw-color); text-decoration: underline; }
.lcw-visitor .lcw-bubble { background: var(--lcw-color); border-color: var(--lcw-color); color: #fff; }
.lcw-system .lcw-bubble { background: var(--lcw-sys-bg); border-color: var(--lcw-sys-bd); }
.lcw-operator .lcw-bubble { background: var(--lcw-op-bg); border-color: var(--lcw-op-bd); }
.lcw-name { font-size: 12px; font-weight: 600; color: var(--lcw-muted); margin: 0 0 2px 4px; }
.lcw-meta { font-size: 11px; color: var(--lcw-muted); margin: 2px 4px 0; }
.lcw-pending .lcw-bubble { opacity: .7; }
.lcw-note { text-align: center; font-size: 12px; color: var(--lcw-muted); margin: 6px 0; }

.lcw-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lcw-btn { display: inline-block; padding: 7px 12px; border: 1px solid var(--lcw-color); border-radius: var(--lcw-r); background: var(--lcw-surface); color: var(--lcw-color);
    font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; min-height: 36px; }
.lcw-btn:hover:not(:disabled) { background: var(--lcw-color); color: #fff; }
.lcw-btn:disabled { opacity: .45; cursor: default; }
.lcw-btn-human { border-style: dashed; }

.lcw-rate { display: flex; gap: 6px; margin-top: 4px; }
.lcw-rbtn { padding: 3px 8px; border: 1px solid var(--lcw-line, #e5e7eb); border-radius: var(--lcw-r); background: var(--lcw-surface); font: inherit; font-size: 12px; cursor: pointer; min-height: 28px; }
.lcw-rbtn[aria-pressed="true"] { background: var(--lcw-color); border-color: var(--lcw-color); color: #fff; }

.lcw-retry { margin-top: 4px; padding: 4px 10px; border: 1px solid #dc2626; border-radius: var(--lcw-r); background: var(--lcw-surface); color: #dc2626; font: inherit; font-size: 12px; cursor: pointer; }

.lcw-bar { padding: 6px 12px 0; background: var(--lcw-bg); border-top: 1px solid var(--lcw-line, #e5e7eb); }
.lcw-human { width: 100%; padding: 8px; border: 1px dashed var(--lcw-color); border-radius: var(--lcw-r); background: var(--lcw-surface); color: var(--lcw-color); font: inherit; font-size: 14px; cursor: pointer; min-height: 40px; }
.lcw-human:hover { background: var(--lcw-color); color: #fff; }
.lcw-count { padding: 2px 12px 0; font-size: 12px; color: var(--lcw-warn); }

.lcw-form { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px 12px; background: var(--lcw-bg); }
.lcw-input { flex: 1 1 auto; min-width: 0; resize: none; padding: 9px 11px; border: 1px solid var(--lcw-input-bd); border-radius: var(--lcw-r); font: inherit; font-size: 16px; color: var(--lcw-fg); background: var(--lcw-surface); max-height: 120px; }
.lcw-send { flex: 0 0 auto; padding: 0 14px; min-height: 40px; border: 0; border-radius: var(--lcw-r); background: var(--lcw-color); color: #fff; font: inherit; font-size: 14px; cursor: pointer; }

@media (max-width: 480px) {
    .lcw-root.lcw-open { inset: 0; bottom: 0; right: 0; left: 0; }
    .lcw-open .lcw-window { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: var(--lcw-r); }
}
@media (prefers-reduced-motion: no-preference) {
    .lcw-window { animation: lcw-in .16s ease-out; }
    @keyframes lcw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

.lcw-later { width: 100%; margin-top: 6px; padding: 8px; border: 1px solid #16a34a; border-radius: var(--lcw-r); background: var(--lcw-ok-bg); color: var(--lcw-ok-fg); font: inherit; font-size: 14px; cursor: pointer; min-height: 40px; }
.lcw-later:hover { background: #16a34a; color: #fff; }
.lcw-later[hidden], .lcw-delstatus[hidden], .lcw-panel[hidden] { display: none !important; }
.lcw-delstatus { margin-top: 6px; padding: 6px 8px; border-radius: var(--lcw-r); background: var(--lcw-ok-bg); color: var(--lcw-ok-fg); font-size: 13px; }
.lcw-link { padding: 0; border: 0; background: none; color: var(--lcw-color); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.lcw-panel { position: relative; padding: 8px 12px; background: var(--lcw-surface); color: var(--lcw-fg); border-top: 1px solid var(--lcw-line, #e5e7eb); max-height: 72%; overflow-y: auto; flex: 0 0 auto; }
.lcw-panel .lcw-close { position: absolute; top: 8px; right: 12px; }
.lcw-ph { font-weight: 700; font-size: 14px; margin-bottom: 4px; padding-right: 70px; }
.lcw-small { font-size: 12px; line-height: 1.35; color: var(--lcw-muted); margin-bottom: 6px; }
.lcw-lform { display: flex; flex-direction: column; gap: 6px; }
.lcw-lbl { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.lcw-in { padding: 6px 9px; border: 1px solid var(--lcw-input-bd); border-radius: var(--lcw-r); font: inherit; font-size: 14px; background: var(--lcw-surface); color: var(--lcw-fg); width: 100%; }
.lcw-consent { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; line-height: 1.3; color: var(--lcw-fg); }
.lcw-consent input { margin-top: 3px; flex: 0 0 auto; }
.lcw-primary { padding: 7px 12px; border: 0; border-radius: var(--lcw-r); background: var(--lcw-color); color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: center; text-decoration: none; min-height: 34px; }
.lcw-primary:disabled { opacity: .6; cursor: default; }
.lcw-alink { display: block; }
.lcw-err { margin-top: 6px; padding: 4px 8px; border-radius: var(--lcw-r); background: var(--lcw-err-bg); color: var(--lcw-err-fg); font-size: 13px; }
.lcw-wait { text-align: center; }
.lcw-later:focus-visible, .lcw-in:focus-visible, .lcw-primary:focus-visible, .lcw-link:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

.lcw-form[hidden], .lcw-count[hidden] { display: none !important; }
.lcw-typing { display: flex; align-items: center; gap: 6px; margin: 2px 4px 10px; font-size: 13px; color: var(--lcw-muted); }
.lcw-dots { display: inline-flex; gap: 3px; }
.lcw-dots i { width: 5px; height: 5px; border-radius: var(--lcw-r); background: var(--lcw-muted); animation: lcw-blink 1.2s infinite ease-in-out; }
.lcw-dots i:nth-child(2) { animation-delay: .2s; }
.lcw-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes lcw-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lcw-dots i { animation: none; opacity: .7; } }

.lcw-foot { display: flex; border-top: 1px solid var(--lcw-sep); background: var(--lcw-bg); }
.lcw-foot .lcw-endlink { flex: 1 1 0; padding: 9px 8px; color: var(--lcw-muted); font-size: 12.5px; text-decoration: none; text-align: center; transition: background .15s, color .15s; }
.lcw-foot .lcw-endlink + .lcw-endlink { border-left: 1px solid var(--lcw-sep); }
.lcw-foot .lcw-endlink:hover { background: var(--lcw-hover); color: var(--lcw-color); }
.lcw-foot .lcw-endlink:last-child:hover { color: var(--lcw-err-fg); }

.lcw-attach { flex: 0 0 auto; min-width: 40px; min-height: 40px; border: 1px solid rgba(0,0,0,.15); border-radius: var(--lcw-r); background: transparent; font-size: 18px; cursor: pointer; }
.lcw-attach:disabled { opacity: .5; cursor: progress; }
.lcw-file { display: block; margin-top: 6px; color: inherit; text-decoration: underline; word-break: break-word; }
.lcw-thumb { display: block; max-width: 100%; max-height: 180px; border-radius: var(--lcw-r); }
.lcw-fname { font-weight: 600; word-break: break-word; }
.lcw-fstatus { margin-top: 6px; font-size: 12px; opacity: .85; }
.lcw-failed .lcw-bubble { background: var(--lcw-fail-bg); color: var(--lcw-fail-fg); }

.lcw-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.lcw-window.lcw-reviewing .lcw-form, .lcw-window.lcw-reviewing .lcw-bar, .lcw-window.lcw-reviewing .lcw-foot, .lcw-window.lcw-reviewing .lcw-panel { display: none; }
.lcw-review { padding: 18px 16px 16px; border-top: 1px solid rgba(0,0,0,.08); background: var(--lcw-surface); text-align: center; }
.lcw-review-h { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.lcw-stars { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.lcw-star { border: 0; background: transparent; font-size: 34px; line-height: 1; color: var(--lcw-star-off); cursor: pointer; padding: 2px 4px; transition: transform .1s, color .1s; }
.lcw-star.on { color: #f5b301; }
.lcw-star:hover { transform: scale(1.12); }
.lcw-review-ta { width: 100%; box-sizing: border-box; resize: vertical; margin-bottom: 10px; text-align: left; }
.lcw-review-row { display: flex; align-items: center; justify-content: center; gap: 14px; }

.lcw-root *, .lcw-root *::before, .lcw-root *::after { border-radius: var(--lcw-r) !important; }
.lcw-root.lcw-open .lcw-window { border-radius: 0 !important; }

html[data-bs-theme="dark"] .lcw-root { color-scheme: dark; --lcw-bg: #111827; --lcw-fg: #e5e7eb; --lcw-muted: #9ca3af; --lcw-line: #374151; --lcw-soft: #0b1220; --lcw-surface: #1f2937; --lcw-input-bd: #4b5563; --lcw-sys-bg: #1e2a4a; --lcw-sys-bd: #3b4f8a; --lcw-op-bg: #12352b; --lcw-op-bd: #1f6b52; --lcw-ok-bg: #0f2e1d; --lcw-ok-fg: #86efac; --lcw-err-bg: #3b1414; --lcw-err-fg: #fca5a5; --lcw-fail-bg: #3b1414; --lcw-fail-fg: #fecaca; --lcw-warn: #fbbf24; --lcw-star-off: #4b5563; --lcw-sep: rgba(255, 255, 255, .12); --lcw-hover: rgba(255, 255, 255, .08); }
@media (prefers-color-scheme: dark) { html:not([data-bs-theme]) .lcw-root { color-scheme: dark; --lcw-bg: #111827; --lcw-fg: #e5e7eb; --lcw-muted: #9ca3af; --lcw-line: #374151; --lcw-soft: #0b1220; --lcw-surface: #1f2937; --lcw-input-bd: #4b5563; --lcw-sys-bg: #1e2a4a; --lcw-sys-bd: #3b4f8a; --lcw-op-bg: #12352b; --lcw-op-bd: #1f6b52; --lcw-ok-bg: #0f2e1d; --lcw-ok-fg: #86efac; --lcw-err-bg: #3b1414; --lcw-err-fg: #fca5a5; --lcw-fail-bg: #3b1414; --lcw-fail-fg: #fecaca; --lcw-warn: #fbbf24; --lcw-star-off: #4b5563; --lcw-sep: rgba(255, 255, 255, .12); --lcw-hover: rgba(255, 255, 255, .08); } }
html[data-bs-theme="dark"] .lcw-window, html[data-bs-theme="dark"] .lcw-fab { box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
.lcw-has-tip { position: relative; }
.lcw-tip { position: absolute; left: 0; bottom: 100%; margin-bottom: 7px; z-index: 5; max-width: 100%; padding: 4px 8px; background: #000; color: #fff; font-size: 12.5px; line-height: 1.3; text-align: left; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none; }
.lcw-tip::after { content: ""; position: absolute; top: 100%; left: 14px; border: 5px solid transparent; border-top-color: #000; }
@media (max-width: 520px) { .lcw-in { font-size: 16px; } }
.lcw-phone { display: flex; }
.lcw-pfx { display: flex; align-items: center; padding: 0 9px; border: 1px solid var(--lcw-input-bd); border-right: 0; background: var(--lcw-soft); color: var(--lcw-muted); font-size: 14px; white-space: nowrap; }
.lcw-phone .lcw-in { flex: 1 1 auto; min-width: 0; }
.lcw-logo { flex: 0 0 auto; width: 32px; height: 32px; object-fit: contain; background: rgba(255, 255, 255, .15); }
@media (max-width: 575px) { .lcw-root.lcw-hide-mobile { display: none; } }
