@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --container-max-width: 600px;
  --container-padding: 8px;
}

@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
  }
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #ffffff; color: #1f2937; }
.container { max-width: var(--container-max-width); margin: 0 auto; padding: var(--container-padding); }

.edge-to-edge-mobile {
  margin-left: calc(var(--container-padding) * -1);
  margin-right: calc(var(--container-padding) * -1);
}
.top-header { height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0; }
.logo { color: #1f2937; text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: -0.2px; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.header-search { flex: 1 1 auto; display: flex; justify-content: flex-end; }
.header-search input { width: min(240px, 100%); height: 34px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; padding: 0 12px; font-size: 13px; color: #4b5563; outline: none; }
.header-search input:focus { border-color: #cbd5e1; background: #fff; }
.global-header-logo-mark { width: 22px; height: 22px; display: inline-flex; color: #ffffff; background: #355e3b; border-radius: 7px; align-items: center; justify-content: center; padding: 3px; }
.global-header-logo-mark svg { width: 100%; height: 100%; }

.landing-panel { background: #ffffff; border-radius: 20px; padding: 16px 0; border: none; }
.search-form { position: relative; }
.search-form.compact input { width: 100%; height: 46px; border: 0; border-radius: 10px; background: rgba(2, 32, 71, 0.05); padding: 0 40px 0 42px; font-size: 15px; color: #5b6470; outline: none; }
.search-form.compact input:focus { box-shadow: 0 0 0 3px rgba(53, 94, 59, 0.16); }
.search-form.compact input::placeholder { color: #7a8491; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8592a3; font-size: 30px; }
.clear-q { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 0; border-radius: 999px; background: rgba(2, 32, 71, 0.12); color: #51606f; display: none; align-items: center; justify-content: center; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.clear-q:hover { background: rgba(2, 32, 71, 0.2); }

.section { margin-top: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; margin-bottom: 10px; padding-left: 6px; }
.section-head .muted { margin-right: 8px; }
h2 { margin: 0; font-size: 18px; }
.muted { color: #6b7280; font-size: 13px; }

.rank-list { list-style: none; padding: 0; margin: 0; cursor: pointer; }
.rank-list li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 10px 2px; border-radius: 10px; cursor: pointer; }
.rank-list li:hover { background: #f1f3f5; }

@media (hover: none) and (pointer: coarse) {
  .rank-list li:hover { background: transparent; }
  .rank-list li { -webkit-tap-highlight-color: transparent; }
}
.rank-list li * { cursor: pointer; }
.rank { color: #355e3b; font-weight: 700; font-size: 16px; text-align: center; }
.name { color: #1f2937; text-decoration: none; font-size: 16px; }
.change { color: #ff4d5a; font-weight: 500; font-size: 15px; margin-right: 8px; }

.card { background: white; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.complex-hero { border: none; border-radius: 0; padding: 12px 0 14px; display: flex; justify-content: space-between; align-items: center; }
.complex-hero h1 {
    margin: 0 0 10px;
    font-size: 23px;
    font-weight: 700;
    color: #1f2937;
}
.hero-meta, .hero-sub { margin: 0; font-size: 14px; font-weight: 400; color: #4b5563; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.text-foreground-second { color: #4b5563; font-size: 14px; font-weight: 400; }
.hero-meta { margin-bottom: 6px; }
.hero-kpis { display: grid; gap: 4px; }
.hero-sub { margin-top: 0; }
.kpi-label, .kpi-value, .kpi-meta { font-size: 14px; font-weight: 400; color: #4b5563; }
.kpi-type { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.kpi-type-sale { background: #fee2e2; color: #b91c1c; }
.kpi-type-jeonse { background: #dbeafe; color: #1d4ed8; }
.kpi-type-wolse { background: #dcfce7; color: #166534; }
.hero-sep { width: 1px; height: 12px; background: #e5e7eb; display: inline-block; }
.hero-tour { background: #ece9ff; color: #5b5bd6; text-decoration: none; padding: 8px 14px; border-radius: 10px; font-size: 20px; font-weight: 700; white-space: nowrap; }
h1 { margin: 0 0 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid #f0f2f4; font-size: 14px; }

.trades-card { border: none; padding: 0; background: #fff; }
.chart-panel { margin-bottom: 12px; border: none; border-radius: 0; padding: 12px 0; }
.chart-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chart-mode { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid #e5e7eb; border-radius: 12px; padding: 2px; background: #f3f4f6; overflow: hidden; }
.chart-mode-bubble { position: absolute; top: 2px; left: 2px; width: calc((100% - 4px) / 2); height: calc(100% - 4px); background: #ffffff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); transform: translateX(0); transition: transform 220ms ease-out; will-change: transform; }
.chart-mode[data-active="1"] .chart-mode-bubble { transform: translateX(100%); }
.chart-mode-btn { position: relative; z-index: 1; border: 0; background: transparent; color: #6b7280; padding: 6px 14px; font-size: 13px; font-weight: 500; }
.chart-mode-btn.active { color: #111827; }
.chart-area-wrap { position: relative; }
.chart-area-btn { border: 1px solid #e5e7eb; background: #f3f4f6; color: #4b5563; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: 12px; min-width: 82px; text-align: center; }
.chart-area-menu { position: absolute; top: calc(100% + 6px); right: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 6px 16px rgba(0,0,0,0.08); padding: 4px; min-width: 102px; display: none; z-index: 5; }
.chart-area-menu.open { display: block; }
.chart-area-option { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 6px 8px; border-radius: 6px; font-size: 12px; color: #4b5563; }
.chart-area-option:hover { background: #f3f4f6; }
.chart-summary-label { margin: 0; color: #6b7280; font-size: 13px; }
.chart-summary-value { margin: 4px 0 8px; color: #1f2937; font-size: 40px; font-weight: 700; }
.chart-range { display: flex; gap: 14px; border-bottom: 1px solid #eceff3; margin-bottom: 8px; }
.chart-range-btn { border: 0; background: transparent; color: #8b8f97; padding: 6px 0 10px; font-size: 15px; }
.chart-range-btn.active { color: #1f2937; border-bottom: 2px solid #1f2937; }
.detail-chart { width: 100%; height: 210px; display: block; }
.detail-volume { width: 100%; height: 44px; display: block; }
.chart-grid { stroke: #e5e7eb; stroke-width: 1; }
.chart-y {
    fill: #9ca3af;
    font-size: 11px;
    font-weight: 300;
}
.chart-dot { opacity: 0.55; }
.chart-dot line { stroke: #bcc5d1; stroke-width: 0.8; stroke-linecap: round; }
.chart-line-under { fill: none; stroke: rgba(75, 85, 99, 0.2); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.chart-line { fill: none; stroke: #4b5563; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.chart-vline { stroke: #d1d5db; stroke-dasharray: 3 3; }
.chart-max { fill: #ef4444; }
.chart-min { fill: #2563eb; }
.chart-max-label { fill: #ef4444; font-size: 11px; font-weight: 600; }
.chart-min-label { fill: #2563eb; font-size: 11px; font-weight: 600; }
.vol-bar { fill: #bcc5d1; opacity: 0.55; }
.vol-label {
    fill: #9ca3af;
    font-size: 11px;
    font-weight: 300;
}
.vol-x {
    fill: #bcc5d1;
    font-size: 11px;
    font-weight: 300;
}
.dummy-filters { display: flex; gap: 8px; margin: 0 0 10px; }
.filter-btn { border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12px; color: #4b5563; }
.filter-btn.active { background: #f3f4f6; color: #111827; }
.trades-meta { margin: 0 0 10px; font-size: 12px; color: #9ca3af; }
.trades-table { table-layout: fixed; }
.trades-table thead th { font-size: 12px; font-weight: 500; color: #6b7280; background: #fff; padding: 10px 8px; border-top: 1px solid #eef1f4; border-bottom: 1px solid #eef1f4; white-space: nowrap; text-align: center; }
.trades-table thead th:nth-child(1), .trades-table tbody td:nth-child(1) { width: 22%; }
.trades-table thead th:nth-child(2), .trades-table tbody td:nth-child(2) { width: 16%; }
.trades-table thead th:nth-child(3), .trades-table tbody td:nth-child(3) { width: 18%; }
.trades-table thead th:nth-child(4), .trades-table tbody td:nth-child(4) { width: 44%; }
.trades-table tbody td:nth-child(1),
.trades-table tbody td:nth-child(3) { font-size: 13px; font-weight: 400; }
.trades-table thead th:nth-child(1) { text-align: left; }
.trades-table thead th:nth-child(4) { text-align: right; }
.trades-table tbody td { font-size: 15px; color: #374151; padding: 9px 8px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
.trades-table tbody td:last-child { text-align: right; }
.trades-table thead th:nth-child(2), .trades-table tbody td:nth-child(2) { text-align: center; }
.trades-table tbody td:nth-child(2) .price-badge { margin: 0 auto; }
.price-badge { display: inline-block; border-radius: 999px; font-size: 11px; padding: 2px 8px; font-weight: 600; }
.badge-매매 { background: #fee2e2; color: #b91c1c; }
.badge-전세 { background: #dbeafe; color: #1d4ed8; }
.badge-월세 { background: #dcfce7; color: #166534; }
.price-sub { margin-top: 3px; font-size: 13px; font-weight: 400; color: #6b7280; }
.trades-table tbody tr:hover { background: #f7f8fa; }

a:hover { text-decoration: none; }
