.lcw-root {
  --lcw-bg: #16161a;
  --lcw-panel: #1d1d22;
  --lcw-soft: #26262c;
  --lcw-line: #2f2f36;
  --lcw-text: #ffffff;
  --lcw-dim: #a1a1aa;
  --lcw-faint: #71717a;
  --lcw-ok: #34d17a;
  --lcw-bad: #ff8fa8;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lcw-text);
  -webkit-font-smoothing: antialiased;
}

.lcw-root *, .lcw-root *::before, .lcw-root *::after { box-sizing: border-box; }

.lcw-root svg { width: 100%; height: 100%; display: block; }

.lcw-launcher {
  position: relative;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #111114;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  display: grid;
  place-items: center;
  transition: transform .25s cubic-bezier(.2, .8, .3, 1.3), box-shadow .2s;
  animation: lcw-pop .5s .3s cubic-bezier(.2, .8, .3, 1.3) both;
}

.lcw-launcher:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }

.lcw-launcher:focus-visible { outline: 3px solid rgba(255, 255, 255, .5); outline-offset: 3px; }

.lcw-launcher svg { position: absolute; width: 30px; height: 30px; transition: transform .3s, opacity .2s; }

.lcw-ico-chat path:first-child { fill: currentColor; }

.lcw-ico-chat .lcw-smile { fill: none; stroke: #ffffff; stroke-width: 1.8; stroke-linecap: round; }

.lcw-ico-close { width: 22px !important; height: 22px !important; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; opacity: 0; transform: rotate(-90deg); }

.lcw-root.is-open .lcw-ico-chat { opacity: 0; transform: rotate(90deg) scale(.6); }

.lcw-root.is-open .lcw-ico-close { opacity: 1; transform: none; }

.lcw-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff4d6d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px #111114;
  animation: lcw-pop .3s cubic-bezier(.2, .8, .3, 1.4) both;
}

.lcw-badge[hidden] { display: none; }

.lcw-tip {
  position: absolute;
  right: 0;
  bottom: 76px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 48px);
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--lcw-line);
  border-radius: 16px;
  background: var(--lcw-panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .3, 1.2);
}

.lcw-tip.is-show { opacity: 1; transform: none; pointer-events: auto; }

.lcw-root.is-open .lcw-tip { display: none; }

.lcw-tip-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 6px 10px 14px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lcw-tip-body strong { font-size: 15px; font-weight: 700; }

.lcw-tip-sub, .lcw-head-sub { display: inline-flex; align-items: center; gap: 6px; color: var(--lcw-dim); font-size: 13px; }

.lcw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lcw-ok); box-shadow: 0 0 0 3px rgba(52, 209, 122, .18); }

.lcw-tip-close {
  width: 26px;
  height: 26px;
  margin-top: 6px;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--lcw-soft);
  color: var(--lcw-dim);
  cursor: pointer;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.lcw-tip-close:hover { color: #ffffff; }

.lcw-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  width: 380px;
  height: min(620px, calc(100vh - 120px));
  border: 1px solid var(--lcw-line);
  border-radius: 20px;
  background: var(--lcw-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  overflow: hidden;
  transform-origin: bottom right;
  animation: lcw-open .32s cubic-bezier(.2, .8, .3, 1.1) both;
}

.lcw-panel[hidden] { display: none; }

.lcw-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px 16px 18px;
  border-bottom: 1px solid var(--lcw-line);
  background: var(--lcw-panel);
}

.lcw-logo { width: 40px; height: 40px; border-radius: 12px; background: #ffffff; flex: none; }

.lcw-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.lcw-head-text strong { font-size: 17px; font-weight: 800; }

.lcw-x {
  width: 34px;
  height: 34px;
  padding: 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--lcw-dim);
  cursor: pointer;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.lcw-x:hover { background: var(--lcw-soft); color: #ffffff; }

.lcw-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }

.lcw-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px; scrollbar-width: thin; scrollbar-color: #3a3a42 transparent; }

.lcw-loading { margin: auto; color: var(--lcw-dim); }

.lcw-msg { display: flex; flex-direction: column; max-width: 82%; margin-bottom: 12px; animation: lcw-up .28s ease both; }

.lcw-msg.is-admin { align-items: flex-start; }

.lcw-msg.is-me { align-items: flex-end; margin-left: auto; }

.lcw-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.lcw-msg.is-admin .lcw-bubble { background: var(--lcw-soft); border-top-left-radius: 6px; }

.lcw-msg.is-me .lcw-bubble { background: #ffffff; color: #111114; border-top-right-radius: 6px; }

.lcw-bubble a { color: inherit; text-decoration: underline; }

.lcw-meta { margin-top: 4px; padding: 0 4px; color: var(--lcw-faint); font-size: 11.5px; }

.lcw-date { margin: 14px 0 12px; text-align: center; color: var(--lcw-faint); font-size: 12px; }

.lcw-contact {
  margin: 0 auto 16px;
  padding: 6px 12px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: var(--lcw-soft);
  color: var(--lcw-dim);
  font-size: 12px;
  text-align: center;
  word-break: break-all;
}

.lcw-contact b { color: #ffffff; font-weight: 600; }

.lcw-closed {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px dashed var(--lcw-line);
  border-radius: 12px;
  color: var(--lcw-dim);
  font-size: 13px;
  text-align: center;
}

.lcw-closed[hidden] { display: none; }

.lcw-gate {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
  padding: 16px;
  border: 1px solid var(--lcw-line);
  border-radius: 16px;
  background: var(--lcw-panel);
  animation: lcw-up .35s .1s ease both;
}

.lcw-gate-desc { margin: 0; color: var(--lcw-dim); font-size: 13.5px; }

.lcw-field { display: flex; flex-direction: column; gap: 6px; }

.lcw-field span { font-size: 13px; font-weight: 700; }

.lcw-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--lcw-line);
  border-radius: 12px;
  background: var(--lcw-bg);
  color: #ffffff;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.lcw-input::placeholder { color: var(--lcw-faint); }

.lcw-input:focus { border-color: #ffffff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }

.lcw-input.is-bad { border-color: var(--lcw-bad); }

.lcw-agree { display: flex; gap: 8px; align-items: flex-start; color: var(--lcw-dim); font-size: 12.5px; cursor: pointer; }

.lcw-agree input { margin: 3px 0 0; accent-color: #ffffff; flex: none; width: 16px; height: 16px; }

.lcw-error { margin: 0; color: var(--lcw-bad); font-size: 13px; }

.lcw-error[hidden] { display: none; }

.lcw-primary {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #111114;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}

.lcw-primary:hover { transform: translateY(-1px); }

.lcw-primary:disabled { opacity: .6; cursor: progress; }

.lcw-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--lcw-line);
  border-radius: 18px;
  background: var(--lcw-panel);
  transition: border-color .15s;
}

.lcw-composer:focus-within { border-color: #55555e; }

.lcw-text {
  flex: 1;
  min-height: 24px;
  max-height: 120px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  line-height: 1.45;
  resize: none;
  outline: none;
}

.lcw-text::placeholder { color: var(--lcw-faint); }

.lcw-send {
  flex: none;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #111114;
  cursor: pointer;
  fill: currentColor;
  transition: opacity .15s, transform .15s;
}

.lcw-send:disabled { opacity: .25; cursor: default; }

.lcw-send:not(:disabled):hover { transform: translateY(-1px); }

.lcw-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 76px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #3a1d26;
  color: #ffd0da;
  font-size: 13px;
  animation: lcw-up .25s ease both;
}

@keyframes lcw-pop {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: none; }
}

@keyframes lcw-open {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@keyframes lcw-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .lcw-root { right: 16px; bottom: 16px; }
  .lcw-root.is-open .lcw-launcher { display: none; }
  .lcw-panel {
    position: fixed;
    inset: 0;
    width: auto;
    height: 100%;
    border-radius: 0;
    border: 0;
  }
  .lcw-tip { bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .lcw-root *, .lcw-root { animation: none !important; transition: none !important; }
}

.lcw-row { display: flex; align-items: flex-start; gap: 8px; max-width: 88%; margin-bottom: 12px; animation: lcw-up .28s ease both; }

.lcw-row .lcw-msg { max-width: 100%; margin-bottom: 0; animation: none; }

.lcw-ava { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #ffffff; border: 1px solid var(--lcw-line); }

.lcw-ava.is-default { padding: 5px; object-fit: contain; }

.lcw-name { margin: 0 0 4px 4px; color: var(--lcw-dim); font-size: 12px; font-weight: 700; }
