:root {
  --bg: #f6f8fc;
  --ink: #172036;
  --muted: #6c7893;
  --line: #e6ebf5;
  --card: #ffffff;
  --brand: #3f6fff;
  --brand-soft: #eef3ff;
  --warm: #ff7b78;
  --warm-soft: #fff1f0;
  --mint: #22b8a8;
  --shadow: 0 14px 38px rgba(20, 34, 72, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background:
    radial-gradient(circle at 5% 8%, #e9f0ff 0%, transparent 27%),
    radial-gradient(circle at 94% 15%, #ffe9e5 0%, transparent 25%),
    linear-gradient(180deg, #f9fbff 0%, #f3f6fc 100%);
  min-height: 100vh;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  opacity: 0.5;
  filter: blur(64px);
  border-radius: 999px;
}

.bg-shape-1 {
  width: 320px;
  height: 320px;
  top: -90px;
  right: -70px;
  background: #d8e4ff;
}

.bg-shape-2 {
  width: 280px;
  height: 280px;
  left: -90px;
  bottom: -90px;
  background: #ffd8d4;
}

.layout {
  width: min(1160px, 92%);
  margin: 28px auto 48px;
  display: grid;
  gap: 16px;
}

.hero {
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 56%, #fff8f7 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(1.6rem, 3.3vw, 2.4rem);
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.stats article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}

.stats h2 {
  margin: 0;
  font-size: 1.45rem;
}

.stats p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.top-tabs {
  display: flex;
  gap: 8px;
  position: sticky;
  top: 10px;
  z-index: 15;
}

.tab-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: #ffffffd9;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.tab-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(63, 111, 255, 0.28);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.wizard-head {
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
}

.wizard-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #d7e2ff;
  background: #f2f6ff;
  color: #5c6e9d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.wizard-dot.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

h3 {
  margin: 0 0 14px;
  font-size: 1.06rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(63, 111, 255, 0.15);
  border-color: var(--brand);
}

.input-with-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mini-btn {
  white-space: nowrap;
}

.full {
  margin-top: 10px;
}

.geo-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.geo-hint {
  color: var(--muted);
  font-size: 0.88rem;
}

.geo-suggestions,
.trade-list,
.visit-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.geo-item,
.suggest-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  cursor: pointer;
}

.geo-item:hover,
.suggest-item:hover {
  border-color: var(--brand);
  background: #f7f9ff;
}

.geo-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.suggestion-list {
  margin-top: 6px;
  display: grid;
  gap: 6px;
}

.suggestion-list .suggest-item {
  background: var(--brand-soft);
}

.size-chips {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.size-chip {
  border: 1px solid #dce4fb;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #2f4eb8;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.star-group {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 28px;
}

.star-btn {
  border: 0;
  background: transparent;
  color: #d8deeb;
  font-size: 1.18rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.star-btn.active {
  color: #ffb020;
}

.trade-panel {
  margin-top: 12px;
  border: 1px solid #dfe8ff;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  padding: 13px;
  display: grid;
  gap: 8px;
}

.trade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trade-result {
  margin: 0;
  font-size: 0.92rem;
}

.api-details {
  border-top: 1px dashed #dfe5f4;
  padding-top: 8px;
}

.api-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.86rem;
}

.trade-list {
  max-height: 220px;
  overflow: auto;
}

.trade-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 9px;
  font-size: 0.85rem;
}

.actions {
  margin-top: 13px;
  display: flex;
  gap: 8px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(63, 111, 255, 0.24);
}

.btn.ghost {
  background: #fff;
}

.link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.map-card {
  overflow: hidden;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.map-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.map {
  border: 1px solid var(--line);
  border-radius: 14px;
  height: 370px;
  background: linear-gradient(180deg, #edf7ff 0%, #f5fbff 100%);
}

.filters {
  display: flex;
  gap: 8px;
}

.filters input {
  min-width: 170px;
}

.mini {
  width: 124px;
}

.visit-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.visit-item h4 {
  margin: 0;
  font-size: 1.01rem;
}

.meta {
  margin: 6px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.memo {
  margin: 0;
  line-height: 1.52;
  font-size: 0.92rem;
}

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

.detail-panel {
  margin-top: 14px;
  border-top: 1px dashed #dbe3f2;
  padding-top: 12px;
}

.detail-title {
  margin: 0;
  font-weight: 700;
}

.detail-meta {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.trade-chart {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 4px;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  overflow-x: auto;
}

.trade-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 1px 4px 0;
}

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

.legend-dot.point {
  background: #2f6fed;
}

.legend-dot.trend {
  background: #f77f00;
}

.legend-dot.count {
  background: #ff7b78;
}

.axis-line {
  stroke: rgba(23, 32, 54, 0.7);
  stroke-width: 1;
}

.grid-line {
  stroke: rgba(23, 32, 54, 0.14);
  stroke-width: 1;
}

.axis-text {
  fill: #667391;
  font-size: 11px;
}

.chart-line {
  fill: none;
  stroke-width: 2;
}

.chart-line.trend {
  stroke: #f77f00;
}

.chart-line.count {
  stroke: #ff7b78;
  stroke-dasharray: 4 3;
}

.price-point-svg {
  opacity: 0.95;
}

.volume-bar-svg {
  fill: rgba(255, 123, 120, 0.45);
}

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

.compare-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 11px;
}

.compare-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty {
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

@media (max-width: 680px) {
  .layout {
    width: min(1160px, 94%);
  }

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

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

  .filters {
    width: 100%;
    flex-direction: column;
  }

  .filters input,
  .mini {
    width: 100%;
  }

  .map {
    height: 310px;
  }

  .top-tabs {
    top: 8px;
  }
}
