/* 사이트 공통 겉모습 (레퍼런스: Figma 커뮤니티 'Legacy Homes')
   회색 바탕 · 검정 포인트 · 아주 굵은 제목 · 각진 카드와 버튼 · 검정 원 장식 · 어두운 바닥글.
   각 페이지(map·apt·report 템플릿)의 스타일 뒤에 붙어서 덮어쓴다. 데이터 색(공포 파랑·탐욕 빨강)은 그대로 둔다. */

:root {
  --bg: #f0f0f0; --surface: #ffffff; --ink: #1d1d1d; --ink-2: #474747; --muted: #636363;  /* 흐린 글도 대비 4.5:1 이상 */
  --grid: #e3e3e3; --axis: #bdbdbd; --hair: rgba(29, 29, 29, 0.14); --hl: #e9e9e9;
  --line: #9a9a9a; --shadow: 0 14px 36px rgba(0, 0, 0, 0.08); --on-ink: #ffffff;
  --font: "Work Sans", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --display: "Archivo", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #1c1c1c; --ink: #f0f0f0; --ink-2: #c6c6c6; --muted: #8f8f8f;
    --grid: #2c2c2c; --axis: #474747; --hair: rgba(255, 255, 255, 0.13); --hl: #262626;
    --line: #5a5a5a; --shadow: 0 14px 36px rgba(0, 0, 0, 0.45); --on-ink: #121212;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1c1c1c; --ink: #f0f0f0; --ink-2: #c6c6c6; --muted: #8f8f8f;
  --grid: #2c2c2c; --axis: #474747; --hair: rgba(255, 255, 255, 0.13); --hl: #262626;
  --line: #5a5a5a; --shadow: 0 14px 36px rgba(0, 0, 0, 0.45); --on-ink: #121212;
}

body { background: var(--bg); font-family: var(--font); padding-block: 0 !important; }
.wrap { padding-block: 8px 64px; }

/* ---------- 머리글 (로고 · 메뉴 · 화면 밝기 · 검정 버튼) ---------- */
.sk-nav { margin-inline: -16px; padding: 18px 16px; }
.sk-nav .sk-in { max-width: var(--sk-max, 1180px); margin: 0 auto; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.sk-logo { font-family: "Poiret One", var(--font); font-size: 22px; letter-spacing: 0.04em; color: var(--ink); text-decoration: none; white-space: nowrap; font-weight: 400; display: inline-grid; line-height: 1.15; }
.sk-logo .ko { font-family: var(--font); font-size: 13px; letter-spacing: 0; font-weight: 600; color: var(--ink-2); }
.sk-logo b { font-weight: 400; }
.sk-menu { display: flex; gap: 6px 30px; flex: 1 1 auto; justify-content: center; flex-wrap: wrap; }
.sk-menu a { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.sk-menu a:hover { color: var(--ink); }
.sk-menu a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.sk-right { display: flex; align-items: center; gap: 14px; }
.sk-cta { font-size: 13px; font-weight: 600; color: var(--on-ink) !important; background: var(--ink); padding: 10px 18px; text-decoration: none; white-space: nowrap; letter-spacing: 0.02em; }
.sk-cta:hover { opacity: 0.86; }
.sk-cta:focus-visible, .sk-menu a:focus-visible, .sk-logo:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 760px) {  /* 휴대폰: 1줄 로고·화면 밝기·버튼, 2줄 메뉴 */
  .sk-nav { padding-block: 12px 10px; }
  .sk-nav .sk-in { gap: 10px 10px; flex-wrap: wrap; }
  .sk-menu { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 4px 20px; }
  .sk-right { margin-left: auto; gap: 8px; }
  .sk-logo { font-size: 17px; }
  .sk-logo .ko { font-size: 12px; }
  .sk-right .theme-ctl { display: none !important; }
  .sk-right .sk-theme-m { display: inline-block; }  /* 뒤쪽의 숨김 규칙보다 우선 */
  .sk-cta { padding: 9px 12px; }
}
.theme-ctl { border-radius: 0 !important; border-color: var(--line) !important; background: transparent !important; }
.theme-ctl button { border-radius: 0 !important; }
.theme-ctl button[aria-pressed="true"] { background: var(--ink) !important; color: var(--on-ink) !important; }
.sk-nav .theme-ctl .tl { font-size: 13px; color: var(--ink-2); padding: 0 8px 0 10px; }
.theme-ctl button { font-size: 13px !important; padding: 4px 10px !important; }
.sk-theme-m { display: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--line); padding: 8px 10px; cursor: pointer; white-space: nowrap; }

/* ---------- 첫 화면: 페이지 사진을 어둡게 깐 띠 위에 두 단 제목 (바닥글과 같은 느낌) ---------- */
body { overflow-x: clip; }  /* 화면 폭 띠가 가로 스크롤을 만들지 않게 */
.sk-hero { display: grid !important; grid-template-columns: minmax(0, 1fr); row-gap: 14px !important; position: relative; isolation: isolate;
  padding-block: 40px 46px; margin-block: 0 8px;
  /* 띠 안에서는 글자·버튼 색을 뒤집는다 (밝게·어둡게 모드 모두 어두운 띠) */
  --ink: #ffffff; --ink-2: #dcdcdc; --muted: #ababab; --surface: #1d1d1d; --on-ink: #1d1d1d; --hl: rgba(255, 255, 255, 0.1);
  --hair: rgba(255, 255, 255, 0.22); --line: rgba(255, 255, 255, 0.55); color: var(--ink); }
/* 사진은 실제 요소(.sk-bg)의 인라인 배경으로: CSS 변수로 넘기면 주소가 스타일 파일 기준이 돼 최상위 페이지에서 틀어진다 */
.sk-hero > .sk-bg, .sk-hero::after { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; max-width: none; }
.sk-hero > .sk-bg { z-index: -2; background-color: #1d1d1d; background-size: cover; background-repeat: no-repeat; }
.sk-hero::after { content: ""; z-index: -1; background: linear-gradient(90deg, rgba(18, 18, 18, 0.9) 0%, rgba(18, 18, 18, 0.78) 45%, rgba(18, 18, 18, 0.62) 100%); }
.sk-hero > :not(.sk-bg):not(.sk-dot) { min-width: 0; max-width: 760px; }
.topbar .back { display: none; }  /* 머리글 메뉴가 대신한다 */
.wrap > .sk-hero { min-width: 0; }
.sk-hero .topbar { min-height: 0; }
.sk-hero h1 { display: grid; gap: 2px; margin-top: 6px; }
.sk-h1a { font-family: var(--font); font-size: clamp(20px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.sk-h1b { font-family: var(--display); font-size: clamp(36px, 5vw, 60px); font-weight: 900; font-stretch: 112%; letter-spacing: -0.025em; line-height: 1.02; }
.sk-hero .sub, .sk-hero .lede, .sk-hero .change { color: var(--ink-2); line-height: 1.75; }
.sk-hero .change { background: rgba(255, 255, 255, 0.08); }
.sk-hero b { color: var(--ink); }
/* 단지 검색·신고가·모의 투자의 지역 고르기 (site_build.py PICK이 채움) */
.rg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.rg > span:first-child { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.rg a, .rg .off { font-size: 13.5px; line-height: 1; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; white-space: nowrap; }
.rg a:hover { background: var(--hl); }
.rg a[aria-current] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 600; }
.rg .off { color: var(--muted); border: 1px dashed var(--hair); cursor: default; }
.sk-hero .sk-dot { position: absolute; z-index: -1; display: block; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); pointer-events: none; }
.sk-hero .sk-dot.a { width: 120px; height: 120px; right: calc(50% - 50vw + 56px); top: 34px; }  /* 화면 오른쪽 끝 기준 (글과 겹치지 않게) */
.sk-hero .sk-dot.b { width: 40px; height: 40px; right: calc(50% - 50vw + 96px); top: 170px; background: rgba(255, 255, 255, 0.85); border: 0; }  /* 고리 바로 아래 (예전엔 띠 아래쪽 사진 위에 따로 떠 얼룩처럼 보였음) */
@media (max-width: 1240px) { .sk-hero .sk-dot.b { display: none; } }
@media (max-width: 760px) { .sk-hero { padding-block: 28px 32px; } .sk-hero .sk-dot { display: none; } }
.eyebrow { font-family: var(--font) !important; font-size: 13px; letter-spacing: 0.12em; color: var(--muted); }

/* ---------- 제목 ---------- */
h2 { font-family: var(--display); font-weight: 900; font-stretch: 108%; letter-spacing: -0.02em; }
.section > header h2 { font-size: clamp(24px, 3vw, 32px); }
.sec-title, .hist-title { letter-spacing: 0.02em; }
.hero-num, .v-score b, .pin .v, .v-label { font-family: var(--display); font-weight: 800; }

/* ---------- 카드 · 패널: 각지고, 흰 바탕, 얇은 선 ---------- */
.panel { border-radius: 0 !important; border: 1px solid var(--hair) !important; background: var(--surface); }
.panel.search, .panel.timebar, .sk-raised { box-shadow: var(--shadow); border-color: transparent !important; }
.fact, div.verdict, .note, .relbox, .g-mini, .results li, .bar-row.click, .tag, .tip, .hist-tip, .pin, .pin.gu, .g-pin i, .chart:focus-visible { border-radius: 0 !important; }
.fact { border-color: var(--line) !important; background: transparent; }
.note { background: var(--hl); }
div.verdict { background: var(--surface) !important; border-color: var(--line) !important; }  /* 단지 화면 결론 카드 (보고서의 section.verdict 는 아님) */
.scale-bar, .g-track span, .gauge-track span, .range-track .zone { border-radius: 0 !important; }
.gauge-track span:first-child, .gauge-track span:last-child { border-radius: 0 !important; }

/* ---------- 버튼: 검정 사각 / 테두리 사각 ---------- */
.btn, .quick button, .seg, .seg button, .gu-select, .chip, .zone-chip, .g-chip, .search input, .sw, .pick { border-radius: 0 !important; }
.btn, .quick button, .gu-select { border: 1px solid var(--line) !important; background: transparent; color: var(--ink); }
.btn:hover, .quick button:hover { background: var(--ink) !important; color: var(--on-ink) !important; }
.btn[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--ink) !important; color: var(--on-ink) !important; border-color: var(--ink) !important; box-shadow: none !important; }
.seg { background: transparent !important; border: 1px solid var(--line) !important; padding: 0 !important; }
.seg button { border-radius: 0 !important; }
.seg button[aria-pressed="true"] small { color: var(--on-ink) !important; }
.detail .seg, #types, #types .seg, #months { border: 0 !important; }  /* 평형·달 버튼은 한 칸씩 테두리 */
.detail .seg button, #types button, #months button { border: 1px solid var(--line) !important; }
a.btn { background: var(--ink) !important; color: var(--on-ink) !important; border-color: var(--ink) !important; padding: 9px 18px !important; font-weight: 600; }
.chip, .zone-chip, .g-chip { background: transparent !important; border: 1px solid var(--line) !important; }
.search input { background: var(--surface) !important; border: 1px solid var(--line) !important; }

/* ---------- 바닥글: 어두운 띠 + 사진 ---------- */
.sk-foot { margin-inline: -16px; color: #e9e9e9; background: #1d1d1d; position: relative; overflow: hidden; }
.sk-foot > .sk-foot-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0.28; filter: grayscale(0.35); }
.sk-foot .sk-in { position: relative; max-width: var(--sk-max, 1180px); margin: 0 auto; padding: 56px 16px 28px; display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 32px 40px; }
@media (max-width: 760px) { .sk-foot .sk-in { grid-template-columns: 1fr 1fr; } .sk-foot .sk-about, .sk-foot .sk-contact { grid-column: 1 / -1; } }
.sk-foot .sk-about { container-type: inline-size; }
.sk-foot .sk-logo { color: #fff; font-size: 26px; font-size: min(26px, 8.4cqw); white-space: nowrap; line-height: 1.2; }  /* 좁은 페이지(단지 검색·모의 투자)에서 두 줄로 꺾이지 않게 */
.sk-foot p { color: #cfcfcf; font-size: 13px; line-height: 1.7; max-width: 46ch; margin-top: 12px; }
.sk-foot h4 { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: #fff; }
.sk-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; }
.sk-foot a { color: #d6d6d6; text-decoration: none; }
.sk-foot a:hover { color: #fff; text-decoration: underline; }
.sk-foot .sk-contact p { margin: 0 0 12px; }
.sk-foot .sk-mail { display: block; color: #fff; font-size: 15px; font-weight: 600; word-break: break-all; }
.sk-foot .sk-mailbtn { display: inline-block; margin-top: 14px; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, 0.7); color: #fff; font-size: 13px; font-weight: 600; }
.sk-foot .sk-mailbtn:hover { background: #fff; color: #1d1d1d; text-decoration: none; }
.sk-foot .sk-copy { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 16px; font-size: 13px; color: #b5b5b5; max-width: none; margin: 0; }
@media print { .sk-nav, .sk-foot, .sk-photo { display: none; } }

/* ---------- 검색 전 첫 화면 (단지 검색·모의 투자): 사진 한 장을 화면 전체 배경으로 은은하게 ---------- */
.sk-pagebg { display: none; }
body.sk-intro .sk-pagebg { display: block; position: fixed; inset: 0; z-index: -1; background-color: #141414; background-size: cover; background-position: center; background-repeat: no-repeat; }
body.sk-intro .sk-pagebg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 14, 14, 0.62) 0%, rgba(14, 14, 14, 0.72) 55%, rgba(14, 14, 14, 0.84) 100%); }
body.sk-intro {
  --bg: transparent; --surface: rgba(24, 24, 24, 0.72); --ink: #ffffff; --ink-2: #dcdcdc; --muted: #ababab; --on-ink: #1d1d1d;
  --hair: rgba(255, 255, 255, 0.18); --hl: rgba(255, 255, 255, 0.09); --line: rgba(255, 255, 255, 0.45);
  --grid: rgba(255, 255, 255, 0.12); --axis: rgba(255, 255, 255, 0.35); --shadow: none;
  background: #141414; color: var(--ink); color-scheme: dark;
}
body.sk-intro .sk-hero > .sk-bg, body.sk-intro .sk-hero::after, body.sk-intro .sk-foot > .sk-foot-bg { display: none; }  /* 띠·바닥글 사진은 감춤 */
body.sk-intro .sk-foot { background: transparent; border-top: 1px solid rgba(255, 255, 255, 0.14); }
body.sk-intro .panel { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- 휴대폰: 꼭 필요한 정보만 (컴퓨터 화면은 그대로) ----------
   .m-hide 휴대폰에서 숨김 · .m-only 휴대폰에서만 보임 · .m-fold 휴대폰에서 접혀 있다가 바로 앞 .m-fold-btn으로 펼침 */
.m-only { display: none !important; }  /* 표 보조 글(td .s) 규칙보다 우선 */
.m-fold-btn { display: none; }
@media (max-width: 600px) {
  .m-hide { display: none !important; }
  .m-only { display: block !important; }
  .m-fold-btn { display: block; width: 100%; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: transparent;
    border: 1px solid var(--line); padding: 10px 12px; cursor: pointer; text-align: center; }
  .m-fold:not(.m-open) { display: none !important; }
  .sk-hero .eyebrow { display: none; }  /* 제목 위 작은 분류 글씨 */
  .sk-foot .sk-in > div:nth-child(3) { display: none; }  /* 바닥글 '자료' 칸 */
  .sk-foot .sk-in { padding-top: 36px; gap: 22px 24px; }
}

/* ---------- 휴대폰 손보기 (2026-10-23 휴대폰 화면 점검: 360·390px) ---------- */
/* 한글 낱말이 줄 끝에서 쪼개지지 않게 ('갱/신' → '갱신'). 한 낱말이 칸보다 길면(주소·이메일) 그때만 끊음 */
body { word-break: keep-all; overflow-wrap: break-word; }
@media (max-width: 600px) {
  /* 아이폰 Safari는 16px보다 작은 입력칸을 누르면 화면을 확대함 (신고가 검색·정렬, 지도 구 선택, 모의 투자 금리 칸이 13~14px이었음) */
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
  /* 손가락으로 누르기 쉽게: 바닥글 링크(높이 16px → 32px), 지역 고르기(30 → 38px), 월·시기 막대(16 → 32px) */
  .sk-foot ul { gap: 2px; }
  .sk-foot ul a { display: inline-block; padding: 8px 0; }
  .rg > a { min-height: 38px; display: inline-flex; align-items: center; }
  input[type="range"] { height: 32px; }
  .btn.icon { min-width: 40px; min-height: 40px; }  /* 지도 월 이동 ◀ ▶ (30px이었음) */
}
