/* 2026-10-01 우하단 플로팅 — 카카오 상담 · 밴드 새 매물 알림 · 최근 본 매물 · 맨 위로
   데스크톱(1024+): 흰 세로 바 1개 + 아래 TOP. 태블릿·모바일: 하단 독 위에 원형 버튼 스택(라벨 숨김). */
.kh-float{position:fixed;right:24px;bottom:24px;z-index:94;display:flex;flex-direction:column;align-items:center;gap:10px;font-family:var(--font-sans)}
.kh-float__bar{display:flex;flex-direction:column;width:78px;padding:6px 0;background:#fff;border:1px solid var(--line,#e5e9f0);border-radius:20px;box-shadow:0 12px 32px rgba(15,23,42,.12),0 2px 6px rgba(15,23,42,.05)}
.kh-float__item{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;margin:0;padding:10px 4px 9px;border:0;background:none;color:#222630;font:inherit;font-size:12px;line-height:16px;font-weight:650;letter-spacing:-.3px;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.kh-float__item+.kh-float__item::before{content:"";position:absolute;top:0;left:14px;right:14px;height:1px;background:#eef0f4}
.kh-float__icon{position:relative;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;transition:transform .18s var(--ease,ease)}
.kh-float__icon svg{width:22px;height:22px;display:block}
.kh-float__item--kakao .kh-float__icon{background:#FEE500;color:#191919}
.kh-float__item--kakao .kh-float__icon svg{width:23px;height:23px}
.kh-float__item--band .kh-float__icon{background:#16B95B;color:#fff}
.kh-float__item--recent .kh-float__icon{background:var(--brand-soft,#F3EFFF);color:var(--brand,#693BF2)}
.kh-float__count{position:absolute;top:-4px;right:-7px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--brand,#693BF2);color:#fff;font-size:11px;line-height:19px;font-weight:750;text-align:center;box-shadow:0 0 0 2px #fff}
.kh-float__count[hidden]{display:none}
.kh-float__item:hover .kh-float__icon,.kh-float__item:focus-visible .kh-float__icon{transform:translateY(-2px)}
.kh-float__item:focus-visible{outline:2px solid var(--brand-focus,#AA89F7);outline-offset:-2px;border-radius:14px}
.kh-float__item[aria-expanded="true"] .kh-float__label{color:var(--brand,#693BF2)}

/* 데스크톱 툴팁: 마우스·키보드 포커스 시 왼쪽에 문구 */
.kh-float__tip{position:absolute;top:50%;right:calc(100% + 12px);transform:translate(6px,-50%);padding:8px 12px;border-radius:10px;background:#1f2430;color:#fff;font-size:13px;line-height:18px;font-weight:600;letter-spacing:-.2px;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease,transform .16s ease,visibility 0s linear .16s}
.kh-float__tip::after{content:"";position:absolute;top:50%;right:-5px;width:10px;height:10px;margin-top:-5px;background:inherit;transform:rotate(45deg);border-radius:2px}
.kh-float__item:hover .kh-float__tip,.kh-float__item:focus-visible .kh-float__tip,.kh-float__item.is-tip .kh-float__tip{opacity:1;visibility:visible;transform:translate(0,-50%);transition-delay:0s}
.kh-float.is-recent-open .kh-float__tip{display:none}

/* TOP: 플로팅 안으로 들어온 기존 버튼. 자리를 미리 잡아 두어 스크롤 시 다른 버튼이 튀지 않게 한다. */
body[data-form] .kh-float .kh-top-btn{position:static;inset:auto;display:flex;width:46px;height:46px;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility 0s linear .2s,transform .3s var(--ease,ease)}
body[data-form] .kh-float .kh-top-btn.is-on{opacity:1;visibility:visible;transition-delay:0s}

/* 최근 본 매물 패널 (데스크톱: 바 왼쪽 팝오버) */
.kh-recent{position:absolute;right:calc(100% + 14px);bottom:0;width:340px;max-height:min(560px,calc(100vh - 140px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#e5e9f0);border-radius:18px;box-shadow:0 20px 48px rgba(15,23,42,.16);overflow:hidden}
.kh-recent[hidden]{display:none}
.kh-recent__head{display:flex;align-items:center;gap:8px;padding:16px 14px 12px 18px;border-bottom:1px solid #eef0f4}
.kh-recent__title{flex:1;font-size:15px;line-height:22px;font-weight:750;color:var(--ink,#0f172a);letter-spacing:-.3px}
.kh-recent__title span{color:var(--brand,#693BF2)}
.kh-recent__clear{border:0;background:none;padding:4px 6px;color:var(--sub,#6b7280);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.kh-recent__clear:hover{color:var(--ink,#0f172a);text-decoration:underline}
.kh-recent__clear[hidden]{display:none}
.kh-recent__close{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;background:none;color:#4b5360;cursor:pointer}
.kh-recent__close:hover{background:#f3f4f7}
.kh-recent__close svg{width:18px;height:18px}
.kh-recent__list{margin:0;padding:6px 0;list-style:none;overflow-y:auto;overscroll-behavior:contain}
.kh-recent__item+.kh-recent__item{border-top:1px solid #f1f2f5}
.kh-recent__link{display:flex;flex-direction:column;gap:3px;padding:12px 18px;color:inherit;text-decoration:none}
.kh-recent__link:hover{background:var(--brand-wash,#FAF8FF)}
.kh-recent__link:hover .kh-recent__name{color:var(--brand-dark,#5527D5)}
.kh-recent__where{display:flex;align-items:center;gap:8px;color:#4b5360;font-size:12.5px;line-height:18px;font-weight:600}
.kh-recent__when{margin-left:auto;color:var(--faint,#9ca3af);font-size:12px;font-weight:500}
.kh-recent__name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#222630;font-size:14.5px;line-height:21px;font-weight:700;letter-spacing:-.3px}
.kh-recent__facts{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;color:#4b5360;font-size:13px;line-height:19px;font-weight:600}
.kh-recent__facts>span+span::before{content:"";display:inline-block;width:1px;height:10px;margin-right:10px;background:#d6d9e0;vertical-align:-1px}
.kh-recent__sold{font-style:normal;padding:0 6px;border-radius:4px;background:#f1f2f5;color:#6b7280;font-size:11.5px;font-weight:700}
.kh-recent__empty{margin:0;padding:28px 18px 30px;color:var(--sub,#6b7280);font-size:13.5px;line-height:21px;text-align:center}
.kh-recent__empty[hidden]{display:none}

/* 태블릿·모바일: 하단 독 위 원형 스택 */
@media (max-width:1023px){
  .kh-float{right:14px;bottom:calc(12px + var(--cta-h,0px));gap:8px}
  .kh-float__bar{width:auto;padding:0;gap:8px;background:none;border:0;border-radius:0;box-shadow:none}
  .kh-float__item{width:auto;padding:0}
  .kh-float__item+.kh-float__item::before{display:none}
  .kh-float__label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .kh-float__icon{width:46px;height:46px;box-shadow:0 6px 16px rgba(15,23,42,.18)}
  .kh-float__item--recent .kh-float__icon{background:#fff;border:1px solid var(--line,#e5e9f0)}
  .kh-float[data-recent-empty="1"] .kh-float__item--recent{display:none}
  .kh-float__tip{display:none}
  .kh-float__item.is-tip .kh-float__tip{display:block}
  .kh-float__item:hover .kh-float__icon{transform:none}
  .kh-recent{position:fixed;left:12px;right:12px;bottom:calc(12px + var(--cta-h,0px));width:auto;max-height:min(70vh,520px);z-index:96}
}
@media (max-width:1023px) and (hover:hover){.kh-float__item:hover .kh-float__tip{display:none}}
@media (prefers-reduced-motion:reduce){.kh-float__icon,.kh-float__tip,body[data-form] .kh-float .kh-top-btn{transition:none}}
@media print{.kh-float{display:none!important}}

/* 2026-10-01 밴드 버튼: BAND 앱 아이콘(그린 라운드 사각 + 흰 b) 그대로 보이게 / 최근 본 매물은 비어 있어도 항상 노출 */
.kh-float__item--band .kh-float__icon,.kh-float__item--band .kh-float__icon--band{background:none;color:inherit;border-radius:12px;box-shadow:none}
.kh-float__item--band .kh-float__icon svg{width:40px;height:40px;border-radius:11px}
.kh-float__item--band .kh-float__label{color:#16a12a}
@media (max-width:1023px){
  .kh-float__item--band .kh-float__icon{width:46px;height:46px;border-radius:14px;box-shadow:0 6px 16px rgba(15,23,42,.18)}
  .kh-float__item--band .kh-float__icon svg{width:46px;height:46px;border-radius:14px}
  .kh-float[data-recent-empty="1"] .kh-float__item--recent{display:flex}
}
/* 2026-10-01 네이버 톡톡 (카톡 상담 위) */
.kh-float__item--talk .kh-float__icon{background:#03C75A;color:#fff}
.kh-float__item--talk .kh-float__icon svg{width:23px;height:23px}

/* 2026-10-03 카톡 상담 말풍선 — 더현대 서울 우하단 AI 말풍선 실측값
   흰 배경 · 1px 연회색 테두리 · radius 16 · padding 12/16 · 최대폭 240 · 14px/1.375 500 · shadow-lg
   닫기 20px 회색(#808080) 원 · 우상단 -8px / 꼬리 12px 사각 -45° 회전 · 문구 3초 주기, 퇴장 위로 8px·등장 아래 8px 페이드
   세로 위치(top)는 khan-float.js 가 카톡 아이콘 중심에 맞춘다. */
.kh-float-bubble{position:absolute;right:calc(100% + 14px);top:0;z-index:1;max-width:240px;width:max-content;padding:12px 16px;background:#fff;border:1px solid #f0f0f0;border-radius:16px;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);opacity:0;transform:translate(8px,-50%) scale(.96);transform-origin:right center;transition:opacity .3s ease,transform .35s var(--ease,ease)}
.kh-float-bubble[hidden]{display:none}
.kh-float-bubble.is-on{opacity:1;transform:translate(0,-50%) scale(1)}
.kh-float-bubble__msg{display:block;color:var(--ink,#0f172a);text-decoration:none;-webkit-tap-highlight-color:transparent}
.kh-float-bubble__text{display:block;font-size:14px;line-height:1.375;font-weight:500;letter-spacing:-.2px;text-align:left;transition:opacity .3s ease-out,transform .3s ease-out}
.kh-float-bubble__text.is-out{opacity:0;transform:translateY(-8px);transition:opacity .25s ease-in,transform .25s ease-in}
.kh-float-bubble__text.is-in{opacity:0;transform:translateY(8px);transition:none}
.kh-float-bubble__msg:focus-visible{outline:2px solid var(--brand-focus,#AA89F7);outline-offset:6px;border-radius:8px}
.kh-float-bubble__close{position:absolute;top:-8px;right:-8px;z-index:2;display:grid;place-items:center;width:20px;height:20px;margin:0;padding:0;border:0;border-radius:50%;background:#808080;color:#fff;cursor:pointer;transition:background-color .15s ease}
.kh-float-bubble__close::before{content:"";position:absolute;inset:-10px}
.kh-float-bubble__close:hover{background:#4b4b4b}
.kh-float-bubble__close:focus-visible{outline:2px solid var(--brand-focus,#AA89F7);outline-offset:2px}
.kh-float-bubble__close svg{width:10px;height:10px;display:block}
.kh-float-bubble__tail{position:absolute;top:50%;right:-7px;width:12px;height:12px;margin-top:-6px;background:#fff;border-right:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;transform:rotate(-45deg);pointer-events:none}
/* 말풍선이 떠 있는 동안 카톡 버튼 hover 툴팁은 같은 자리라 숨긴다 / 최근 본 매물 패널이 열리면 말풍선도 숨긴다 */
.kh-float.has-bubble .kh-float__item--kakao .kh-float__tip{display:none}
.kh-float.is-recent-open .kh-float-bubble{display:none}
@media (max-width:1023px){
  .kh-float-bubble{right:calc(100% + 12px);max-width:min(240px,calc(100vw - 100px))}
}
@media (prefers-reduced-motion:reduce){
  .kh-float-bubble,.kh-float-bubble__text,.kh-float-bubble__text.is-out{transition:none}
}

/* 2026-10-04 모바일·태블릿 플로팅 순서(위→아래): 최근 본 매물 › 밴드 › 카톡 상담 › 맨 위로(TOP은 바 밖, 항상 마지막).
   마크업은 그대로 두고 flex order 로만 바꾼다(데스크톱 세로 바 순서는 유지). 톡톡이 다시 켜지면 카톡 아래로 간다. */
@media (max-width:1023px){
  .kh-float__item--recent{order:1}
  .kh-float__item--band{order:2}
  .kh-float__item--kakao{order:3}
  .kh-float__item--talk{order:4}
  /* 모바일 말풍선: 3~8초 뒤 잠깐 나타나고 사라진다(khan-float.js). 꼬리 위치는 place()가 카톡 아이콘 중심으로 맞춘다. */
  .kh-float-bubble{transition:opacity .28s ease,transform .32s var(--ease,ease)}
}

/* 2026-10-04 모바일·태블릿: 메인 퀵메뉴 위에 겹치는 동안 버튼 묶음 숨김(khan-float.js .is-tucked).
   khan-mobile-dock.css 의 bottom 전환(하단 바 따라 내려감)도 함께 유지한다. */
@media (max-width:1023px){
  .kh-float{transition:bottom .32s cubic-bezier(.2,.7,.2,1),opacity .24s ease,transform .28s cubic-bezier(.2,.7,.2,1),visibility 0s linear 0s}
  .kh-float.is-tucked{opacity:0;visibility:hidden;transform:translateX(14px);pointer-events:none;transition:bottom .32s cubic-bezier(.2,.7,.2,1),opacity .2s ease,transform .24s ease,visibility 0s linear .24s}
}
@media (max-width:1023px) and (prefers-reduced-motion:reduce){.kh-float,.kh-float.is-tucked{transition:none}}

/* 2026-10-04 모바일 버벅임 개선: 버튼 묶음 이동을 translate(합성 레이어)로만 한다.
   - 하단 바가 숨으면(--kh-fy) 아래로, 퀵메뉴와 겹치면(--kh-fx) 오른쪽으로 살짝 + 페이드.
   - 루트(.kh-float)에는 transform 을 걸지 않는다: 안의 '최근 본 매물' 패널(position:fixed)이 화면 기준을 잃지 않게.
   - 말풍선 위치(top)는 khan-float.js place() 가 레이아웃 좌표(offsetTop)로 잡고, 같은 translate 로 함께 움직인다. */
@media (max-width:1023px){
  .kh-float{--kh-fx:0px;--kh-fy:0px;transition:opacity .22s ease,visibility 0s linear 0s;transform:none}
  body.kh-dock-hidden .kh-float{--kh-fy:calc(var(--cta-h,0px) - 2px - env(safe-area-inset-bottom))}
  .kh-float.is-tucked{--kh-fx:14px;opacity:0;visibility:hidden;pointer-events:none;transform:none;transition:opacity .2s ease,visibility 0s linear .2s}
  .kh-float__bar{translate:var(--kh-fx) var(--kh-fy);transition:translate .3s cubic-bezier(.2,.7,.2,1);will-change:transform}
  .kh-float-bubble{translate:var(--kh-fx) var(--kh-fy);transition:opacity .28s ease,transform .32s var(--ease,ease),translate .3s cubic-bezier(.2,.7,.2,1)}
}
/* translate 속성 미지원(아주 오래된 브라우저): 예전처럼 bottom 으로(전환 없이) */
@supports not (translate:0 0){
  @media (max-width:1023px){body.kh-dock-hidden .kh-float{bottom:calc(14px + env(safe-area-inset-bottom))}}
}
@media (max-width:1023px) and (prefers-reduced-motion:reduce){.kh-float__bar,.kh-float-bubble{transition:none}}
