
.sr-chat-launcher {
  position: fixed; right: 28px; bottom: 28px; z-index: 49;
  display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 20px 0 16px;
  border: 0; border-radius: var(--r, 8px); background: var(--pri); color: #fff; font: inherit; font-size: 15px; font-weight: 800;
  box-shadow: 0 14px 30px rgba(20, 50, 36, .26); cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), background-color .2s;
}
.sr-chat-launcher:hover { background: var(--pri2); }
.sr-chat-launcher svg { width: 23px; height: 23px; flex: 0 0 auto; }
.fab.is-on ~ .sr-chat .sr-chat-launcher { transform: translateY(-66px); }
html.sr-chat-open .sr-chat-launcher, html.sr-chat-open .fab { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 899px) {
  .sr-chat-launcher { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
  .sr-chat-launcher .sr-chat-lt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .sr-chat-launcher svg { width: 26px; height: 26px; }
  .sticky-cta.is-on ~ .sr-chat .sr-chat-launcher { transform: translateY(-73px); }
}

.sr-chat-panel {
  position: fixed; right: 28px; bottom: 28px; z-index: 70;
  display: flex; flex-direction: column; width: 384px; height: min(640px, calc(100vh - 110px));
  background: #fff; border: 1px solid var(--line2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 28, 22, .22), 0 2px 8px rgba(16, 28, 22, .08);
  transform-origin: 100% 100%;
}
.sr-chat-panel[hidden] { display: none; }
.sr-chat-panel.is-in { animation: srChatIn .26s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes srChatIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (min-width: 600px) and (max-width: 899px) { .sr-chat-panel { right: 16px; bottom: 16px; height: min(640px, calc(100vh - 96px)); } }
@media (max-width: 599px) {
  .sr-chat-panel { inset: 0; width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  html.sr-chat-lock, html.sr-chat-lock body { overflow: hidden; }
}

.sr-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.sr-chat-back, .sr-chat-close {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink2); cursor: pointer;
}
.sr-chat-back { margin-left: -8px; }
.sr-chat-back[hidden] { display: none; }
.sr-chat-back svg { width: 20px; height: 20px; transform: scaleX(-1); }
.sr-chat-close svg { width: 20px; height: 20px; }
.sr-chat-back:hover, .sr-chat-close:hover { background: var(--bg2); color: var(--ink); }
.sr-chat-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--pri-soft); color: var(--pri); }
.sr-chat-mark svg { width: 21px; height: 21px; }
.sr-chat-brand { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sr-chat-brand strong { display: flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.sr-chat-wm { font-family: 'LR Round Logo', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; /* design-no-ai: allow 생활요청 공식 로고 글꼴 */ font-size: 18px; font-weight: 800; color: var(--pri); letter-spacing: -.02em; }
.sr-chat-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-chat-status i { width: 7px; height: 7px; border-radius: 50%; background: #22a06b; flex: 0 0 auto; }

.sr-chat-log { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 10px; background: #fff; scroll-behavior: smooth; }
.sr-chat-day { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 12px; color: var(--ink3); }
.sr-chat-day::before, .sr-chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sr-chat-msg { display: grid; justify-items: start; margin: 0 0 12px; }
.sr-chat-msg.me { justify-items: end; }
.sr-chat-msg + .sr-chat-msg.is-cont { margin-top: -6px; }
.sr-chat-who { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 13px; }
.sr-chat-who b { font-weight: 800; color: var(--ink); }
.sr-chat-who em { padding-left: 7px; border-left: 1px solid var(--line2); font-style: normal; font-size: 12px; color: var(--ink3); line-height: 1; }
.sr-chat-av { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pri-soft); color: var(--pri); }
.sr-chat-av svg { width: 14px; height: 14px; }
.sr-chat-body { display: grid; justify-items: start; gap: 8px; max-width: calc(100% - 31px); margin-left: 31px; }
.sr-chat-msg.me .sr-chat-body { justify-items: end; max-width: 84%; margin-left: 0; }
.sr-chat-bubble { padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--bg2); color: var(--ink); font-size: 14.5px; line-height: 1.62; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.sr-chat-msg.me .sr-chat-bubble { border-radius: 14px 4px 14px 14px; background: var(--pri); color: #fff; }
.sr-chat-time { font-size: 11px; color: var(--ink3); }
.sr-chat-opts { display: grid; gap: 7px; width: 100%; }
.sr-chat-opts button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px 11px 14px; text-align: left;
  border: 1px solid var(--line2); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.sr-chat-opts button:hover { border-color: var(--pri); background: var(--pri-soft); }
.sr-chat-opts .t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sr-chat-opts b { font-size: 14.5px; font-weight: 700; }
.sr-chat-opts small { font-size: 12.5px; color: var(--ink3); }
.sr-chat-opts svg { width: 16px; height: 16px; color: var(--ink3); flex: 0 0 auto; }
.sr-chat-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-chat-sugg button {
  display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border: 1px solid var(--pri-soft2); border-radius: 8px;
  background: #fff; color: var(--pri-ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.35; text-align: left; cursor: pointer;
}
.sr-chat-sugg button:hover { background: var(--pri-soft); border-color: var(--pri); }
.sr-chat-links { display: grid; gap: 6px; width: 100%; }
.sr-chat-links p { margin: 0; font-size: 12px; color: var(--ink3); }
.sr-chat-links div { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-chat-links a {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line2); border-radius: 6px;
  background: #fff; color: var(--pri-ink); font-size: 13px; font-weight: 600; line-height: 1.3;
}
.sr-chat-links a:hover { border-color: var(--pri); background: var(--pri-soft); }
.sr-chat-links a svg { width: 13px; height: 13px; flex: 0 0 auto; }
.sr-chat-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-chat-acts a, .sr-chat-acts button {
  display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px 0 14px; border: 1px solid var(--line2); border-radius: 8px;
  background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.sr-chat-acts .is-pri { border-color: var(--pri); background: var(--pri); color: #fff; }
.sr-chat-acts a:hover, .sr-chat-acts button:hover { border-color: var(--pri); }
.sr-chat-acts .is-pri:hover { background: var(--pri2); }
.sr-chat-acts svg { width: 15px; height: 15px; }
.sr-chat-note { margin: 0 auto 12px; max-width: 92%; padding: 8px 12px; border-radius: 8px; background: #f7f8f7; color: var(--ink2); font-size: 12.5px; line-height: 1.55; text-align: center; }
.sr-chat-note.is-sub { margin-top: -6px; background: transparent; color: var(--ink3); }
.sr-chat-resume { display: flex; justify-content: center; margin: 4px 0 10px; }
.sr-chat-resume button { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 8px; background: #fff; color: var(--ink2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sr-chat-resume svg { width: 14px; height: 14px; }
.sr-chat-typing { display: inline-flex; align-items: center; gap: 4px; padding: 13px 14px; border-radius: 4px 14px 14px 14px; background: var(--bg2); }
.sr-chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa5a0; animation: srChatDot 1.1s infinite ease-in-out; }
.sr-chat-typing i:nth-child(2) { animation-delay: .15s; }
.sr-chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes srChatDot { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-4px); opacity: 1; } }
.sr-chat-new { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: inherit; font-size: 13px; font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); cursor: pointer; }
.sr-chat-new[hidden] { display: none; }
.sr-chat-new svg { width: 14px; height: 14px; }
.sr-chat-logwrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.sr-chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.sr-chat-field { flex: 1; min-width: 0; display: flex; }
.sr-chat-compose textarea {
  width: 100%; min-width: 0; min-height: 44px; max-height: 120px; padding: 11px 12px; resize: none;
  border: 1px solid var(--line2); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; line-height: 1.45;
}
.sr-chat-compose textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(47, 107, 82, .14); }
.sr-chat-compose textarea::placeholder { color: #8b958f; }
.sr-chat-send { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 10px; background: var(--pri); color: #fff; cursor: pointer; }
.sr-chat-send:disabled { background: #c9d2cd; cursor: default; }
.sr-chat-send svg { width: 20px; height: 20px; }
.sr-chat-foot { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11.5px; line-height: 1.5; color: var(--ink3); text-align: center; flex: 0 0 auto; }
@media (max-width: 599px) {
  .sr-chat-compose { padding-bottom: 8px; }
  .sr-chat-compose textarea { font-size: 16px; }
  .sr-chat-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

.sr-chat-contact {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; gap: 10px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line2); border-radius: 14px 14px 0 0; background: #fff; box-shadow: 0 -16px 40px rgba(16, 28, 22, .16);
  animation: srChatUp .24s cubic-bezier(.2, .7, .2, 1) both;
}
.sr-chat-contact[hidden] { display: none; }
@keyframes srChatUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sr-chat-dim { position: absolute; inset: 0; z-index: 2; background: rgba(16, 24, 20, .32); }
.sr-chat-dim[hidden] { display: none; }
.sr-chat-contact strong { font-size: 16px; font-weight: 800; }
.sr-chat-contact > p { margin: -4px 0 2px; font-size: 13px; line-height: 1.55; color: var(--ink2); }
.sr-chat-contact label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.sr-chat-contact label > span b { color: var(--pri); font-weight: 700; }
.sr-chat-contact input[type="text"], .sr-chat-contact input[type="tel"] {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 8px; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.sr-chat-contact input:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(47, 107, 82, .14); }
.sr-chat-consent { display: flex !important; align-items: flex-start; gap: 8px; font-weight: 600 !important; color: var(--ink) !important; cursor: pointer; }
.sr-chat-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--pri); flex: 0 0 auto; }
.sr-chat-pv { margin: -4px 0 0; font-size: 12px; line-height: 1.55; color: var(--ink3); }
.sr-chat-err { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--red, #e5432a); }
.sr-chat-err[hidden] { display: none; }
.sr-chat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-chat-cact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; margin-top: 2px; }
.sr-chat-cact button { height: 46px; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.sr-chat-cact .ghost { border: 1px solid var(--line2); background: #fff; color: var(--ink2); }
.sr-chat-cact .pri { border: 0; background: var(--pri); color: #fff; }
@media (max-width: 599px) { .sr-chat-contact input[type="text"], .sr-chat-contact input[type="tel"] { font-size: 16px; } }

@media (prefers-reduced-motion: reduce) {
  .sr-chat-launcher, .sr-chat-panel.is-in, .sr-chat-contact, .sr-chat-log { transition: none; animation: none; scroll-behavior: auto; }
  .sr-chat-typing i { animation: none; opacity: .7; }
}
