:root {
  --ink: #1d2330; --muted: #6b7280; --line: #d6dae2; --bg: #f4f5f7; --accent: #2456d6; --card: #fff;
  --good: #067647; --warn: #b54708; --bad: #d92d20; --hl: #fff6d6;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 14px/1.45 "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
button, select, input { font: inherit; }
button { padding: 5px 11px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
select, input { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.only-mobile { display: none; }

/* 상단 */
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line); z-index: 1000; }
.brand { font-weight: 800; font-size: 16px; color: var(--accent); }
.search { display: flex; gap: 6px; flex: 1 1 360px; max-width: 560px; }
.search input { flex: 1; padding: 6px 10px; }

/* 본문: 필터 | 지도 (+ 오른쪽 분석 패널) */
.app { flex: 1; display: grid; grid-template-columns: 330px 1fr; min-height: 0; position: relative; }
.filters { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.filters section { padding: 10px 14px; border-bottom: 1px solid #eef0f3; display: grid; gap: 7px; }
.filters h4 { margin: 0; font-size: 13px; color: #344054; display: flex; gap: 4px; align-items: center; }
.hint { cursor: help; color: var(--muted); font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; }
.unit { font-size: 13px; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 4px; }
.quick button { padding: 2px 9px; font-size: 12.5px; border-radius: 12px; }
.quick button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.lbl { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 6px; font-size: 13px; color: #344054; }
.chk { font-size: 13px; display: block; position: relative; padding-left: 22px; line-height: 1.5; margin: 3px 0; }
/* 체크박스 크기 고정: 문구가 길어도 줄어들지 않게 (예전엔 flex 라 긴 줄에서 작아졌음) */
.chk > input[type=checkbox] { position: absolute; left: 0; top: 2px; width: 15px; height: 15px; margin: 0; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; cursor: pointer; user-select: none; }
.chip.on { border-color: var(--ink); background: #f0f2f5; font-weight: 600; }
.chip .n { color: var(--muted); font-weight: 400; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-radius: 0; padding: 10px 6px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.pane[hidden] { display: none !important; }
.gobar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; display: flex; gap: 6px; }
.gobar .primary { flex: 1; font-weight: 700; }
.res-head { top: 41px !important; }
.results { flex: 1; min-height: 260px; padding: 0 !important; gap: 0 !important; }
.res-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 9px 14px 9px 12px; border-bottom: 1px solid #d6dae2; border-left: 3px solid transparent; cursor: pointer; }
.list li:nth-child(even) { background: #fafbfc; }
.list li:hover { background: #f3f6ff; }
.list li.sel { background: #eaf0ff; border-left-color: var(--accent); }
.list .sep { color: #c5cad3; margin: 0 3px; }
.list .warnline, .mtip .warnline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .t { font-weight: 600; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.list .a { font-size: 12px; color: var(--muted); margin: 1px 0 2px; }
.list .p { font-size: 12.5px; }
.list .more { text-align: center; color: var(--muted); font-size: 12.5px; cursor: default; }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; font-weight: 400; }
.tag.good { border-color: var(--good); color: var(--good); }
.tag.warn { border-color: var(--warn); color: var(--warn); }
.tag.bad { border-color: var(--bad); color: var(--bad); }
.tag.hug { border-color: #7a5af8; color: #7a5af8; }

.mapwrap { position: relative; min-height: 0; }
#bigMap { position: absolute; inset: 0; }
.legend { position: absolute; left: 10px; bottom: 22px; z-index: 500; background: rgba(255,255,255,.95); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; display: grid; gap: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.legend div { display: flex; gap: 6px; align-items: center; }
.ring { width: 12px; height: 12px; border-radius: 50%; border: 3px solid #067647; display: inline-block; }

.list .p + .p, .mtip .p + .p { margin-top: 1px; }
.warnline { font-size: 12px; color: var(--warn); margin-top: 2px; white-space: normal; }
.dd-soon { color: var(--bad); }
.mtip { font-size: 12.5px; line-height: 1.5; min-width: 260px; max-width: 360px; white-space: normal; }
.mtip .t { font-weight: 700; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.mtip .a { color: var(--muted); font-size: 12px; }
.mpop .t { font-weight: 700; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.mpop .a { color: var(--muted); font-size: 12px; }
.yp { display: inline-flex; gap: 3px; }
.yp button { padding: 1px 7px; font-size: 12px; border-radius: 10px; }
.yp button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.mpop { font-size: 12.5px; line-height: 1.5; min-width: 220px; }
.mpop b.t { font-size: 13.5px; }
.mpop .btns { display: flex; gap: 6px; margin-top: 6px; }
.mpop .btns button { padding: 3px 9px; font-size: 12.5px; }

/* 오른쪽 분석 패널 */
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(820px, 100%); background: var(--bg); z-index: 1100;
  box-shadow: -4px 0 18px rgba(0,0,0,.15); overflow-y: auto; }
.drawer .close { position: sticky; top: 8px; float: right; margin: 8px 10px 0 0; z-index: 2; font-size: 16px; padding: 3px 10px; }
#main { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.empty { padding: 40px; text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.card h3 { margin: 0 0 8px; font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.subj-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-right: 40px; }
.subj-title { font-size: 16px; font-weight: 700; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-start; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px; margin-top: 10px; }
.kv div { font-size: 13px; }
.kv b { display: block; font-size: 15px; }
.kv .hi b { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.actions a, .actions button { font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  color: var(--ink); text-decoration: none; cursor: pointer; }
.actions .primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.sale { margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 13.5px; }
.sale b.big { font-size: 16px; }
.judge { margin-top: 10px; font-size: 13px; display: grid; gap: 3px; }
.judge .ok { color: var(--good); font-weight: 700; }
.judge .no { color: var(--bad); font-weight: 700; }
.judge .bad { color: var(--bad); } .judge .warn { color: var(--warn); } .judge .info { color: #475467; }
.itabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: -4px 0 10px; }
.itabs button { border: 0; border-radius: 0; background: none; padding: 7px 10px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.itabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.itabs .cnt { font-size: 11px; background: #fee4e2; color: var(--bad); border-radius: 8px; padding: 0 5px; margin-left: 3px; }
.infobody { font-size: 13px; }
/* 항목-내용 칸 = 테두리 있는 표 (모든 탭 공통) */
.infobody .rowkv { display: grid; grid-template-columns: 118px 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 4px 0 12px; font-size: 13px; }
.infobody .rowkv > div { white-space: pre-wrap; padding: 6px 10px; border-bottom: 1px solid #eef0f3; }
.infobody .rowkv > div:nth-child(odd) { color: #475467; background: #f7f8fa; font-weight: 600; font-size: 12.5px; }
.infobody .rowkv > div:nth-last-child(-n+2) { border-bottom: 0; }
.infobody h5 { margin: 14px 0 6px; font-size: 13.5px; }
.rsum td { vertical-align: top; }
.rsum tr:last-child td { background: #f7f8fa; font-weight: 600; }
.issues { margin: 6px 0 10px; padding-left: 18px; font-size: 12.5px; color: var(--bad); }
.issues li { margin: 2px 0; }
details.fold { margin: 8px 0; } details.fold summary { cursor: pointer; color: var(--accent); font-size: 13px; }
a.lnk { font-size: 12px; color: var(--accent); text-decoration: none; margin-left: 4px; }
/* 지도: 선택한 물건 깜빡이는 별 */
.selmark span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; color: #fff;
  background: #f04438; border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(240, 68, 56, .7); animation: selpulse 1.2s infinite; }
@keyframes selpulse { 0% { box-shadow: 0 0 0 0 rgba(240, 68, 56, .7); } 70% { box-shadow: 0 0 0 14px rgba(240, 68, 56, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 68, 56, 0); } }
.infobody ul { margin: 4px 0; padding-left: 18px; }
.infobody h5 { margin: 12px 0 5px; font-size: 13px; }
.grid tr.next td { background: #eef4ff; font-weight: 600; }
.chg { border-left: 3px solid var(--warn); padding: 4px 10px; margin: 6px 0; }
.chg .old { color: var(--muted); text-decoration: line-through; white-space: pre-wrap; }
.chg .new { white-space: pre-wrap; }
.src { font-size: 12px; color: var(--muted); margin: 2px 0 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.src a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.copy { font-size: 11px; padding: 0 6px; border-radius: 8px; margin-left: 4px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; }
.photos img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #f2f4f7; cursor: zoom-in; }
/* 지도 위 레이어 선택 상자 (zones.js) */
.layerbox { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.12); min-width: 150px; }
.layerbox b { display: block; margin-bottom: 3px; font-size: 12px; color: var(--muted); }
.layerbox label { display: flex; gap: 6px; align-items: center; padding: 2px 0; cursor: pointer; }
.layerbox .lb-op { width: 100%; margin: 0 0 4px; accent-color: var(--accent); height: 14px; }
.layerbox .lb-op[hidden] { display: none; }
.layerbox .lb-note { font-size: 11px; color: var(--muted); }
.layerbox .lb-note:empty { display: none; }
.layerbox .lb-msg { font-size: 11.5px; color: #b45309; margin-top: 2px; }
.layerbox .lb-msg:empty { display: none; }
.layerbox .lb-zoom { margin-top: 4px; font-size: 12px; padding: 2px 8px; }
/* 정비구역 이름표 (zones.js) */
.zlabel { background: none; border: 0; transform: translate(-50%, -50%); }
.zlabel span, .zlabel b { display: block; white-space: nowrap; text-align: center; font-style: normal; line-height: 1.3; }
.zlabel span { background: #1d2330; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 5px 5px 0 0; }
.zlabel b { background: #fff; color: #b54708; font-size: 11.5px; padding: 1px 7px; border: 1px solid #1d2330; border-top: 0; border-radius: 0 0 5px 5px; }
.tip { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 3px; border-radius: 50%;
  background: #e4e7ec; color: #475467; font-size: 10px; font-weight: 700; cursor: help; vertical-align: 1px; user-select: none; }
.tip:hover, .tip:focus { background: var(--accent); color: #fff; outline: none; }
#tipbox { position: fixed; z-index: 2200; background: #1d2330; color: #fff; padding: 9px 11px; border-radius: 9px; font-size: 12.5px;
  line-height: 1.55; box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: none; white-space: pre-wrap; }
#tipbox[hidden] { display: none; }
.slider { width: 100%; accent-color: var(--accent); margin: 4px 0 2px; }
.profit-val { color: var(--accent); margin-left: 4px; }
tr.keydoc td { background: #fff8db; }
.courthint { margin: -4px 0 8px; line-height: 1.7; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1d2330; color: #fff; padding: 10px 16px;
  border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 2100; max-width: 92vw; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#gallery { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 12, 16, .92); display: flex; align-items: center; justify-content: center; }
#gallery[hidden] { display: none; }
#gallery figure { margin: 0; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 8px; }
#gallery img { max-width: 100%; max-height: calc(100% - 30px); object-fit: contain; background: #fff; border-radius: 4px; }
#gallery figcaption { color: #e5e7eb; font-size: 14px; }
#gallery button { background: rgba(255, 255, 255, .12); color: #fff; border: none; font-size: 32px; line-height: 1; }
#gallery .g-prev, #gallery .g-next { width: 52px; height: 84px; border-radius: 10px; flex: 0 0 auto; margin: 0 8px; }
#gallery .g-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; }
@media (max-width: 640px) { #gallery .g-prev, #gallery .g-next { position: absolute; bottom: 16px; height: 52px; } #gallery .g-prev { left: 16px; } #gallery .g-next { right: 16px; } }
.infobody .bad { color: var(--bad); }
.rights { margin-top: 8px; font-size: 13px; }
.rights div p { margin: 4px 0; white-space: pre-wrap; }
.ctrl { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; }
.ctrl .num { width: 70px; }
.opt { font-size: 13px; color: var(--muted); white-space: nowrap; }
#typeChips { margin-top: 10px; }
#nbStatus { margin-top: 6px; min-height: 18px; }
.tablewrap { overflow-x: auto; }
.tablewrap.tall { max-height: 520px; overflow-y: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.grid th, .grid td { padding: 5px 8px; border-bottom: 1px solid #eef0f3; text-align: right; white-space: nowrap; }
.grid th { background: #f7f8fa; position: sticky; top: 0; font-weight: 600; color: #444; }
.grid.rows th { cursor: pointer; }
.grid td.l, .grid th.l { text-align: left; }
.grid tr.same td { background: var(--hl); }
.liq { font-weight: 700; }
.liq.good { color: var(--good); } .liq.warn { color: var(--warn); } .liq.bad { color: var(--bad); }
.verdict { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #f3f6ff; font-size: 13.5px; line-height: 1.6; }
.chartbox { position: relative; height: 260px; }
#nbMap { height: 400px; border-radius: 8px; border: 1px solid var(--line); }
.subj-star { color: #d92d20; font-size: 30px; line-height: 30px; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.pop h4 { margin: 0 0 4px; font-size: 13.5px; }
.pop table { border-collapse: collapse; font-size: 12px; }
.pop td { padding: 1px 6px 1px 0; white-space: nowrap; }

@media (max-width: 860px) {
  .only-mobile { display: inline-block; }
  .app { grid-template-columns: 1fr; }
  .filters { position: absolute; inset: 0 auto 0 0; width: min(340px, 92%); z-index: 950; box-shadow: 4px 0 18px rgba(0,0,0,.15); display: none; }
  .filters.open { display: flex; }
  .search { flex-basis: 100%; }
}
/* 권리 요약표·목록: 긴 글은 줄바꿈 (가로 넘침 방지) */
.rsum { width: 100%; table-layout: fixed; }
.rsum td, .rsum th { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.rsum th:nth-child(1), .rsum td:nth-child(1) { width: 92px; }
.rsum th:nth-child(3), .rsum td:nth-child(3) { width: 120px; }
.list li { overflow: hidden; }
.list .p, .list .a, .list .t { white-space: normal; overflow-wrap: anywhere; }
/* 목록이 경고 한 줄(말줄임) 때문에 넓어지지 않게: 부모들 폭 고정 */
#filters .pane, #resultPane, #resList, .list li { min-width: 0; max-width: 100%; }
#resultPane { overflow-x: clip; }  /* hidden 은 머리줄(sticky) 기준을 바꿔 첫 물건을 덮음 → clip */
.list .warnline { display: block; max-width: 100%; }

/* 등기 현황표: 열 폭 (권리 요약표 폭 규칙 대신) */
.reg th:nth-child(1), .reg td:nth-child(1) { width: 26px; text-align: center; }
.reg th:nth-child(2), .reg td:nth-child(2) { width: 84px; }
.reg th:nth-child(3), .reg td:nth-child(3) { width: 96px; }
.reg th:nth-child(6), .reg td:nth-child(6) { width: 92px; }

.regask { margin: 10px 0 2px; padding: 8px 10px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; font-size: 13px; }
.regask button { margin-left: 6px; }

/* 등기부로 확인된 물건: 목록 태그 + 지도 파란 체크 배지 */
.tag.reg { background: #e0eaff; color: #1d4ed8; border-color: #b2ccff; }
.regmark { display: grid !important; place-items: center; width: 13px !important; height: 13px !important; border-radius: 50%;
  background: #2456d6; color: #fff; font-size: 9px; font-weight: 700; line-height: 1; border: 1.5px solid #fff; box-shadow: 0 0 2px rgba(0,0,0,.4); }
.regmark.inline { display: inline-grid !important; vertical-align: middle; margin-right: 6px; }

/* 목록: 등기부로 확인된 물건은 카드 전체 파란 테두리 */
.list li.reg { border: 2px solid #2456d6; border-radius: 8px; margin: 5px 6px; }
.list li.reg.sel { border-left-width: 5px; }

/* 상세: 등기부 분석 완료 */
.regbadge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #2456d6; color: #fff; font-size: 12px; font-weight: 600; vertical-align: middle; }
.regbadge small { opacity: .8; font-weight: 400; }
#main.regdone .card:first-child { border: 2px solid #2456d6; }

/* 보조 링크(인터넷등기소 유료)는 작게 */
[data-f=actions] a.minor { font-size: 11.5px; opacity: .75; }

/* 시세 계산에 쓴 동네 거래 표 */
table.mini { border-collapse: collapse; font-size: 12px; margin: 4px 0 8px; width: 100%; }
table.mini th, table.mini td { padding: 2px 6px; border-bottom: 1px solid var(--line, #e5e5e5); text-align: right; }
table.mini .l { text-align: left; }

/* 지도에서 점을 누른 물건 (목록이 따라 스크롤) */
#resList li.pick { outline: 2px solid #f79009; outline-offset: -2px; }

/* ---------- 진행 중 ↔ 매각 결과 전환 ---------- */
.modes { display: inline-flex; border: 1px solid var(--line, #d0d5dd); border-radius: 8px; overflow: hidden; margin: 0 8px; flex: none; }
.modes button { border: 0; background: transparent; padding: 5px 12px; font-size: 13px; cursor: pointer; color: inherit; }
.modes button.on { background: var(--accent, #2456d6); color: #fff; font-weight: 600; }
/* 매각 결과 패널 */
.sold section { padding-bottom: 6px; }
.sold .seg button.on { background: var(--accent, #2456d6); color: #fff; border-color: var(--accent, #2456d6); }
.sold .seg button.dim { opacity: .45; }
.sold .mt { margin-top: 6px; }
.soldsum .sumgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.soldsum .sumgrid > div { background: #f2f4f7; border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.soldsum .sumgrid b { font-size: 17px; }
.soldsum .catline { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0; }
#soldList li .soldrow { margin-top: 3px; }
#soldList .soldprice { font-size: 15px; }
#soldList .good, .soldkv .good { color: #067647; }
.legend .lg { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; font-size: 12px; }
.soldkv { margin: 8px 0; }
@media (prefers-color-scheme: dark) { .soldsum .sumgrid > div { background: #1f242f; } }
@media (max-width: 860px) { .modes button { padding: 4px 8px; font-size: 12px; } }

/* 매각 결과 화면에선 진행 중 탭 숨김 (.tabs 의 display 가 hidden 을 덮어써서) */
#liveTabs[hidden], .pane[hidden] { display: none !important; }

/* 매각 결과: 한 줄 판정·쉬운 말 요약 */
#soldList .verdictline { margin-top: 3px; font-size: 12.5px; }
.vd.good { color: #067647; } .vd.bad { color: #b42318; }
.subject .plain { margin: 8px 0; line-height: 1.6; font-size: 14px; }
.subject .plain p { margin: 4px 0; }

/* ---------- 매각 결과 카드 (목록) ---------- */
#soldList li.scard { padding: 9px 10px; }
.scard .sc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.scard .sc-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .sc-price { flex: none; display: flex; align-items: center; gap: 5px; }
.scard .sc-price b { font-size: 15px; }
.scard .rate, .sd-tiles em { color: #fff; font-style: normal; font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 10px; }
.scard .sc-sub { color: var(--muted, #667085); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .sc-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted, #667085); margin-top: 3px; }
.scard .sc-verdict { margin-top: 5px; font-size: 12px; padding: 3px 8px; border-radius: 6px; display: inline-block; }
.scard .sc-verdict.good { background: #ecfdf3; color: #067647; }
.scard .sc-verdict.bad { background: #fef3f2; color: #b42318; }
/* ---------- 매각 결과 자세히 ---------- */
.sold-detail .sd-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 10px; }
.sold-detail .sd-tiles > div { border: 1px solid var(--line, #e4e7ec); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.sold-detail .sd-tiles > div.hl { border-width: 2px; }
.sold-detail .sd-tiles span { font-size: 12px; color: var(--muted, #667085); }
.sold-detail .sd-tiles b { font-size: 17px; }
.sold-detail .sd-tiles small { font-size: 12px; color: var(--muted, #667085); }
.sold-detail .sd-ladder { margin: 6px 0 12px; }
.sold-detail .sd-ladder .bar { position: relative; height: 8px; background: #eaecf0; border-radius: 4px; margin: 10px 6px 8px; }
.sold-detail .sd-ladder .mk { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.sold-detail .sd-ladder .mk.main { width: 16px; height: 16px; }
.sold-detail .sd-ladder .keys { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.sold-detail .sd-ladder .keys i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.sold-detail .sd-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.sold-detail .sd-table th { text-align: left; font-weight: 500; color: var(--muted, #667085); white-space: nowrap; padding: 7px 12px 7px 0; vertical-align: top; width: 1%; border-top: 1px solid var(--line, #f2f4f7); }
.sold-detail .sd-table td { padding: 7px 0; border-top: 1px solid var(--line, #f2f4f7); }
.sold-detail .good { color: #067647; } .sold-detail .bad { color: #b42318; }
@media (prefers-color-scheme: dark) {
  .scard .sc-verdict.good { background: #053321; color: #75e0a7; } .scard .sc-verdict.bad { background: #55160c; color: #fda29b; }
  .sold-detail .sd-ladder .bar { background: #333741; }
}
/* 좁은 왼쪽 목록에서도 잘리지 않게 */
#soldList li.scard { overflow: hidden; }
.scard .sc-name { flex: 1 1 auto; }
.scard .sc-price b { font-size: 14px; white-space: nowrap; }
.scard .sc-verdict { display: block; white-space: normal; }
/* 한 줄 고정 글자(nowrap)가 목록 폭을 넓혀 오른쪽이 잘리던 것: 폭을 왼쪽 칸에 맞춤 */
#soldPane, #soldPane > section, #soldList { min-width: 0; max-width: 100%; overflow-x: clip; }  /* hidden 은 스크롤 상자가 돼 머리 고정이 깨짐 */
#soldList li.scard, .scard .sc-top, .scard .sc-sub { min-width: 0; max-width: 100%; }
/* 매각 결과에는 위 탭이 없으니 목록 머리를 맨 위에 붙임 (41px 띄우면 그 틈으로 카드가 비쳐 잘려 보임) */
#soldPane .res-head { top: 0 !important; z-index: 5; box-shadow: 0 1px 0 var(--line, #e4e7ec); }
#soldPane .res-head b { white-space: nowrap; font-size: 13px; }
.linkbtn { margin-left: auto; font-size: 11.5px; padding: 1px 8px; border-radius: 10px; color: var(--accent); border-color: var(--accent); background: #fff; font-weight: 600; }
.peers .tag { margin-right: 4px; }

.statuslink { margin-left: auto; font-size: 13px; text-decoration: none; white-space: nowrap; padding: 4px 8px; border: 1px solid var(--line, #d0d5dd); border-radius: 8px; }

/* ================= 2026-10-09 화면 정리 ================= */
/* 진행 중 목록 카드 (매각 결과 카드와 같은 틀) */
#resList li { padding: 9px 10px; overflow: hidden; min-width: 0; }
#resList .sc-top, .mtip .sc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
#resList .sc-name, .mtip .sc-name { font-weight: 600; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-dday { flex: none; font-size: 12px; color: var(--muted, #667085); white-space: nowrap; }
.sc-dday.soon b { color: var(--bad, #b42318); }
#resList .sc-sub, .mtip .sc-sub { color: var(--muted, #667085); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-row { font-size: 13px; margin-top: 3px; }
.sc-row .sep { color: var(--line, #d0d5dd); margin: 0 4px; }
.sc-row .tag { margin-left: 4px; }
#resList, #resultPane, #filterPane { min-width: 0; max-width: 100%; overflow-x: clip; }
.mtip { max-width: 300px; }
/* 목록 크게: 왼쪽 칸 넓히고 카드 2열 */
.app.wide { grid-template-columns: min(700px, 55vw) 1fr; }
.app.wide #resList, .app.wide #soldList { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
.widebtn { font-size: 12px; padding: 2px 8px; border: 1px solid var(--line, #d0d5dd); border-radius: 8px; background: transparent; cursor: pointer; margin-left: auto; margin-right: 6px; white-space: nowrap; }
.app.wide .widebtn { background: var(--accent, #2456d6); color: #fff; border-color: var(--accent, #2456d6); }
/* 상세: 판정 맨 위, 숫자는 칸, 링크 줄임 */
.subject .judge { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f9fafb; border: 1px solid var(--line, #e4e7ec); }
.subject .judge .ok, .subject .judge .no { font-size: 14.5px; }
.subject .kv { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.subject .kv > div { border: 1px solid var(--line, #e4e7ec); border-radius: 10px; padding: 7px 10px; }
.subject .kv > div.hi { border: 2px solid var(--accent, #2456d6); }
.subject .sale { font-size: 13px; }
.morelinks { display: inline-block; position: relative; }
.morelinks summary { list-style: none; cursor: pointer; font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 14px; }
.morelinks summary::-webkit-details-marker { display: none; }
.morelinks[open] > div { position: absolute; z-index: 20; top: 28px; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; width: 280px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.morenotes summary { cursor: pointer; color: var(--muted, #667085); font-size: 12.5px; margin-top: 2px; }
.actions .minor { opacity: .8; }
.subh { margin: 18px 0 6px; font-size: 14px; }
@media (prefers-color-scheme: dark) { .subject .judge { background: #1f242f; } .morelinks[open] > div { background: #161b26; } }

/* 내 순위(/my) 안에 끼워 넣는 모드 (?embed=1): 오른쪽 상세만 전체 폭으로 */
body.embed > header.bar, body.embed .filters, body.embed .mapwrap, body.embed .drawer .close { display: none !important; }
body.embed main.app { display: block; height: auto; }
body.embed .drawer { position: static; width: 100%; box-shadow: none; overflow: visible; }

/* ================= 2026-11-06 보기 좋게 (사용자 "글자가 너무 많다") ================= */
/* 상단: 화면 이동 알약 */
.bar .navpills { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.bar .navpills a { font-size: 13px; text-decoration: none; padding: 4px 11px; border-radius: 14px; background: #eef0f3; color: var(--ink); white-space: nowrap; }
.bar .navpills a:hover { background: var(--accent); color: #fff; }
/* 왼쪽 조건: 제목 가볍게, 칩은 알약 모양, 긴 설명은 '더 보기' 안으로 */
.filters section { padding: 12px 14px; gap: 8px; }
.filters h4 { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .2px; }
.filters .quick button, .filters .chips button, .filters .chips label { border: 0; background: #eef0f3; border-radius: 14px; padding: 4px 10px; font-size: 12.5px; }
.filters .quick button.on, .filters .chips button.on, .filters .chips .on { background: var(--accent); color: #fff; }
.filters details.more { border-top: 1px solid #eef0f3; }
.filters details.more > summary { list-style: none; cursor: pointer; padding: 10px 14px; font-size: 12.5px; color: var(--accent); font-weight: 700; }
.filters details.more > summary::-webkit-details-marker { display: none; }
.filters details.more > summary::after { content: " ▾"; }
.filters details.more[open] > summary::after { content: " ▴"; }
.filters .tabs button { font-weight: 700; }
/* 결과 카드: 숫자 3칸 + 막대 */
#resList li { padding: 11px 12px; }
.sc-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.sc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 7px; background: #f6f7f9; border-radius: 8px; padding: 5px 8px; }
.sc-nums small { display: block; font-size: 10.5px; color: var(--muted); }
.sc-nums b { font-size: 13.5px; }
.sc-nums .up b { color: var(--good); }
.sc-nums .down b { color: var(--bad); }
.sc-nums .est b { font-size: 15px; } .sc-nums small em { font-style: normal; font-weight: 700; }  /* 시세가 첫 칸·가장 크게 (2026-11-07) */
.sc-nums .dim b { color: var(--muted); font-weight: 400; font-size: 12px; }
.sc-bar { position: relative; height: 5px; border-radius: 3px; background: #eceef2; margin-top: 7px; }
.sc-bar i { position: absolute; top: 0; bottom: 0; }
.sc-bar .gap { border-radius: 3px; background: linear-gradient(90deg, #d7f0e2, var(--good)); }
.sc-bar .mx { width: 3px; top: -3px; bottom: -3px; background: var(--accent); border-radius: 2px; }
.sc-bar .es { width: 2px; top: -3px; bottom: -3px; background: var(--ink); }
.tag { border: 0; background: #eef0f3; border-radius: 6px; padding: 1px 7px; font-weight: 700; }
.tag.good { background: #e3f5ea; color: var(--good); }
.tag.warn { background: #fff1e0; color: var(--warn); }
.tag.bad { background: #fde8e6; color: var(--bad); }
.tag.hug { background: #e3f5ea; color: var(--good); }
@media (prefers-color-scheme: dark) {
  .bar .navpills a, .filters .quick button, .filters .chips button { background: #242a33; color: #e6e9ef; }
  .sc-nums { background: #1f242f; } .sc-bar { background: #2a313b; } .tag { background: #242a33; }
}
/* 좁은 화면(휴대폰·/my 안 법원 서류 칸)에서 표가 글자 한 자씩 세로로 깨지지 않게: 표는 최소 폭 유지 + 옆으로 밀어 보기 (2026-11-06) */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.rsum { min-width: 520px; }
table.rsum.reg { min-width: 640px; }
table.grid td, table.grid th { word-break: keep-all; }
/* 끼워넣기(/my 원문 탭): 화면 높이에 묶지 않음 → 안쪽 스크롤 없이 바깥에서 전체 높이로 (2026-11-06 "좁은 칸에 스크롤") */
html:has(body.embed), body.embed { height: auto; }
body.embed { display: block; }
body.embed #main { padding: 0; }
/* ===== 물건 상세 위쪽 (2026-11-06 경매정보지처럼): 꼬리표 한 줄 → 4칸×3줄 표 → 판정 → 링크 ===== */
.subject .dtags { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 2px; }
.subject .dtags .tag { font-size: 12px; padding: 2px 8px; }
.infotbl { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.infotbl td { border: 1px solid #eceef2; padding: 7px 10px; vertical-align: top; }
.infotbl td > span { display: block; font-size: 11.5px; color: var(--muted); }
.infotbl td > b { font-size: 15px; white-space: nowrap; }
.infotbl td em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.infotbl td em.bad { color: var(--bad); }
.infotbl td.strong > b { font-size: 16.5px; }
.infotbl td.hi { background: #eef3ff; }
.infotbl td.hi > b { color: var(--accent); font-size: 17px; }
/* 2026-11-07 시세가 첫 칸·가장 크게 */
.infotbl td.star { background: #fff7e6; } .infotbl td.star > b { font-size: 19px; } .infotbl td.star em { display: block; margin: 2px 0 0; }
.judge .ref { color: var(--muted); font-size: 12.5px; }
.esthead { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; }
.esthead > div { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; } .esthead b.big { font-size: 20px; }
.esthead > div.muted { flex-basis: 100%; }
.cands { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.cand { border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; color: var(--muted); }
.cand.on { border-color: var(--accent); color: var(--ink); background: #eef3ff; }
@media (prefers-color-scheme: dark) { .infotbl td.star { background: #2b2414; } .cand.on { background: #1c2a45; } }
.subject .judge { margin-top: 10px; padding: 9px 12px; }
.subject .judge .ok, .subject .judge .no { font-size: 15px; }
.subject .actions { margin-top: 10px; }
.subject .kv { display: none; }
@media (max-width: 640px) {
  .infotbl, .infotbl tbody, .infotbl tr { display: block; } .infotbl tr { display: grid; grid-template-columns: 1fr 1fr; }
  .infotbl td > b { font-size: 14px; white-space: normal; }
}
@media (prefers-color-scheme: dark) { .infotbl td { border-color: #2a313b; } .infotbl td.hi { background: #1c2a45; } }
/* 상세 탭: 알약 대신 밑줄 탭 유지, 글자 조금 크게 */
.itabs button { font-size: 13.5px; padding: 8px 12px; }
.subject .sale { background: none !important; border: 0 !important; padding: 0 !important; margin: 0; }
/* 휴대폰: 상세 탭 7개가 세 줄로 접히던 것 → 한 줄로 옆으로 밀기 (2026-11-07) */
@media (max-width: 600px) { .itabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .itabs::-webkit-scrollbar { display: none; } .itabs button { white-space: nowrap; flex: none; } }

/* 시세 근거 한 줄 (표 바로 아래) */
.estline { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; line-height: 1.5; } .estline b { color: var(--ink); } .estline a { color: var(--accent); }

.infotbl td em.sub { display: block; margin: 2px 0 0; font-weight: 500; }

/* 내 입찰가 슬라이더 (2026-11-07) */
.bidsim { margin-top: 10px; padding: 10px 12px; border: 2px solid var(--accent); border-radius: 10px; background: #f5f8ff; }
.bidsim .bs-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .bidsim .bs-h input { width: 90px; font-size: 16px; font-weight: 700; padding: 3px 6px; }
.bidsim .bs-track { position: relative; padding-bottom: 22px; } .bidsim input[type=range] { width: 100%; accent-color: var(--accent); margin: 8px 0 0; }
.bs-marks { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; }
.bs-marks .bm { position: absolute; top: -16px; width: 3px; height: 24px; margin-left: -1px; border-radius: 2px; background: var(--muted); } .bs-marks .bm span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; font-style: normal; }
.bs-marks .bm.mx { background: var(--good); } .bs-marks .bm.mx span { color: var(--good); font-weight: 700; } .bs-marks .bm.ref { background: #b26a00; } .bs-marks .bm.ref span { color: #b26a00; font-weight: 700; }
.bs-kp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 4px; } .bs-kp small { display: block; font-size: 11.5px; color: var(--muted); } .bs-kp b { font-size: 18px; }
@media (prefers-color-scheme: dark) { .bidsim { background: #172036; } }

/* 슬라이더 기준선 금액은 아래 범례 한 줄로 (선 옆 글자가 겹쳐서, 2026-11-07) */
.bidsim .bs-track { padding-bottom: 6px; } .bs-marks .bm { top: -20px !important; } .bs-marks .bm span { display: none; }
.bs-legend { display: flex; gap: 4px 12px; flex-wrap: wrap; font-size: 12px; margin: 2px 0 4px; }
.bs-legend .lg::before { content: ""; display: inline-block; width: 3px; height: 12px; margin-right: 4px; vertical-align: -1px; background: var(--muted); }
.bs-legend .ref { color: #b26a00; font-weight: 700; } .bs-legend .ref::before { background: #b26a00; }
.bs-legend .mx { color: var(--good); font-weight: 700; } .bs-legend .mx::before { background: var(--good); }
/* 표시 이름을 누르면 그 값으로 (2026-11-19) — 글자처럼 보이되 누를 수 있게 */
.bs-legend button.lg { background: none; border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; font: inherit; color: inherit; cursor: pointer; }
.bs-legend button.lg:hover { border-color: currentColor; }
.bs-legend button.ref { color: #b26a00; } .bs-legend button.mx { color: var(--good); }
