#kttd-btn{position:fixed;right:22px;top:50%;transform:translateY(-50%);width:60px;height:60px;border-radius:50%;
  background:#dc834e;color:#fff;border:0;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.25);
  font-size:26px;z-index:99998;display:flex;align-items:center;justify-content:center}
#kttd-btn:hover{background:#c46b36}
#kttd-btn.kttd-attn::after{content:'';position:absolute;left:0;top:0;right:0;bottom:0;border-radius:50%;
  pointer-events:none;animation:kttdpulse 2.2s ease-out infinite}
@keyframes kttdpulse{0%{box-shadow:0 0 0 0 rgba(158,11,15,.45)}70%{box-shadow:0 0 0 18px rgba(158,11,15,0)}100%{box-shadow:0 0 0 0 rgba(158,11,15,0)}}
#kttd-nudge{position:fixed;right:92px;top:50%;transform:translateY(-50%);width:250px;max-width:calc(100vw - 120px);background:#fff;
  border:1px solid #eee;border-radius:14px;box-shadow:0 8px 26px rgba(0,0,0,.2);padding:12px 32px 12px 12px;
  display:none;gap:9px;z-index:99997;cursor:pointer;
  font-family:'Noto Sans KR','Malgun Gothic','Apple SD Gothic Neo',sans-serif}
#kttd-nudge.show{display:flex;animation:kttdpop .28s ease}
@keyframes kttdpop{from{opacity:0}to{opacity:1}}
#kttd-nudge .kttd-n-av{width:30px;height:30px;flex:0 0 30px;border-radius:50%;background:#dc834e;color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}
#kttd-nudge .kttd-n-txt{font-size:13px;line-height:1.55;color:#222}
#kttd-nudge .kttd-n-x{position:absolute;top:6px;right:8px;background:transparent;border:0;font-size:16px;color:#999;cursor:pointer;line-height:1}
#kttd-panel{position:fixed;right:22px;top:50%;transform:translateY(-50%);width:360px;max-width:calc(100vw - 32px);
  height:70vh;max-height:560px;background:#f5f4f1;border-radius:14px;overflow:hidden;
  box-shadow:0 10px 34px rgba(0,0,0,.28);z-index:99999;display:none;flex-direction:column;
  font-family:'Noto Sans KR','Malgun Gothic','Apple SD Gothic Neo',sans-serif}
#kttd-panel.open{display:flex}
#kttd-head{background:#dc834e;color:#fff;padding:12px 14px;display:flex;align-items:center;gap:9px}
#kttd-head .av{width:30px;height:30px;border-radius:50%;background:#fff;color:#a8551f;
  display:flex;align-items:center;justify-content:center;font-weight:700}
#kttd-head .t{font-size:14px;font-weight:700;line-height:1.2}
#kttd-head .s{font-size:11px;opacity:.85}
#kttd-head .x{background:transparent;border:0;color:#fff;font-size:20px;cursor:pointer}
#kttd-actions{display:flex;gap:6px;padding:8px 10px;background:#fff;border-bottom:1px solid #eee}
.kttd-a{flex:1;text-align:center;padding:7px 4px;border-radius:8px;font-size:12px;text-decoration:none;
  color:#a8551f;border:1px solid #f0dbc9;background:#fdf4ee;font-weight:600;white-space:nowrap}
.kttd-a:hover{background:#f9e9dc}
#kttd-msgs{flex:1;overflow-y:auto;padding:14px}
.kttd-m{margin:9px 0;display:flex;gap:7px;align-items:flex-end}
.kttd-m .av{width:26px;height:26px;border-radius:50%;flex:0 0 26px;display:flex;align-items:center;
  justify-content:center;font-size:13px;background:#dc834e;color:#fff}
.kttd-m .b{max-width:80%;padding:9px 11px;border-radius:12px;font-size:14px;line-height:1.6;
  white-space:pre-wrap;background:#fff;border:1px solid #eee;border-bottom-left-radius:3px;color:#222}
.kttd-m.me{flex-direction:row-reverse}
.kttd-m.me .av{background:#c0906f}
.kttd-m.me .b{background:#f7f0e9;border-bottom-right-radius:3px;border-color:#eadfd4}
.kttd-m .b a{color:#a8551f;text-decoration:underline;word-break:break-all}
.kttd-m.typing .b{color:#999;font-style:italic}
#kttd-in{display:flex;gap:7px;padding:10px;border-top:1px solid #e2e0db;background:#fff}
#kttd-in input{flex:1;padding:10px;border:1px solid #ccc;border-radius:20px;font-size:14px}
#kttd-in button{background:#dc834e;color:#fff;border:0;border-radius:20px;padding:0 16px;font-size:14px;cursor:pointer}
#kttd-in button:disabled{opacity:.5}
#kttd-handoff{display:none;border-top:1px solid #e2e0db;background:#fff}
#kttd-handoff.show{display:block}
#kttd-handoff .kttd-h-bar{display:flex;align-items:center;gap:8px;padding:9px 10px}
#kttd-handoff .kttd-h-q{flex:1;font-size:12.5px;color:#444;line-height:1.4}
#kttd-handoff .kttd-h-open{background:#dc834e;color:#fff;border:0;border-radius:16px;padding:7px 13px;
  font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
#kttd-handoff .kttd-h-open:hover{background:#c46b36}
#kttd-handoff .kttd-h-form{display:none;padding:0 10px 10px}
#kttd-handoff.form-open .kttd-h-form{display:block}
#kttd-handoff.form-open .kttd-h-bar{display:none}
#kttd-handoff .kttd-h-form input{width:100%;box-sizing:border-box;padding:9px 11px;margin-bottom:6px;
  border:1px solid #ccc;border-radius:8px;font-size:13.5px;
  font-family:'Noto Sans KR','Malgun Gothic','Apple SD Gothic Neo',sans-serif}
#kttd-handoff .kttd-h-form input:focus{outline:0;border-color:#dc834e}
#kttd-handoff .kttd-h-row{display:flex;gap:6px;margin-top:2px}
#kttd-handoff .kttd-h-cancel{flex:0 0 78px;background:#f3f1ee;color:#555;border:1px solid #ddd;
  border-radius:8px;padding:8px 0;font-size:12.5px;cursor:pointer}
#kttd-handoff .kttd-h-send{flex:1;background:#dc834e;color:#fff;border:0;border-radius:8px;
  padding:8px 0;font-size:13px;font-weight:600;cursor:pointer}
#kttd-handoff .kttd-h-send:hover{background:#c46b36}
#kttd-handoff .kttd-h-send:disabled,#kttd-handoff .kttd-h-cancel:disabled{opacity:.5;cursor:default}
#kttd-handoff .kttd-h-note{margin-top:8px;font-size:11px;line-height:1.55;color:#888}
#kttd-handoff .kttd-h-msg{margin-top:6px;font-size:11.5px;line-height:1.5;color:#a8551f;min-height:0}
.kttd-m .b .kttd-say{display:block;width:-moz-fit-content;width:fit-content;
  margin-top:10px;padding:7px 15px;border:1px solid #f0dbc9;
  background:#fdf4ee;color:#a8551f;border-radius:16px;font-size:12px;font-weight:600;cursor:pointer;
  line-height:1.3;white-space:nowrap;text-align:center;
  font-family:'Noto Sans KR','Malgun Gothic','Apple SD Gothic Neo',sans-serif}
.kttd-m .b .kttd-say:hover{background:#f9e9dc}
.kttd-m .b .kttd-say.on{background:#dc834e;color:#fff;border-color:#dc834e}
.kttd-m .b .kttd-say.wait{background:#f9e9dc;color:#a8551f;border-color:#f0dbc9;opacity:.75;cursor:default}
#kttd-head .z{margin-left:auto;margin-right:3px;background:transparent;border:0;color:#fff;cursor:pointer;
  padding:2px 4px;line-height:1;display:flex;align-items:center;opacity:.9}
#kttd-head .z:hover{opacity:1}
#kttd-panel input,#kttd-panel button,#kttd-panel textarea,#kttd-panel select{font-family:inherit}
#kttd-head .z .i-sml{display:none}
#kttd-panel.big #kttd-head .z .i-big{display:none}
#kttd-panel.big #kttd-head .z .i-sml{display:block}
#kttd-panel.big{width:820px;max-width:calc(100vw - 44px);height:86vh;max-height:none}
#kttd-panel.big .kttd-m .b{max-width:70%}
@media (max-width:640px){#kttd-head .z{display:none}#kttd-head .x{margin-left:auto}}
