:root {
  --blue: #E2672C; --blue-d: #B44B18; --blue-l: #FFF0E4; --apricot: #F7934C; --cream: #FFF8F1;
  --text: #191f28; --sub: #4e5968; --gray: #8b95a1; --gray2: #b0b8c1; --line: #e5e8eb; --bg: #f2f4f6; --hover: #f9fafb;
  --green: #00b493; --green-l: #e5f8f3; --yellow: #f5a300; --yellow-l: #fff6e0; --red: #f04452; --red-l: #ffeeee; --purple: #8b5cf6; --purple-l: #f3f0ff;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  --top: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; } /* 화면 고정 레이아웃: 채팅·위키만 안에서 스크롤 */
body { font-family: Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; color: var(--text); background: #fff; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* 상단 */
#top { height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid #eef0f2; background: #fff; position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.brand .mark { width: 32px; height: 32px; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.brand .en { font-size: 12px; font-weight: 800; color: var(--blue); letter-spacing: .06em; }
.proto { font-size: 10.5px; font-weight: 700; color: #ff8a00; background: #fff4e6; padding: 2px 7px; border-radius: 6px; }
.tag { margin: 0; color: var(--gray); font-size: 13.5px; font-weight: 600; flex: 1; }
.btn-ghost { height: 36px; border: 0; border-radius: 10px; background: var(--bg); padding: 0 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.btn-ghost:hover { background: #e5e8eb; }

/* 본문: 왼쪽 채팅 + 오른쪽 지도/위키 */
#app { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); }
#chat { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #eef0f2; background: #fff; }
#log { flex: 1; overflow-y: auto; padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 14px; }
#side { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

/* 시작 화면 */
.welcome { margin: auto 0; padding: 12px 4px 20px; }
.welcome .hello { font-size: 26px; font-weight: 800; line-height: 1.38; letter-spacing: -.035em; }
.welcome .hello span { color: var(--blue); }
.welcome p { color: var(--sub); line-height: 1.65; margin: 12px 0 20px; font-size: 15px; }
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ex { text-align: left; border: 0; background: var(--bg); border-radius: 14px; padding: 13px 14px; cursor: pointer; font-weight: 600; font-size: 14.5px; display: flex; gap: 10px; align-items: center; transition: background .15s, transform .15s var(--ease); }
.ex:hover { background: #e8ebee; } .ex:active { transform: scale(.98); }
.ex span { font-size: 18px; }
.welcome .facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.welcome .facts span { font-size: 12px; font-weight: 600; color: var(--gray); background: var(--hover); border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px; }

/* 말풍선 */
.m { max-width: 92%; animation: msgIn .35s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.m.me { align-self: flex-end; background: var(--blue); color: #fff; padding: 11px 15px; border-radius: 18px 18px 4px 18px; font-size: 15px; line-height: 1.55; }
.m.me img { display: block; max-width: 180px; border-radius: 10px; margin-bottom: 6px; }
.m.bot { align-self: flex-start; width: 100%; }
.bot-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.bot-h .av { width: 26px; height: 26px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.bot-t { font-size: 15px; line-height: 1.7; color: #333d4b; }
.bot-t p { margin: 0 0 8px; } .bot-t ul, .bot-t ol { margin: 4px 0 8px; padding-left: 20px; } .bot-t li { margin: 2px 0; }
.bot-t blockquote { margin: 8px 0; padding: 12px 14px; background: var(--hover); border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0; font-size: 14px; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray2); animation: blink 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .3; transform: translateY(-2px); } }
.thinking { font-size: 12.5px; color: var(--gray); margin-top: 2px; }

/* 되묻기 버튼 · 후속 질문 */
.ask { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ask button { border: 1.5px solid var(--blue); background: #fff; color: var(--blue); border-radius: 12px; padding: 8px 13px; font-weight: 700; font-size: 14px; cursor: pointer; transition: background .15s; }
.ask button:hover { background: var(--blue-l); }
.ask.done button { border-color: var(--line); color: var(--gray2); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button { border: 0; background: var(--bg); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chips button:hover { background: #e5e8eb; }

/* 판정 카드 (색 + 아이콘 + 문구 3중 표시) */
.card { margin-top: 10px; border-radius: 18px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.jc-top { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.jc-top.green { background: var(--green-l); } .jc-top.yellow { background: var(--yellow-l); } .jc-top.red { background: var(--red-l); }
.jc-light { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; flex: none; color: #fff; font-weight: 800; }
.green .jc-light { background: var(--green); } .yellow .jc-light { background: var(--yellow); } .red .jc-light { background: var(--red); }
.jc-top b { font-size: 19px; } .jc-top .sub { font-size: 13px; color: var(--sub); margin-top: 2px; }
.jc-body { padding: 14px 18px 16px; }
.scale { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--green) 0 50%, var(--yellow) 50% 75%, var(--red) 75%); margin: 22px 0 26px; }
.scale .pin { position: absolute; top: -20px; transform: translateX(-50%); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.scale .pin::after { content: ''; position: absolute; left: 50%; top: 16px; width: 3px; height: 18px; margin-left: -1.5px; background: var(--text); border-radius: 2px; }
.scale .lab { position: absolute; top: 14px; transform: translateX(-50%); font-size: 11px; color: var(--gray); white-space: nowrap; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv div { background: var(--hover); border-radius: 12px; padding: 10px 12px; } .kv span { display: block; font-size: 11.5px; color: var(--gray); font-weight: 600; } .kv b { font-size: 15.5px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--gray); }
.meta span { background: var(--hover); border-radius: 7px; padding: 3px 8px; }
.meta .conf-A { color: var(--green); font-weight: 700; } .meta .conf-B { color: var(--yellow); font-weight: 700; } .meta .conf-C { color: var(--red); font-weight: 700; }
.lvl { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid #f2f4f6; }
.lvl:first-child { border-top: 0; }
.lvl .ic { font-size: 18px; } .lvl b { display: block; font-size: 14.5px; } .lvl p { margin: 3px 0 6px; font-size: 13.5px; color: var(--sub); line-height: 1.55; }
.lvl ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--sub); line-height: 1.6; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid #f2f4f6; cursor: pointer; }
.rank-row:first-child { border-top: 0; } .rank-row:hover { background: var(--hover); }
.rank-row .n { width: 26px; height: 26px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.rank-row:first-child .n { background: var(--blue); color: #fff; }
.rank-row .nm { flex: 1; min-width: 0; } .rank-row .nm b { display: block; font-size: 15px; } .rank-row .nm span { font-size: 12.5px; color: var(--gray); }
.rank-row .v { text-align: right; font-weight: 800; } .rank-row .v span { display: block; font-size: 11.5px; color: var(--gray); font-weight: 600; }
.sup { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid #f2f4f6; } .sup:first-child { border-top: 0; }
.sup.no { opacity: .55; } .sup .ic { font-size: 22px; } .sup b { font-size: 14.5px; } .sup p { margin: 2px 0 0; font-size: 13px; color: var(--sub); line-height: 1.55; }
.sup .st { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.sup .st.ok { background: var(--green-l); color: var(--green); } .sup .st.no { background: var(--red-l); color: var(--red); }
.sup a { font-size: 12.5px; color: var(--blue); font-weight: 600; }
.net { margin: 0 16px 14px; background: var(--blue-l); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.net b { color: var(--blue); font-size: 17px; }
.photo-card { padding: 14px 16px; }
.photo-card .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.photo-card label { font-size: 12px; color: var(--gray); font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.photo-card input { border: 0; background: var(--bg); border-radius: 10px; padding: 9px 10px; font-weight: 700; width: 100%; }
.photo-card .btns { display: flex; gap: 8px; }
.btn { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 700; cursor: pointer; background: var(--blue); color: #fff; } .btn.gray { background: var(--bg); color: var(--sub); }

/* 답변 아래: 위키 근거 · 도구 기록 · 숫자 검증 */
.foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 12px; }
.foot .wk { border: 0; background: var(--purple-l); color: var(--purple); border-radius: 8px; padding: 4px 9px; font-weight: 700; cursor: pointer; font-size: 12px; }
.foot .wk:hover { background: #e7e0ff; }
.foot .vf { color: var(--green); font-weight: 700; } .foot .vf.bad { color: var(--red); }
.foot .gen { background: var(--hover); color: var(--gray); border-radius: 8px; padding: 3px 8px; font-weight: 700; }
.foot .mk { color: var(--gray); }
.trace { margin-top: 8px; } .trace summary { font-size: 12px; color: var(--gray); font-weight: 700; cursor: pointer; list-style: none; }
.trace summary::-webkit-details-marker { display: none; }
.trace pre { margin: 6px 0 0; background: #191f28; color: #d6e2ee; border-radius: 12px; padding: 10px 12px; font-size: 11.5px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.trace pre b { color: #7cc4ff; font-weight: 700; }
.wupd { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; background: #f6f3ff; color: var(--purple); border-radius: 10px; padding: 6px 10px; cursor: pointer; border: 0; font-weight: 600; }

/* 입력창 */
#composer { padding: 10px 16px 12px; border-top: 1px solid #f2f4f6; }
.cmp-box { display: flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 18px; padding: 5px 5px 5px 6px; transition: box-shadow .2s, background .2s; }
.cmp-box:focus-within { box-shadow: inset 0 0 0 2px var(--blue); background: #fff; }
#q { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15.5px; padding: 8px 4px; }
.ic { width: 38px; height: 38px; border: 0; background: none; border-radius: 12px; font-size: 18px; cursor: pointer; flex: none; }
.ic:hover { background: #e5e8eb; } .ic.rec { background: var(--red-l); animation: blink 1s infinite; }
.send { width: 40px; height: 40px; border: 0; border-radius: 13px; background: var(--blue); color: #fff; font-size: 19px; font-weight: 800; cursor: pointer; flex: none; }
.send:disabled { background: #c9d6e8; cursor: default; }
.cmp-note { margin: 6px 4px 0; font-size: 11.5px; color: var(--gray); }

/* 오른쪽: 탭 · 지도 · 위키 */
.side-tabs { display: flex; gap: 4px; padding: 10px 12px; background: #fff; border-bottom: 1px solid #eef0f2; }
.side-tabs button { border: 0; background: none; border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--gray); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.side-tabs button.on { background: var(--bg); color: var(--text); }
.wk-badge { background: var(--purple); color: #fff; font-size: 10.5px; border-radius: 8px; padding: 1px 6px; }
.pane { display: none; flex: 1; min-height: 0; position: relative; } .pane.on { display: flex; }
#map { flex: 1; min-height: 0; z-index: 1; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 2; background: rgba(255,255,255,.95); border-radius: 14px; padding: 10px 12px; font-size: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); max-width: 260px; line-height: 1.6; }
.map-legend b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px -1px 0; }
.map-hint { position: absolute; right: 12px; top: 12px; z-index: 2; background: rgba(25,31,40,.85); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 10px; }
.dong-lbl { background: none; border: 0; box-shadow: none; font-weight: 800; font-size: 12px; color: #191f28; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.dong-lbl::before { display: none; }
.rank-pin { width: 24px; height: 24px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; box-shadow: 0 3px 10px rgba(240,123,63,.45); }
.hub-pin { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.leaflet-popup-content { font-family: Pretendard, sans-serif; font-size: 13px; line-height: 1.55; margin: 10px 14px; }
.leaflet-popup-content b { font-size: 14px; }
.pulse { animation: pulse 1.4s ease-out 3; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 0% { stroke-width: 3; } 50% { stroke-width: 12; stroke-opacity: .35; } 100% { stroke-width: 3; } }

.wk-wrap { flex: 1; display: grid; grid-template-columns: 230px 1fr; min-height: 0; }
.wk-nav { border-right: 1px solid var(--line); background: #fff; overflow-y: auto; padding: 12px; }
.wk-search { width: 100%; border: 0; background: var(--bg); border-radius: 10px; padding: 9px 12px; outline: none; font-size: 13.5px; margin-bottom: 8px; }
.wk-search:focus { box-shadow: inset 0 0 0 2px var(--blue); background: #fff; }
.wk-cat { font-size: 11.5px; font-weight: 800; color: var(--gray2); margin: 12px 6px 4px; }
.wk-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; cursor: pointer; color: var(--sub); }
.wk-item:hover { background: var(--hover); } .wk-item.on { background: var(--blue-l); color: var(--blue); font-weight: 700; }
.wk-item .ai { font-size: 10px; font-weight: 800; color: var(--purple); background: var(--purple-l); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.wk-page { overflow-y: auto; padding: 24px 28px 40px; background: #fff; font-size: 14.5px; line-height: 1.75; color: #333d4b; }
.wk-page h2 { font-size: 22px; margin: 0 0 4px; color: var(--text); letter-spacing: -.03em; }
.wk-page .wk-meta { font-size: 12px; color: var(--gray); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.wk-page .wk-meta span { background: var(--hover); border-radius: 6px; padding: 2px 7px; }
.wk-page h3 { font-size: 15.5px; margin: 20px 0 6px; color: var(--text); }
.wk-page p { margin: 0 0 10px; } .wk-page ul, .wk-page ol { margin: 4px 0 12px; padding-left: 20px; }
.wlink { color: var(--purple); font-weight: 600; cursor: pointer; border-bottom: 1px dashed #c4b5fd; }
.wk-back { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--gray); }
.wk-log { margin-top: 18px; background: #f9f8ff; border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.wk-log b { color: var(--purple); }
.wk-log div { padding: 4px 0; border-top: 1px dashed #e4ddff; } .wk-log div:first-of-type { border-top: 0; }
.wk-intro { background: linear-gradient(135deg, #f6f3ff, #eef5ff); border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; font-size: 13.5px; line-height: 1.65; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: rgba(25,31,40,.95); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .35s var(--spring); z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }
#mtabs { display: none; }

/* 모바일: 채팅 중심, 지도·위키는 탭으로 접기 */
@media (max-width: 860px) {
  :root { --top: 54px; }
  #top { padding: 0 12px; gap: 10px; } .tag { display: none; } .brand .en, .proto { display: none; }
  #top .top-act { margin-left: auto; }
  #app { display: block; height: calc(100dvh - var(--top) - 58px); }
  #chat, #side { height: 100%; border: 0; }
  #side { display: none; } body.m-map #side, body.m-wiki #side { display: flex; } body.m-map #chat, body.m-wiki #chat { display: none; }
  .side-tabs { display: none; }
  #log { padding: 16px 14px 8px; }
  #composer { padding: 8px 10px 10px; } .cmp-note { display: none; }
  #q { font-size: 16px; }
  .welcome .hello { font-size: 23px; }
  .ex-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; }
  .wk-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .wk-nav { border-right: 0; border-bottom: 1px solid var(--line); max-height: 34vh; }
  .wk-page { padding: 18px 16px 30px; }
  .map-hint { display: none; }
  #mtabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(58px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid #eef0f2; z-index: 20; }
  #mtabs button { flex: 1; border: 0; background: none; font-weight: 700; font-size: 13.5px; color: var(--gray); position: relative; }
  #mtabs button.on { color: var(--text); }
  #mtabs .dot { position: absolute; top: 12px; margin-left: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
  #toast { bottom: 76px; }
}

/* 그리드 행 높이 고정: 채팅 기록은 #log 안에서만 스크롤 */
#app { grid-template-rows: minmax(0, 1fr); }
#chat, #side { min-height: 0; overflow: hidden; }

/* ===== 개선: 근거 실거래 표 · 조건 시뮬레이터 · 용어 풀이 · 시간가치 ===== */
.deals { margin-top: 12px; }
.deals summary { font-size: 13px; font-weight: 700; color: var(--sub); cursor: pointer; }
.deal-wrap { overflow-x: auto; margin-top: 8px; }
.deal-t { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 380px; }
.deal-t th { text-align: left; color: var(--gray); font-weight: 700; padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.deal-t td { padding: 6px 6px; border-bottom: 1px solid #f2f4f6; white-space: nowrap; }
.deal-t td.g { color: var(--green); font-weight: 800; } .deal-t td.y { color: var(--yellow); font-weight: 800; } .deal-t td.r { color: var(--red); font-weight: 800; }
.sim { margin-top: 14px; background: var(--hover); border-radius: 14px; padding: 12px 14px; }
.sim-h { font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.sim-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.sim-row label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--gray); font-weight: 700; }
.sim-row input { width: 92px; border: 0; background: #fff; border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: 15px; box-shadow: inset 0 0 0 1px var(--line); }
.sim-row input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.sim-out { flex: 1; min-width: 150px; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 700; }
.sim-out.green { background: var(--green-l); color: #00795f; } .sim-out.yellow { background: var(--yellow-l); color: #a86d00; } .sim-out.red { background: var(--red-l); color: var(--red); }
.sim-tip { margin: 8px 0 0; font-size: 12.5px; color: var(--sub); line-height: 1.55; }
.term { border-bottom: 1.5px dotted var(--purple); cursor: help; color: inherit; }
.term:hover { color: var(--purple); }
.tv-row { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid #f2f4f6; flex-wrap: wrap; font-size: 12.5px; color: var(--gray); font-weight: 700; }
.tv-row span { margin-right: 4px; }
.tv-row button { border: 0; background: var(--bg); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--sub); }
.tv-row button.on { background: var(--blue); color: #fff; }

/* ===== 카카오맵 오버레이 ===== */
.k-lbl { font-weight: 800; font-size: 12px; color: #191f28; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; white-space: nowrap; cursor: pointer; }
.k-pop { position: relative; background: #fff; border-radius: 12px; padding: 10px 30px 10px 12px; font-size: 13px; line-height: 1.55; box-shadow: 0 6px 20px rgba(0,0,0,.15); white-space: nowrap; }
.k-pop b { font-size: 14px; }
.k-pop::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
.k-x { position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: #f2f4f6; color: #8b95a1; font-size: 11px; cursor: pointer; }
.hub-pin { display: flex; flex-direction: column; align-items: center; }
.hub-pin span { font-size: 11.5px; font-weight: 800; background: #191f28; color: #fff; border-radius: 6px; padding: 1px 6px; margin-top: 2px; filter: none; white-space: nowrap; }
.house-pin { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); cursor: pointer; }
.map-src { font-size: 11px; color: #b0b8c1; }

/* ===== 에이전트: 매물 후보 · 전화 · 계획서 ===== */
.ex.agent { grid-column: 1 / -1; background: linear-gradient(135deg, #eef5ff, #f6f3ff); box-shadow: inset 0 0 0 1.5px #c9dcff; flex-wrap: wrap; }
.ex.agent i { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--blue); border-radius: 6px; padding: 1px 7px; }
.lst { display: flex; gap: 12px; padding: 13px 16px; border-top: 1px solid #f2f4f6; } .lst:first-child { border-top: 0; }
.lst-n { width: 26px; height: 26px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.lst-b { flex: 1; min-width: 0; }
.lst-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .lst-t b { font-size: 15px; }
.lv { font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 7px; }
.lv.green { background: var(--green-l); color: #00795f; } .lv.yellow { background: var(--yellow-l); color: #a86d00; } .lv.red { background: var(--red-l); color: var(--red); }
.lst-p { font-size: 13.5px; margin-top: 4px; } .lst-p span { color: var(--gray); font-size: 12.5px; }
.lst-m { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; font-size: 12.5px; color: var(--sub); } .lst-m .ok { color: var(--green); font-weight: 700; }
.lst-w { margin-top: 5px; font-size: 12.5px; color: #a86d00; background: var(--yellow-l); border-radius: 8px; padding: 4px 8px; display: inline-block; }
.lst-a { margin-top: 5px; font-size: 12.5px; color: var(--gray); } .lst-a em, .call-h em { font-style: normal; font-size: 11px; background: var(--bg); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.cmp-note.demo { padding: 0 16px 12px; margin: 0; }
.calls { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.call { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: #fff; }
.call.wait { opacity: .5; padding: 10px 14px; }
.call-h { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; flex-wrap: wrap; }
.cs { margin-left: auto; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 7px; background: var(--bg); color: var(--gray); }
.cs.live { background: var(--red-l); color: var(--red); animation: blink 1.2s infinite; } .cs.ok { background: var(--green-l); color: #00795f; } .cs.no { background: var(--bg); color: var(--gray); }
.call-sub { font-size: 12px; color: var(--gray); margin: 2px 0 8px; }
.ln { display: flex; gap: 8px; margin-top: 6px; font-size: 13.5px; line-height: 1.55; animation: msgIn .3s var(--ease) both; }
.ln span { flex: none; font-size: 11.5px; font-weight: 800; color: var(--gray); width: 52px; padding-top: 2px; }
.ln p { margin: 0; padding: 7px 11px; border-radius: 12px; background: var(--bg); }
.ln.ai p { background: var(--blue-l); }
.plan { border: 1.5px solid #c9dcff; }
.plan-h { display: flex; gap: 12px; align-items: center; padding: 16px 18px; background: linear-gradient(135deg, #eef5ff, #f6f3ff); }
.plan-ic { width: 44px; height: 44px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 22px; flex: none; }
.plan-h b { font-size: 18px; } .plan-h .sub { font-size: 13px; color: var(--sub); margin-top: 2px; }
.plan-tl { padding: 10px 18px 4px; }
.plan-v { display: flex; gap: 12px; padding: 8px 0; }
.plan-t { width: 52px; flex: none; font-weight: 800; font-size: 16px; color: var(--blue); padding-top: 1px; }
.plan-b { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.6; } .plan-b b { font-size: 15px; }
.plan-m { font-size: 12.5px; color: var(--gray); }
.plan-mv { margin-left: 22px; padding: 2px 0 2px 40px; border-left: 2px dashed #c9dcff; font-size: 12.5px; color: var(--sub); }
.plan-ck { margin: 6px 18px 0; background: var(--hover); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.plan-ck ul { margin: 4px 0 0; padding-left: 18px; color: var(--sub); line-height: 1.7; }
.plan-btns { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px 16px; }
.lst-pin, .plan-pin { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; background: #191f28; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 12.5px; box-shadow: 0 3px 10px rgba(0,0,0,.3); cursor: pointer; white-space: nowrap; }
.plan-pin { background: var(--blue); }
@media (max-width: 860px) { .plan-btns .btn { flex: 1; } .ln span { width: 44px; } }
@media (max-width: 860px) { .plan-btns { display: grid; grid-template-columns: 1fr 1fr; } .plan-btns .btn { padding: 10px 8px; font-size: 13.5px; } .plan-btns .btn:first-child { grid-column: 1 / -1; } }

/* ===== 지도 개선: 확대 단계 · 도구 · 동네 패널 ===== */
.k-lbl small, .dong-lbl small { display: block; font-size: 10.5px; font-weight: 700; color: #4e5968; text-align: center; }
.k-lbl { text-align: center; line-height: 1.25; animation: pop .35s var(--spring); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.bub { display: flex; flex-direction: column; align-items: center; min-width: 38px; padding: 3px 6px 4px; border-radius: 10px; color: #fff; font-size: 10.5px; line-height: 1.15; box-shadow: 0 3px 8px rgba(0,0,0,.25); cursor: pointer; position: relative; animation: pop .35s var(--spring); }
.bub b { font-size: 13px; } .bub span { opacity: .85; }
.bub::after { content: ''; position: absolute; bottom: -5px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: inherit; }
.bub.green { background: #00b493; border-top-color: #00b493; } .bub.yellow { background: #f5a300; border-top-color: #f5a300; } .bub.red { background: #f04452; border-top-color: #f04452; }
.bub:hover { transform: scale(1.12); z-index: 10; }
.stn { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1.5px solid #191f28; border-radius: 8px; padding: 1px 6px 1px 2px; font-size: 11px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.stn i { font-style: normal; background: #191f28; color: #fff; border-radius: 5px; padding: 0 4px; font-size: 10px; }
.map-tools { position: absolute; right: 12px; top: 12px; z-index: 3; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; max-width: calc(100% - 80px); }
.mt-row { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; align-items: center; background: rgba(255,255,255,.95); border-radius: 12px; padding: 5px; box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.mt { border: 0; background: var(--bg); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; color: var(--gray); cursor: pointer; white-space: nowrap; }
.mt.on { background: #191f28; color: #fff; }
.mt-rng { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--sub); padding: 0 4px; white-space: nowrap; }
.mt-rng b { min-width: 44px; } .mt-rng input { width: 90px; accent-color: var(--blue); }
.mt-n { font-size: 12px; font-weight: 800; color: var(--blue); padding: 0 6px; }
.map-panel { position: absolute; right: 12px; top: 104px; bottom: 12px; width: 330px; z-index: 4; background: #fff; border-radius: 18px; box-shadow: 0 10px 34px rgba(0,0,0,.18); display: flex; flex-direction: column; overflow: hidden; transform: translateX(110%); transition: transform .35s var(--ease); }
.map-panel.on { transform: none; }
.mp-h { display: flex; align-items: flex-start; justify-content: space-between; padding: 14px 14px 8px 16px; }
.mp-h b { font-size: 17px; display: block; } .mp-h span { font-size: 12px; color: var(--gray); }
.mp-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--bg); cursor: pointer; color: var(--sub); flex: none; }
.mp-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 14px; }
.mp-stat div { background: var(--hover); border-radius: 10px; padding: 7px 9px; } .mp-stat span { display: block; font-size: 11px; color: var(--gray); font-weight: 700; } .mp-stat b { font-size: 14.5px; }
.mp-ask { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; }
.mp-ask .btn { padding: 10px 12px; font-size: 14px; }
.mp-list-h { padding: 4px 16px 6px; font-size: 13px; font-weight: 800; border-top: 1px solid #f2f4f6; padding-top: 10px; }
.mp-list-h span { color: var(--gray); font-weight: 600; } .mp-list-h em { font-style: normal; font-size: 10.5px; background: var(--bg); color: var(--gray); border-radius: 5px; padding: 1px 5px; margin-left: 4px; }
.mp-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.mp-it { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 8px; transition: box-shadow .2s; }
.mp-it.focus { box-shadow: 0 0 0 2px var(--blue); }
.mp-it-t { display: flex; justify-content: space-between; align-items: center; } .mp-it-t b { font-size: 16px; }
.mp-it-d { font-size: 12.5px; color: var(--sub); margin-top: 3px; }
.mp-it-w { font-size: 12px; color: #a86d00; background: var(--yellow-l); border-radius: 7px; padding: 3px 7px; margin-top: 5px; display: inline-block; }
.mp-it-b { display: flex; gap: 6px; margin-top: 8px; }
.mp-it-b button { border: 0; background: var(--blue-l); color: var(--blue); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.mp-it-b button:last-child { background: var(--bg); color: var(--sub); }
.mp-empty { font-size: 13px; color: var(--gray); text-align: center; padding: 20px 0; }
@media (max-width: 860px) {
  .map-tools { left: 8px; right: 8px; top: 8px; max-width: none; align-items: stretch; }
  .mt-row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .mt-row::-webkit-scrollbar { display: none; }
  .mt-rng input { width: 70px; }
  .map-panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 62%; border-radius: 20px 20px 0 0; transform: translateY(105%); }
  .map-panel.on { transform: none; }
  .map-legend { bottom: 8px; left: 8px; max-width: 220px; font-size: 11px; }
}
/* 확대 수준별 매물 묶음 원 */
.clu { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; color: #fff; line-height: 1.1; text-align: center; cursor: pointer; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 0 0 6px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.22); animation: pop .35s var(--spring); transition: transform .15s; white-space: nowrap; }
.clu b { font-size: 15px; font-weight: 800; } .clu span { font-size: 10.5px; font-weight: 700; opacity: .95; } .clu em { font-style: normal; font-size: 9.5px; opacity: .85; }
.clu.green { background: rgba(0,180,147,.88); box-shadow: 0 0 0 6px rgba(0,180,147,.18), 0 4px 12px rgba(0,0,0,.2); }
.clu.yellow { background: rgba(245,163,0,.9); box-shadow: 0 0 0 6px rgba(245,163,0,.2), 0 4px 12px rgba(0,0,0,.2); }
.clu.red { background: rgba(240,68,82,.88); box-shadow: 0 0 0 6px rgba(240,68,82,.18), 0 4px 12px rgba(0,0,0,.2); }
.clu:hover { transform: scale(1.08); }

/* ===== 3D 현장 보기 ===== */
.v3d { position: fixed; inset: 0; z-index: 80; background: #e9edf2; display: none; }
.v3d.on { display: block; animation: v3in .25s var(--ease); }
@keyframes v3in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.v3d .v3-map, .v3d #v3map.maplibregl-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.v3-tint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; transition: background .3s; z-index: 1; }
.v3-top { position: absolute; top: 12px; left: 56px; right: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; z-index: 3; pointer-events: none; }
.v3-ttl, .v3-tb { pointer-events: auto; }
.v3-ttl { background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-radius: 14px; padding: 9px 14px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.v3-ttl b { display: block; font-size: 15px; } .v3-ttl span { font-size: 12px; color: #6b7684; }
.v3-tb { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.v3-tb button { border: 0; background: rgba(255,255,255,.94); border-radius: 10px; padding: 8px 11px; font: inherit; font-size: 12.5px; font-weight: 700; color: #333d4b; box-shadow: 0 2px 10px rgba(0,0,0,.12); cursor: pointer; }
.v3-tb button.on { background: #F07B3F; color: #fff; }
.v3-tb .v3-x { background: #191f28; color: #fff; width: 36px; }
.v3-card { position: absolute; top: 76px; right: 12px; width: 340px; max-height: calc(100% - 200px); overflow: auto; background: rgba(255,255,255,.97); border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.18); z-index: 3; padding: 14px 16px; font-size: 13px; }
.v3-wait { color: #6b7684; padding: 18px 0; text-align: center; }
.v3c-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.v3c-h b { display: block; font-size: 14.5px; } .v3c-h span { font-size: 12px; color: #6b7684; }
.v3c-h em { font-style: normal; font-size: 10.5px; background: #f2f4f6; color: #8b95a1; padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.v3c-sec { border-top: 1px solid #f2f4f6; padding: 11px 0 6px; }
.v3c-k { font-weight: 800; font-size: 13px; margin-bottom: 7px; } .v3c-k small { font-weight: 600; color: #8b95a1; margin-left: 4px; }
.v3c-big { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; } .v3c-big b { font-size: 22px; } .v3c-big span { font-size: 12px; color: #6b7684; }
.v3c-big.good b { color: #e08a00; } .v3c-big.mid b { color: #333d4b; } .v3c-big.low b { color: #6b7684; }
.v3-bar { width: 100%; height: 34px; display: block; border-radius: 4px; }
.v3-lg { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: #6b7684; margin: 2px 0 6px; align-items: center; }
.v3-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -6px; }
.v3c-p { font-size: 12.5px; color: #4e5968; line-height: 1.55; margin: 4px 0 8px; }
.v3-season div { display: grid; grid-template-columns: 34px 1fr 74px; align-items: center; gap: 8px; font-size: 12px; margin: 3px 0; }
.v3-season span { color: #6b7684; } .v3-season i { height: 8px; background: #f2f4f6; border-radius: 4px; overflow: hidden; }
.v3-season i b { display: block; height: 100%; background: #ffc23d; border-radius: 4px; } .v3-season em { font-style: normal; font-weight: 700; text-align: right; }
.v3-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.v3-kv div { background: #f9fafb; border-radius: 10px; padding: 7px 8px; } .v3-kv span { display: block; font-size: 11px; color: #8b95a1; } .v3-kv b { font-size: 15px; }
.v3-kv em { display: block; font-style: normal; font-size: 11px; color: #6b7684; }
.sl.flat { color: #00a37f; } .sl.mild { color: #333d4b; } .sl.slope { color: #e08a00; } .sl.steep { color: #f04452; }
.v3-prof { margin-top: 8px; font-size: 12.5px; color: #4e5968; } .v3-prof .up { color: #e08a00; }
.v3-prof svg { width: 100%; height: 42px; display: block; margin-top: 5px; } .v3-pl { display: flex; justify-content: space-between; font-size: 10.5px; color: #8b95a1; }
.v3c-act { padding: 8px 0 4px; } .v3c-act .btn { width: 100%; }
.v3c-note { font-size: 10.5px; color: #8b95a1; line-height: 1.5; margin: 6px 0 0; }
.v3-time { position: absolute; left: 12px; bottom: 14px; width: min(560px, calc(100% - 380px)); background: rgba(255,255,255,.96); border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 10px 14px 9px; z-index: 3; }
.v3-days { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.v3-days button { border: 1px solid #e5e8eb; background: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; color: #4e5968; cursor: pointer; }
.v3-days button.on { background: #191f28; border-color: #191f28; color: #fff; }
.v3-row { display: flex; align-items: center; gap: 10px; } .v3-row input { flex: 1; accent-color: #ffb020; }
.v3-row b { font-size: 18px; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.v3-play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #ffb020; color: #fff; font-size: 13px; cursor: pointer; flex: none; }
.v3-now { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; margin-top: 5px; min-height: 18px; }
.v3-now .sunpos { color: #8b95a1; } .v3-now .st { font-weight: 700; } .v3-now .st.sun { color: #e08a00; }
.v3-now .st.bldg, .v3-now .st.hill { color: #4e5968; } .v3-now .st.night, .v3-now .st.side { color: #6b7684; }
.v3-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(233,237,242,.75); z-index: 4; font-size: 14px; color: #4e5968; font-weight: 600; }
.v3-load[hidden] { display: none; }
.v3-load .sp { width: 22px; height: 22px; border: 3px solid #d1d6db; border-top-color: #F07B3F; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.v3-pin { display: flex; flex-direction: column; align-items: center; background: #F07B3F; color: #fff; border-radius: 12px; padding: 4px 9px 5px; box-shadow: 0 4px 14px rgba(240,123,63,.5); position: relative; line-height: 1.15; }
.v3-pin b { font-size: 15px; } .v3-pin span { font-size: 10.5px; white-space: nowrap; }
.v3-pin::after { content: ""; position: absolute; bottom: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #F07B3F; }
.v3-dot { border: 2px solid #fff; background: #4e5968; color: #fff; font: inherit; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 7px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.v3-dot:hover { background: #F07B3F; }
.v3-stn { background: #fff; border-radius: 8px; padding: 2px 7px 2px 3px; font-size: 11px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.2); white-space: nowrap; }
.v3-stn i { font-style: normal; background: #F07B3F; color: #fff; border-radius: 5px; padding: 0 4px; margin-right: 4px; }
body.v3-open { overflow: hidden; }
.mt.v3b { background: #191f28; color: #fff; border-color: #191f28; }
.lnk3 { border: 0; background: #eef4ff; color: #C2551F; font: inherit; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .v3-top { left: 10px; right: 10px; top: 10px; flex-direction: column; align-items: stretch; }
  .v3-ttl { padding: 7px 12px; padding-right: 48px; } .v3-tb { justify-content: flex-start; }
  .v3-tb button { padding: 6px 9px; font-size: 12px; } .v3-tb .v3-x { position: absolute; top: 0; right: 0; height: 44px; }
  .v3d .maplibregl-ctrl-top-left { top: 98px; }
  .v3-time { left: 8px; right: 8px; width: auto; bottom: 8px; padding: 8px 10px; }
  .v3-card { top: auto; bottom: 128px; left: 8px; right: 8px; width: auto; max-height: 36vh; padding: 12px 13px; }
  .v3-card.min { max-height: 64px; overflow: hidden; }
  .v3c-h { cursor: pointer; }
}

/* ===== 기본 3D 지도 (MapLibre) ===== */
#map.maplibregl-map { background: #f5f1ea; }
.gl-mk { position: absolute; }
.gl-mk .k-lbl { pointer-events: auto; }
#map .maplibregl-popup-content { border-radius: 12px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 13px; line-height: 1.5; }
#map .maplibregl-popup-close-button { font-size: 16px; padding: 2px 7px; }
#map .maplibregl-ctrl-top-left { top: 4px; }

/* 3D 지도: 그림자 시각 · 건물 로딩 표시 */
.mt-sh { align-items: center; gap: 6px; }
.mt-sh input[type=range] { width: 120px; accent-color: #ffb020; }
.mt-sh b { font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 38px; }
.mt-sh .mt-sun { font-size: 11.5px; color: #8b95a1; white-space: nowrap; }
.mt-sh input:disabled { opacity: .4; }
.gl-busy { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 5; background: rgba(25,31,40,.82); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 12px 6px 10px; border-radius: 999px; display: flex; align-items: center; gap: 7px; pointer-events: none; }
.gl-busy[hidden] { display: none; }
.gl-busy i { width: 11px; height: 11px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
@media (max-width: 860px) { .mt-sh input[type=range] { width: 90px; } .gl-busy { top: auto; bottom: 64px; } }

/* ===== 채팅 중심 화면 (PC): 가운데 채팅 + 오른쪽 지도/위키 칸(열기·닫기) ===== */
@media (min-width: 861px) {
  :root { --sidew: min(46vw, 820px); --col: 780px; }
  #app { display: block; position: relative; }
  #chat { position: absolute; left: 0; top: 0; bottom: 0; right: var(--sidew); border-right: 1px solid #eef0f2; transition: right .28s var(--ease); }
  #side { position: absolute; top: 0; bottom: 0; right: 0; width: var(--sidew); transition: transform .28s var(--ease); }
  body.side-closed #chat { right: 0; border-right: 0; }
  body.side-closed #side { transform: translateX(100%); visibility: hidden; pointer-events: none; } /* 숨겨도 크기는 유지 → 지도를 미리 만들어 둠 */
  #log { padding: 22px max(22px, calc((100% - var(--col)) / 2)) 8px; }
  #composer, .prefs { padding-left: max(16px, calc((100% - var(--col)) / 2)); padding-right: max(16px, calc((100% - var(--col)) / 2)); }
  .map-legend { left: auto; right: 12px; bottom: 34px; }
}
#sideBtn.on { background: var(--blue-l); color: var(--blue-d); }
.side-x { margin-left: auto; color: var(--gray) !important; font-size: 15px !important; padding: 6px 10px !important; }
.side-x:hover { background: var(--bg) !important; }
.top-act { display: flex; gap: 6px; align-items: center; }
.top-act .cnt { background: var(--red); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 6px; margin-left: 2px; }

/* 첫 화면: 집 찾기 3단계 */
.welcome.w2 .hello { font-size: 28px; }
.steps { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; background: var(--hover); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.steps i { font-style: normal; width: 24px; height: 24px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }
.steps b { display: block; font-size: 14px; } .steps span { font-size: 12px; color: var(--gray); line-height: 1.45; display: block; margin-top: 2px; }
.welcome.w2 .ex.agent { background: var(--blue-l); }
.welcome.w2 .ex.agent:hover { background: #FFE2CC; }
.more-ex { margin-top: 12px; } .more-ex summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--gray); padding: 4px 0 8px; }

/* 내 조건 칸 */
.prefs { flex: none; border-bottom: 1px solid #f2f4f6; background: #fff; padding-top: 8px; padding-bottom: 8px; }
.pf-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf-l { font-size: 12.5px; color: var(--sub); flex: none; }
.pf-chips { flex: 1; min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; } .pf-chips::-webkit-scrollbar { display: none; }
.pf-chips span { flex: none; font-size: 12.5px; font-weight: 600; background: var(--blue-l); color: var(--blue-d); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pf-chips em { font-style: normal; font-size: 12.5px; color: var(--gray2); white-space: nowrap; }
.pf-ed { flex: none; border: 0; background: var(--bg); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pf-ed:hover { background: #e5e8eb; }
.pf-form { display: none; }
.prefs.edit .pf-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; margin-top: 10px; padding: 12px; background: var(--hover); border: 1px solid var(--line); border-radius: 14px; }
.pf-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--sub); }
.pf-form select, .pf-form input { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: #fff; font-size: 13.5px; min-width: 0; }
.pf-am { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; } .pf-am span { font-size: 12px; font-weight: 700; color: var(--sub); margin-right: 4px; }
.pf-am button, .ask.multi [data-mv] { border: 1.5px solid var(--line); background: #fff; color: var(--sub); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.pf-am button.on, .ask.multi [data-mv].on { border-color: var(--blue); background: var(--blue); color: #fff; }
.pf-go { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.ask.multi .ask-go { flex-basis: 100%; display: flex; gap: 6px; margin-top: 4px; }
.ask.multi .ask-go .btn { border: 0; padding: 9px 16px; background: var(--blue); color: #fff; }
.ask.multi .ask-go .btn.gray { background: var(--bg); color: var(--sub); }
.ask.done [data-mv], .ask.done .ask-go { pointer-events: none; opacity: .5; }

/* 맞춤 매물 카드 */
.mt-ck { flex: none; cursor: pointer; padding-top: 1px; position: relative; }
.mt-ck input { position: absolute; opacity: 0; pointer-events: none; }
.mt-ck span { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; background: #fff; transition: all .15s; }
.mt-ck input:checked + span { background: var(--blue); border-color: var(--blue); }
.mt-ck input:checked + span::after { content: '✓'; color: #fff; font-weight: 800; font-size: 14px; }
.mt-ck input:focus-visible + span { outline: 2.5px solid var(--blue); outline-offset: 2px; }
.mt-rank { font-size: 12px; font-weight: 800; color: var(--blue); }
.mt-sc { margin-left: auto; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.mt-sc b { font-size: 14px; } .mt-sc.hi { background: var(--green-l); color: #00876e; } .mt-sc.mid { background: var(--blue-l); color: var(--blue-d); } .mt-sc.lo { background: var(--bg); color: var(--sub); }
.mt-rt { margin-top: 7px; background: #FFF6EE; border-radius: 10px; padding: 7px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.mt-rt b { font-size: 13px; color: var(--blue-d); } .mt-rt span { color: var(--sub); }
.mt-rt.over { background: var(--yellow-l); } .mt-rt.over b { color: #a86d00; }
.mt-am { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mt-am span { font-size: 11.5px; color: var(--gray); background: var(--hover); border-radius: 7px; padding: 2px 6px; }
.mt-am span.w { font-weight: 700; } .mt-am span.ok { color: #00876e; background: var(--green-l); } .mt-am span.no { color: #c43c47; background: var(--red-l); }
.mt-why { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12.5px; color: var(--sub); display: grid; gap: 2px; }
.mt-why li::before { display: inline-block; width: 16px; font-weight: 800; }
.mt-why li.y::before { content: '✓'; color: var(--green); } .mt-why li.m::before { content: '△'; color: var(--yellow); } .mt-why li.n::before { content: '✕'; color: var(--red); }
.mt-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid #f2f4f6; background: #fafbfc; }
.mt-act span { font-size: 12.5px; color: var(--gray); } .mt-act.done { font-size: 13px; font-weight: 700; color: var(--green); }
.work-pin { background: #191f28; color: #fff; border-radius: 10px; padding: 5px 9px; font-size: 12.5px; font-weight: 800; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.3); border: 2px solid #fff; }

/* 채팅 속 지도 캡쳐 */
.snap { margin: 0; padding: 12px 12px 4px; cursor: zoom-in; }
.snap-img { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #e4f1e8; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.snap-img img { display: block; width: 100%; height: 100%; object-fit: cover; animation: snapIn .35s var(--ease); }
.snap-map { position: absolute; inset: 0; pointer-events: none; animation: snapIn .35s var(--ease); }
.snap-map .leaflet-control-attribution { font-size: 9px; }
/* 채팅 지도 핀: 이름표 + 점 (아래 끝이 위치) */
.sp-wrap { background: none; border: 0; }
.sp { position: relative; display: flex; flex-direction: column; align-items: center; width: max-content; font-family: inherit; }
.leaflet-marker-icon .sp { transform: translate(-50%, -100%); } /* 카카오는 yAnchor 1로, Leaflet은 여기서 아래 끝을 위치에 맞춤 */
.sp-l { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 9px; padding: 3px 8px 3px 3px; font-size: 12.5px; font-weight: 800; color: #191f28; box-shadow: 0 2px 8px rgba(0,0,0,.25); white-space: nowrap; margin-bottom: 6px; position: relative; transition: transform .15s; }
.sp-l::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #fff; }
.sp.moved .sp-l::after { display: none; }
.sp-l b { display: grid; place-items: center; min-width: 21px; height: 21px; border-radius: 7px; background: #4e5968; color: #fff; font-size: 12px; }
.sp-1 .sp-l b { background: #F07B3F; }
.sp-l:not(:has(b)) { padding-left: 8px; color: #C2551F; }
.sp-d { width: 10px; height: 10px; border-radius: 50%; background: #4e5968; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); margin-bottom: -5px; }
.sp-1 .sp-d { background: #F07B3F; }
.sp-w .sp-l { background: #191f28; color: #fff; padding: 4px 9px; } .sp-w .sp-l::after { border-top-color: #191f28; } .sp-w .sp-d { background: #191f28; }
@keyframes snapIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.snap-ld { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #5b7a66;
  background: linear-gradient(110deg, #e4f1e8 30%, #f1f8f3 50%, #e4f1e8 70%) 0 0 / 300% 100%; animation: snapSh 1.4s linear infinite; }
.snap-ld i { width: 18px; height: 18px; border: 2.5px solid rgba(91,122,102,.25); border-top-color: #5b7a66; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes snapSh { to { background-position: -300% 0; } }
.snap-open { position: absolute; right: 8px; top: 8px; border: 0; border-radius: 9px; padding: 5px 9px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.92); color: #191f28; box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; }
.snap:hover .snap-open { background: #fff; }
.snap figcaption { font-size: 12px; color: var(--gray); padding: 6px 2px 2px; }
.plan .snap { padding: 0 0 8px; }
@media (max-width: 860px) { .snap-img { aspect-ratio: 7 / 5; } .snap { padding: 10px 10px 2px; } }

/* 내 예약 */
.dlg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); display: grid; place-items: center; padding: 16px; }
.dlg[hidden] { display: none; }
.dlg-b { width: min(520px, 100%); max-height: min(80vh, 720px); overflow-y: auto; background: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dlg-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; } .dlg-h b { font-size: 17px; }
.dlg-h button { border: 0; background: var(--bg); border-radius: 9px; width: 32px; height: 32px; cursor: pointer; }
.bk { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #f2f4f6; } .bk:first-child { border-top: 0; }
.bk-t { flex: none; width: 92px; } .bk-t b { display: block; font-size: 13px; } .bk-t span { font-size: 18px; font-weight: 800; color: var(--blue); }
.bk-b { flex: 1; min-width: 0; font-size: 13px; } .bk-b > div { margin-top: 3px; }
.bk-btns { display: flex; gap: 6px; margin-top: 8px !important; } .bk-btns .btn { padding: 6px 10px; font-size: 12.5px; }
.bk.cancel { opacity: .55; } .bk.cancel .bk-t span { text-decoration: line-through; color: var(--gray); }
.bk-st { font-size: 12px; color: var(--gray); }
.bk-empty { text-align: center; color: var(--gray); font-size: 14px; line-height: 1.6; padding: 24px 0; }

@media (max-width: 860px) {
  .top-act .tx { display: none; } .top-act .btn-ghost { padding: 0 11px; }
  #sideBtn, .side-x { display: none; }
  .prefs { padding: 7px 12px; }
  .steps { grid-template-columns: 1fr; gap: 6px; } .steps li { padding: 9px 11px; }
  .welcome.w2 .hello { font-size: 23px; }
  .mt-act .btn { flex: 1 1 100%; } .mt-act span { flex-basis: 100%; text-align: center; }
  .mrow.lst { padding: 12px; gap: 10px; }
}

/* 선택한 매물 · 주변 편의시설 */
.bub.sel { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 0 6px #F07B3F, 0 6px 16px rgba(240,123,63,.45); z-index: 20; }
.gl-mk:has(.bub.sel) { z-index: 20 !important; }
.mp-near { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 6px 0 2px; padding: 7px 9px; background: #FFF6EE; border-radius: 10px; font-size: 11.5px; color: #333d4b; }
.mp-near b { font-size: 11.5px; color: #C2551F; margin-right: 2px; }
.mp-near span { background: #fff; border-radius: 7px; padding: 2px 6px; box-shadow: 0 0 0 1px #FBE3D0; white-space: nowrap; }
.mp-near em { font-style: normal; color: #b0b8c1; font-size: 10.5px; margin-left: auto; }
.lst[data-lid] { cursor: pointer; } .lst[data-lid]:hover { box-shadow: 0 0 0 2px #FFD9BF; border-radius: 12px; }
.bub.sel::after { display: none; }

/* 일조 투어 카드 */
.gl-tour { position: absolute; left: calc(50% + 40px); bottom: 16px; transform: translateX(-50%); width: 380px; max-width: calc(100% - 24px); z-index: 6; background: rgba(255,255,255,.97); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 10px 12px 9px; font-size: 12.5px; animation: chatIn .22s var(--ease); }
.gt-h { display: flex; align-items: center; gap: 6px; } .gt-h b { font-size: 13.5px; } .gt-h span { flex: 1; color: #6b7684; font-size: 12px; }
.gt-h button { border: 0; background: #f2f4f6; border-radius: 8px; width: 30px; height: 28px; font-size: 13px; cursor: pointer; } .gt-h button[data-t="play"] { background: #ffb020; color: #fff; }
.gt-now { display: flex; align-items: center; gap: 8px; margin: 6px 0 6px; } .gt-now em { font-style: normal; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; }
.gt-now .st { font-weight: 700; } .gt-now .st.sun { color: #e08a00; } .gt-now .st.shade { color: #4e5968; } .gt-now .st.night { color: #6b7684; }
.gt-bar { position: relative; display: flex; height: 12px; border-radius: 6px; overflow: hidden; }
.gt-bar i { flex: 1; } .gt-bar i.sun { background: #ffc23d; } .gt-bar i.shade { background: #8792a6; } .gt-bar i.night { background: #2d3650; }
.gt-bar b { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; background: #191f28; border-radius: 2px; transition: left .2s linear; }
.gt-f { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: 10.5px; color: #8b95a1; } .gt-f span:nth-child(2) { text-align: center; color: #4e5968; font-weight: 600; }
@media (max-width: 860px) { .gl-tour { top: 132px; bottom: auto; width: auto; left: 8px; right: 8px; transform: none; padding: 8px 10px; } .gt-now em { font-size: 17px; } }

/* ===== 모바일 지도 사용성: 접는 도구 · 시트 손잡이 · 살짝 열린 시트 ===== */
.mt-mob, .mp-grab, .mp-more { display: none; }
.mt-chip { font-size: 11.5px; font-weight: 700; color: #C2551F; background: #eef4ff; border-radius: 7px; padding: 4px 7px; white-space: nowrap; }
@media (max-width: 860px) {
  .mt-mob { display: flex; }
  .map-tools:not(.open) .mt-row:not(.mt-mob) { display: none; }
  .map-tools.open .mt-row { flex-wrap: wrap; }
  .map-legend { display: none; }
  body.tools-open .gl-tour { display: none; }
  /* 시트 */
  .map-panel { height: 72%; max-height: calc(100% - 64px); transition: transform .3s var(--ease), height .25s var(--ease); }
  .map-panel.peek { height: auto; max-height: 56%; }
  .mp-grab { display: flex; justify-content: center; align-items: center; width: 100%; border: 0; background: none; padding: 9px 0 3px; cursor: grab; touch-action: none; flex: none; }
  .mp-grab i { width: 42px; height: 5px; border-radius: 3px; background: #d1d6db; }
  .mp-h { padding-top: 4px; }
  .map-panel.peek .mp-stat, .map-panel.peek .mp-ask, .map-panel.peek .mp-it:not(.focus) { display: none; }
  .map-panel.peek .mp-list-h { font-size: 0; border-top: 0; padding: 0 14px 6px; order: 2; }
  .map-panel.peek .mp-list-h > *:not(.mp-more) { display: none; }
  .map-panel.peek .mp-more { display: block; width: 100%; border: 0; background: #f2f4f6; color: #4e5968; border-radius: 10px; padding: 9px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .map-panel.peek .mp-list { padding-bottom: 6px; }
  .map-panel.peek .mp-it.focus { margin-top: 0; }
  .map-panel { display: flex; flex-direction: column; }
  /* 투어 카드: 접힌 도구 바로 아래, 얇게 */
  .gl-tour { top: 60px; padding: 7px 10px 6px; border-radius: 14px; }
  .gt-now { margin: 3px 0 4px; } .gt-now em { font-size: 16px; min-width: 48px; } .gt-now .st { font-size: 12px; }
  .gt-bar { height: 9px; } .gt-f { font-size: 10px; }
  .gt-h b { font-size: 12.5px; } .gt-h button { width: 28px; height: 26px; }
}

/* 일조 투어: 계절 비교 · 층 바꾸기 */
.gt-ss { display: flex; align-items: stretch; gap: 4px; margin-top: 7px; }
.gt-ss > button { flex: 1; border: 0; background: #f2f4f6; color: #4e5968; border-radius: 9px; padding: 4px 2px; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; line-height: 1.25; }
.gt-ss > button small { display: block; font-size: 10px; font-weight: 600; color: #8b95a1; }
.gt-ss > button.on { background: #fff4dc; color: #b86e00; box-shadow: inset 0 0 0 1.5px #ffb020; } .gt-ss > button.on small { color: #b86e00; }
.gt-fl { display: flex; align-items: center; gap: 2px; background: #f2f4f6; border-radius: 9px; padding: 2px; }
.gt-fl b { min-width: 38px; text-align: center; font-size: 11.5px; }
.gt-fl button { border: 0; background: #fff; border-radius: 7px; width: 24px; height: 100%; min-height: 26px; font-size: 14px; font-weight: 700; cursor: pointer; }
.gt-fl button:disabled { opacity: .35; cursor: default; }
@media (max-width: 860px) { .gt-ss { margin-top: 5px; } .gt-ss > button { font-size: 11px; padding: 3px 1px; } .gt-fl b { min-width: 32px; } }

/* 일조 투어: 창 방향 */
.gt-h select { border: 0; background: #f2f4f6; border-radius: 8px; height: 28px; padding: 0 4px; font: inherit; font-size: 12px; font-weight: 700; color: #333d4b; cursor: pointer; }
.gt-bar i.side { background: #c9d0db; } .gt-now .st.side { color: #6b7684; }
@media (max-width: 860px) { .gt-h select { height: 26px; font-size: 11.5px; } }

/* 3D 건물 확대 안내 */
.gl-hint { background: rgba(255,255,255,.94); color: #333d4b; box-shadow: 0 2px 10px rgba(0,0,0,.12); padding: 6px 12px; }

/* 3D 지도 로딩 화면 */
.gl-load { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #eaf3fc, #f6f2ea); transition: opacity .35s; }
.gl-load.done { opacity: 0; pointer-events: none; }
.gl-load-b { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #333d4b; }
.gl-load-b i { width: 34px; height: 34px; border: 3px solid rgba(240,123,63,.2); border-top-color: #F07B3F; border-radius: 50%; animation: spin .9s linear infinite; margin-bottom: 6px; }
.gl-load-b b { font-size: 15px; } .gl-load-b span { font-size: 12.5px; color: #8b95a1; }
/* 모바일: 채팅 탭에 있는 동안에도 지도 칸을 (안 보이게) 펼쳐 둬서 3D 지도를 미리 만들어 둠 */
@media (max-width: 860px) {
  body:not(.m-map):not(.m-wiki) #side { display: flex; position: fixed; left: 0; right: 0; top: 0; bottom: 58px; visibility: hidden; pointer-events: none; z-index: -1; }
}

/* ===== 살구 브랜드 ===== */
.brand .mark { background: var(--cream); box-shadow: inset 0 0 0 1.5px #FFE0C7; }
.brand .mark .apricot { width: 26px; height: 26px; }
.brand b { color: #3a2418; letter-spacing: -.04em; }
.brand .en { color: var(--blue-d); letter-spacing: 0; font-weight: 700; font-size: 12px; }
.tag b { color: var(--blue); }
.av { background: var(--cream) !important; box-shadow: inset 0 0 0 1px #FFE0C7; padding: 2px; }
.av .apricot { width: 100%; height: 100%; display: block; }
.welcome .hello-ic { display: block; width: 52px; height: 52px; margin-bottom: 12px; padding: 6px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 1.5px #FFE0C7; }
.welcome .hello-ic .apricot { width: 100%; height: 100%; display: block; }
.welcome .hello em { font-style: normal; color: var(--blue); }
.welcome .hello span b { color: var(--blue-d); }
.m.me { background: var(--blue); }
#chat, #log { background: linear-gradient(180deg, #fff 0, #fff 60%, var(--cream) 100%); }
.prefs, #composer { background: #fff; }
.pf-chips span { background: var(--blue-l); color: var(--blue-d); }
.steps i, .lst-n { background: var(--blue); }

/* ===== 기획서 흐름 카드: 조건 · 후보 · 통화 준비 · 카카오톡 · 최종 · 일정 ===== */
.cd-h { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px 6px; font-weight: 800; font-size: 14.5px; }
.cd-h span { font-size: 12px; font-weight: 600; color: var(--gray); }
.card.cond.old .cd-h, .card.cond.old { opacity: .6; }
.cd-rows { padding: 2px 16px 8px; display: grid; gap: 2px; }
.cd-r { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-top: 1px dashed #f0e6dd; font-size: 13.5px; }
.cd-r:first-child { border-top: 0; }
.cd-k { width: 92px; flex: none; color: var(--sub); font-weight: 700; font-size: 12.5px; }
.cd-v { font-weight: 700; }
.cd-r.miss .cd-v { color: var(--red); }
.cd-s { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.cd-s.infer { background: var(--blue-l); color: var(--blue-d); box-shadow: inset 0 0 0 1px #FFD3B5; }
.cd-s.said { background: var(--bg); color: var(--gray); }
.cd-s.need { background: var(--red-l); color: var(--red); }
.cd-why { flex-basis: 100%; padding-left: 100px; font-style: normal; font-size: 11.5px; color: var(--gray); }
.cd-unk { margin: 0 16px 8px; padding: 8px 10px; background: var(--bg); border-radius: 10px; display: grid; gap: 3px; font-size: 12.5px; color: var(--sub); }
.cd-unk b { font-size: 12px; color: var(--text); }
.cd-btns { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 14px; border-top: 1px solid #f6efe9; }
.cd-btns .btn[disabled], [data-cpgo][disabled] { opacity: .45; cursor: not-allowed; }
.cd-form { padding: 0 12px 12px; }
.cf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; padding: 12px; background: var(--cream); border: 1px solid #FBE3D0; border-radius: 14px; }
.cf label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--sub); }
.cf select, .cf input { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: #fff; font-size: 13.5px; min-width: 0; }
.prefs.edit .pf-form { display: block; margin-top: 10px; }
.prefs .pf-form .cf { background: var(--hover); border-color: var(--line); }
.lst-sub { font-size: 12px; color: var(--gray); }
.mt-pt { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mt-pt span { position: relative; isolation: isolate; overflow: hidden; font-size: 11px; font-weight: 700; color: var(--sub); background: var(--bg); border-radius: 6px; padding: 2px 7px; }
.mt-pt i { position: absolute; left: 0; top: 0; bottom: 0; background: #FFD9BF; z-index: -1; } /* 점수 막대(글자 뒤) */
/* 통화 준비 */
.cp-sec { padding: 8px 16px; border-top: 1px solid #f6efe9; display: grid; gap: 6px; font-size: 13px; }
.cp-sec > b { font-size: 12.5px; color: var(--sub); }
.cp-bld { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; } .cp-bld span { font-weight: 800; } .cp-bld em { font-style: normal; font-size: 12px; color: var(--gray); background: var(--hover); border-radius: 6px; padding: 1px 6px; }
.cp-opt { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-opt button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--sub); cursor: pointer; }
.cp-opt button.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.cp-when { font-weight: 800; color: var(--blue-d); }
.cp-share { display: grid; gap: 4px; } .cp-share label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.cp-name { width: 42px; height: 26px; border: 1px solid var(--line); border-radius: 7px; padding: 0 6px; }
.cp-script { margin: 6px 16px 4px; padding: 8px 12px; background: var(--cream); border-radius: 12px; font-size: 13px; }
.cp-script summary { cursor: pointer; font-weight: 800; font-size: 12.5px; } .cp-script p { margin: 6px 0; line-height: 1.55; }
.card.callprep.done { opacity: .75; }
/* 카카오톡 미리보기 */
.kk { margin: 0 0 10px; }
.kk-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; }
.kk-h i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #FEE500; font-size: 12px; }
.kk-h em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--gray); background: var(--bg); border-radius: 5px; padding: 1px 5px; }
.kk-b { margin-top: 6px; background: #FEE500; color: #191919; border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: 13px; line-height: 1.6; max-width: 420px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.kk-b b { display: block; margin-bottom: 2px; }
.kk p { margin: 4px 0 0; font-size: 11px; color: var(--gray); }
/* 최종 추천 */
.fn-best { display: flex; gap: 12px; align-items: center; margin: 4px 16px 10px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, var(--cream), #FFE7D4); box-shadow: inset 0 0 0 1.5px #FFD3B5; }
.fn-ic { font-size: 30px; } .fn-best span { font-size: 12px; color: var(--sub); }
.fn-big { font-size: 20px; font-weight: 800; color: var(--blue-d); } .fn-big small { font-size: 12px; font-weight: 700; color: var(--sub); margin-left: 6px; }
.final .deal-wrap { margin: 0 16px; } .fn-t th.best { color: var(--blue-d); } .fn-t td em { font-style: normal; font-size: 10.5px; color: var(--red); }
.fn-t td:first-child { color: var(--sub); font-weight: 700; white-space: nowrap; } .final .cmp-note { padding: 8px 16px 12px; }
/* 일정 탭 */
#pane-sched { overflow-y: auto; background: #fff; }
.sc-wrap { padding: 14px 18px 24px; max-width: 640px; }
.sc-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; } .sc-h b { font-size: 17px; } .sc-h span { font-size: 12.5px; color: var(--gray); }
.sc-day { margin-top: 14px; font-size: 13px; font-weight: 800; color: var(--blue-d); }
.bk-t { width: 64px; } .bk-t em { display: block; font-style: normal; font-size: 10.5px; color: var(--blue-d); }
.bk-ask { margin-top: 6px !important; font-size: 12.5px; } .bk-ask summary { cursor: pointer; font-weight: 700; color: var(--sub); } .bk-ask ul { margin: 4px 0 0; padding-left: 18px; }
.bk-al { display: flex; gap: 12px; font-size: 12.5px; color: var(--sub); } .bk-al label { display: flex; gap: 4px; align-items: center; }
#mtabs button { font-size: 13px; }
@media (max-width: 860px) { .cd-k { width: 84px; } .cd-why { padding-left: 0; } .cd-rows, .cp-sec { padding-left: 12px; padding-right: 12px; } }
/* ⑥ 등기부 사실 정리 */
.rg-wrap { margin: 0 16px; } .rg-t td:first-child { width: 150px; color: var(--sub); font-weight: 700; white-space: nowrap; } .rg-t td { text-align: left; }
.rg-t em { font-style: normal; color: var(--gray); font-size: 12px; } .rg-on { color: #a84f12; }
.rg-calc { margin: 10px 16px 0; padding: 10px 12px; background: var(--cream); border-radius: 12px; font-size: 13px; display: grid; gap: 6px; }
.rg-calc .sim-row { display: flex; gap: 10px; flex-wrap: wrap; } .rg-calc label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--sub); }
.rg-calc input { height: 32px; width: 150px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; }
.rg-out b { font-size: 16px; color: var(--blue-d); } .rg-out span { display: block; font-size: 12px; color: var(--gray); }
.registry .plan-ck { margin: 10px 16px 0; } .registry .cmp-note { padding: 8px 16px 12px; }
@media (max-width: 860px) { .rg-t td:first-child { width: 96px; white-space: normal; } .rg-calc input { width: 120px; } }
.rg-t td { white-space: normal; } .rg-t { width: 100%; min-width: 0; }
.welcome.w2 .ex { flex-wrap: nowrap; align-items: center; }
@media (max-width: 860px) {
  .rg-t, .rg-t tbody { display: block; } .rg-t tr { display: grid; grid-template-columns: 88px 1fr; gap: 6px; padding: 6px 0; border-top: 1px solid #f2f4f6; }
  .rg-t td { padding: 0 !important; border: 0 !important; width: auto !important; font-size: 12.5px; } .rg-wrap { margin: 0 12px; overflow: visible; }
}
/* 되묻기 · 통화 예외 · 지도 중개사무소 */
.cd-amb { margin: 0 16px 8px; padding: 10px 12px; border-radius: 12px; background: var(--blue-l); box-shadow: inset 0 0 0 1.5px #FFD3B5; display: grid; gap: 8px; font-size: 13.5px; }
.ln.sys p { margin: 4px 0; padding: 6px 10px; border-radius: 9px; background: var(--bg); color: var(--sub); font-size: 12.5px; }
.sms { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--cream); box-shadow: inset 0 0 0 1px #FBE3D0; display: grid; gap: 6px; font-size: 13px; }
.sms p { margin: 0; line-height: 1.55; } .sms .btn { justify-self: start; padding: 6px 12px; font-size: 12.5px; } .sms span { font-size: 11.5px; color: var(--gray); }
.brk-pin { width: 22px; height: 22px; border-radius: 7px; background: #fff; color: #5b6b82; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 1px 5px rgba(0,0,0,.3), inset 0 0 0 1.5px #5b6b82; cursor: pointer; }
.brk-pin.sm { display: inline-grid; width: 16px; height: 16px; font-size: 9px; vertical-align: -3px; box-shadow: inset 0 0 0 1.2px #5b6b82; }
/* 영업시간 · 화면 알림 · 큰 글씨 */
.cp-off { margin: 6px 16px 0; padding: 8px 12px; border-radius: 10px; background: #f3f4ff; color: #3d4a7a; font-size: 12.5px; line-height: 1.5; }
.kk.off { padding: 10px 12px; border-radius: 12px; background: var(--hover); border: 1px dashed var(--line); }
.kk.off .kk-h i { background: var(--blue-l); } .kk.off p { font-size: 12.5px; color: var(--sub); margin: 6px 0 8px; } .kk.off .btn { padding: 6px 12px; font-size: 12.5px; }
.sc-kk { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 4px; padding: 8px 10px; border-radius: 10px; background: var(--hover); font-size: 12.5px; color: var(--sub); }
.sc-kk.on { background: #FFF9D6; color: #5c4a00; } .sc-kk .btn { padding: 5px 10px; font-size: 12px; flex: none; }
#bigBtn b { font-size: 11px; margin-left: 1px; } #bigBtn.on { background: var(--blue-l); color: var(--blue-d); }
body.big #chat, body.big #mtabs, body.big #pane-sched, body.big #pane-wiki { zoom: 1.15; } /* 지도 칸은 확대하지 않음(지도 클릭 좌표가 어긋남) */
@media (max-width: 860px) { body.big #chat { zoom: 1.1; } }
/* 등기 판정 띠 */
.rg-verdict { margin: 10px 16px 0; }
.rv { border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.rv b { font-size: 15px; }
.rv ul { margin: 4px 0 0; padding-left: 18px; }
.rv.red { background: var(--red-l); } .rv.red b { color: var(--red); }
.rv.yellow { background: var(--yellow-l); } .rv.yellow b { color: #a86d00; }
.rv.green { background: var(--green-l); } .rv.green b { color: #00795f; }
/* ⑤ 매물 확인 카드 */
.checks .ck { margin: 10px 16px 0; padding: 10px 12px; border: 1px solid var(--line, #eee); border-radius: 12px; display: grid; gap: 6px; }
.checks .ck.drop { opacity: .78; }
.ck-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; cursor: pointer; }
.ck-n { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.ck-st { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.ck-st.go { background: var(--green-l); color: #00795f; } .ck-st.warn { background: var(--yellow-l); color: #a86d00; }
.ck-st.drop { background: var(--red-l); color: var(--red); } .ck-st.wait { background: var(--bg); color: var(--sub); }
.ck-sub { font-size: 12.5px; color: var(--sub); flex-basis: 100%; }
.ck-src { font-size: 12.5px; color: var(--sub); }
.ck-t td:first-child { white-space: nowrap; color: var(--sub); font-size: 12.5px; }
.ck-t small { color: var(--sub); }
.ck-ok, .ck-green { color: #00795f; } .ck-no, .ck-red { color: var(--red); } .ck-yellow { color: #a86d00; }
.ck-wait { font-size: 13px; background: var(--bg); border-radius: 8px; padding: 8px 10px; margin: 0; }
.cp-recv div { font-size: 13px; line-height: 1.55; }
.call-h em { font-style: normal; font-size: 12px; color: var(--sub); margin-left: 4px; }
/* ③ 살만한 동네 줄: 건물 줄(.lst)과 같은 배치 */
.mrow.dg { display: flex; gap: 12px; padding: 13px 16px; border-top: 1px solid #f2f4f6; cursor: pointer; }
.mrow.dg:hover { box-shadow: 0 0 0 2px #FFD9BF; border-radius: 12px; }
@media (max-width: 860px) { .mrow.dg { padding: 12px; gap: 10px; } }
