/* 로그인 없이 여는 정적 화면(첫 화면·약관·개인정보처리방침) 공통 */
:root {
  --bg: #f2f4f6;
  --surface: #ffffff;
  --line: #e5e8eb;
  --ink: #191f28;
  --ink-2: #333d4b;
  --ink-2b: #4e5968;
  --ink-3: #6b7684;
  --primary: #0b7a6f;
  --primary-soft: #e3f3f0;
  --primary-text: #08655c;
  --danger-bg: #fbe6e3;
  --danger-fg: #8f1d14;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary);
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px calc(48px + env(safe-area-inset-bottom));
}

/* 카카오 로그인 디자인 가이드: 바탕 #FEE500, 심볼 #000(공식 리소스의 도형 그대로), 레이블 #000 85%, 반경 12px, 시스템 서체.
   심볼은 빼지 않고, 레이블은 "카카오 로그인"(작으면 "로그인"), 레이블 높이는 버튼 높이의 1/3 이하 */
.kakao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  background: #fee500;
  color: rgba(0, 0, 0, 0.85);
  font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: normal;
  text-decoration: none;
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.kakao:active {
  transform: scale(0.98);
}

.kakao:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.kakao svg {
  flex: none;
}

.kakao.small {
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  color: var(--ink-3);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 20px calc(56px + env(safe-area-inset-bottom));
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  max-width: 280px;
}

.footer-brand p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 32px 48px;
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.footer-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.footer-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink-2b);
  text-decoration: none;
}

.footer-cols a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-bottom {
  display: grid;
  gap: 6px;
  padding-top: 24px;
}

.footer-bottom p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .footer-inner {
    padding-top: 40px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .footer-cols a {
    min-height: 44px;
  }

  .footer-cols ul {
    gap: 0;
  }
}

/* 약관·방침은 본문 폭(720px)에 헤더·푸터를 맞춘다 */
.doc-page .top-inner,
.doc-page .footer-inner {
  max-width: 720px;
}

/* 약관·방침 본문 */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px calc(48px + env(safe-area-inset-bottom));
}

.doc h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.doc .meta {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--ink-3);
}

.doc h2 {
  margin: 28px 0 8px;
  font-size: 17px;
}

.doc p,
.doc li {
  font-size: 15px;
  color: var(--ink-2);
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
}

.doc th,
.doc td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--bg);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

/* 칸이 많은 표는 좁은 화면에서 글자가 세로로 쪼개지지 않게 옆으로 밀어 본다 */
.doc table.wide {
  min-width: 720px;
}

/* 역별 시세 페이지 (/area) */
.area .crumbs {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-3);
}

.area-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 8px;
}

.area-facts div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.area-facts dt {
  font-size: 13px;
  color: var(--ink-3);
}

.area-facts dd {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.doc .area-facts p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.area-cta {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--primary-soft);
}

.doc .area-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 0;
  list-style: none;
}

.doc .area-links li {
  font-size: 15px;
}

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