:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #1b1d1a;
  --muted: #70766b;
  --line: #dfe3da;
  --green: #256f4b;
  --green-soft: #e4f2e9;
  --amber: #a95f00;
  --amber-soft: #fff1d8;
  --red: #bb2f2f;
  --red-soft: #ffe4e0;
  --blue: #255f85;
  --blue-soft: #e5f1f8;
  --shadow: 0 16px 40px rgba(31, 45, 35, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-status,
.sync-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #eef1ea;
}

.auth-mode-btn {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.auth-mode-btn.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 6px rgba(31, 45, 35, 0.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-chip {
  display: inline-grid;
  align-items: center;
  min-height: 30px;
  max-width: 110px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
}

.profile-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -18px -18px 16px;
  padding: 10px 18px;
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 227, 218, 0.8);
}

.topbar .eyebrow {
  display: none;
}

.topbar h1 {
  font-size: 1.05rem;
}

.topbar .primary-btn,
.topbar .ghost-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.topbar .sync-status {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.45rem, 5vw, 2.3rem);
  letter-spacing: 0;
}

h2 {
  font-size: 1.25rem;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.link-btn {
  display: inline-grid;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.primary-btn {
  background: var(--green);
  color: #fff;
}

.ghost-btn {
  background: #eef1ea;
  color: var(--ink);
}

.link-btn {
  background: #eef1ea;
  color: var(--ink);
}

.link-btn.compact {
  min-height: 40px;
  padding: 0 10px;
  font-size: 0.9rem;
}

.auth-link {
  min-height: auto;
  padding: 0;
  justify-content: start;
  background: transparent;
  color: var(--green);
}

.compact-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.link-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.danger-btn {
  background: var(--red-soft);
  color: var(--red);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(64px, 0.55fr);
  gap: 4px;
  margin-bottom: 6px;
}

.dashboard article {
  min-height: 36px;
  padding: 5px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard article.dashboard-filter {
  cursor: pointer;
}

.dashboard article.dashboard-filter:hover,
.dashboard article.dashboard-filter:focus-visible,
.dashboard article.dashboard-filter.active {
  border-color: rgba(41, 125, 81, 0.35);
  background: var(--green-soft);
  outline: none;
}

.dashboard article.dashboard-empty {
  background: transparent;
  border-color: transparent;
}

.dashboard .npl-filter {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-color: var(--line);
  background: #eef1ea;
  color: var(--muted);
}

.dashboard article.npl-filter.active {
  border-color: rgba(169, 95, 0, 0.45);
  background: #f6cf8f;
  outline: none;
}

.dashboard article.npl-filter:focus-visible {
  outline: 2px solid rgba(169, 95, 0, 0.35);
  outline-offset: 2px;
}

.dashboard-view-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.dashboard-view-switch button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: #eef1ea;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
}

.dashboard-view-switch button.active {
  background: var(--green);
  color: #fff;
}

.dashboard span {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard .npl-filter span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.dashboard article.npl-filter.active span {
  color: var(--amber);
}

.dashboard strong {
  display: block;
  margin-top: 1px;
  font-size: 0.9rem;
  line-height: 1.05;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(520px, 100%);
  padding: 3px;
  background: #e9ede4;
  border-radius: 8px;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.tab small {
  color: inherit;
  font-size: 0.66rem;
  font-weight: 900;
  opacity: 0.68;
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(29, 38, 31, 0.08);
}

.search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.search input,
label input,
label select,
label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.search input,
label input,
label select {
  min-height: 42px;
  padding: 0 12px;
}

label textarea {
  resize: vertical;
  padding: 12px;
}

.legacy-visit-log {
  display: none;
}

.readonly-value {
  display: grid;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #f7f8f5;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.calc-results div {
  padding: 10px;
  border-radius: 8px;
  background: #f7f8f5;
}

.calc-results span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.calc-results strong {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
}

.return-plan-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-btn {
  min-height: 0;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.76rem;
}

.return-plan-list {
  display: grid;
  gap: 10px;
}

.module-list {
  display: grid;
  gap: 10px;
}

.module-section-title {
  margin-top: 4px;
  border-radius: 8px;
  padding: 8px 10px;
}

.return-module-title {
  background: #eef7f1;
}

.exit-module-title {
  background: #eef5ff;
}

.review-module-title {
  background: #fff3e2;
}

.return-plan-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf6;
}

.module-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.exit-plan-card {
  background: #f4f8ff;
}

.review-plan-card {
  background: #fff8ed;
}

.return-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.return-plan-head strong {
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 900;
}

.return-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.return-plan-result {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.return-plan-result span {
  border-radius: 6px;
  padding: 3px 6px;
  background: #fff;
}

.formula-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.suffix-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.suffix-input input {
  border: 0;
  min-height: 40px;
}

.suffix-input span {
  padding: 0 12px 0 4px;
  color: var(--muted);
  font-weight: 900;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-bottom: 26px;
}

.board.alt-view {
  grid-template-columns: 1fr;
}

.view-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.view-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.view-panel-head strong {
  font-size: 1rem;
}

.view-panel-head span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-nav {
  display: inline-flex;
  gap: 5px;
  justify-content: end;
}

.calendar-nav .compact-btn {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.72rem;
}

.auction-map {
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1ea;
}

.map-message {
  display: grid;
  height: 100%;
  min-height: 240px;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.map-legend {
  display: grid;
  gap: 6px;
}

.map-legend {
  grid-template-columns: repeat(4, 1fr);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 900;
}

.map-legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.map-side-row,
.simple-list-row,
.calendar-cell button {
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.map-side-row {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.map-side-row strong,
.simple-list-row strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.map-side-row span,
.simple-list-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.map-geocode-note {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.kakao-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 150px;
  padding: 5px 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--marker-color);
  box-shadow: 0 4px 12px rgba(29, 38, 31, 0.22);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transform: translateY(-5px);
}

.kakao-marker::after {
  position: absolute;
  bottom: -7px;
  left: 14px;
  width: 10px;
  height: 10px;
  background: var(--marker-color);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  content: "";
  transform: rotate(45deg);
}

.kakao-marker span {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.kakao-marker strong {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-list {
  display: grid;
  gap: 7px;
}

.simple-list-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.board-list {
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.board-list-row {
  grid-template-columns: 96px minmax(120px, 1.3fr) 70px 58px 58px 94px 78px 78px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 760px;
}

.board-list-row strong,
.board-list-row span,
.board-list-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-list-row b {
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 900;
}

.board-list-head {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.board-list-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clean-list-row {
  grid-template-columns: 88px minmax(120px, 1fr) minmax(170px, 0.9fr) 112px 68px 76px minmax(178px, 0.8fr);
  min-width: 880px;
}

.clean-list-row strong {
  font-size: 0.9rem;
}

.clean-list-row .list-meta,
.clean-list-row .list-date,
.clean-list-row .list-price,
.clean-list-row .list-tags {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.clean-list-row .list-tags {
  display: inline-flex;
  gap: 3px;
  overflow: visible;
}

.clean-list-row .list-tags i {
  border-radius: 999px;
  padding: 2px 5px;
  background: #eef1ea;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  white-space: nowrap;
}

.clean-list-row .list-tags i.tenant {
  background: var(--green-soft);
  color: var(--green);
}

.clean-list-row .list-tags i.vacant {
  background: var(--blue-soft);
  color: var(--blue);
}

.clean-list-row .list-tags i.unknown {
  background: #eef1ea;
  color: var(--muted);
}

.clean-list-row .list-tags i.npl {
  background: var(--amber-soft);
  color: var(--amber);
}

.clean-list-row .list-date {
  font-size: 0.68rem;
}

.clean-list-row .list-price b {
  margin-left: 2px;
}

.clean-list-row .list-price small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  margin-left: 2px;
  white-space: nowrap;
}

.summary-board {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

.summary-toolbar {
  display: flex;
  justify-content: start;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-weekday,
.calendar-cell {
  min-height: 76px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-weekday {
  min-height: auto;
  padding: 6px 3px;
  background: #eef1ea;
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 900;
}

.calendar-cell {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 5px;
}

.calendar-cell.muted {
  background: #f7f8f5;
}

.calendar-cell.has-item {
  background: #fffdf6;
}

.calendar-day {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.calendar-cell button {
  display: grid;
  gap: 1px;
  padding: 4px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
}

.calendar-cell button small {
  overflow: hidden;
  font-size: 0.58rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-hope-price {
  color: var(--red);
}

.calendar-cell button strong {
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-card.focus-card {
  outline: 3px solid rgba(187, 47, 47, 0.24);
  outline-offset: 3px;
}

.property-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.property-card.status-bidding {
  background: var(--surface);
}

.property-card.status-watching {
  background: #f6fbf8;
  border-color: #cfe4d8;
}

.property-card.status-review {
  background: #fff8ef;
  border-color: #efd4aa;
}

.property-card.status-other {
  background: #f5f6f8;
  border-color: #d7dce2;
}

.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.case-no {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.title {
  margin-top: 3px;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.3;
}

.address {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: keep-all;
}

.dday {
  min-width: 70px;
  padding: 8px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  text-align: center;
  font-weight: 900;
}

.dday.urgent {
  background: var(--red-soft);
  color: var(--red);
}

.dday small {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  line-height: 1.1;
  white-space: nowrap;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  min-height: 24px;
  padding: 3px 8px;
  background: #eef1ea;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.badge.npl {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.tenant {
  background: #e7f2e9;
  color: var(--green);
}

.badge.vacant {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.unknown {
  background: #f0ece4;
  color: var(--muted);
}

.selection-reason-preview {
  order: 90;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(38, 115, 71, 0.16);
  border-radius: 8px;
  background: #f6faf4;
}

.selection-reason-preview .note-label {
  color: var(--green);
  font-weight: 900;
}

.selection-reason-preview p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.selection-thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  overflow: hidden;
}

.selection-thumb-strip img {
  width: 100%;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: contain;
  background: #fdfdfb;
}

.numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lease-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lease-info-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(38, 115, 71, 0.16);
  border-radius: 8px;
  background: #f3f8f1;
}

.lease-info-box > .note-label {
  color: var(--green);
  font-weight: 900;
}

.lease-info-box .estimate {
  background: #fff;
}

.lease-memo {
  padding: 9px;
  border-radius: 8px;
  background: #fff;
}

.lease-memo .note {
  margin-bottom: 0;
}

.lease-grid .estimate strong {
  font-size: 0.78rem;
  line-height: 1.35;
}

.lease-grid .estimate strong.lease-amount {
  display: inline;
  white-space: nowrap;
}

.lease-grid .estimate strong.lease-amount span {
  display: inline;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.facts span {
  flex: 1 1 120px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f8f5;
  color: #3d4339;
  font-size: 0.82rem;
  font-weight: 800;
}

.layout-image-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.layout-image-card img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  background: #fff;
}

.numbers div,
.estimate {
  padding: 10px;
  border-radius: 8px;
  background: #f7f8f5;
}

.numbers span,
.estimate span,
.note-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.numbers strong,
.estimate strong {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
}

.memo-focus-box {
  padding: 11px;
  border: 1px solid rgba(180, 120, 30, 0.28);
  border-radius: 8px;
  background: #fff9e8;
  box-shadow: inset 3px 0 0 #d9982a;
}

.memo-focus-box .note-label {
  color: #9b5d00;
  font-weight: 900;
}

.memo-focus-box .note {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 800;
}

.reason-image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.reason-image-preview figure {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.reason-image-preview img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
}

.numbers small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.rounds-mini-wrap {
  display: grid;
  gap: 3px;
}

.rounds-mini {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.68rem;
  table-layout: fixed;
}

.rounds-mini th,
.rounds-mini td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 4px 3px;
  text-align: center;
  line-height: 1.25;
}

.rounds-mini th:last-child,
.rounds-mini td:last-child {
  border-right: 0;
}

.rounds-mini tr:last-child td {
  border-bottom: 0;
}

.rounds-mini th {
  color: var(--muted);
  font-weight: 900;
  background: #f7f8f5;
}

.rounds-mini td {
  color: #3d4339;
  font-weight: 700;
}

.rounds-mini .current td {
  color: var(--ink);
  font-weight: 900;
}

.rounds-mini .current-date,
.rounds-mini .current-price {
  background: var(--red-soft);
  color: var(--red) !important;
}

.rounds-mini .target-date,
.rounds-mini .target-price {
  background: #e8f6ee;
  color: var(--green) !important;
  box-shadow: inset 0 0 0 1px rgba(38, 115, 71, 0.18);
}

.rounds-mini .projected td {
  color: var(--muted);
}

.rounds-mini-note {
  margin: 0;
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 900;
}

.estimate strong small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.target-bid-value {
  color: var(--red);
}

.return-highlight {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.return-highlight span {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 900;
}

.return-seed {
  background: #e8f0ff;
  color: #2357b8;
}

.return-rate {
  background: #e8f6ee;
  color: var(--green);
}

.return-monthly {
  background: #fff1d8;
  color: #a45b00;
}

.return-plan-summary {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f8f5;
}

.return-plan-summary > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.return-plan-summary-row {
  display: grid;
  gap: 4px;
}

.return-plan-summary-row b {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.return-plan-summary-row small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.return-plan-summary-row .plan-bid-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px;
  color: #3f493e;
  font-size: 0.78rem;
  font-weight: 900;
}

.plan-yield {
  color: #1f6fb2;
  font-size: 0.95rem;
  font-weight: 950;
}

.plan-bid-price {
  color: var(--red);
  font-size: 1.08rem;
  font-weight: 950;
}

.plan-bid-word,
.plan-yield-text,
.plan-arrow,
.plan-separator,
.plan-purchase {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.plan-purchase {
  color: #80540b;
}

.exit-highlight {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.exit-highlight span {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 900;
}

.exit-sale,
.exit-sale-value {
  background: #e9f7ff;
  color: #00749c;
}

.exit-gain,
.exit-gain-value {
  background: #fff0f2;
  color: #c02f45;
}

.exit-npl-gain,
.exit-npl-gain-value {
  background: #f1edff;
  color: #6d45b8;
}

.highlight-date {
  color: var(--red);
}

.estimate strong.target-timing {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.target-timing span {
  display: inline;
  color: inherit;
  font-size: 0.98rem;
}

.target-timing .target-round {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.target-timing .highlight-date {
  color: var(--red);
  font-size: 0.98rem;
}

.target-timing small {
  margin-left: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.note {
  display: -webkit-box;
  overflow: hidden;
  color: #3d4339;
  font-size: 0.9rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.review-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--red);
  font-size: 0.95rem;
  font-weight: 900;
}

.review-summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.review-metrics {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
  white-space: nowrap;
}

.review-metrics strong,
.review-metrics small {
  display: inline;
  margin-top: 0;
}

.review-metrics small {
  font-size: 0.72rem;
}

.card-comments {
  order: 91;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: #f7f8f5;
}

.comment-list {
  display: grid;
  gap: 4px;
}

.comment-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
  color: #3d4339;
  font-size: 0.76rem;
  line-height: 1.35;
}

.comment-body {
  min-width: 0;
}

.comment-body span,
.comment-body time {
  flex: 0 0 auto;
  margin-right: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.comment-body strong {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: normal;
  word-break: break-word;
}

.comment-delete {
  border: 0;
  border-radius: 6px;
  padding: 3px 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  cursor: pointer;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.comment-form input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.map-preview {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1ea;
}

.card-kakao-map {
  width: 100%;
  height: 100%;
}

.card-kakao-map .map-message {
  min-height: 100%;
}

.map-choice-actions,
.detail-actions {
  display: grid;
  gap: 8px;
}

.map-choice-actions {
  grid-template-columns: repeat(3, 1fr);
}

.detail-actions {
  justify-content: end;
}

.map-choice-actions > * {
  width: 100%;
}

.detail-actions > * {
  min-width: 64px;
}

.map-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.empty {
  grid-column: 1 / -1;
  padding: 34px 18px;
  border: 1px dashed #c9cec2;
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(23, 30, 23, 0.42);
}

.reason-dialog {
  width: min(680px, calc(100% - 24px));
}

.reason-dialog-body {
  display: grid;
  gap: 14px;
  max-height: min(70vh, 680px);
  overflow: auto;
  padding: 16px;
}

.reason-text {
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.7;
}

.empty-reason {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.reason-gallery {
  display: grid;
  gap: 12px;
}

.reason-gallery figure {
  display: grid;
  gap: 6px;
  margin: 0;
}

.reason-gallery img {
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.reason-gallery figcaption {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

form {
  padding: 18px;
}

.account-dialog {
  width: min(430px, calc(100% - 24px));
}

.account-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.account-panel hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

.account-readonly {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f8f5;
}

.account-readonly span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.account-readonly strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.danger-zone {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--red-soft);
  border-radius: 8px;
  background: #fff8f6;
}

.danger-zone strong {
  color: var(--red);
  font-size: 0.9rem;
}

.danger-zone p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.4;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-header-actions .ghost-btn {
  min-width: 42px;
  padding: 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.form-section {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
}

.npl-return-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auction-rounds {
  display: grid;
  grid-template-columns: 56px 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.auction-rounds input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.round-head,
.round-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.round-label {
  color: var(--ink);
}

.ocr-panel {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.ocr-panel strong {
  display: block;
  margin-bottom: 4px;
}

.ocr-panel p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.file-picker {
  min-height: 42px;
  align-content: center;
  border-radius: 8px;
  padding: 0 12px;
  background: #eef1ea;
  color: var(--ink);
  text-align: center;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.layout-image-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
}

.layout-image-editor img {
  display: block;
  width: 100%;
  max-height: 260px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.ocr-status {
  grid-column: 1 / -1;
}

.paste-area {
  grid-column: 1 / -1;
}

.span-4 {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.span-2 {
  grid-column: span 2;
}

.dialog-actions > div {
  display: flex;
  gap: 8px;
}

@media (max-width: 860px) {
  .board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    margin: -12px -12px 12px;
    padding: 8px 12px;
  }

  .topbar-actions {
    justify-content: end;
    gap: 6px;
  }

  .topbar .sync-status {
    display: none;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .tabs,
  .search,
  .board {
    width: 100%;
  }

  .tab {
    min-height: 32px;
    padding: 0 2px;
    font-size: 0.66rem;
  }

  .tab small {
    font-size: 0.54rem;
  }

  .search {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
  }

  .dashboard {
    grid-template-columns: minmax(0, 3fr) 54px;
    gap: 3px;
  }

  .dashboard article {
    min-height: 32px;
    padding: 4px 3px;
  }

  .dashboard span {
    font-size: 0.58rem;
  }

  .dashboard strong {
    font-size: 0.78rem;
  }

  .dashboard-view-switch {
    padding: 3px;
  }

  .dashboard-view-switch button {
    font-size: 0.56rem;
  }

  .dashboard .npl-filter span {
    font-size: 0.64rem;
  }

  .board {
    grid-template-columns: 1fr;
  }

  .board-list {
    overflow-x: visible;
  }

  .board-list-row {
    min-width: 0;
    padding: 9px;
  }

  .board-list-row strong {
    font-size: 0.72rem;
  }

  .board-list-row span,
  .board-list-row b {
    font-size: 0.62rem;
  }

  .clean-list-row {
    grid-template-columns: 78px minmax(0, 1fr) max-content max-content;
    gap: 4px 5px;
    min-width: 0;
  }

  .clean-list-row .list-meta,
  .clean-list-row .list-date,
  .clean-list-row .list-price,
  .clean-list-row .list-tags {
    font-size: 0.66rem;
  }

  .clean-list-row strong {
    font-size: 0.82rem;
  }

  .clean-list-row .list-meta {
    grid-column: 1 / 3;
  }

  .clean-list-row .list-date {
    grid-column: 4 / 5;
    grid-row: 1;
  }

  .clean-list-row .list-tags {
    grid-column: 3 / 5;
    justify-content: end;
  }

  .clean-list-row .list-tags i {
    padding: 1px 4px;
    font-size: 0.62rem;
  }

  .clean-list-row .list-price {
    display: inline-flex;
    gap: 2px;
    align-items: baseline;
    min-width: 0;
    white-space: nowrap;
  }

  .clean-list-row .list-price small {
    font-size: 0.58rem;
    margin-left: 0;
  }

  .clean-list-row .minimum-price {
    grid-column: 1 / 2;
    grid-row: 3;
  }

  .clean-list-row .hope-price {
    grid-column: 2 / 5;
    grid-row: 3;
  }

  .map-legend {
    grid-template-columns: repeat(2, 1fr);
  }

  .auction-map {
    min-height: 360px;
  }

  .kakao-marker {
    max-width: 110px;
    padding: 4px 6px;
  }

  .kakao-marker strong {
    font-size: 0.58rem;
  }

  .return-plan-grid {
    grid-template-columns: 1fr;
  }

  .return-plan-result span {
    font-size: 0.76rem;
  }

  .view-panel-head {
    grid-template-columns: 1fr;
  }

  .calendar-nav {
    justify-content: stretch;
  }

  .calendar-nav .compact-btn {
    flex: 1;
  }

  .calendar-cell {
    min-height: 76px;
    padding: 4px;
  }

  .calendar-cell button {
    padding: 3px;
  }

  .calendar-cell button small {
    display: none;
  }

  .calendar-cell button strong {
    overflow: visible;
    font-size: 0.5rem;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .lease-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }

  .lease-grid .estimate {
    padding: 7px 8px;
  }

  .lease-grid .estimate > span {
    font-size: 0.68rem;
  }

  .lease-grid .estimate strong.lease-amount {
    font-size: 0.72rem;
  }

  .lease-grid .estimate strong.lease-amount span {
    font-size: 0.58rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .npl-return-panel {
    grid-template-columns: 1fr;
  }

  .calc-results {
    grid-template-columns: 1fr;
  }

  .ocr-panel {
    grid-template-columns: 1fr;
  }

  .auction-rounds {
    grid-template-columns: 1fr;
  }

  .round-head {
    display: none;
  }

  .round-label {
    margin-top: 6px;
  }

  .span-2 {
    grid-column: span 1;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
