/* popin 공용 디자인 기준 (2026-11-27). 부트스트랩 대신 쓰는 작은 파일.
   색·모서리·간격·글자 크기를 여기서만 정한다. 페이지 고유 모양은 각 템플릿 <style> 에 둔다.
   외부 글꼴 없음 (시스템 글꼴), 숫자는 같은 폭(tabular-nums) 으로 세로 줄이 맞게. */
:root {
  --ink: #17243a;        /* 본문 글자 (짙은 남색 잉크) */
  --ink-2: #3a4759;      /* 보조 글자 */
  --muted: #5b6878;      /* 설명·단위 */
  --paper: #f3f5f7;      /* 바탕 */
  --surface: #ffffff;    /* 종이 */
  --tint: #f7f9fb;       /* 옅은 칸 */
  --line: #dce2e9;       /* 테두리 */
  --line-2: #eef1f5;     /* 표 줄 */
  --brand: #1d5fd0;      /* 지적도 파랑: 링크·선택 */
  --brand-tint: #eaf1fd;
  --sale: #1d5fd0;       /* 매매 */
  --jeonse: #0d8268;     /* 전세 */
  --wolse: #c4561a;      /* 월세 */
  --up: #c92a2a;         /* 평균보다 높음 */
  --down: #0d8268;       /* 평균보다 낮음 */
  --r: 8px;              /* 모서리는 둘뿐: 8px 와 알약 */
  --pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}

/* 기본값 정리 (부트스트랩 reboot 대신, 쓰는 것만).
   :where() 로 감싸 우선순위 0 — 페이지가 자기 규칙(* { margin:0 } 등)을 두면 언제나 그쪽이 이긴다 */
*, *::before, *::after { box-sizing: border-box; }
:where(html) { -webkit-text-size-adjust: 100%; }
:where(body) { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
:where(h1, h2, h3, h4, h5, h6) { margin: 0 0 8px; line-height: 1.35; font-weight: 700; color: var(--ink); }
:where(p, ul, ol) { margin: 0 0 12px; }
:where(a) { color: var(--brand); }
:where(img, svg, canvas) { vertical-align: middle; }
:where(button, input, select) { font: inherit; color: inherit; }
:where(button) { cursor: pointer; }
:where(table) { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 글자 크기: 13 / 15 / 17 / 20 / 24 */
.t-h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.t-h2 { font-size: 17px; font-weight: 700; }
.t-sm { font-size: 13px; }
@media (min-width: 768px) { .t-h1 { font-size: 24px; } }

.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.tr { text-align: right; }
.tc { text-align: center; }
.nowrap { white-space: nowrap; }
.hide-sm { display: none; }
@media (min-width: 576px) { .hide-sm { display: table-cell; } col.hide-sm { display: table-column; } }

/* 틀 */
.wrap { max-width: 1120px; margin: 0 auto; padding: 12px; }
@media (min-width: 768px) { .wrap { padding: 24px 20px; } }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
@media (min-width: 768px) { .sheet { padding: 24px; } }
.grid2 { display: grid; gap: 8px; }
@media (min-width: 768px) { .grid2 { grid-template-columns: 1fr 1fr; gap: 12px; } }
.stack > * + * { margin-top: 16px; }

/* 입력·버튼 */
.input { width: 100%; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font-size: 14px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #24344f; }
.btn-text { height: auto; padding: 2px 10px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; }
.search { display: flex; gap: 6px; }

/* 꼬리표 */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--pill); font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); }

/* 표 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { padding: 8px 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--tint); border-bottom: 1px solid var(--line); text-align: center; }
.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--tint); }

/* 광고 칸 (높이는 페이지마다) */
.ad-slot { position: relative; z-index: 1; overflow: hidden; margin: 16px 0; width: 100%; text-align: center; }
.ad-slot ins { display: block !important; width: 100% !important; }

/* 아이콘 (페이지 안 SVG) */
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }
.icon-spin { animation: icon-spin 1s linear infinite; } @keyframes icon-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .icon-spin { animation: none; } }
