.nyw-chat-launcher { position: fixed; z-index: 160; right: 22px; bottom: 26px; display: grid; place-items: center; width: 48px; height: 48px; min-height: 48px; padding: 0; border: 0; border-radius: 50%; overflow: visible; background: #103d91; box-shadow: 0 3px 12px #103d9126; cursor: pointer; animation: nyw-chat-float 5s ease-in-out infinite; }
.nyw-chat-launcher img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nyw-chat-launcher::before { content: ''; position: absolute; right: 16px; bottom: calc(100% + 3px); width: 14px; height: 10px; background: #103d91; clip-path: polygon(0 0,100% 0,50% 100%); pointer-events: none; opacity: 0; transform: translateY(4px); animation: nyw-chat-invite 5s ease-in-out 5s infinite; }
.nyw-chat-launcher::after { content: '무엇을 도와드릴까요?'; position: absolute; right: 0; bottom: calc(100% + 12px); width: max-content; max-width: calc(100vw - 40px); padding: 11px 15px; border: 0; border-radius: 15px; background: #103d91; color: white; box-shadow: 0 3px 14px #14283f20; font: 500 14px/1.5 Pretendard,sans-serif; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(4px); animation: nyw-chat-invite 5s ease-in-out 5s infinite, nyw-chat-invite-copy 30s steps(1,end) 5s infinite; }
.nyw-chat-launcher[aria-expanded='true'] { animation: none; }
.nyw-chat-launcher[aria-expanded='true']::before,.nyw-chat-launcher[aria-expanded='true']::after { animation: none; opacity: 0; }
@keyframes nyw-chat-float { 0%,100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-3px) rotate(-2deg); } 65% { transform: translateY(-1px) rotate(2deg); } }
@keyframes nyw-chat-invite { 0%,42%,100% { opacity: 0; transform: translateY(4px); } 6%,36% { opacity: 1; transform: translateY(0); } }
@keyframes nyw-chat-invite-copy {
  0% { content: '무엇을 도와드릴까요?'; }
  16.6667% { content: '보증서 없어도 매입 가능해요'; }
  33.3333% { content: '내 시계 얼마일까요?'; }
  50% { content: '사진 한 장으로 시작해요'; }
  66.6667% { content: '위탁도 함께 비교해요'; }
  83.3333%,100% { content: '고장 난 시계도 매입해요'; }
}
@media (prefers-reduced-motion: reduce) {
  .nyw-chat-launcher { animation: none; }
  .nyw-chat-launcher::before,.nyw-chat-launcher::after { animation: none; opacity: 1; transform: none; }
}
#nyw-chat-panel { position: fixed; inset: auto 20px 86px auto; width: 370px; height: auto; max-width: calc(100vw - 24px); max-height: calc(100dvh - 112px); margin: 0; padding: 0 0 14px; border: 1px solid #e2e7ee; border-radius: 18px; color: #202127; background: white; overflow: hidden; font: 15px/1.6 Pretendard,sans-serif; text-align: left; }
#nyw-chat-panel[open] { display: flex; flex-direction: column; }
#nyw-chat-panel.has-conversation { height: 580px; }
#nyw-chat-panel::backdrop { background: #14283f30; }
#nyw-chat-panel * { box-sizing: border-box; }
#nyw-chat-panel button,#nyw-chat-panel input,#nyw-chat-panel a { font-family: inherit; }
.nyw-chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 0; flex-shrink: 0; }
.nyw-chat-header strong { font-size: 15px; }
.nyw-chat-wordmark { display: block; width: 150px; height: 24px; object-fit: contain; }
.nyw-chat-header button { width: 40px; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: #202127; font-size: 27px; cursor: pointer; }
.nyw-chat-intro { padding: 12px 18px 18px; }
.nyw-chat-intro strong { font-size: 16px; font-weight: 600; }
.nyw-chat-intro p { margin: 6px 0 0; color: #758093; font-size: 13px; line-height: 1.7; white-space: pre-line; word-break: keep-all; }
.nyw-chat-mode { margin: 0; padding: 8px 18px 0; color: #8791a2; font-size: 10px; line-height: 1.5; }
.nyw-chat-mode:empty { display: none; }
.nyw-chat-log { flex: 1; min-height: 90px; overflow-y: auto; padding: 14px; overscroll-behavior: contain; }
.nyw-chat-log:empty { display: none; }
.nyw-chat-message { margin: 0 0 18px; padding: 14px 16px; background: #f5f7fa; border-radius: 12px; }
.nyw-chat-message-user { margin-left: 38px; color: #103d91; background: #ecf2ff; }
.nyw-chat-speaker { display: block; color: #7c8798; font-size: 11px; margin-bottom: 5px; }
.nyw-chat-message p { margin: 0; color: inherit; font-size: 15px; line-height: 1.85; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.nyw-chat-message p + p { margin-top: 12px; }
.nyw-chat-sources a { display: inline-block; margin-top: 8px; color: #7c8798; font-size: 11px; }
.nyw-chat-action { display: block; margin-top: 12px; padding: 10px 14px; border-radius: 9px; background: #103d91; color: white; text-align: center; text-decoration: none; font-size: 13px; font-weight: 600; }
.nyw-chat-form { display: flex; gap: 8px; padding: 8px 14px 0; flex-shrink: 0; }
#nyw-chat-panel .nyw-chat-form input { flex: 1; min-width: 0; height: 48px; margin: 0; padding: 12px; border: 1px solid #dce4ee; border-radius: 10px; font-size: 16px; line-height: 1.4; background: white; }
#nyw-chat-panel .nyw-chat-form button { min-height: 46px; padding: 10px 12px; border: 0; border-radius: 10px; color: white; background: #103d91; font-size: 13px; cursor: pointer; }
#nyw-chat-panel .nyw-chat-form button:disabled { background: #879ab7; cursor: wait; }
.nyw-chat-note { display: block; margin: 6px 0 0; padding: 0 14px; color: #8a94a4; font-size: 10px; line-height: 1.5; }
.has-conversation .nyw-chat-note { display: block; }
.nyw-chat-reset { flex-shrink: 0; margin: 0; padding: 8px 14px 12px; border: 0; background: none; color: #7c8798; font-size: 11px; text-align: right; cursor: pointer; }
.nyw-chat-check { padding: 0 18px; flex-shrink: 0; }
.nyw-chat-support { display: none; padding: 4px 14px 0; flex-shrink: 0; }
.has-conversation .nyw-chat-support { display: flex; justify-content: flex-end; }
#nyw-chat-panel :focus-visible,.nyw-chat-launcher:focus-visible { outline: 2px solid #103d91; outline-offset: 2px; }
@media (max-width: 600px) {
  .has-mobile-shell .nyw-chat-launcher { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .nyw-chat-launcher { right: 14px; bottom: 18px; }
  #nyw-chat-panel { inset: auto 10px calc(12px + env(safe-area-inset-bottom)) 10px; width: calc(100vw - 20px); max-width: none; max-height: calc(100dvh - 24px); border-radius: 16px; }
  #nyw-chat-panel.has-conversation { height: min(660px,calc(100dvh - 24px)); }
  .nyw-chat-log { min-height: 110px; padding: 14px; }
}
