/* 어르신 기준: 본문 20px+(모바일 22px) · 금액 32px+ · 대비 7:1 · 터치 56px · 행간 1.8 */
/* 2026-09-30 디자인 개편: 따뜻한 크림 바탕 + 흰 카드 + 남색 머리띠. 글자 크기·대비 기준은 그대로 */
:root {
  --ink: #1a1a1a;        /* 흰 바탕 17.4:1 · 크림 바탕 15.9:1 */
  --ink-2: #3d3d3d;      /* 흰 바탕 10.9:1 · 크림 바탕 10.0:1 */
  --bg: #ffffff;         /* 카드 */
  --page: #f7f3ec;       /* 페이지 바탕(따뜻한 크림) */
  --brand: #0a3d7a;      /* 흰 글자 대비 11.4:1 */
  --brand-deep: #072b57;
  --brand-soft: #e8f0fa;
  --panel: #eef3f9;
  --line: #7c8594;       /* 카드 테두리 — 흰 바탕 3.6:1(비텍스트 3:1 기준 충족) */
  --accent: #9a3412;     /* 단풍색 — 흰 글자 대비 7.3:1 */
  --accent-soft: #fdeee4;
  --warn-bg: #fff4e0;
  --warn-line: #7a4100;
  --shadow: 0 2px 0 rgba(10, 61, 122, .08), 0 6px 18px rgba(10, 61, 122, .08);
}
* { box-sizing: border-box; }
/* 기기별 기본 글자: 휴대폰 22px · 태블릿 23px · PC 24px — PC 는 화면이 멀어서 오히려 키운다 */
html { font-size: 22px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (min-width: 768px) { html { font-size: 23px; } }
@media (min-width: 1200px) { html { font-size: 24px; } }
/* «글자 크게» — 모든 크기가 rem 이라 한 줄로 전체가 커진다 */
html.fs-lg { font-size: 26px; }
@media (min-width: 768px) { html.fs-lg { font-size: 27px; } }
@media (min-width: 1200px) { html.fs-lg { font-size: 28px; } }
/* 아주 좁은 폰(320px) — 좌우 여백을 줄이고 글자는 그대로 */
@media (max-width: 359px) { .top, #app, .foot { padding: 0 12px; } }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere;
}
.top, #app, .foot { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: 12px; }
.top-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding-bottom: 12px; margin-bottom: 14px;
}
.brand { margin: 0; font-weight: 900; color: var(--brand); font-size: 1rem; display: flex; align-items: center; gap: 10px; }
.brand::before {
  content: ""; flex: none; width: 40px; height: 40px; border-radius: 11px;
  background: url("/favicon.svg") center / cover no-repeat; box-shadow: var(--shadow);
}
.fs { display: flex; align-items: center; gap: 6px; }
.fs-label { font-weight: 700; color: var(--ink-2); font-size: 0.95rem; }
.fs-btn {
  min-width: 64px; min-height: 56px; padding: 4px 12px; font: inherit; font-size: 0.95rem; font-weight: 800;
  color: var(--brand); background: var(--bg); border: 3px solid var(--brand); border-radius: 12px; cursor: pointer;
}
.fs-btn[aria-pressed="true"] { color: #fff; background: var(--brand); }
h1 { font-size: 1.45rem; line-height: 1.4; margin: 0; color: #14213d; letter-spacing: -0.02em; }
.year { margin: 4px 0 0; color: var(--ink-2); font-weight: 700; }
h2 { font-size: 1.35rem; line-height: 1.45; margin: 8px 0 4px; color: #14213d; letter-spacing: -0.02em; }
h2:focus { outline: none; }
h3 { font-size: 1.1rem; margin: 20px 0 6px; color: #14213d; }

/* 첫 화면 머리띠 — 남색 바탕에 흰 글씨(대비 11.4:1 이상) */
.hero {
  position: relative; overflow: hidden; margin: 0 0 6px; padding: 22px 20px 24px;
  color: #fff; border-radius: 22px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 10px 28px rgba(7, 43, 87, .22);
}
.hero::after { /* 오른쪽 위 은은한 단풍잎 무늬 — 장식일 뿐 글자 뒤로 가지 않게 흐리게 */
  content: ""; position: absolute; right: -28px; top: -28px; width: 150px; height: 150px; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23ffffff' d='M50 4l8 18 14-9-3 20 20-4-10 16 17 7-18 8 6 17-19-6-3 20-12-15-12 15-3-20-19 6 6-17-18-8 17-7-10-16 20 4-3-20 14 9z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}
.hero h1 { color: #fff; position: relative; }
.hero .year {
  display: inline-block; margin: 10px 0 0; padding: 2px 14px; border-radius: 999px;
  color: #fff; background: var(--accent); font-size: 0.95rem; position: relative;
}
.hero-sub { margin: 12px 0 0; color: #fff; font-size: 1rem; line-height: 1.6; position: relative; }

.progress {
  display: inline-block; margin: 22px 0 0; padding: 2px 14px; border-radius: 999px;
  color: var(--brand); background: var(--brand-soft); font-weight: 800; font-size: 0.95rem;
}
.hint { margin: 0 0 16px; color: var(--ink-2); }

.choices { display: grid; gap: 14px; }
/* 태블릿·PC: 선택지를 2열로 — 한눈에 넷이 다 보인다(스크롤 없이) */
@media (min-width: 720px) {
  .choices { grid-template-columns: 1fr 1fr; }
  .nav-row { grid-template-columns: 1fr; max-width: 560px; }
}
.choice {
  position: relative; display: block; width: 100%; min-height: 76px; padding: 14px 52px 14px 18px; text-align: left;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 2px solid var(--line); border-left: 8px solid var(--brand); border-radius: 16px; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .12s, border-color .12s, background .12s;
}
.choice::after { /* 누를 수 있다는 표시 */
  content: "›"; position: absolute; right: 18px; top: 50%; transform: translateY(-52%);
  font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--brand);
}
.choice-main { display: block; font-size: 1.2rem; font-weight: 800; line-height: 1.4; color: var(--brand); }
.choice-sub { display: block; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.choice[data-grade="unknown"], .choice[data-income="unknown"] { border-left-color: var(--accent); }
.choice[data-grade="unknown"] .choice-main, .choice[data-income="unknown"] .choice-main { color: var(--accent); }
@media (hover: hover) { .choice:hover { border-color: var(--brand); transform: translateY(-2px); } }
.choice:active { background: var(--panel); transform: translateY(1px); }
button:focus-visible, summary:focus-visible { outline: 5px solid var(--ink); outline-offset: 3px; }

.nav-row { display: grid; gap: 12px; margin: 24px 0; }
.nav-btn {
  display: block; width: 100%; min-height: 60px; margin-top: 18px; padding: 10px 16px;
  font: inherit; font-weight: 700; color: var(--brand); background: var(--bg);
  border: 3px solid var(--brand); border-radius: 16px; cursor: pointer;
}
.nav-row .nav-btn { margin-top: 0; }
.nav-btn.primary {
  color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  border-color: var(--brand-deep); box-shadow: 0 6px 16px rgba(7, 43, 87, .25);
}

/* 결과 — 이 사이트의 결론. 남색 카드에 흰 큰 숫자 */
.result-box {
  position: relative; overflow: hidden; margin: 12px 0 16px; padding: 22px 20px;
  color: #fff; border-radius: 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 10px 28px rgba(7, 43, 87, .22);
}
.amount { margin: 0; font-size: 2.3rem; font-weight: 900; line-height: 1.3; color: #fff; letter-spacing: -0.02em; }
@media (max-width: 359px) { .amount { font-size: 2rem; } }
.exact { margin: 6px 0 0; font-size: 1.05rem; font-weight: 700; color: #fff; }
.result-box .for { color: #fff; }
.for { margin: 4px 0 0; color: var(--ink-2); font-size: 0.95rem; }

.notice { margin: 0 0 14px; padding: 12px 14px; background: var(--warn-bg); border-left: 6px solid var(--warn-line); border-radius: 10px; }
.caveats {
  margin: 18px 0; padding: 4px 18px 10px; background: var(--bg); border-radius: 16px; box-shadow: var(--shadow);
}
.caveats ul { margin: 0; padding-left: 1.2em; }
.caveats li { margin-bottom: 6px; }
.caveats li::marker { color: var(--accent); }

.more { margin: 22px 0; background: var(--bg); border: 2px solid var(--line); border-radius: 16px; padding: 0 16px; box-shadow: var(--shadow); }
.more summary { min-height: 60px; display: flex; align-items: center; font-weight: 800; color: var(--brand); cursor: pointer; }
.more summary::before { content: "＋ "; margin-right: 6px; }
.more[open] summary::before { content: "－ "; }
.more[open] { padding-bottom: 12px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; background: var(--bg); }
.table caption { text-align: left; font-weight: 800; margin-bottom: 6px; }
.table th, .table td { border: 2px solid #b7bec9; padding: 6px 4px; text-align: right; }
.table th[scope="row"], .table thead th { text-align: center; background: var(--panel); color: #14213d; }
.small { font-size: 0.92rem; color: var(--ink-2); }
.foot {
  margin-top: 36px; padding-bottom: 32px; color: var(--ink-2); font-size: 0.92rem;
  border-top: 2px solid #d8cfc0; padding-top: 16px;
}
.foot .op { margin-top: 10px; }
a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 5px solid var(--ink); outline-offset: 3px; }
/* 움직임을 줄이라는 기기 설정 존중 */
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* 우리 동네 요양원 */
.field { display: block; margin: 0 0 14px; }
.field-label { display: block; font-weight: 800; margin-bottom: 4px; }
.select {
  display: block; width: 100%; min-height: 64px; padding: 10px 14px;
  font: inherit; font-size: 1.1rem; color: var(--ink); background: var(--bg);
  border: 3px solid var(--brand); border-radius: 16px; box-shadow: var(--shadow);
}
.select:disabled { color: var(--ink-2); border-color: var(--line); box-shadow: none; }
.select:focus-visible { outline: 5px solid var(--ink); outline-offset: 3px; }
.list-head { font-size: 1.15rem; font-weight: 800; margin: 18px 0 4px; color: #14213d; }
.fcard { margin: 14px 0; padding: 16px 18px; background: var(--bg); border: 2px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.fname { margin: 0; font-size: 1.1rem; font-weight: 800; line-height: 1.45; color: #14213d; }
.fmeta { margin: 2px 0 10px; color: var(--ink-2); }
.call {
  display: flex; align-items: center; justify-content: center; min-height: 60px;
  font-weight: 800; color: #fff; background: var(--accent); border: 3px solid var(--accent);
  border-radius: 14px; text-decoration: underline;
}
.call:focus-visible { outline: 5px solid var(--ink); outline-offset: 3px; }

/* 안내 글 */
.brand a { color: inherit; text-decoration: none; }
.crumb { margin: 0 0 6px; color: var(--ink-2); font-size: 0.92rem; }
.article h1 { margin-top: 10px; }
.article h2 { margin-top: 30px; padding-top: 10px; border-top: 2px solid #d8cfc0; }
.article p, .article li { margin: 0 0 12px; }
.lead { font-size: 1.05rem; color: var(--ink-2); }
.summary { margin: 14px 0 20px; padding: 16px 18px; background: var(--bg); border: 2px solid var(--line); border-left: 8px solid var(--brand); border-radius: 16px; box-shadow: var(--shadow); }
.summary p { margin: 0 0 8px; }
.summary .big { font-size: 1.25rem; font-weight: 900; color: var(--brand); }
.src { font-size: 0.92rem; color: var(--ink-2); padding-left: 1.2em; }
.src li { margin-bottom: 8px; overflow-wrap: anywhere; }
a.nav-btn { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: underline; }
.guide-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.guide-link {
  position: relative; display: block; padding: 14px 48px 14px 18px; min-height: 56px;
  background: var(--bg); border: 2px solid var(--line); border-left: 8px solid var(--accent); border-radius: 16px;
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.guide-link::after {
  content: "›"; position: absolute; right: 16px; top: 50%; transform: translateY(-52%);
  font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--accent);
}
.guide-link:focus-visible { outline: 5px solid var(--ink); outline-offset: 3px; }
.gl-title { display: block; font-weight: 800; font-size: 1.1rem; text-decoration: underline; color: var(--brand); }
.gl-desc { display: block; color: var(--ink-2); font-size: 0.95rem; line-height: 1.6; }
.warn { margin: 16px 0; padding: 14px 16px; background: var(--warn-bg); border-left: 6px solid var(--warn-line); border-radius: 10px; }
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 10px; }

.more-guides { margin: 30px 0 8px; }
.small-h { font-size: 1.15rem; margin: 0 0 6px; }
