/* DF 챗봇 - 디자인필 */
.dfcb-root{--dfcb-c:#2f6bff;--dfcb-x:24px;--dfcb-y:24px;position:fixed;bottom:var(--dfcb-y);z-index:2147483000;font-size:14px;line-height:1.55;letter-spacing:-.01em;color:#1f2430;-webkit-font-smoothing:antialiased}
.dfcb-root *,.dfcb-root *::before,.dfcb-root *::after{box-sizing:border-box}
.dfcb-root.dfcb-right{right:var(--dfcb-x)}
.dfcb-root.dfcb-left{left:var(--dfcb-x)}
.dfcb-root button{font:inherit;letter-spacing:inherit;cursor:pointer;margin:0}
.dfcb-root svg{display:block;width:100%;height:100%}

/* 런처 버튼 */
.dfcb-launcher{display:flex;align-items:center;gap:8px;height:56px;min-width:56px;padding:0 18px;border:0;border-radius:28px;background:var(--dfcb-c);color:#fff;font-weight:600;font-size:15px;box-shadow:0 8px 24px rgba(0,0,0,.18);transition:transform .2s,box-shadow .2s}
.dfcb-launcher:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(0,0,0,.22)}
.dfcb-launcher svg{width:24px;height:24px;flex:none}
.dfcb-launcher::after{content:"";position:absolute;inset:0;border-radius:28px;box-shadow:0 0 0 0 var(--dfcb-c);animation:dfcb-pulse 2.4s infinite;pointer-events:none;opacity:.5}
.dfcb-open .dfcb-launcher::after{animation:none}
@keyframes dfcb-pulse{0%{box-shadow:0 0 0 0 var(--dfcb-c)}70%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 0 transparent}}
.dfcb-launcher{position:relative}

/* 티저 말풍선 */
.dfcb-teaser{position:absolute;bottom:68px;display:flex;align-items:flex-start;gap:6px;width:max-content;max-width:320px;padding:12px 12px 12px 16px;background:#fff;border-radius:16px;box-shadow:0 8px 28px rgba(0,0,0,.14);opacity:0;visibility:hidden;transform:translateY(8px);transition:all .3s}
.dfcb-right .dfcb-teaser{right:0}
.dfcb-left .dfcb-teaser{left:0}
.dfcb-teaser.dfcb-show{opacity:1;visibility:visible;transform:none}
.dfcb-teaser-t{cursor:pointer;font-weight:500;word-break:keep-all;display:flex;flex-direction:column;gap:2px}
.dfcb-teaser-n{font-size:12px;font-weight:700;color:var(--dfcb-c)}
.dfcb-teaser-n:empty{display:none}
.dfcb-teaser-m{transition:opacity .25s;white-space:nowrap}
@media (max-width:600px){.dfcb-teaser-m{white-space:normal}}
.dfcb-teaser-m.dfcb-fade{opacity:0}
.dfcb-teaser::before{content:"";position:absolute;width:14px;height:14px;background:#fff;transform:rotate(45deg);bottom:-6px;right:22px;border-radius:2px}
.dfcb-left .dfcb-teaser::before{right:auto;left:22px}
.dfcb-teaser-x{flex:none;width:20px;height:20px;padding:3px;border:0;background:none;color:#9aa0ab}
.dfcb-open .dfcb-teaser{display:none}

/* 패널 */
.dfcb-panel{position:absolute;bottom:72px;width:380px;height:min(640px,calc(100vh - var(--dfcb-y) - 100px));display:flex;flex-direction:column;background:#f5f7fb;border-radius:20px;box-shadow:0 16px 48px rgba(0,0,0,.2);overflow:hidden;opacity:0;visibility:hidden;transform:translateY(16px) scale(.98);transform-origin:bottom right;transition:opacity .25s,transform .25s,visibility .25s}
.dfcb-right .dfcb-panel{right:0}
.dfcb-left .dfcb-panel{left:0;transform-origin:bottom left}
.dfcb-open .dfcb-panel{opacity:1;visibility:visible;transform:none}

.dfcb-head{display:flex;align-items:center;gap:10px;padding:14px 12px 14px 16px;background:var(--dfcb-c);color:#fff;flex:none}
.dfcb-avatar{width:40px;height:40px;flex:none;border-radius:50%;overflow:hidden;background:#fff;color:var(--dfcb-c)}
.dfcb-head .dfcb-avatar{box-shadow:0 0 0 2px rgba(255,255,255,.5)}
.dfcb-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.dfcb-head-t{flex:1;min-width:0;display:flex;flex-direction:column}
.dfcb-head-t strong{font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dfcb-head-t span{display:flex;align-items:center;gap:6px;font-size:12.5px;opacity:.9}
.dfcb-head-t em{font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dfcb-dot{width:7px;height:7px;border-radius:50%;background:#3ee07a;flex:none}
.dfcb-ic{width:34px;height:34px;padding:7px;border:0;border-radius:10px;background:transparent;color:#fff;opacity:.85}
.dfcb-ic:hover{background:rgba(255,255,255,.15);opacity:1}

.dfcb-body{flex:1;overflow-y:auto;padding:18px 14px 8px;overscroll-behavior:contain;scroll-behavior:smooth}
.dfcb-row{display:flex;gap:8px;margin-bottom:10px;align-items:flex-start;animation:dfcb-in .25s ease}
@keyframes dfcb-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.dfcb-avatar-s{width:30px;height:30px}
.dfcb-msg{max-width:82%;padding:10px 14px;border-radius:4px 16px 16px 16px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06);word-break:keep-all;overflow-wrap:anywhere}
.dfcb-msg a{color:var(--dfcb-c)}
.dfcb-user{justify-content:flex-end}
.dfcb-user .dfcb-msg{border-radius:16px 4px 16px 16px;background:var(--dfcb-c);color:#fff}
.dfcb-img{display:block;width:100%;height:auto;margin-top:10px;border-radius:10px}
.dfcb-links{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.dfcb-root a.dfcb-link{display:block;padding:9px 12px;border-radius:10px;background:#f1f4fa;color:var(--dfcb-c);font-weight:600;text-align:center;text-decoration:none;transition:background .2s}
.dfcb-root a.dfcb-link:hover{background:#e6ebf5}

.dfcb-typing .dfcb-msg{display:flex;gap:4px;padding:14px 16px}
.dfcb-typing i{width:6px;height:6px;border-radius:50%;background:#b5bcc8;animation:dfcb-dot 1s infinite}
.dfcb-typing i:nth-child(2){animation-delay:.15s}
.dfcb-typing i:nth-child(3){animation-delay:.3s}
@keyframes dfcb-dot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}

.dfcb-chips{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 14px 38px;animation:dfcb-in .25s ease}
.dfcb-chip{padding:8px 13px;border:1px solid #d6dcea;border:1px solid color-mix(in srgb,var(--dfcb-c) 35%,#fff);border-radius:18px;background:#fff;color:var(--dfcb-c);font-size:13.5px;font-weight:500;line-height:1.3;text-align:left;transition:all .15s}
.dfcb-chip-home{border-color:#dde1e8;color:#6b7280}
@media (hover:hover){.dfcb-chip:hover{background:var(--dfcb-c);border-color:var(--dfcb-c);color:#fff}.dfcb-chip-home:hover{background:#6b7280;border-color:#6b7280}}
.dfcb-chip:active{opacity:.8}
.dfcb-chip-lead{background:var(--dfcb-c);color:#fff;border-color:var(--dfcb-c)}

/* 상담 접수 폼 */
.dfcb-lead{margin:0 0 14px 38px;padding:14px;background:#fff;border-radius:14px;box-shadow:0 1px 2px rgba(0,0,0,.06);display:flex;flex-direction:column;gap:8px;animation:dfcb-in .25s ease}
.dfcb-lead input:not([type=checkbox]),.dfcb-lead textarea{width:100%;margin:0;padding:10px 12px;border:1px solid #dde1e8;border-radius:10px;background:#fafbfc;font:inherit;font-size:14px;color:inherit;box-shadow:none;outline:0;resize:vertical}
.dfcb-lead input:focus,.dfcb-lead textarea:focus{border-color:var(--dfcb-c);background:#fff}
.dfcb-lead .dfcb-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}
.dfcb-agree{display:flex;align-items:center;gap:6px;font-size:13px;color:#4b5260;margin:0}
.dfcb-agree input{margin:0;width:16px;height:16px;accent-color:var(--dfcb-c)}
.dfcb-more{border:0;background:none;padding:0;color:#8a919e;font-size:12.5px;text-decoration:underline}
.dfcb-privacy{padding:10px;border-radius:8px;background:#f5f7fb;font-size:12px;color:#6b7280}
.dfcb-err{font-size:13px;color:#e5484d}
.dfcb-err:empty{display:none}
.dfcb-submit{padding:11px;border:0;border-radius:10px;background:var(--dfcb-c);color:#fff;font-weight:700}
.dfcb-submit:disabled{opacity:.6;cursor:wait}

/* 빠른 버튼 */
.dfcb-quick{display:flex;gap:6px;padding:10px 12px 0;overflow-x:auto;flex:none;scrollbar-width:none}
.dfcb-quick::-webkit-scrollbar{display:none}
.dfcb-root .dfcb-qb{flex:none;padding:7px 12px;border:1px solid #dde1e8;border-radius:16px;background:#fff;color:#374151;font-size:13px;font-weight:600;text-decoration:none;white-space:nowrap;line-height:1.3}
.dfcb-root .dfcb-qb:hover{border-color:var(--dfcb-c);color:var(--dfcb-c)}

/* 입력창 */
.dfcb-input{display:flex;gap:8px;margin:10px 12px 0;padding:5px 5px 5px 14px;background:#fff;border:1px solid #dde1e8;border-radius:24px;flex:none}
.dfcb-input:focus-within{border-color:var(--dfcb-c)}
.dfcb-input input{flex:1;min-width:0;margin:0;padding:0;height:36px;border:0!important;background:transparent!important;box-shadow:none!important;outline:0;font:inherit;font-size:14.5px;color:inherit}
.dfcb-input button{flex:none;width:36px;height:36px;padding:9px;border:0;border-radius:50%;background:var(--dfcb-c);color:#fff}
.dfcb-brand{padding:6px 0 8px;text-align:center;font-size:11px;color:#a3a9b4;flex:none}
.dfcb-root .dfcb-brand a{color:#8a919e;text-decoration:none;font-weight:600}

/* ===== 캐릭터 버튼 ===== */
.dfcb-charmode{--dfcb-csz:var(--dfcb-cs,88px)}
.dfcb-root .dfcb-launcher-char{display:block;width:var(--dfcb-csz);height:var(--dfcb-csz);min-width:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:inherit;transition:none}
.dfcb-root .dfcb-launcher-char:hover{transform:none;box-shadow:none}
.dfcb-launcher-char::after{display:none}
.dfcb-char{position:absolute;left:0;right:0;bottom:6%;transform-origin:50% 100%;transition:transform .35s cubic-bezier(.34,1.56,.64,1),opacity .25s;z-index:1}
.dfcb-char-in{position:relative;display:block;width:100%}
.dfcb-char-in img{display:block;width:100%;height:auto;pointer-events:none;user-select:none;filter:drop-shadow(0 6px 10px rgba(20,60,140,.25))}
.dfcb-shadow{position:absolute;left:22%;right:22%;bottom:0;height:9%;border-radius:50%;background:radial-gradient(ellipse at center,rgba(15,40,90,.28),transparent 70%);transition:opacity .25s}
.dfcb-launcher-char:hover .dfcb-char{transform:translateY(-10%) scale(1.06)}
.dfcb-launcher-char:focus-visible{outline:2px solid var(--dfcb-c);outline-offset:4px;border-radius:12px}

/* 눈 깜빡임 · 별 반짝임 (기본 캐릭터 전용) */
.dfcb-lid{position:absolute;top:27.3%;width:10.6%;height:11.2%;border-radius:50%;background:#f4f8fc;opacity:0;pointer-events:none}
.dfcb-lid::after{content:"";position:absolute;left:12%;right:12%;top:46%;height:14%;border-radius:4px;background:#14244a}
.dfcb-lid-l{left:26.2%}
.dfcb-lid-r{left:55.2%}
.dfcb-spark{position:absolute;left:46%;top:71.7%;width:26%;height:26%;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.95) 0,rgba(255,255,255,.45) 22%,rgba(255,255,255,0) 62%);transform:translate(-50%,-50%) scale(.2);opacity:0;pointer-events:none}

.dfcb-anim .dfcb-char-in{animation:dfcb-float 3.2s ease-in-out infinite}
.dfcb-anim .dfcb-shadow{animation:dfcb-shadow 3.2s ease-in-out infinite}
.dfcb-anim .dfcb-lid{animation:dfcb-blink 4.6s infinite}
.dfcb-anim .dfcb-spark{animation:dfcb-spark 3.8s ease-in-out infinite 1s}
.dfcb-wave .dfcb-char{animation:dfcb-wiggle 1.5s ease-in-out}
@keyframes dfcb-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7%)}}
@keyframes dfcb-shadow{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.8);opacity:.6}}
@keyframes dfcb-blink{0%,91%,100%{opacity:0}93%,95%{opacity:1}}
@keyframes dfcb-spark{0%,62%,100%{opacity:0;transform:translate(-50%,-50%) scale(.2)}74%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(20deg)}86%{opacity:0;transform:translate(-50%,-50%) scale(.5)}}
@keyframes dfcb-wiggle{0%,100%{transform:rotate(0)}15%{transform:rotate(-9deg)}30%{transform:rotate(8deg)}45%{transform:rotate(-7deg)}60%{transform:rotate(5deg)}75%{transform:rotate(-2deg)}}

/* 열렸을 때: 캐릭터 → 닫기 버튼 */
.dfcb-x-btn{position:absolute;left:50%;bottom:8%;width:52px;height:52px;margin-left:-26px;padding:15px;border-radius:50%;background:var(--dfcb-c);color:#fff;box-shadow:0 8px 20px rgba(0,0,0,.2);opacity:0;transform:scale(.4) rotate(-90deg);transition:all .3s cubic-bezier(.34,1.56,.64,1);pointer-events:none}
.dfcb-open .dfcb-char{transform:translateY(20%) scale(.3);opacity:0}
.dfcb-open .dfcb-shadow{opacity:0}
.dfcb-open .dfcb-x-btn{opacity:1;transform:none}

/* 창 · 말풍선 위치 */
.dfcb-charmode .dfcb-panel{bottom:calc(var(--dfcb-csz) + 12px)}
.dfcb-charmode .dfcb-teaser{bottom:calc(var(--dfcb-csz) * .32)}
.dfcb-charmode.dfcb-left .dfcb-teaser{left:calc(var(--dfcb-csz) + 10px)}
.dfcb-charmode .dfcb-teaser::before{bottom:18px}
.dfcb-charmode.dfcb-left .dfcb-teaser::before{left:-6px}
.dfcb-charmode.dfcb-right .dfcb-teaser{left:auto;right:calc(var(--dfcb-csz) + 10px)}
.dfcb-charmode.dfcb-right .dfcb-teaser::before{left:auto;right:-6px}
.dfcb-charmode .dfcb-teaser{transform:translateX(-8px)}
.dfcb-charmode.dfcb-right .dfcb-teaser{transform:translateX(8px)}
.dfcb-charmode .dfcb-teaser.dfcb-show{transform:none}

/* 스크롤 중에는 말풍선 접기 */
.dfcb-root.dfcb-scrolling .dfcb-teaser.dfcb-show{opacity:0;visibility:hidden;transform:translateY(6px) scale(.96)}

/* 챗봇이 열려 있는 동안 DF 디자인 퀵메뉴 등 겹치는 요소 숨김 */
.dfcb-is-open .dfd-qm,.dfcb-is-open .dfd-qm-top,.dfcb-is-open #toTop,.dfcb-is-open .to-top-container{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

/* 모바일 */
@media (max-width:600px){
	.dfcb-no-mobile{display:none!important}
	.dfcb-root{bottom:var(--dfcb-my)}
	.dfcb-root.dfcb-right{right:var(--dfcb-mx)}
	.dfcb-root.dfcb-left{left:var(--dfcb-mx)}
	.dfcb-charmode{--dfcb-csz:calc(var(--dfcb-cs,88px) * .82)}
	.dfcb-charmode .dfcb-teaser{max-width:200px;font-size:13px;padding:10px 10px 10px 13px}
	.dfcb-launcher{height:52px;min-width:52px;padding:0 16px;font-size:14px}
	.dfcb-panel{position:fixed;inset:0;width:auto;height:auto;border-radius:0;bottom:0;padding-bottom:env(safe-area-inset-bottom)}
	.dfcb-open .dfcb-launcher,.dfcb-open .dfcb-teaser{display:none}
	.dfcb-body{padding:14px 12px 8px}
	.dfcb-msg{max-width:86%}
	.dfcb-input input{font-size:16px}
}
@media (prefers-reduced-motion:reduce){.dfcb-root *{animation:none!important;transition:none!important}}
