/* 닥터파킨슨 안내 사이트 (dr-parkinsons.com) — 개인정보처리방침 · 이용약관 · 문의하기
 * 색은 앱 디자인 토큰과 같다 (lib/theme/app_colors.dart — docs/design_system.md) */
:root {
  --primary: #215fe6;
  --primary-dark: #1d4ed8;
  --primary-soft: #e8efff;
  --bg: #f4f7fc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --border: #e2e8f0;
  --divider: #edf1f7;
  --success: #15803d;
  --error: #c62828;
  --todo-bg: #fff4c2;
  --todo-text: #7a4b00;
  --radius: 16px;
  --font: Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.75 var(--font);
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* 머리글 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-header .inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 16px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}
.brand img { width: 32px; height: 32px; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current='page'] { color: var(--primary); border-bottom-color: var(--primary); }
/* 휴대폰은 머리글을 고정하지 않는다 (본문을 가리지 않게) */
@media (max-width: 560px) {
  .site-header { position: static; }
  h2 { scroll-margin-top: 16px; }
}

/* 본문 */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}
.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
}
@media (min-width: 720px) {
  .doc { padding: 40px 48px; }
}
h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.35; }
.meta { margin: 0 0 24px; color: var(--text-2); font-size: 15px; }
h2 {
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  font-size: 20px;
  line-height: 1.4;
  scroll-margin-top: 120px;
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { margin: 24px 0 8px; font-size: 17px; line-height: 1.45; }
p, li, dd { color: var(--text); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.3em; }
li { margin: 4px 0; }
.lead { font-size: 17px; }
.muted { color: var(--text-2); font-size: 15px; }

/* 목차 */
.toc {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 8px;
}
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; }
.toc a { display: inline-block; padding: 3px 0; }

/* 항목 카드 (표 대신 — 휴대폰에서 가로로 넘기지 않게) */
.items { display: grid; gap: 12px; margin: 12px 0 16px; }
.item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.item h4 { margin: 0 0 6px; font-size: 16px; }
.item dl { margin: 0; display: grid; grid-template-columns: 6.5em 1fr; gap: 4px 12px; }
.item dt { color: var(--text-2); font-size: 15px; }
.item dd { margin: 0; }
/* 휴대폰: 이름 아래에 값을 둔다 (두 칸이면 값 칸이 좁아 줄이 너무 많이 바뀐다) */
@media (max-width: 560px) {
  .item dl { grid-template-columns: 1fr; gap: 0; }
  .item dt { font-size: 14px; }
  .item dd { margin-bottom: 8px; }
  .item dd:last-child { margin-bottom: 0; }
}

/* 알림 상자 */
.note {
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 16px;
}
.note p:last-child { margin-bottom: 0; }

/* 문의 카드 */
.contact-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin: 12px 0;
}
.contact-card dl { margin: 0; display: grid; grid-template-columns: 6em 1fr; gap: 6px 12px; }
.contact-card dt { color: var(--text-2); }
.contact-card dd { margin: 0; font-weight: 600; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--primary-dark); color: #ffffff; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin: 10px 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  line-height: 28px;
  text-align: center;
}

/* 문의 양식 */
.form { display: grid; gap: 18px; margin: 12px 0 8px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.req, .opt {
  display: inline-block;
  margin-left: 4px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  vertical-align: 2px;
}
.req { background: var(--primary-soft); color: var(--primary); }
.opt { background: var(--divider); color: var(--text-2); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.hint { margin: 0; color: var(--text-2); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
}
.consent p { margin-bottom: 6px; }
.consent ul { margin-bottom: 8px; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-weight: 700;
  cursor: pointer;
}
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--primary); }
.form-status { margin: 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status[data-kind='ok'] { color: var(--success); }
.form-status[data-kind='error'] { color: var(--error); }
.form-status[data-kind='info'] { color: var(--text-2); }
.form .button { margin-top: 0; justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.form .button:disabled { opacity: 0.6; cursor: progress; }

/* 첫 화면 바로가기 */
.links { display: grid; gap: 12px; margin-top: 20px; }
.links a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}
.links a:hover { border-color: var(--primary); }
.links strong { display: block; font-size: 17px; }
.links span { color: var(--text-2); font-size: 15px; }

/* 배포 전에 채울 곳 (tool/check_hosting.mjs 가 남아 있으면 배포를 막는다) */
.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 700;
}

/* 바닥글 */
.site-footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 40px;
  color: var(--text-2);
  font-size: 14px;
}
.site-footer p { color: var(--text-2); margin: 0 0 4px; }
.site-footer a { color: var(--text-2); }

@media print {
  .site-header, .site-footer, .toc { display: none; }
  body { background: #ffffff; }
  .doc { border: 0; padding: 0; }
}
