/* SAGI CHECK — 고령자용 큰 글씨 · 대비 7:1 이상(본문 #111/#fbfaf7 ≈ 18:1 · 보조 #3a3a3a ≈ 11:1 · 등급 배경과 글자 8:1 이상)
   기본 20px · 버튼 높이 56px 이상 · 한 화면에 버튼 하나(판정하기)가 가장 크게. 반응형 그리드는 minmax(0,1fr). */
:root {
  --bg: #fbfaf7;
  --card: #ffffff;
  --text: #111111;
  --muted: #3a3a3a;
  --line: #b9b4a8;
  --primary: #0b3d91;
  --primary-ink: #ffffff;
  --focus: #0b3d91;
  --danger: #a30d0d;
  --caution: #ffd60a;
  --safe: #0a5a2a;
  --mark: #ffe066;
  --strip: #7a0a0a;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 20px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, "Yu Gothic UI", "Noto Sans JP", "Noto Sans", "Segoe UI", Roboto, sans-serif;
  line-height: 1.7; overflow-wrap: anywhere;
}
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 4px solid var(--focus); outline-offset: 3px;
}
img { max-width: 100%; height: auto; }
:lang(ja) body, body:lang(ja) { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, "Yu Gothic", "Noto Sans JP", sans-serif; }
:lang(zh-Hans) body, body:lang(zh-Hans) { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(zh-Hant) body, body:lang(zh-Hant) { font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
:lang(ko) body, body:lang(ko) { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 18px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 10px 16px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* ── 머리 ── */
.top { background: var(--card); border-bottom: 2px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 6px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { width: 44px; height: 44px; flex: 0 0 auto; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-name { font-weight: 900; font-size: 1.25rem; letter-spacing: .06em; color: var(--primary); }
.brand-sub { font-size: .8rem; color: var(--muted); }
.lang select { font: inherit; font-size: .9rem; min-height: 48px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); max-width: 46vw; }
.nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-bottom: 10px; }
.nav a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 6px 8px; border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--primary); border: 2px solid transparent; line-height: 1.3; font-size: .95rem; }
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
.strip { background: var(--strip); color: #fff; }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 8px; padding-bottom: 8px; font-weight: 700; }
.strip a { color: #fff; font-size: 1.15rem; font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; padding: 4px 2px; }

/* ── 본문 ── */
main { padding-top: 18px; padding-bottom: 40px; }
h1 { font-size: 1.6rem; line-height: 1.35; margin: 8px 0 10px; }
h2 { font-size: 1.3rem; line-height: 1.4; margin: 0 0 10px; }
h3 { font-size: 1.1rem; margin: 18px 0 6px; }
.lead { font-size: 1.05rem; margin: 0 0 18px; }
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 20px; min-width: 0; }
.notice { border: 3px solid var(--danger); background: #fff; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; font-weight: 700; }
.notice.soft { border-color: var(--line); font-weight: 400; }
.hint, .small { color: var(--muted); font-size: .9rem; margin: 6px 0; }
.privacy { color: var(--muted); font-size: .85rem; margin: 10px 0 0; }

.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.tabs button { font: inherit; font-weight: 700; font-size: 1rem; min-height: 64px; padding: 8px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--text); cursor: pointer; line-height: 1.3; }
.tabs button[aria-selected="true"] { border-color: var(--primary); background: #e8eefb; color: var(--primary); box-shadow: inset 0 -4px 0 var(--primary); }
.tabs .ico { display: block; font-size: 1.4rem; line-height: 1.2; }
label.lbl, .lbl { display: block; font-weight: 700; margin: 6px 0; }
textarea, input[type="text"], input[type="email"] {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--text); background: #fff; border: 2px solid #6b665c; border-radius: 12px; padding: 12px 14px;
}
textarea { min-height: 9.5em; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; min-height: 56px; padding: 10px 20px; border-radius: 12px; border: 2px solid var(--primary); background: #fff; color: var(--primary); cursor: pointer; text-decoration: none; text-align: center; line-height: 1.3; }
.btn.main { background: var(--primary); color: var(--primary-ink); width: 100%; min-height: 72px; font-size: 1.35rem; margin-top: 16px; }
.btn.main[disabled] { opacity: .75; cursor: progress; }
.btn.sub { margin-top: 10px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn[aria-disabled="true"], .btn:disabled:not(.main) { border-color: #6b665c; color: #3a3a3a; background: #ecebe7; cursor: not-allowed; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file:focus-within { outline: 4px solid var(--focus); outline-offset: 3px; }
#imgPrev { margin: 12px 0 0; }
#imgPrev img { max-height: 320px; border: 2px solid var(--line); border-radius: 10px; display: block; }
.quota { font-weight: 700; margin: 12px 0 0; }
.msg { margin: 10px 0 0; font-weight: 700; color: var(--danger); }
.msg.ok { color: var(--safe); }
.busy { display: inline-block; width: 1em; height: 1em; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -0.15em; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy { animation: none; } }

/* ── 결과 ── */
.result { margin: 0 0 20px; }
.result:focus { outline: none; }
.lv { display: flex; align-items: center; gap: 14px; border-radius: var(--radius) var(--radius) 0 0; padding: 18px 20px; font-weight: 900; font-size: 2rem; line-height: 1.2; }
.lv .ico { font-size: 2.2rem; }
.lv.danger { background: var(--danger); color: #fff; }
.lv.caution { background: var(--caution); color: #111; }
.lv.likely_safe { background: var(--safe); color: #fff; }
.lv.no_signs { background: #e8eefb; color: var(--primary); border: 2px solid var(--primary); border-bottom: 0; }
.mode { display: inline-block; font-size: .85rem; font-weight: 700; padding: 2px 12px; border-radius: 999px; border: 2px solid var(--primary); color: var(--primary); background: #fff; margin: 0 0 10px; }
.rules-note { color: var(--muted); font-size: .9rem; }
.upsell { border: 2px solid var(--primary); border-radius: 12px; padding: 12px 14px; background: #f3f6fd; margin: 14px 0 8px; }
.upsell h3 { margin: 0 0 4px; color: var(--primary); }
.upsell p { margin: 0 0 10px; }
.prem-note p { margin: 0 0 8px; }
.prem-h { font-weight: 700; color: var(--primary); }
.lv-body { background: var(--card); border: 2px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 16px 18px; }
.lv-lead { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
.safe-note { font-weight: 700; border-left: 6px solid var(--safe); padding: 6px 12px; background: #eef6f0; }
.degraded { border-left: 6px solid var(--caution); padding: 6px 12px; background: #fff8d6; }
.flags { list-style: none; margin: 0; padding: 0; }
.flags li { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; }
.chip { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #111; color: #fff; margin: 0 6px 4px 0; }
.quote { display: block; font-weight: 700; }
.orig { white-space: pre-wrap; border: 2px dashed var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; max-height: 22em; overflow: auto; }
mark { background: var(--mark); color: #111; border-bottom: 3px solid var(--danger); padding: 0 2px; }
.acts { margin: 0; padding-left: 1.6em; }
.acts li { margin: 0 0 8px; font-weight: 700; }
.disclaimer { color: var(--muted); font-size: .9rem; }

/* ── 상담 번호 ── */
.tels { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tel { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 12px; border: 3px solid var(--strip); color: var(--text); text-decoration: none; background: #fff; }
.tel strong { font-size: 1.25rem; color: var(--strip); }
.tel span { color: var(--muted); font-size: .95rem; }
.emergency h2::before { content: "☎ "; }
.tels-kr { margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--line); }
.tels-kr h3 { margin: 0 0 10px; font-size: 1.05rem; }
.strip-kr { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-left: 12px; border-left: 2px solid rgba(255, 255, 255, .55); }

/* ── 수법 사전 ── */
.toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.toc a { display: block; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 700; min-height: 52px; }
.scheme h2 { color: var(--primary); }
.scheme h3 { font-size: 1rem; color: var(--muted); margin: 12px 0 2px; }
.scheme p { margin: 0; }
.source { font-size: .9rem; color: var(--muted); }

/* ── 요금 ── */
.cmp { width: 100%; border-collapse: collapse; font-size: .95rem; overflow-wrap: normal; word-break: normal; }
.cmp th:first-child { width: 44%; }
.cmp th + th, .cmp td { min-width: 6em; }
.cmp th, .cmp td { border: 2px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.cmp thead th { background: #e8eefb; }
.cmp td:nth-child(3) { font-weight: 700; }
.tbl { overflow-x: auto; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan { display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; min-width: 0; }
.plan h3 { margin: 0; }
.price { font-size: 1.6rem; font-weight: 900; }
.plan .btn { margin-top: auto; }
.lic-state { font-weight: 700; }

/* ── 가족 ── */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; background: #fff; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--line); }
.tag.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.tag.caution { background: var(--caution); color: #111; border-color: #8a7400; }
.tag.likely_safe { background: var(--safe); color: #fff; border-color: var(--safe); }
.tag.no_signs { background: #e8eefb; color: var(--primary); border-color: var(--primary); }
.code { font: 900 2rem/1.2 ui-monospace, Consolas, Menlo, monospace; letter-spacing: .2em; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; margin: 8px 0; }
.check input { width: 28px; height: 28px; flex: 0 0 auto; margin-top: 4px; }
.field { margin: 0 0 10px; }
select.big { font: inherit; min-height: 52px; padding: 8px 10px; border: 2px solid #6b665c; border-radius: 12px; background: #fff; color: var(--text); max-width: 100%; }

/* ── SEO 본문 ── */
.seo { border-top: 2px solid var(--line); margin-top: 28px; padding-top: 18px; }
.seo h2 { font-size: 1.2rem; }
.seo h3 { font-size: 1.05rem; }
.seo .faq h4 { font-size: 1rem; margin: 14px 0 4px; }
.seo .faq p, .seo p { margin: 0 0 8px; }

/* ── 바닥 ── */
.foot { border-top: 2px solid var(--line); background: #f2f0ea; padding: 18px 0 28px; font-size: .85rem; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0; }
.foot-links a { padding: 6px 0; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #111; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 60; max-width: calc(100% - 32px); }

@media (max-width: 640px) {
  html { font-size: 19px; }
  h1 { font-size: 1.4rem; }
  .tabs { grid-template-columns: minmax(0, 1fr); }
  .tabs button { min-height: 56px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 14px; }
  .tabs .ico { display: inline; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .toc { grid-template-columns: minmax(0, 1fr); }
  .lv { font-size: 1.7rem; }
  .cmp { font-size: .8rem; table-layout: fixed; }
  .cmp th + th, .cmp td { min-width: 0; }
  .cmp th, .cmp td { padding: 8px 5px; overflow-wrap: break-word; hyphens: auto; }
  .cmp thead th:first-child { width: 38%; }
  .cmp thead th:nth-child(2) { width: 29%; }
  .card { padding: 14px; }
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
