:root {
  --background: #fafafa;
  --foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #0052ff;
  --accent-secondary: #4d7cff;
  --accent-foreground: #ffffff;
  --border: #e2e8f0;
  --card: #ffffff;
  --ring: #0052ff;
  --danger: #ef4444;
  --success: #16a34a;
  --warning: #f59e0b;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.07);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-accent: 0 12px 30px rgba(0, 82, 255, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0, 82, 255, 0.1), transparent 32rem),
    radial-gradient(circle at 92% 12%, rgba(77, 124, 255, 0.1), transparent 28rem),
    var(--background);
  color: var(--foreground);
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
  word-break: keep-all;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.ghost-reset {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: left;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.page-shell {
  width: min(1720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.app-header h1 {
  max-width: 780px;
  margin: 0 0 12px;
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
  font-size: clamp(2.55rem, 5vw, 5.1rem);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-header h1 span,
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-header h1 span {
  white-space: nowrap;
}

.app-header p {
  max-width: 700px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 1.02rem;
  line-height: 1.7;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 82, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 82, 255, 0.06);
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-label.small {
  padding: 7px 12px;
  font-size: 0.66rem;
}

.detail-hero .section-label {
  border-color: rgba(219, 234, 254, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
}

.detail-hero .pulse-dot {
  background: #60a5fa;
  box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.16);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(0, 82, 255, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.header-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.status-card {
  min-width: 142px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.control-card {
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.status-card.accent {
  border-color: rgba(0, 82, 255, 0.28);
  box-shadow: var(--shadow-accent);
}

.status-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.status-card strong {
  font-size: 1.06rem;
}

.status-select {
  width: 100%;
  min-width: 112px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.2;
  outline: 0;
  cursor: pointer;
  appearance: none;
}

.status-select:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 4px;
  border-radius: 8px;
}

.settings-button {
  min-width: 142px;
  padding: 17px 18px;
  border: 1px solid rgba(0, 82, 255, 0.22);
  border-radius: var(--radius);
  background: var(--foreground);
  color: #fff;
  text-align: left;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.settings-button .status-label {
  color: rgba(255, 255, 255, 0.68);
}

.settings-button strong {
  display: block;
  font-size: 1.06rem;
}

.settings-button:hover {
  transform: translateY(-2px);
  border-color: rgba(77, 124, 255, 0.55);
  box-shadow: var(--shadow-accent);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(430px, 1.25fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.search-panel,
.detail-panel {
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-heading.compact {
  margin: 24px 0 12px;
}

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel h2,
.map-panel h2,
.compare-panel h2,
.detail-panel h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.ghost-button,
.toggle-button,
.area-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.ghost-button {
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.ghost-button:hover,
.toggle-button:hover,
.area-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 82, 255, 0.3);
  background: rgba(0, 82, 255, 0.04);
  box-shadow: var(--shadow-sm);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.search-box span {
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
}

.search-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
}

.search-box input::placeholder {
  color: rgba(100, 116, 139, 0.7);
}

.hint-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(0, 82, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(0, 82, 255, 0.06), rgba(77, 124, 255, 0.02)),
    var(--card);
}

.hint-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.88rem;
}

.hint-box p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  line-height: 1.55;
}

.result-list,
.favorite-list,
.transaction-list {
  display: grid;
  gap: 10px;
}

.search-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 2px 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.search-section-title small {
  color: var(--muted-foreground);
  font-weight: 600;
}

.complex-row,
.favorite-row,
.transaction-row,
.compare-row {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.complex-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
}

.complex-row::before,
.compare-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 82, 255, 0.05), transparent 52%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.complex-row:hover::before,
.compare-row:hover::before {
  opacity: 1;
}

.complex-main,
.favorite-main {
  min-width: 0;
}

.complex-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.complex-title strong {
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-ring {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(0, 82, 255, 0.12);
}

.complex-row p,
.favorite-row p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1.45;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.7rem;
}

.toggle-button {
  position: relative;
  z-index: 1;
  min-width: 70px;
  height: 38px;
  padding: 0 12px;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 600;
}

.toggle-button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: var(--accent-foreground);
  box-shadow: var(--shadow-accent);
}

.toggle-button:disabled {
  cursor: default;
  opacity: 0.76;
}

.kakao-result-row {
  border-color: rgba(0, 82, 255, 0.22);
}

.favorite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.favorite-row button {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.favorite-row.active {
  border-color: rgba(0, 82, 255, 0.45);
  box-shadow: inset 3px 0 0 var(--accent);
}

.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(0, 82, 255, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.map-workspace {
  display: grid;
  gap: 18px;
}

.map-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background: var(--foreground);
  color: var(--background);
}

.map-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.map-panel::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -130px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(0, 82, 255, 0.28);
  filter: blur(90px);
  pointer-events: none;
}

.map-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.map-topbar .eyebrow {
  color: #9db7ff;
}

.map-canvas {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 24%, rgba(77, 124, 255, 0.16), transparent 12rem),
    linear-gradient(135deg, #172033, #0f172a 62%, #111827);
}

.kakao-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.map-canvas.kakao-ready .kakao-map {
  opacity: 1;
  pointer-events: auto;
}

.map-canvas.kakao-ready .map-grid,
.map-canvas.kakao-ready .map-river,
.map-canvas.kakao-ready .map-road,
.map-canvas.kakao-ready > .map-marker {
  opacity: 0;
  pointer-events: none;
}

.map-grid {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 54px 54px;
}

.map-river {
  position: absolute;
  left: -8%;
  top: 33%;
  width: 116%;
  height: 86px;
  transform: rotate(-8deg);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(77, 124, 255, 0.45), rgba(0, 82, 255, 0.16));
  filter: blur(0.4px);
}

.map-road {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.road-a {
  left: 9%;
  top: 18%;
  width: 74%;
  transform: rotate(16deg);
}

.road-b {
  left: 4%;
  top: 68%;
  width: 86%;
  transform: rotate(-17deg);
}

.road-c {
  left: 52%;
  top: 6%;
  width: 2px;
  height: 78%;
  transform: rotate(8deg);
}

.map-marker {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--foreground);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.map-marker::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--muted-foreground);
}

.map-marker.favorite::after {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
}

.map-marker.selected {
  transform: translate(-50%, -50%) scale(1.16);
  box-shadow: 0 18px 38px rgba(0, 82, 255, 0.42);
}

.map-marker.selected::before {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(77, 124, 255, 0.5);
  border-radius: inherit;
  animation: markerRing 2.6s ease-in-out infinite;
}

.map-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  min-width: 150px;
  transform: translateX(-50%);
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 0.76rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-marker:hover .map-tooltip,
.map-marker.selected .map-tooltip {
  opacity: 1;
}

.map-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: grid;
  gap: 4px;
  max-width: 240px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(14px);
}

.map-caption strong {
  color: #fff;
}

.map-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.45;
}

.compare-panel {
  padding: 18px;
}

.area-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.area-tabs.stacked {
  justify-content: flex-start;
}

.area-tab {
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 700;
}

.area-tab.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: var(--accent-foreground);
  box-shadow: var(--shadow-accent);
}

.comparison-table {
  display: grid;
  gap: 10px;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  text-align: left;
}

.compare-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(92px, 0.55fr));
  gap: 12px;
  align-items: center;
  width: 100%;
}

.compare-row.header {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(92px, 0.55fr)) minmax(68px, 0.32fr);
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.74rem;
  font-weight: 700;
}

.compare-row.header::before {
  display: none;
}

.compare-row.active {
  border-color: rgba(0, 82, 255, 0.46);
  box-shadow: inset 3px 0 0 var(--accent);
}

.compare-name strong {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-name span,
.compare-cell small {
  color: var(--muted-foreground);
  font-size: 0.74rem;
}

.compare-cell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
}

.compare-cell strong {
  font-size: 0.92rem;
}

.compare-remove {
  position: relative;
  z-index: 1;
  min-height: 34px;
  white-space: nowrap;
}

.detail-panel {
  position: sticky;
  top: 18px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  margin: -20px -20px 18px;
  padding: 22px 20px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--foreground);
  color: #fff;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 28px 28px;
}

.detail-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: rgba(0, 82, 255, 0.35);
  filter: blur(52px);
}

.detail-hero > * {
  position: relative;
  z-index: 1;
}

.detail-hero h2 {
  margin: 18px 0 9px;
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1.1;
}

.detail-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.55;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.meta-item,
.metric-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.meta-item {
  padding: 12px;
}

.meta-item span,
.metric-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.meta-item strong {
  font-size: 0.94rem;
}

.area-block,
.period-analysis-card,
.chart-card,
.transaction-card {
  margin-top: 18px;
}

.block-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.block-title span {
  font-weight: 700;
}

.block-title small {
  color: var(--muted-foreground);
  font-size: 0.73rem;
  text-align: right;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.metric-card.featured {
  grid-column: 1 / -1;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.metric-card.featured span {
  color: rgba(255, 255, 255, 0.76);
}

.metric-card strong {
  display: block;
  font-size: 1.38rem;
  line-height: 1.1;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  line-height: 1.4;
}

.metric-card.featured small {
  color: rgba(255, 255, 255, 0.76);
}

.trend-up {
  color: var(--success);
}

.trend-down {
  color: var(--danger);
}

.period-analysis-card,
.chart-card,
.transaction-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.switch-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.period-analysis-wrap {
  display: grid;
  gap: 10px;
}

.period-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.period-row {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, minmax(0, 1fr));
}

.period-row + .period-row {
  border-top: 1px solid var(--border);
}

.period-row span,
.period-row strong {
  min-width: 0;
  padding: 10px 8px;
  text-align: right;
}

.period-row span:first-child {
  text-align: left;
}

.period-row.header {
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 700;
}

.period-row:not(.header) span {
  color: var(--muted-foreground);
  font-size: 0.74rem;
  font-weight: 700;
}

.period-row strong {
  font-size: 0.84rem;
}

.period-note {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: right;
}

.chart-wrap {
  min-height: 220px;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-axis {
  fill: #475569;
  font-size: 12px;
  font-weight: 700;
}

.chart-axis-y {
  text-anchor: end;
}

.chart-axis-x {
  text-anchor: middle;
}

.chart-grid-line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.chart-grid-line.vertical {
  stroke-dasharray: 4 6;
  opacity: 0.75;
}

.chart-domain-line {
  stroke: #cbd5e1;
  stroke-width: 1.4;
}

.empty-state {
  padding: 24px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.55;
}

.compact-empty {
  width: 100%;
  padding: 14px;
  font-size: 0.78rem;
  text-align: left;
}

.detail-empty {
  grid-column: 1 / -1;
}

.transaction-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
}

.transaction-row strong {
  display: block;
  margin-bottom: 4px;
}

.transaction-row span {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.transaction-price {
  text-align: right;
}

.transaction-price strong {
  color: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(12px);
}

.modal-backdrop.open {
  display: grid;
}

.settings-modal {
  position: relative;
  overflow: hidden;
  width: min(100%, 560px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(0, 82, 255, 0.16), transparent 16rem),
    var(--card);
  box-shadow: var(--shadow-xl);
}

.settings-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: linear-gradient(135deg, rgba(0, 82, 255, 0.05), transparent 48%);
  pointer-events: none;
}

.settings-modal > * {
  position: relative;
  z-index: 1;
}

.modal-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
}

.modal-topline h2 {
  margin: 0;
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 1.4rem;
  line-height: 1;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: var(--foreground);
  color: #fff;
}

.api-summary-card {
  display: grid;
  gap: 6px;
  margin: 0 24px 18px;
  padding: 16px;
  border: 1px solid rgba(0, 82, 255, 0.18);
  border-radius: 14px;
  background: rgba(0, 82, 255, 0.045);
}

.api-summary-card span,
.field-label,
.settings-note,
.check-row {
  color: var(--muted-foreground);
}

.api-summary-card span {
  font-size: 0.74rem;
}

.api-summary-card strong {
  color: var(--foreground);
}

.api-summary-card code {
  overflow-wrap: anywhere;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
}

.settings-form {
  display: grid;
  gap: 14px;
  padding: 0 24px 24px;
}

.field-label {
  display: grid;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
}

.field-label input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--foreground);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.field-label input::placeholder {
  color: rgba(100, 116, 139, 0.58);
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 0.84rem;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.settings-note {
  margin: 0;
  padding: 13px 14px;
  border: 1px dashed rgba(100, 116, 139, 0.36);
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.6);
  font-size: 0.82rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.secondary-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted-foreground);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.28);
    opacity: 0.72;
  }
}

@keyframes markerRing {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.36;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1320px) {
  .dashboard-grid {
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  }

  .detail-panel {
    position: static;
    grid-column: 1 / -1;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric-card.featured {
    grid-column: span 2;
  }
}

@media (max-width: 920px) {
  .page-shell {
    width: min(100% - 24px, 760px);
    padding-top: 20px;
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

  .map-canvas {
    min-height: 420px;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }

  .compare-row.header {
    display: none;
  }

  .compare-main {
    grid-template-columns: 1fr 1fr;
  }

  .compare-remove {
    width: fit-content;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card.featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .app-header h1 {
    font-size: 2.65rem;
  }

  .status-card {
    flex: 1;
    min-width: 130px;
  }

  .settings-button {
    flex: 1 1 100%;
    min-width: 130px;
  }

  .panel-heading,
  .map-topbar,
  .block-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .area-tabs {
    justify-content: flex-start;
  }

  .complex-row,
  .transaction-row {
    grid-template-columns: 1fr;
  }

  .toggle-button {
    width: 100%;
  }

  .meta-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .map-caption {
    left: 14px;
    right: 14px;
    max-width: unset;
  }

  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .settings-modal {
    border-radius: 18px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
