/* Area Check — split view: list left, map right */
.split { display: grid; grid-template-columns: minmax(420px, 560px) 1fr; height: 100vh; padding-top: 74px; }
.list { overflow-y: auto; padding: 22px 24px 40px; scrollbar-width: thin; }
.list-head h1 { font-size: 34px; letter-spacing: -.045em; font-weight: 600; margin: 4px 0 4px; }
.list-head p { color: var(--ink-2); margin: 0 0 18px; }
.search { position: relative; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh-1); color: var(--muted); margin-bottom: 12px; }
.search:focus-within { box-shadow: 0 0 0 3px rgba(201, 138, 38, .2), var(--sh-1); }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15.5px; color: var(--ink); min-width: 0; }
.search .drop { top: 56px; }
#regions { margin-bottom: 18px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }

.mapwrap { position: relative; margin: 0 14px 14px 0; border-radius: 22px; overflow: hidden; box-shadow: var(--sh-1); isolation: isolate; }
#map { position: absolute; inset: 0; background: #eceef1; }
.map-ui { position: absolute; top: 14px; left: 14px; z-index: 500; }
.map-ui .seg { background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); box-shadow: var(--sh-1); }
.map-ui .seg button.on { background: var(--ink); color: #fff; }
.legend { position: absolute; left: 14px; bottom: 14px; z-index: 500; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh-1); font-size: 12px; color: var(--ink-2); }
.legend .ramp { display: flex; gap: 3px; margin: 6px 0 4px; }
.legend .ramp i { width: 30px; height: 8px; border-radius: 4px; }
.legend .ends { display: flex; justify-content: space-between; font-family: var(--mono); color: var(--muted); font-size: 11px; }
.leaflet-container { font-family: var(--sans); }
.leaflet-tile-pane { filter: saturate(.6) brightness(1.04) hue-rotate(-8deg); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--sh-1) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-zoom a { color: var(--ink) !important; }
.leaflet-tooltip.tip { background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 6px 10px; font: 500 12.5px var(--sans); box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .35); }
.leaflet-tooltip.tip::before { border-top-color: var(--ink); }
.leaflet-tooltip.tip small { display: block; font-family: var(--mono); color: #aab1bd; font-size: 11.5px; }

/* Detail */
.detail { display: grid; gap: 12px; }
.panel { background: var(--surface); border-radius: 20px; box-shadow: var(--sh-1); padding: 20px; animation: up .45s cubic-bezier(.2, .8, .2, 1) both; }
.panel:nth-child(2) { animation-delay: .04s; } .panel:nth-child(3) { animation-delay: .08s; } .panel:nth-child(4) { animation-delay: .12s; } .panel:nth-child(5) { animation-delay: .16s; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.d-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.crumb { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.d-name { font-size: 30px; letter-spacing: -.045em; font-weight: 600; margin: 4px 0 10px; line-height: 1.05; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.d-note { color: var(--ink-2); margin: 14px 0 0; font-size: 15px; }
.share { border: 0; background: var(--sunken); border-radius: 999px; padding: 7px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.share:hover { background: #e9e9e5; }

.sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.s { background: var(--surface); padding: 14px 14px 12px; }
.s small { color: var(--muted); font-size: 12px; display: block; }
.s b { display: block; font-family: var(--mono); font-weight: 500; font-size: 20px; letter-spacing: -.05em; margin: 4px 0 2px; white-space: nowrap; }
.s b .u { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: 0; }
.s em { font-style: normal; font-size: 12px; color: var(--muted); }
.s em.pos { color: var(--leaf); }
.s.hi b { color: #8f5a0c; }

.h3 { font-size: 16px; letter-spacing: -.02em; font-weight: 600; margin: 0 0 2px; }
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.rbars { display: grid; gap: 10px; }
.rbar { display: grid; grid-template-columns: 54px 1fr 80px; gap: 12px; align-items: center; font-size: 13.5px; }
.rbar .track { height: 10px; background: var(--sunken); border-radius: 99px; position: relative; }
.rbar .fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.rbar .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; opacity: .55; }
.rbar b { text-align: right; font-family: var(--mono); font-weight: 500; font-size: 13px; }
.key { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.key i { width: 2px; height: 12px; background: var(--ink); opacity: .55; display: inline-block; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.vs div { background: var(--sunken); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.vs b { font-size: 16px; color: var(--ink); display: block; letter-spacing: -.02em; font-weight: 600; }

.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.field .inp { display: flex; align-items: center; border-radius: 12px; padding: 0 12px; height: 44px; background: var(--sunken); }
.field .inp:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.field input { border: 0; outline: 0; background: transparent; width: 100%; font-family: var(--mono); font-size: 16px; color: var(--ink); }
.field .inp span { color: var(--muted); font-size: 13px; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.result { border-radius: 14px; padding: 14px 16px; background: var(--ink); color: #fff; }
.result small { color: #9aa1ad; font-size: 12px; display: block; }
.result b { display: block; font-family: var(--mono); font-weight: 500; font-size: 22px; letter-spacing: -.05em; margin: 2px 0; }
.result em { font-style: normal; color: #e7c37f; font-size: 12.5px; }
.result:nth-child(2) { background: linear-gradient(160deg, #e2a83f, #c98a26); color: #111214; }
.result:nth-child(2) small, .result:nth-child(2) em { color: #4a3510; }

.l-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
#lseg { margin-bottom: 12px; max-width: 100%; overflow-x: auto; }
#lseg .muted { font-family: var(--mono); font-size: 11.5px; margin-left: 2px; }
.lgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lcard { border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--sh-1); transition: transform .2s, box-shadow .2s; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.lcard .ph { height: 92px; position: relative; display: grid; place-items: center; font-size: 30px; }
.ph.rent { background: linear-gradient(135deg, #f7ecd4, #e9c98a); }
.ph.sale { background: linear-gradient(135deg, #fff0e6, #ffc9ab); }
.ph.stay { background: linear-gradient(135deg, #eef0f2, #c9d0d8); }
.lcard .ph .tag { position: absolute; top: 8px; left: 8px; background: rgba(255, 255, 255, .9); }
.lcard .ph .tag-s { position: absolute; top: 9px; right: 9px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-2); background: rgba(255, 255, 255, .7); padding: 2px 7px; border-radius: 99px; }
.lcard .bd { padding: 12px 14px 14px; }
.lcard .pr { font-family: var(--mono); font-weight: 500; font-size: 17px; letter-spacing: -.05em; }
.lcard .pr small { font-family: var(--sans); color: var(--muted); font-size: 12.5px; letter-spacing: 0; }
.lcard .tt { font-size: 14px; font-weight: 500; margin: 2px 0; }
.lcard .meta { font-size: 12.5px; color: var(--muted); }
.vs-avg { font-size: 12px; font-weight: 500; margin-top: 8px; display: inline-block; padding: 2px 8px; border-radius: 99px; }
.vs-avg.good { background: var(--leaf-soft); color: #0f7a54; }
.vs-avg.high { background: var(--peach-soft); color: #b5552a; }
.vs-avg.fair { background: var(--sunken); color: var(--ink-2); }
.l-empty { text-align: center; padding: 28px 16px; border-radius: 16px; background: var(--sunken); color: var(--ink-2); }
.l-empty .em { font-size: 32px; }
.l-empty p { margin: 4px 0 14px; font-size: 14px; }

/* Table */
.table-sec { padding: 80px 0 30px; }
.table-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.table-head h2 { font-size: 32px; letter-spacing: -.045em; font-weight: 600; margin: 8px 0 2px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
.table-wrap { background: var(--surface); border-radius: 20px; box-shadow: var(--sh-1); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
th { text-align: left; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 400; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; }
th:hover { color: var(--ink); }
th.sorted { color: #8f5a0c; }
th.sorted::after { content: " ↓"; }
th.sorted.asc::after { content: " ↑"; }
td { padding: 12px 16px; border-bottom: 1px solid #f1f1ee; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: #fafaf8; }
tbody tr.sel { background: var(--accent-soft); }
.num { text-align: right; font-family: var(--mono); font-size: 13.5px; }
td .reg { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.ybar { display: inline-block; width: 42px; height: 5px; background: var(--sunken); border-radius: 9px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.ybar i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.disclaimer { font-size: 13px; color: var(--muted); max-width: 860px; margin: 16px 0 0; }

dialog { border: 0; border-radius: 22px; padding: 0; width: min(440px, calc(100% - 32px)); box-shadow: var(--sh-2); color: var(--ink); }
dialog::backdrop { background: rgba(13, 15, 20, .3); backdrop-filter: blur(4px); }
dialog form { padding: 22px; display: grid; gap: 12px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.x-btn { border: 0; background: var(--sunken); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; }
dialog label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
dialog input, dialog select { border: 0; border-radius: 12px; padding: 11px 12px; background: var(--sunken); font-size: 15px; outline: 0; }
dialog input:focus, dialog select:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

@media (max-width: 900px) {
  .split { display: flex; flex-direction: column; height: auto; padding-top: 80px; min-width: 0; }
  .split > * , .detail > * { min-width: 0; }
  .list { display: contents; }
  .list-head { order: 1; padding: 20px 16px 0; }
  .mapwrap { order: 2; height: 380px; margin: 0 16px 14px; }
  .detail { order: 3; padding: 0 16px; }
}
@media (max-width: 560px) {
  .sgrid { grid-template-columns: 1fr 1fr; }
  .lgrid, .calc-row, .calc-out, .vs { grid-template-columns: 1fr; }
  .search kbd { display: none; }
}
