/* AI 상담 창(2026-11-04, 설계안 docs/ai-chat-plan-2026-11-03.html) — 오른쪽 아래 버튼, 누를 때만 열림, 머리 × 왼쪽에 견적 문의·직원 연결 */
#hsChat{--hc-ink:#141827;--hc-navy:#1b1f3a;--hc-blue:#2e5bff;--hc-blue2:#dfe6ff;--hc-soft:#f5f6fa;--hc-line:#e4e6ee;--hc-sub:#6b7080;
  position:fixed;right:24px;bottom:24px;z-index:1000;font-size:15px;line-height:1.6;color:var(--hc-ink);letter-spacing:-.01em}
#hsChat *{box-sizing:border-box}
#hsChat button{font:inherit;cursor:pointer}

/* 별 — 대기 · 열 때 · 작성 중 */
.hc-spark{overflow:visible}
.hc-spark .s1,.hc-spark .s2,.hc-spark .s3{transform-box:view-box}
.hc-spark .s1{transform-origin:12px 9px;animation:hcS1 2.4s cubic-bezier(.45,0,.2,1) infinite}
.hc-spark .s2{transform-origin:19px 17.5px;animation:hcS2 2.4s ease-in-out .5s infinite}
.hc-spark .s3{transform-origin:5px 18px;animation:hcS3 2.4s ease-in-out 1.1s infinite}
@keyframes hcS1{0%,100%{transform:scale(1) rotate(0)}40%{transform:scale(1.16) rotate(14deg)}62%{transform:scale(.95) rotate(0)}}
@keyframes hcS2{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.35);opacity:.35}}
@keyframes hcS3{0%,25%,100%{transform:scale(0);opacity:0}55%{transform:scale(1);opacity:1}80%{transform:scale(.4);opacity:.4}}
.hc-spark.busy .s1{animation:hcSpin 1.1s cubic-bezier(.6,0,.4,1) infinite}
.hc-spark.busy .s2,.hc-spark.busy .s3{animation-duration:.8s}
@keyframes hcSpin{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(.82)}100%{transform:rotate(360deg) scale(1)}}

.hc-lg{position:relative;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#fff;border:1px solid var(--hc-line);flex:none}
.hc-lg img{width:26px;height:26px}
.hc-lg .hc-b{position:absolute;right:-5px;bottom:-5px;display:grid;place-items:center;width:20px;height:20px;border-radius:7px;background:var(--hc-blue);box-shadow:0 0 0 2px #fff}
.hc-lg .hc-b svg{width:13px;height:13px}

/* 버튼 */
.hc-fab{position:relative;display:flex;align-items:center;gap:10px;height:58px;padding:0 20px 0 8px;margin-left:auto;border:0;border-radius:999px;
  background:var(--hc-navy);color:#fff;font-size:15.5px;font-weight:700;box-shadow:0 12px 30px rgba(20,24,39,.28);
  transition:width .26s cubic-bezier(.2,.8,.2,1),padding .26s,background .2s}
.hc-fab:hover{background:var(--hc-blue)}
.hc-fab .hc-lg{width:42px;height:42px;border-radius:50%;border:0}
.hc-fab .hc-lg .hc-b{right:-4px;bottom:-4px;width:18px;height:18px;border-radius:6px;box-shadow:0 0 0 2px var(--hc-navy)}
.hc-fab .hc-lg .hc-b svg{width:12px;height:12px}
.hc-fab .hc-x{display:none;font-size:28px;font-weight:400;line-height:1}
#hsChat.open .hc-fab{width:58px;padding:0;justify-content:center}
#hsChat.open .hc-fab .hc-lg,#hsChat.open .hc-fab .hc-t{display:none}
#hsChat.open .hc-fab .hc-x{display:block}
.hc-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#ff3b30;color:#fff;font-size:12px;font-weight:800;line-height:20px;text-align:center}
.hc-peek{position:absolute;right:0;bottom:70px;width:280px;padding:12px 14px;border-radius:14px;background:#fff;box-shadow:0 12px 30px rgba(20,24,39,.18);font-size:14px;cursor:pointer}
.hc-peek b{display:block;font-size:12.5px;color:var(--hc-sub)}

/* 대화창 */
.hc-panel{position:absolute;right:0;bottom:72px;width:400px;height:min(640px,calc(100vh - 120px));display:flex;flex-direction:column;overflow:hidden;
  border-radius:20px;background:#fff;box-shadow:0 24px 60px rgba(20,24,39,.22),0 0 0 1px rgba(20,24,39,.06);
  transform-origin:bottom right;transform:scale(.6) translateY(20px);opacity:0;pointer-events:none;
  transition:transform .26s cubic-bezier(.2,.8,.2,1),opacity .2s}
#hsChat.open .hc-panel{transform:none;opacity:1;pointer-events:auto}
#hsChat.instant .hc-panel,#hsChat.instant .hc-fab{transition:none}

.hc-head{display:flex;align-items:center;gap:8px;padding:14px 12px 14px 16px;border-bottom:1px solid var(--hc-line)}
.hc-head .hc-who{flex:1;min-width:0}
.hc-head .hc-who b{display:block;font-size:15.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-tag{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:6px;background:var(--hc-blue2);color:var(--hc-blue);font-size:11.5px;font-weight:700;vertical-align:2px}
.hc-tag.staff{background:var(--hc-soft);color:var(--hc-navy)}
.hc-head small{display:block;font-size:12.5px;color:var(--hc-sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px;vertical-align:1px;background:#f0a020}
.hc-dot.on{background:#22b35e}
.hc-hb{flex:none;padding:5px 9px;border:1px solid #cdd3e3;border-radius:999px;background:#fff;color:var(--hc-navy);font-size:11.5px!important;font-weight:700;white-space:nowrap}
.hc-hb.q{background:var(--hc-soft);border-color:var(--hc-soft);color:var(--hc-ink)}
.hc-hb:hover{border-color:var(--hc-navy)}
.hc-hb.wait::before,.hc-hb.on::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:5px;vertical-align:1px;background:#f0a020}
.hc-hb.on::before{background:#22b35e}
.hc-icon{flex:none;width:28px;height:28px;border:0;border-radius:8px;background:none;color:#a2a7b5;font-size:20px;line-height:1}
.hc-icon:hover{background:var(--hc-soft);color:var(--hc-ink)}
.hc-menu{position:absolute;top:56px;right:44px;z-index:2;padding:6px;border-radius:12px;background:#fff;box-shadow:0 12px 30px rgba(20,24,39,.18)}
.hc-menu button{display:block;width:100%;padding:8px 12px;border:0;border-radius:8px;background:none;text-align:left;font-size:14px}
.hc-menu button:hover{background:var(--hc-soft)}

.hc-body{flex:1;overflow-y:auto;padding:20px 18px;display:flex;flex-direction:column;gap:14px;overscroll-behavior:contain}
.hc-m{max-width:100%;white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere;animation:hcIn .22s ease-out}
@keyframes hcIn{from{opacity:0;transform:translateY(6px)}}
.hc-m.ai,.hc-m.staff{position:relative;padding-left:40px;align-self:flex-start}
.hc-m.ai::before,.hc-m.staff::before{content:"";position:absolute;left:0;top:1px;width:28px;height:28px;border-radius:9px;border:1px solid var(--hc-line);background:#fff url(https://d36g2rk6qhlg3p.cloudfront.net/hrmsoft/static/img/ic_logo.webp) center/18px no-repeat}
.hc-m.staff::before{content:"담당";display:grid;place-items:center;font-size:10px;font-weight:800;color:#fff;background:var(--hc-navy);border-color:var(--hc-navy)}
.hc-m.staff .hc-nm{display:block;font-size:12px;color:var(--hc-sub);font-weight:700;margin-bottom:2px}
.hc-m.user{align-self:flex-end;max-width:84%;padding:10px 15px;border-radius:18px 18px 4px 18px;background:var(--hc-navy);color:#fff;font-size:14.5px}
.hc-m.user .hc-via{display:block;font-size:10.5px;opacity:.6;text-align:right}
.hc-m.system{align-self:center;max-width:92%;padding:8px 14px;border-radius:12px;background:var(--hc-soft);color:#4a4f5f;font-size:13.5px;text-align:center}
.hc-m.recalled{color:#a2a7b5;font-style:italic}
.hc-edited{font-size:11px;color:#a2a7b5;margin-left:6px}
.hc-at{display:block;font-size:11px;color:#a2a7b5;margin-top:2px}
.hc-m.user .hc-at{color:rgba(255,255,255,.5);text-align:right}
.hc-div{display:flex;align-items:center;gap:10px;color:#a2a7b5;font-size:12px}
.hc-div::before,.hc-div::after{content:"";flex:1;height:1px;background:var(--hc-line)}
.hc-typing{display:flex;align-items:center;gap:8px;padding-left:40px;position:relative;color:var(--hc-sub);font-size:13px}
.hc-typing .hc-av{position:absolute;left:0;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--hc-blue)}
.hc-typing .hc-av svg{width:18px;height:18px}

.hc-chips{display:flex;flex-wrap:wrap;gap:8px;padding-left:40px;margin-top:-4px}
.hc-chips.center{justify-content:center;padding-left:0}
.hc-chip{padding:8px 14px;border:1px solid #cdd3e3;border-radius:999px;background:#fff;color:var(--hc-navy);font-size:13.5px!important;font-weight:600;transition:background .15s,border-color .15s}
.hc-chip:hover{border-color:var(--hc-navy)}
.hc-chip.on{background:var(--hc-navy);border-color:var(--hc-navy);color:#fff}
.hc-chip.etc{border-style:dashed;color:var(--hc-sub)}
.hc-chip.done{background:var(--hc-blue);border-color:var(--hc-blue);color:#fff}
.hc-chip.done:disabled{opacity:.45;cursor:default}
.hc-chips.gone .hc-chip{opacity:.35;pointer-events:none}

.hc-card{align-self:stretch;padding:14px;border:1px solid var(--hc-line);border-radius:14px;background:#fff;display:flex;flex-direction:column;gap:8px}
.hc-card label{font-size:12px;color:var(--hc-sub);font-weight:600}
.hc-card input[type=text],.hc-card input[type=tel]{width:100%;height:38px;padding:0 10px;border:1px solid var(--hc-line);border-radius:8px;font:inherit;font-size:14px}
.hc-card input:focus{outline:0;border-color:var(--hc-blue)}
.hc-two{display:flex;gap:6px}.hc-two>*{flex:1;min-width:0}
.hc-seg{display:flex;gap:6px}
.hc-seg button{flex:1;padding:7px 0;border:1px solid var(--hc-line);border-radius:8px;background:#fff;font-size:13px!important;font-weight:600;color:var(--hc-sub)}
.hc-seg button.on{background:var(--hc-navy);border-color:var(--hc-navy);color:#fff}
.hc-agree{display:flex;gap:6px;align-items:flex-start;font-size:12.5px}
.hc-agree small{display:block;color:var(--hc-sub)}
.hc-submit{padding:11px 0;border:0;border-radius:10px;background:var(--hc-navy);color:#fff;font-weight:700}
.hc-submit:disabled{opacity:.5}
.hc-skip{border:0;background:none;color:var(--hc-sub);font-size:12.5px!important;text-decoration:underline;text-underline-offset:3px}
.hc-err{color:#d93025;font-size:12.5px}

.hc-sc{display:flex;gap:6px;padding:8px 16px 0}
.hc-sc a{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px 0 10px;border-radius:999px;background:var(--hc-soft);color:#4a4f5f;font-size:12.5px;font-weight:600;text-decoration:none}
.hc-sc a:hover{background:var(--hc-blue2);color:var(--hc-navy)}
.hc-input{display:flex;align-items:flex-end;gap:8px;padding:10px 14px 8px}
.hc-input textarea{flex:1;min-height:42px;max-height:120px;padding:10px 12px;border:1px solid var(--hc-line);border-radius:12px;font:inherit;font-size:14.5px;line-height:1.45;resize:none}
.hc-input textarea:focus{outline:0;border-color:var(--hc-blue)}
.hc-clip{flex:none;width:36px;height:42px;border:0;border-radius:10px;background:none;color:#7d8496;font-size:22px!important;line-height:1}
.hc-clip:hover{background:var(--hc-soft);color:var(--hc-ink)}
.hc-img{display:block;max-width:240px;max-height:240px;border-radius:12px;margin:4px 0;border:1px solid var(--hc-line)}
.hc-m audio{display:block;max-width:240px;margin:4px 0}
.hc-file{display:inline-block;margin-top:2px;padding:6px 10px;border-radius:10px;background:var(--hc-soft);color:var(--hc-navy);font-size:13px;text-decoration:none;word-break:break-all}
.hc-m.user .hc-file{background:rgba(255,255,255,.14);color:#fff}
.hc-cap{display:block;margin-top:4px}
.hc-send{flex:none;width:42px;height:42px;border:0;border-radius:12px;background:var(--hc-navy);color:#fff;font-size:17px}
.hc-send:disabled{opacity:.4}
.hc-note{padding:0 16px 10px;font-size:11px;color:#a2a7b5;text-align:center}
.hc-note button{border:0;background:none;padding:0;margin-left:4px;color:#7d8496;font-size:11px!important;text-decoration:underline;text-underline-offset:2px}

@media (max-width:640px){
  #hsChat{right:14px;bottom:14px}
  .hc-fab{height:52px;font-size:14.5px}
  .hc-panel{position:fixed;inset:0;width:auto;height:auto;border-radius:0;transform:translateY(30px)}
  #hsChat.open .hc-fab{display:none}
  .hc-head{padding:12px}
  .hc-head .hc-who small{display:none}
}
@media (prefers-reduced-motion:reduce){.hc-spark *{animation:none!important}.hc-panel,.hc-fab{transition:none}}
