.care-chat {
  --chat-ink: #173b63;
  --chat-blue: #2055a4;
  --chat-paper: #fff;
  --chat-edge: clamp(16px, 1.6vw, 28px);
  color: var(--chat-ink);
  font-family: var(--atelier-font, sans-serif);
}
.care-chat :is(button, input) { font: inherit; }
.care-chat svg { width: 22px; height: 22px; flex: none; }
.care-chat__launch {
  position: fixed;
  z-index: 20;
  right: var(--chat-edge);
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 17px;
  border: 1px solid #1e527f;
  border-radius: 28px;
  background: var(--chat-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  box-shadow: 0 5px 18px #17375028;
}
.care-chat__launch:hover { background: #1b507f; }
.care-chat__dialog:not([open]) { display: none; }
.care-chat__dialog[open] {
  position: fixed;
  top: auto;
  right: var(--chat-edge);
  bottom: max(var(--chat-edge), env(safe-area-inset-bottom));
  left: auto;
  display: flex;
  flex-direction: column;
  width: min(395px, calc(100% - 24px));
  max-width: none;
  height: min(570px, calc(100dvh - 2 * var(--chat-edge)));
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--chat-ink);
  border: 1px solid #a5c9ed;
  border-radius: 24px;
  background: var(--chat-paper);
  box-shadow: 0 5px 18px #2055a417;
  font-family: inherit;
  text-align: left;
  line-height: 1.55;
}
.care-chat__dialog::backdrop { background: transparent; }
html { scrollbar-gutter: stable; }
html:has(.care-chat__dialog[open]) { overflow: hidden; }
.care-chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 16px 17px 20px;
  background: #ecf6ff;
  border-bottom: 1px solid #c7e1fa;
  flex: none;
}
.care-chat__mark {
  display: grid;
  width: 45px;
  height: 45px;
  flex: none;
  place-items: center;
  background: var(--chat-blue);
  color: #fff;
  border-radius: 48% 52% 45% 55%;
}
.care-chat__mark svg { width: 26px; height: 26px; }
.care-chat__eyebrow, .care-chat__human {
  color: #426278;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.4;
}
.care-chat__header h2 { margin: 2px 0 0; color: var(--chat-ink); font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: -.035em; }
.care-chat__header h2:focus { outline: none; }
.care-chat__close {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #35546d;
  background: transparent;
}
.care-chat__close:hover { background: #d5e6ef; }
.care-chat__scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bbced9 transparent; }
.care-chat__scroll:focus-visible { outline-offset: -3px; }
.care-chat__thread { display: grid; align-content: start; gap: 14px; padding: 20px; }
.care-chat__turn { min-width: 0; }
.care-chat__answer, .care-chat__question {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 4px 17px 17px;
  background: white;
  border: 1px solid #d9e4e9;
  color: #24465b;
  font-size: 1rem;
  line-height: 1.62;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.care-chat__question {
  justify-self: end;
  margin-left: auto;
  max-width: 86%;
  border-color: #c7e1fa;
  border-radius: 17px 4px 17px 17px;
  background: #edf6ff;
  color: #174b82;
}
.care-chat__choices, .care-chat__links, .care-chat__channels { display: flex; flex-wrap: wrap; align-items: center; }
.care-chat__choices { gap: 6px; margin-top: 7px; }
.care-chat__choices button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 1px solid #b5ccdb;
  border-radius: 30px;
  color: #245a83;
  background: #fff;
  font-size: .94rem;
  font-weight: 580;
}
.care-chat__choices button:hover { background: #ecf4f9; border-color: #90b4cd; }
.care-chat__links { gap: 2px 14px; margin-top: 3px; }
.care-chat__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #235c85;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .94rem;
  font-weight: 650;
}
.care-chat__controls { flex: none; padding: 12px 18px 13px; border-top: 1px solid #dce5e9; background: #fff; }
.care-chat__channels { gap: 0 7px; margin: 1px 0 7px; }
.care-chat__channels a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 5px; font-size: .94rem; font-weight: 650; }
.care-chat__channels a[hidden] { display: none; }
.care-chat__channels a:first-child { margin-left: -5px; }
.care-chat__channels a:hover { text-decoration: underline; text-underline-offset: 3px; }
.care-chat__channels a svg { width: 18px; height: 18px; }
.care-chat__kakao svg { fill: #ffe778; stroke: #58471a; }
.care-chat__naver { color: #196447; }
.care-chat__phone, .care-chat__sms { color: #245b83; }
.care-chat__form { display: flex; align-items: center; min-width: 0; gap: 5px; border: 1px solid #b5c9d5; border-radius: 24px; padding: 0 3px 0 14px; background: #fff; }
.care-chat__form:focus-within { outline: 2px solid #286691; outline-offset: 1px; }
.care-chat__form input { flex: 1; min-width: 0; height: 46px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--chat-ink); font-size: 1rem; }
.care-chat__form input::placeholder { color: #607485; }
.care-chat__form button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: var(--chat-blue); }
.care-chat__form button:disabled { background: #e8eff3; color: #6a7e8e; cursor: default; }
.care-chat__privacy { margin-top: 7px; font-size: .78rem; line-height: 1.45; color: #56697b; }
.care-chat :is(button, a):focus-visible { outline: 3px solid #347ba8; outline-offset: 2px; }
@media (max-width: 850px) {
  .care-chat__launch { right: max(12px, env(safe-area-inset-right)); bottom: calc(var(--rail-height, 59px) + env(safe-area-inset-bottom) + 9px); padding: 6px 12px; }
  body:has(.quick-rail [data-care-chat-open]) .care-chat__launch { display: none; }
}
@media (min-width: 851px) and (max-height: 540px) {
  .care-chat__launch { right: calc(var(--chat-edge) + 80px); }
}
@media (max-width: 560px) {
  .care-chat__dialog[open] {
    inset: auto 0 var(--care-chat-keyboard, 0px);
    width: 100%;
    height: min(640px, calc(var(--care-chat-visible, 100dvh) - 8px));
    border-bottom: 0;
    border-radius: 23px 23px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (max-height: 460px) {
  .care-chat__dialog[open] { height: calc(var(--care-chat-visible, 100dvh) - 6px); bottom: var(--care-chat-keyboard, 0px); }
  .care-chat__header { padding-block: 4px; }
  .care-chat__header h2 { font-size: 1.1rem; }
  .care-chat__controls { padding-block: 5px; }
  .care-chat__human { display: none; }
  .care-chat__channels { margin: 0; }
  .care-chat__thread { padding-block: 10px; }
}
@media (forced-colors: active) {
  .care-chat__launch, .care-chat__form button { border: 1px solid ButtonText; }
}
