/* 색 체계: 중요한 내용이 눈에 띄도록 의미에 따라 색을 입힌다. 다른 CSS보다 나중에 불러온다.
   - 주제 색(data-tone): 시세·거래=파랑, 경매=호박, 청약·분양=초록, 지역·개발·상권=보라, 내 관심=분홍
   - 의미 색: 오름·높음=빨강, 내림·낮음=파랑(한국 시세 관례), 좋음·기회=초록, 주의·위험=호박, 해당 없음=회색 */

:root {
  --up: #dc2626; --up-bg: #fee2e2; --up-fg: #b91c1c;
  --down: #2563eb; --down-bg: #dbeafe; --down-fg: #1d4ed8;
  --good: #16a34a; --good-bg: #dcfce7; --good-fg: #166534;
  --warn: #d97706; --warn-bg: #fef3c7; --warn-fg: #92400e;
}
[data-tone="trade"] { --tone: #2563eb; --tone-bg: #eff6ff; --tone-fg: #1d4ed8; }
[data-tone="auction"] { --tone: #d97706; --tone-bg: #fffbeb; --tone-fg: #b45309; }
[data-tone="subscribe"] { --tone: #059669; --tone-bg: #ecfdf5; --tone-fg: #047857; }
[data-tone="region"] { --tone: #7c3aed; --tone-bg: #f5f3ff; --tone-fg: #6d28d9; }
[data-tone="mine"] { --tone: #db2777; --tone-bg: #fdf2f8; --tone-fg: #be185d; }

/* ---- 상단 ---- */
#topbar { border-top: 3px solid var(--brand); }
#site-nav a.on { font-weight: 800; }

/* ---- 주제별 도구 카드·탭 ---- */
.topic[data-tone] .topic-title { color: var(--tone-fg); font-size: 13.5px; }
.category-card[data-tone] .icon { background: var(--tone-bg); color: var(--tone); }
.category-card[data-tone]:hover { border-color: var(--tone); }
.category-card.active[data-tone] { border-color: var(--tone); background: var(--tone-bg); box-shadow: 0 0 0 3px var(--tone-bg); }
.category-card.active[data-tone] .icon { background: var(--tone); color: #fff; }
.category-card h3 { font-weight: 800; }
#topic-tabs button[data-tone] { border-color: var(--tone-bg); color: var(--tone-fg); background: var(--tone-bg); }
#topic-tabs button[data-tone]:hover { border-color: var(--tone); }
#topic-tabs button.on[data-tone] { background: var(--tone); border-color: var(--tone); color: #fff; }
.shortcut[data-tone] { background: var(--tone-bg); border-color: var(--tone-bg); }
.shortcut[data-tone]:hover { border-color: var(--tone); }

/* ---- 도구 화면: 선택한 도구의 색, 주요 버튼 ---- */
.tool-card[data-tone] .tool-bar { background: var(--tone-bg); border-top: 3px solid var(--tone); }
.tool-card[data-tone] .tool-bar-icon { background: var(--tone); }
.tool-card[data-tone] .tool-back { color: var(--tone-fg); }
.tool-card[data-tone] .tool-back:hover { border-color: var(--tone); }
.tool-bar-text b { color: var(--tone-fg, var(--ink)); }
#tool-card #table-btn, #tool-card #generate, #tool-card #ppt-btn {
  background: var(--tone, var(--brand)); border-color: var(--tone, var(--brand)); color: #fff; font-weight: 700;
}
#tool-card #table-btn:hover:not(:disabled), #tool-card #generate:hover:not(:disabled), #tool-card #ppt-btn:hover:not(:disabled) { filter: brightness(0.92); background: var(--tone, var(--brand)); }
#tool-card #table-btn:disabled, #tool-card #generate:disabled, #tool-card #ppt-btn:disabled { background: #cbd5e1; border-color: #cbd5e1; color: #fff; }
#tool-card #csv { color: var(--tone-fg, var(--brand-dark)); border-color: var(--tone, var(--brand)); }
#tool-card #fav-add-btn { background: #fdf2f8; border-color: #f9a8d4; color: #be185d; font-weight: 700; }
.field-label { color: #334155; }
.req-note { font-weight: 700; }

/* ---- 표 ---- */
.data-table tbody tr:nth-child(even) td { background-color: #fafcff; }
.data-table tbody tr:hover td { background-color: #f1f5f9; }
.data-table th { background: #f1f5f9; color: #334155; border-bottom: 2px solid #cbd5e1; }
.table-group-count { background: var(--brand-tint); color: var(--brand-dark); padding: 1px 9px; border-radius: 999px; font-weight: 700; }
.table-group:not(.colored) > summary .table-group-row > span:first-child { color: var(--ink); font-weight: 800; }
.table-group:not(.colored)[open] { border-color: #bfdbfe; }
.table-group:not(.colored)[open] > summary { background: var(--brand-tint); }

/* ---- 요약 칩 ---- */
.sum-chip { background: #f8fafc; }
.sum-chip b { font-size: 16px; }
.sum-chip.up { background: #fef2f2; }
.sum-chip.up b { color: var(--up-fg); }
.sum-chip.down { background: #eff6ff; }
.sum-chip.down b { color: var(--down-fg); }
.sum-chip.warn { background: #fffbeb; }
.sum-chip.warn b { color: var(--warn-fg); }
.sum-chip.good { background: #f0fdf4; }
.sum-chip.good b { color: var(--good-fg); }

/* ---- 홈·단지 한 장 요약 ---- */
.home-hero h1 { color: var(--ink); }
.pf-kpi { border-top: 4px solid #94a3b8; }
.pf-kpi.trade { border-top-color: var(--down); background: #f8fbff; }
.pf-kpi.ask { border-top-color: var(--warn); background: #fffdf7; }
.pf-kpi.gap.up { border-top-color: var(--up); background: #fef2f2; }
.pf-kpi.gap.down { border-top-color: var(--down); background: #eff6ff; }
.pf-kpi .v { font-size: 26px; }
.pf-fact.good { background: var(--good-bg); color: var(--good-fg); font-weight: 700; }
.pf-fact.warn { background: var(--warn-bg); color: var(--warn-fg); font-weight: 700; }
.pf-sec h3 { color: #334155; }
.pf-table tbody tr:first-child td { background: #f0f7ff; }
.pf-table tbody tr:first-child td b { color: var(--down-fg); }
.pf-range .bar.trade { background: #60a5fa; }
.pf-range .bar.ask { background: #fbbf24; }

/* ---- 내 관할 ---- */
.astat.on { background: #eff6ff; border-color: #bfdbfe; }
.astat.on b { color: var(--down-fg); }
.astat.hot { background: #fef2f2; border-color: #fecaca; }
.astat.hot b { color: var(--up-fg); }
.astat.warn { background: #fffbeb; border-color: #fde68a; }
.astat.warn b { color: var(--warn-fg); }
.astat.off { background: #f8fafc; }
.astat.off b { color: #94a3b8; }

/* ---- 지도 ---- */
#map-panel h3 { color: var(--ink); }

/* ---- 고객에게 보내는 카드(이미지) ---- */
.cs-big.trade { border-top: 4px solid #60a5fa; }
.cs-big.trade .v { color: #1d4ed8; }
.cs-big.ask { border-top: 4px solid #fbbf24; }
.cs-big.ask .v { color: #b45309; }
.cs-say.good { background: #f0fdf4; color: #166534; }
.cs-say.warn { background: #fffbeb; color: #92400e; }
.cs-say.info { background: #eff6ff; color: #1e40af; }
.cs-title { color: #1d4ed8; }

/* ---- 용어 설명: 열 제목·지표 이름 옆 "i" 버튼과 말풍선 ---- */
button.info {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; min-width: 15px;
  margin: 0 0 0 4px; padding: 0; border-radius: 50%; border: 1px solid #94a3b8; background: #fff; color: #64748b;
  font: italic 700 10px/1 Georgia, 'Times New Roman', serif; cursor: pointer; vertical-align: middle; box-shadow: none;
}
button.info:hover, button.info:focus-visible { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); outline: none; }
.data-table th button.info { margin-left: 2px; }
.sum-chip > span button.info, .astat > span button.info { margin-left: 4px; }
#term-pop {
  position: fixed; z-index: 400; background: #0f172a; color: #f8fafc; border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .35); font-size: 13px; line-height: 1.55; max-width: calc(100vw - 24px);
}
#term-pop b { display: block; font-size: 14px; margin-bottom: 4px; color: #fff; }
#term-pop p { margin: 4px 0; }
#term-pop .calc { background: rgba(255, 255, 255, .1); border-radius: 8px; padding: 6px 9px; font-size: 12px; }
#term-pop .calc span { color: #93c5fd; font-weight: 700; margin-right: 6px; }
#term-pop .note { color: #cbd5e1; font-size: 12px; }

/* ---- 서울 전체 흐름 카드(시장 활황도 순위) ---- */
.flow-card { flex-basis: 100%; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px 14px; margin-bottom: 2px; }
.flow-title { font-size: 13px; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.flow-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 4px 0; border-top: 1px solid #e2e8f0; font-size: 13px; }
.flow-row:first-of-type { border-top: 0; }
.flow-name { font-weight: 800; min-width: 74px; }
.flow-main b { font-size: 15px; }
.flow-main b.up { color: var(--up-fg); }
.flow-main b.down { color: var(--down-fg); }
.flow-main .sub { color: var(--muted); font-size: 12px; }
.flow-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.flow-tags em { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #e2e8f0; color: #334155; }
.flow-note { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

/* 월별 거래 건수 막대 그래프 */
.mc-wrap { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.mc-title { font-size: 12.5px; font-weight: 800; color: #334155; margin-bottom: 4px; }
.mc-grid { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.mc-chart { flex: 1 1 280px; min-width: 240px; }
.mc-name { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.mc-bars { display: flex; align-items: flex-end; gap: 6px; }
.mc-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.mc-val { font-size: 11.5px; font-weight: 700; color: #1e3a8a; margin-bottom: 2px; white-space: nowrap; }
.mc-track { height: 72px; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid #94a3b8; }
.mc-bar { width: 70%; max-width: 38px; background: #3b82f6; border-radius: 4px 4px 0 0; }
.mc-bar.partial { background: repeating-linear-gradient(45deg, #bfdbfe, #bfdbfe 4px, #dbeafe 4px, #dbeafe 8px); outline: 1px dashed #60a5fa; outline-offset: -1px; }
.mc-m { font-size: 11.5px; font-weight: 700; color: #475569; margin-top: 3px; }
.mc-tag { font-size: 10px; color: #2563eb; }

/* ---- 묶음(단지) 머리글·단지 안 표: 글자를 키우고 대비를 높여 읽기 쉽게 ---- */
.table-group summary { padding: 12px 14px; }
.table-group:not(.colored) > summary .table-group-row > span:first-child { font-size: 14.5px; }
.table-group-status-summary { font-size: 12.5px; color: #475569; }
.table-group[open] > summary { border-bottom: 1px solid #bfdbfe; }
.table-group:not([open]):hover > summary { background: #f1f5f9; }
.table-group-count { font-size: 12.5px; }
.table-subgroup { padding: 12px 14px 6px; }
.table-subgroup-label { font-size: 13px; margin-bottom: 8px; }
.table-subgroup .data-table { font-size: 13px; }
.table-subgroup .data-table th { color: #1e293b; font-size: 12.5px; }
.table-subgroup .data-table td { padding-top: 8px; padding-bottom: 8px; }
.table-common { padding: 10px 14px 2px; font-size: 13px; }

/* 최근실거래가 칸의 '특수 의심': 빨간 글자와 빨간 i 버튼 */
.flag-red { color: #dc2626; font-weight: 800; }
.flag-red + button.info { border-color: #dc2626; color: #dc2626; }
.flag-red + button.info:hover { background: #fee2e2; }

/* 일별 실거래: 날짜 머리글을 크고 진하게(요일 포함) */
.table-group.date-group > summary { padding: 14px 16px; }
.table-group.date-group > summary .table-group-row > span:first-child { font-size: 17px; font-weight: 800; color: #1e3a8a; overflow: visible; }
.dg-date { letter-spacing: .01em; }
.dg-wd { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: 12.5px; font-weight: 700; vertical-align: 2px; }
.dg-wd.sat { background: #dbeafe; color: #1d4ed8; }
.dg-wd.sun { background: #fee2e2; color: #b91c1c; }
.dg-kind { display: inline-block; margin-right: 8px; padding: 2px 9px; border-radius: 6px; background: #1e3a8a; color: #fff; font-size: 12.5px; font-weight: 700; vertical-align: 2px; }
.dg-dday { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 12.5px; font-weight: 700; vertical-align: 2px; }
.dg-dday.soon { background: #ffedd5; color: #c2410c; }
.table-group.date-group > summary .table-group-status-summary { font-size: 13px; margin-top: 5px; }

/* ---- 단지 정보 링크(표의 단지명, 묶음 머리글 버튼)와 팝업 ---- */
.cx-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 700; color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; box-shadow: none; }
.cx-link:hover { color: #1e40af; }
#cx-pop { position: fixed; inset: 0; z-index: 450; background: rgba(15, 23, 42, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
#cx-pop[hidden] { display: none; }
.cx-card { position: relative; background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; padding: 22px 22px 18px; box-shadow: 0 20px 50px rgba(15, 23, 42, .35); }
.cx-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 18px; color: #64748b; cursor: pointer; box-shadow: none; }
.cx-card h3 { margin: 0 28px 2px 0; font-size: 19px; color: #0f172a; }
.cx-sub { margin: 0 0 14px; font-size: 13px; color: #475569; }
.cx-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.cx-tile { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.cx-tile .k { display: block; font-size: 12px; color: #64748b; font-weight: 700; }
.cx-tile b { display: block; font-size: 19px; color: #0f172a; margin-top: 2px; }
.cx-tile small { display: block; font-size: 12px; color: #475569; margin-top: 1px; }
.cx-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; padding: 10px 2px; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.cx-kv span:nth-child(odd) { color: #64748b; font-weight: 700; }
.cx-note { font-size: 11.5px; color: #64748b; margin: 10px 0; }
.cx-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-loading, .cx-empty { font-size: 14px; color: #475569; margin: 14px 0; }
.cx-cands { margin-top: 6px; }


/* 표 창 맨 위 기간(·법정동) 선택 줄 */
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 18px 10px; }
.period-bar[hidden] { display: none; }
.period-bar .pb-label { font-size: 12.5px; font-weight: 700; color: #475569; margin-right: 2px; }
.period-bar .pb-gap { margin-left: 10px; }
.period-bar select { padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; background: #fff; max-width: 150px; }
.period-bar .pb-msg { font-size: 12.5px; font-weight: 700; color: #b91c1c; margin-left: 6px; }


/* 묶음 머리글(아파트 실거래가·호가 비교)의 단지 이름 옆 '단지 정보' 버튼 */
.cx-head-btn { flex: 0 0 auto; border: 1px solid #93c5fd; background: #fff; color: #1d4ed8; border-radius: 999px; padding: 2px 11px; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: none; }
.cx-head-btn:hover { background: #eff6ff; }
.table-group-row > span.has-cx { display: flex; align-items: center; gap: 8px; overflow: visible; text-overflow: clip; }
.table-group-row > span.has-cx .tg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 단지 정보 팝업: 최근 6개월 거래 건수(매매·전세·월세) 넓은 칸 */
.cx-tile.cx-wide { grid-column: 1 / -1; }
.cx-counts { display: flex; gap: 22px; margin-top: 4px; }
.cx-counts > div { display: flex; flex-direction: column; }
.cx-counts small { font-size: 12px; font-weight: 700; margin: 0; }
.cx-counts b { font-size: 22px; margin-top: 0; }
.cx-counts em { font-style: normal; font-size: 13px; font-weight: 700; margin-left: 2px; }

/* 표 위 안내 한 줄(예: 행을 누르면 지도에서 위치를 볼 수 있어요) */
.table-hint { display: flex; align-items: center; gap: 8px; margin: 2px 18px 10px; padding: 9px 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; color: #1d4ed8; font-size: 13.5px; font-weight: 700; }
.table-hint[hidden] { display: none; }
.table-hint svg { flex: 0 0 auto; }

/* 시세 근거 링크(표의 근거 칸)와 팝업 */
.ref-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; text-align: left; color: #1e293b; cursor: pointer; text-decoration: underline dotted #94a3b8; text-underline-offset: 3px; box-shadow: none; }
.ref-link:hover { color: #1d4ed8; }
#ref-pop { position: fixed; inset: 0; z-index: 460; background: rgba(15, 23, 42, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
#ref-pop[hidden] { display: none; }
.ref-card { max-width: 640px; }
.ref-sum { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.7; margin-bottom: 10px; }
.ref-calc { margin-top: 2px; }
.ref-note { color: #475569; font-size: 12.5px; margin-top: 2px; }
.ref-tw { max-height: 42vh; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 10px; }
.ref-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ref-table th { position: sticky; top: 0; background: #f1f5f9; text-align: left; padding: 6px 8px; font-size: 12px; color: #334155; }
.ref-table td { padding: 6px 8px; border-top: 1px solid #eef2f7; white-space: nowrap; }
.ref-table td small { color: #64748b; }
.ref-table .num, .ref-table th.num { text-align: right; }
.ref-table tr.chosen td { background: #fef9c3; font-weight: 700; }

/* ---- 청약·분양: 접수 상태 칩과 지역 구분 제목 ---- */
button.sum-chip.st-filter { font: inherit; text-align: left; cursor: pointer; border: 1px solid transparent; }
button.sum-chip.st-filter:hover { border-color: #93c5fd; }
button.sum-chip.st-filter.on { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.st-lead { font-size: 12px; color: var(--muted); margin-right: 6px; }
.st-chip { font: inherit; font-size: 12.5px; font-weight: 700; padding: 2px 10px; margin-right: 6px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; background: #f1f5f9; color: #64748b; }
.st-chip:hover { border-color: #94a3b8; }
.st-chip.st-live { background: #dcfce7; color: #166534; }
.st-chip.st-soon { background: #fef3c7; color: #92400e; }
.st-chip.on { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.group-section { margin: 16px 2px 8px; font-size: 14px; font-weight: 800; color: #1e3a8a; }
.group-section:empty { display: none; }
.tg-filter-note { margin: 10px 16px 0; font-size: 13px; color: #475569; }
.tg-clear { font: inherit; font-size: 13px; color: #2563eb; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* ---- 단지 정보 팝업: 정비사업 안내 ---- */
.cx-redev { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; }
.cx-redev-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cx-redev-h b { color: #92400e; }
.cx-redev-h span { padding: 1px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; font-weight: 700; }
.cx-redev-n { margin-top: 4px; font-size: 13.5px; font-weight: 700; color: #1f2937; }
.cx-redev-v { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 13px; color: #374151; }
.cx-redev-s { margin-top: 3px; font-size: 12.5px; color: #6b7280; }

/* ---- 글자 크기 단계(사이트 전체 공통) + 가시성: 대비·카드 윤곽 ----
   페이지 제목 24 / 섹션 제목 17 / 카드 제목·메뉴 16 / 본문·설명 14 / 보조·표 13 */
:root { --fs-title: 24px; --fs-section: 17px; --fs-card: 16px; --fs-body: 14px; --fs-small: 13px; }
:root { --muted: #475569; --border: #cbd5e1; --bg: #f1f5f9; }
#site-nav a { font-size: var(--fs-card); font-weight: 700; color: #334155; }
#site-nav a.on { color: var(--brand); }
#user-info { font-size: var(--fs-body); color: #334155; }
#brand .brand-sub { font-size: var(--fs-small); color: #475569; }
.home-hero h1, .pf-head h2 { font-size: var(--fs-title); margin-bottom: 14px; }
.pf-head h2 { margin-bottom: 0; }
#home-search { font-size: var(--fs-card); padding: 12px 16px; border: 1.5px solid #94a3b8; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
#home-search::placeholder { color: #64748b; }
.finder { border: 1.5px solid #94a3b8; }
.finder > summary { font-size: var(--fs-card); color: var(--ink); }
.finder > summary span { font-size: var(--fs-body); color: #475569; }
.finder-form label { font-size: var(--fs-body); color: #334155; font-weight: 600; }
.finder-form select, .finder-form input { font-size: var(--fs-body); border-color: #94a3b8; }
.shortcuts h2, .step-title, .topic[data-tone] .topic-title, .tool-bar-text b, #map-panel h3 { font-size: var(--fs-section); }
.shortcuts h2 { font-weight: 800; color: #1e293b; margin-bottom: 10px; }
.topic[data-tone] .topic-title { font-weight: 800; }
.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.shortcut { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; text-align: left; padding: 14px 16px; border: 1.5px solid #94a3b8; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.shortcut b { font-size: var(--fs-card); margin-bottom: 4px; }
.shortcut span { font-size: var(--fs-body); color: #475569; line-height: 1.45; }
.shortcut[data-tone] { background: var(--card); border: 1.5px solid color-mix(in srgb, var(--tone) 70%, #fff); }
.shortcut[data-tone] b { color: var(--tone-fg); }
.shortcut[data-tone]:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .12); }
.category-card { border-color: #94a3b8; }
.category-card h3 { font-size: var(--fs-card); color: var(--ink); }
.category-card p { font-size: var(--fs-body); color: #475569; line-height: 1.45; }
.tool-bar-text span { font-size: var(--fs-small); }
.data-table { font-size: var(--fs-small); }
@media (max-width: 640px) { .shortcut-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .home-hero h1, .pf-head h2 { font-size: 22px; } }
.finder > summary { padding: 12px 16px; }
#home-recent:empty { display: none; }
.home-hero { padding-bottom: 4px; }
#site-nav a { padding: 10px 16px; }

/* ---- 모바일 표: 핵심 열만, 행을 누르면 전체 항목 ---- */
.rs-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(15, 23, 42, .5); display: flex; align-items: flex-end; justify-content: center; }
.rs-overlay[hidden] { display: none; }
.rs-panel { width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; background: var(--card); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 32px rgba(15, 23, 42, .25); }
.rs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.rs-head b { font-size: var(--fs-section); line-height: 1.3; }
.rs-close { border: 0; background: none; font-size: var(--fs-body); color: var(--muted); padding: 6px 0 6px 12px; cursor: pointer; white-space: nowrap; }
.rs-body { overflow-y: auto; padding: 4px 18px 12px; -webkit-overflow-scrolling: touch; }
.rs-list { margin: 0; }
.rs-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rs-row dt { flex: 0 0 38%; color: var(--muted); font-size: var(--fs-body); }
.rs-row dd { margin: 0; flex: 1; text-align: right; font-size: var(--fs-card); font-weight: 600; word-break: keep-all; overflow-wrap: anywhere; }
.rs-more { margin: 18px 0 2px; font-size: var(--fs-small); font-weight: 800; color: var(--muted); }
.rs-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.rs-foot .btn-primary { width: 100%; padding: 12px; font-size: var(--fs-card); }
body.rs-open { overflow: hidden; }
@media (max-width: 640px) {
  .info { display: none !important; }
  #table-summary { flex: 0 0 auto; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }   /* flex: 0 0 auto -- 창이 낮을 때 칸이 납작하게 눌려 값이 잘리지 않게 */
  #table-summary > * { flex: 0 0 auto; }
  .data-table td, .data-table th { white-space: normal; word-break: keep-all; }
  .data-table td.num { white-space: nowrap; }
  .data-table tbody tr.clickable td { cursor: pointer; }
  .table-hint.clampable, .table-summary-note.clampable, #table-status.clampable { max-height: 3.4em; overflow: hidden; position: relative; cursor: pointer; }
  .clampable::after { content: "더 보기 ▾"; position: absolute; right: 0; bottom: 0; padding: 0 0 0 30px; font-weight: 800; color: var(--brand); background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 40%); }
  .table-hint.clampable::after { padding-right: 8px; background: linear-gradient(90deg, rgba(239, 246, 255, 0), #eff6ff 40%); }
  .table-hint.expanded, .table-summary-note.expanded, #table-status.expanded { cursor: pointer; }
}

/* 전용면적(㎡·평) 합친 칸: 평은 작게, 모바일에서는 아래 줄 */
.area-py { color: var(--muted); font-size: var(--fs-small); font-weight: 500; }
@media (max-width: 640px) { .area-py { display: block; } }
@media (max-width: 640px) { .data-table th, .data-table td { padding-left: 4px; padding-right: 4px; } .data-table .dense th, .data-table.dense td { padding-left: 4px; padding-right: 4px; } }
@media (max-width: 640px) { .data-table td { overflow-wrap: anywhere; } .data-table td.num { overflow-wrap: normal; } }

/* 모바일: 설명 문구는 빼고 데이터만 보여 준다 */
@media (max-width: 640px) {
  #table-hint, #table-summary-note, .slow-note, #tool-bar-desc { display: none !important; }
}

/* 표 창 위쪽 줄들은 창이 낮아도 눌리지 않게 한다(표 본문만 스크롤) */
#table-period-bar, #table-hint, #table-summary, #table-summary-note, #table-status, #table-modal .modal-search-row, #table-modal .map-modal-header { flex-shrink: 0; }
