:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eef5ff;
  --ink: #0f172a;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e1e7ef;
  --line-strong: #cfd9e6;
  --blue: #2563eb;
  --blue-dark: #174fc7;
  --blue-soft: #eaf2ff;
  --orange: #ff6817;
  --orange-soft: #fff1e8;
  --teal: #11a889;
  --teal-soft: #e7f8f4;
  --red: #ef4f45;
  --red-soft: #fff0ee;
  --yellow: #f5a524;
  --yellow-soft: #fff7e5;
  --shadow-1: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-2: 0 8px 22px rgba(15, 23, 42, 0.08);
  --shadow-3: 0 18px 48px rgba(15, 23, 42, 0.14);
  --topbar-h: 62px;
  --search-h: 50px;
  --filter-h: 48px;
  --brief-h: 42px;
  font-family: Pretendard, "Spoqa Han Sans Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.58) rgba(225, 231, 239, 0.9);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0, rgba(255, 255, 255, 0.94) 120px, rgba(238, 243, 248, 0) 260px),
    radial-gradient(circle at 12% 0%, rgba(255, 104, 23, 0.055), transparent 25%),
    linear-gradient(90deg, rgba(37, 99, 235, 0.055), transparent 48%, rgba(17, 168, 137, 0.055)),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.search-box input:focus-visible {
  box-shadow: none;
}

body::-webkit-scrollbar,
.listing-list::-webkit-scrollbar,
.crm-drawer::-webkit-scrollbar,
.advanced-strip::-webkit-scrollbar,
.deal-segment::-webkit-scrollbar,
.category-rail::-webkit-scrollbar,
.main-nav::-webkit-scrollbar,
.market-brief-metrics::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

body::-webkit-scrollbar-track,
.listing-list::-webkit-scrollbar-track,
.crm-drawer::-webkit-scrollbar-track,
.advanced-strip::-webkit-scrollbar-track,
.deal-segment::-webkit-scrollbar-track,
.category-rail::-webkit-scrollbar-track,
.main-nav::-webkit-scrollbar-track,
.market-brief-metrics::-webkit-scrollbar-track {
  background: rgba(225, 231, 239, 0.9);
  border-radius: 8px;
}

body::-webkit-scrollbar-thumb,
.listing-list::-webkit-scrollbar-thumb,
.crm-drawer::-webkit-scrollbar-thumb,
.advanced-strip::-webkit-scrollbar-thumb,
.deal-segment::-webkit-scrollbar-thumb,
.category-rail::-webkit-scrollbar-thumb,
.main-nav::-webkit-scrollbar-thumb,
.market-brief-metrics::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.72), rgba(17, 168, 137, 0.64));
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
}

.app-shell {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-rows: var(--topbar-h) var(--search-h) var(--filter-h) var(--brief-h) 1fr;
  overflow: hidden;
}

.topbar {
  position: relative;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.985);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  z-index: 30;
}

.brand {
  min-width: 144px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-wordmark {
  width: 142px;
  height: 38px;
  display: block;
  object-fit: contain;
}

.brand-logo,
.brand strong,
.brand small {
  display: none;
}

.main-nav {
  height: var(--topbar-h);
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
  height: var(--topbar-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  color: var(--ink-2);
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  transition: color 150ms ease;
}

.nav-item:hover {
  color: var(--blue);
}

.nav-item.is-active {
  color: var(--blue);
}

.nav-item::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: center;
  transition: opacity 150ms ease, transform 150ms ease;
}

.nav-item:hover::after,
.nav-item.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.top-actions {
  margin-left: auto;
  height: var(--topbar-h);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.search-box.header-search {
  position: absolute;
  left: 50%;
  width: clamp(320px, 32vw, 440px);
  height: 38px;
  flex: 0 0 auto;
  margin-left: 0;
  transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.search-box.header-search input {
  font-size: 13px;
}

.login-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(207, 217, 230, 0.92);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  transition: transform 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.login-button:hover {
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.search-strip {
  height: var(--search-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  z-index: 24;
}

.search-box.mobile-search {
  display: none;
}

.search-box {
  position: relative;
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid rgba(207, 217, 230, 0.95);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  overflow: visible;
}

.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11), 0 8px 18px rgba(37, 99, 235, 0.08);
}

.search-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid var(--blue);
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  background: var(--blue);
  border-radius: 8px;
  transform: rotate(45deg);
}

.search-box input {
  min-width: 0;
  width: 100%;
  height: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
  font-weight: 720;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-clear,
.search-submit {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.search-clear {
  display: none;
  position: relative;
  color: var(--muted);
  background: transparent;
}

.search-box.has-value .search-clear {
  display: grid;
}

.search-clear::before,
.search-clear::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 1.8px;
  background: currentColor;
  border-radius: 999px;
}

.search-clear::before {
  transform: rotate(45deg);
}

.search-clear::after {
  transform: rotate(-45deg);
}

.search-clear:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.search-submit {
  position: relative;
  color: #ffffff;
  background: var(--orange);
}

.search-submit::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-1px, -1px);
}

.search-submit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: translate(6px, 7px) rotate(45deg);
}

.search-submit:hover {
  background: #f25b0b;
  transform: translateY(-1px);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 80;
  width: min(420px, 100%);
  max-height: min(424px, calc(100vh - 96px));
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  animation: suggestionIn 140ms ease both;
}

.search-box.header-search .search-suggestions {
  width: 100%;
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion {
  width: 100%;
  min-height: 62px;
  display: grid;
  gap: 4px;
  padding: 11px 16px;
  color: var(--ink);
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

.search-suggestion:last-child {
  border-bottom: 0;
}

.search-suggestion:hover,
.search-suggestion:focus-visible {
  background: #f8fbff;
}

.search-suggestion strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 880;
}

.search-suggestion span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

@keyframes suggestionIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.deal-segment {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-chip {
  height: 32px;
  min-width: 58px;
  padding: 0 14px;
  color: var(--ink-2);
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.filter-chip.is-active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 7px 15px rgba(37, 99, 235, 0.22);
}

.advanced-strip {
  height: var(--filter-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  overflow-x: auto;
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid var(--line);
  z-index: 23;
}

.soft-toggle,
.soft-filter,
.status-select,
.reset-button {
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--ink-2);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.soft-toggle,
.soft-filter,
.reset-button {
  padding: 0 13px;
}

.soft-toggle.is-active {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(17, 168, 137, 0.28);
}

.soft-filter::after,
.status-select::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  opacity: 0.6;
  transform: rotate(45deg) translateY(-2px);
}

.status-select {
  padding: 0 9px 0 12px;
}

.status-select span {
  color: var(--muted);
  font-size: 12px;
}

.status-select select {
  appearance: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  font-weight: 820;
}

.reset-button {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(239, 79, 69, 0.22);
}

.market-brief {
  height: var(--brief-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

.market-brief-main {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.market-brief-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 920;
  white-space: nowrap;
}

.market-brief-main span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-brief-metrics {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  flex: 0 0 auto;
}

.market-brief-metrics span {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--ink-2);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.market-brief-metrics b {
  color: var(--blue);
  font-size: 14px;
}

.mobile-view-switch {
  display: none;
}

.workspace {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 112px 404px minmax(0, 1fr);
  overflow: hidden;
}

.category-rail {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 8px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--line);
}

.category-tab {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-rows: 34px auto auto;
  place-items: center;
  gap: 5px;
  padding: 10px 8px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid rgba(225, 231, 239, 0.8);
  border-radius: 8px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.category-tab:hover {
  color: var(--blue);
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.category-tab span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), #5da2ff);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 950;
}

.category-tab strong {
  max-width: 100%;
  color: inherit;
  font-size: 13px;
  font-weight: 920;
  line-height: 1.15;
  text-align: center;
  word-break: keep-all;
}

.category-tab small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tab.is-active {
  color: var(--blue);
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: var(--shadow-2);
}

.category-tab.is-active span {
  background: linear-gradient(135deg, var(--orange), var(--blue));
}

.category-tab.is-active small {
  color: var(--blue);
}

.listing-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 26px rgba(15, 23, 42, 0.07);
  z-index: 5;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 15px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 940;
}

.save-search {
  height: 38px;
  flex: 0 0 auto;
  padding: 0 16px;
  color: #ffffff;
  background: var(--teal);
  border: 1px solid rgba(17, 168, 137, 0.34);
  border-radius: 8px;
  box-shadow: 0 9px 18px rgba(17, 168, 137, 0.18);
  font-size: 13px;
  font-weight: 880;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-grid div {
  min-width: 0;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
}

.summary-grid div:last-child {
  border-right: 0;
}

.summary-grid strong {
  display: block;
  color: var(--blue);
  font-size: 23px;
  line-height: 1;
  font-weight: 950;
}

.summary-grid span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 10px;
}

.section-title-row h2,
.section-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 920;
}

.section-title-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-title-row.tight {
  padding: 0;
}

.listing-list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px 18px 14px;
  overflow-y: auto;
}

.listing-card {
  position: relative;
  width: 100%;
  min-height: 172px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  color: inherit;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.listing-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: var(--shadow-2);
}

.listing-card.is-selected {
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
}

.listing-card.is-selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
  border-radius: 0 8px 8px 0;
}

.listing-media {
  position: relative;
  width: 118px;
  height: 152px;
  overflow: hidden;
  background: #e5e7eb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.listing-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.listing-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.76));
}

.photo-count {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 7px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.84);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
}

.listing-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.listing-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.listing-kicker > span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.status-new {
  color: var(--red);
  background: var(--red-soft);
}

.status-called,
.status-recommended {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-visit {
  color: var(--teal);
  background: var(--teal-soft);
}

.status-contract {
  color: #875100;
  background: var(--yellow-soft);
}

.status-hold {
  color: #64748b;
  background: #f1f5f9;
}

.listing-price {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 960;
}

.listing-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 890;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-meta,
.listing-sub {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.28;
  font-weight: 690;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-trust,
.tag-row,
.card-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.listing-trust b,
.tag-row span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.listing-trust b {
  color: var(--blue);
  background: var(--blue-soft);
}

.listing-trust b:nth-child(2) {
  color: var(--teal);
  background: var(--teal-soft);
}

.listing-trust b:nth-child(3) {
  color: #9a4b12;
  background: var(--orange-soft);
}

.tag-row span {
  color: var(--ink-2);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.card-footer {
  margin-top: auto;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.agent-mini,
.inquiry-mini {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-mini b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--teal);
  border-radius: 7px;
  font-size: 9px;
}

.empty-state {
  margin: 12px 4px;
  padding: 22px;
  color: var(--ink-2);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.map-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #dbe6f1;
}

.map-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.mock-map-surface {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.48) 1px, transparent 1px),
    linear-gradient(135deg, #edf4fb 0%, #f3f8f2 52%, #e7f1fb 100%);
  background-size: 48px 48px, 48px 48px, cover;
}

.mock-map-surface::before {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    linear-gradient(116deg, transparent 0 28%, rgba(255, 255, 255, 0.78) 28% 31%, transparent 31%),
    linear-gradient(22deg, transparent 0 46%, rgba(255, 255, 255, 0.72) 46% 49%, transparent 49%),
    linear-gradient(151deg, transparent 0 58%, rgba(165, 184, 205, 0.38) 58% 61%, transparent 61%);
  pointer-events: none;
}

.road {
  position: absolute;
  z-index: 1;
  height: 18px;
  background: rgba(255, 253, 248, 0.98);
  border: 1px solid rgba(199, 210, 222, 0.9);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
}

.road-a {
  left: -8%;
  top: 28%;
  width: 72%;
  transform: rotate(22deg);
}

.road-b {
  left: 20%;
  top: 56%;
  width: 92%;
  transform: rotate(-8deg);
}

.road-c {
  left: -5%;
  top: 74%;
  width: 54%;
  transform: rotate(-16deg);
}

.road-d {
  right: -10%;
  top: 42%;
  width: 46%;
  transform: rotate(35deg);
}

.map-water,
.map-park {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.map-water {
  left: -6%;
  right: -6%;
  bottom: -12%;
  height: 31%;
  background: linear-gradient(135deg, rgba(83, 163, 219, 0.3), rgba(110, 199, 222, 0.46));
  transform: rotate(-8deg);
}

.map-park {
  background: rgba(68, 164, 103, 0.22);
  border: 1px solid rgba(68, 164, 103, 0.2);
  border-radius: 8px;
}

.park-a {
  left: 16%;
  top: 59%;
  width: 28%;
  height: 15%;
  transform: rotate(-8deg);
}

.park-b {
  right: 8%;
  top: 18%;
  width: 20%;
  height: 18%;
  transform: rotate(14deg);
}

.district-label {
  position: absolute;
  z-index: 3;
  padding: 6px 10px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  font-size: 12px;
  font-weight: 850;
}

.label-a {
  left: 18%;
  top: 31%;
}

.label-b {
  left: 43%;
  top: 69%;
}

.label-c {
  right: 18%;
  top: 48%;
}

.map-search-card,
.mock-map-note,
.map-mode-stack,
.map-zoom-stack,
.map-toolbar,
.map-legend {
  position: absolute;
  z-index: 12;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(14px);
}

.map-search-card {
  left: 18px;
  top: 18px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 256px;
  padding: 11px 12px;
}

.map-search-card strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.map-search-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.mock-map-note {
  left: 18px;
  top: 72px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.mock-map-note strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.mock-map-note span {
  color: var(--muted);
  font-size: 12px;
}

.map-toolbar {
  right: 398px;
  top: 22px;
  display: grid;
  gap: 4px;
  padding: 6px;
}

.map-mode-stack {
  right: 398px;
  top: 22px;
  display: grid;
  gap: 4px;
  padding: 6px;
}

.map-zoom-stack {
  right: 398px;
  bottom: 82px;
  display: grid;
  overflow: hidden;
}

.map-toolbar button,
.map-mode-stack button,
.map-zoom-stack button {
  color: var(--ink-2);
  background: transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.map-toolbar button,
.map-mode-stack button {
  width: 56px;
  height: 34px;
}

.map-toolbar button:first-child,
.map-mode-stack button.is-active {
  color: #ffffff;
  background: var(--blue);
}

.map-zoom-stack button {
  width: 40px;
  height: 38px;
  color: var(--ink);
  font-size: 20px;
}

.map-zoom-stack button + button {
  border-top: 1px solid var(--line);
}

.map-legend {
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 820;
}

.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
}

.legend-dot.sale {
  background: var(--blue);
}

.legend-dot.rent {
  background: var(--orange);
}

.legend-dot.active {
  background: var(--teal);
}

.map-price-marker {
  position: absolute;
  z-index: 6;
  min-width: 82px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #12304f;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.42);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.map-price-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: inherit;
  border-bottom: inherit;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}

.map-price-marker.is-rent {
  color: #93410c;
  border-color: rgba(255, 104, 23, 0.42);
}

.map-price-marker.is-selected {
  color: #ffffff;
  background: var(--blue);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
  z-index: 20;
}

.naver-map .map-price-marker {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  pointer-events: auto;
}

.crm-drawer {
  position: absolute;
  z-index: 18;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(360px, calc(100% - 44px));
  min-width: 320px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.965);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(18px);
}

.drawer-hero {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  background: #111827;
  border-radius: 8px;
}

.drawer-hero img {
  width: 100%;
  height: 100%;
  min-height: 238px;
  display: block;
  object-fit: cover;
}

.drawer-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.04), rgba(17, 24, 39, 0.86));
}

.drawer-hero-copy {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 15px;
  display: grid;
  gap: 5px;
}

.drawer-hero .eyebrow {
  margin: 0;
  color: #67e8cf;
}

.drawer-hero h2,
.drawer-hero strong {
  margin: 0;
  color: #ffffff;
}

.drawer-hero h2 {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 920;
}

.drawer-hero strong {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 950;
}

.drawer-hero span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 760;
}

.drawer-signal-row,
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer-signal-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.drawer-signal-row span:nth-child(2) {
  color: var(--teal);
  background: var(--teal-soft);
}

.drawer-signal-row span:nth-child(3) {
  color: #9a4b12;
  background: var(--orange-soft);
}

.drawer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.drawer-actions button {
  height: 42px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.drawer-actions .primary {
  color: #ffffff;
  background: var(--orange);
  border-color: rgba(255, 104, 23, 0.42);
  box-shadow: 0 12px 22px rgba(255, 104, 23, 0.18);
}

.drawer-section {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.drawer-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 930;
}

.lead-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #fffaf6;
  border: 1px solid rgba(255, 104, 23, 0.16);
  border-radius: 8px;
}

.lead-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
}

.lead-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 920;
}

.lead-card p {
  margin: 4px 0 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 3px;
  padding-left: 14px;
  border-left: 2px solid rgba(17, 168, 137, 0.25);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 3px;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(17, 168, 137, 0.16);
}

.timeline strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 880;
}

.timeline span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.info-list div {
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.info-list dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 890;
}

.recommend-button {
  height: 44px;
  margin-top: auto;
  color: #ffffff;
  background: var(--teal);
  border: 1px solid rgba(17, 168, 137, 0.4);
  border-radius: 8px;
  box-shadow: 0 14px 24px rgba(17, 168, 137, 0.17);
  font-size: 14px;
  font-weight: 920;
}

@media (max-width: 1280px) {
  .main-nav {
    gap: 16px;
  }

  .search-box.header-search {
    width: clamp(300px, 30vw, 380px);
  }

  .workspace {
    grid-template-columns: 104px 386px minmax(0, 1fr);
  }

  .crm-drawer {
    width: 344px;
    min-width: 310px;
  }

  .map-toolbar,
  .map-mode-stack,
  .map-zoom-stack {
    right: 382px;
  }
}

@media (max-width: 1100px) {
  .brand {
    min-width: 132px;
  }

  .brand-wordmark {
    width: 132px;
  }

  .main-nav {
    gap: 13px;
  }

  .nav-item {
    font-size: 13px;
  }

  .search-box.header-search {
    width: 300px;
  }

  .market-brief-main span {
    display: none;
  }

  .workspace {
    grid-template-columns: 100px 360px minmax(0, 1fr);
  }

  .crm-drawer {
    width: 326px;
  }

  .map-toolbar,
  .map-mode-stack,
  .map-zoom-stack {
    right: 364px;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .main-nav,
  .deal-segment,
  .advanced-strip,
  .market-brief-metrics,
  .category-rail {
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar,
  .deal-segment::-webkit-scrollbar,
  .advanced-strip::-webkit-scrollbar,
  .market-brief-metrics::-webkit-scrollbar,
  .category-rail::-webkit-scrollbar {
    display: none;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto auto auto 1fr;
    overflow: hidden;
  }

  .topbar {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 9px 12px;
  }

  .search-box.header-search {
    display: none;
    position: static;
    transform: none;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-wordmark {
    width: 136px;
    height: 37px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    height: auto;
    gap: 18px;
    padding: 0 2px;
    overflow-x: auto;
  }

  .nav-item {
    height: 34px;
    font-size: 13px;
  }

  .nav-item::after {
    bottom: 0;
  }

  .top-actions {
    order: 2;
    height: 38px;
  }

  .login-button {
    height: 34px;
    padding: 0 15px;
  }

  .search-strip {
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 12px;
  }

  .search-box {
    height: 44px;
  }

  .search-box.mobile-search {
    display: flex;
  }

  .deal-segment {
    width: 100%;
  }

  .deal-segment .filter-chip {
    flex: 1 0 62px;
  }

  .advanced-strip {
    height: auto;
    padding: 8px 12px;
    overflow-x: auto;
  }

  .market-brief {
    height: auto;
    gap: 10px;
    padding: 9px 12px;
    overflow: hidden;
  }

  .market-brief-main {
    display: block;
    min-width: max-content;
  }

  .market-brief-main span {
    display: none;
  }

  .market-brief-metrics {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .mobile-view-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
  }

  .mobile-view-switch button {
    height: 39px;
    color: var(--ink-2);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-1);
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-view-switch button.is-active {
    color: #ffffff;
    background: var(--blue);
  }

  .workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    overflow: hidden;
  }

  .category-rail {
    width: 100%;
    height: auto;
    flex-direction: row;
    gap: 7px;
    padding: 0 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: 0;
  }

  .category-tab {
    width: 132px;
    min-width: 132px;
    min-height: 62px;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    place-items: center start;
    padding: 9px 10px;
    background: #ffffff;
  }

  .category-tab span {
    grid-row: 1 / 3;
    grid-column: 1;
  }

  .category-tab strong {
    grid-row: 1;
    grid-column: 2;
    text-align: left;
  }

  .category-tab small {
    grid-row: 2;
    grid-column: 2;
    text-align: left;
  }

  .listing-panel,
  .map-panel,
  .crm-drawer {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-2);
  }

  .listing-panel {
    min-height: 620px;
  }

  .map-panel,
  .map-canvas {
    min-height: 560px;
  }

  .crm-drawer {
    position: static;
    min-width: 0;
    max-height: none;
  }

  body[data-mobile-view="list"] .map-panel,
  body[data-mobile-view="list"] .crm-drawer,
  body[data-mobile-view="map"] .listing-panel,
  body[data-mobile-view="map"] .crm-drawer,
  body[data-mobile-view="crm"] .listing-panel,
  body[data-mobile-view="crm"] .map-panel {
    display: none;
  }

  .map-toolbar {
    display: none;
  }

  .map-mode-stack,
  .map-zoom-stack {
    right: 12px;
  }

  .map-mode-stack {
    top: 174px;
  }

  .map-search-card,
  .mock-map-note {
    left: 12px;
    max-width: calc(100% - 78px);
  }

  .map-search-card {
    top: 12px;
  }

  .mock-map-note {
    top: 66px;
  }
}

@media (max-width: 520px) {
  .brand-wordmark {
    width: 132px;
    height: 36px;
  }

  .login-button {
    height: 34px;
    padding: 0 13px;
  }

  .panel-head {
    padding: 16px 16px 14px;
  }

  h1 {
    font-size: 22px;
  }

  .summary-grid {
    margin: 14px;
  }

  .listing-list {
    padding: 0 10px 14px;
  }

  .listing-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 178px;
    padding: 9px;
  }

  .listing-media {
    width: 112px;
    height: 154px;
  }

  .listing-price {
    font-size: 20px;
  }

  .listing-title {
    font-size: 13px;
  }

  .listing-trust b:nth-child(3),
  .tag-row {
    display: none;
  }

  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-legend,
  .mock-map-note {
    display: none;
  }

  .drawer-hero,
  .drawer-hero img {
    min-height: 220px;
  }
}
