/* 내 미래 머니 — DESIGN.md: 그라데이션·블러·글로 없음, 포인트 색 1개(놋쇠색), 1px 선, 반경 12/10/999 */
:root {
  --bg: #F6F6F3;
  --card: #FFFFFF;
  --ink: #191A1C;
  --ink-2: #45474C;
  --muted: #6B6E74;
  --line: #E4E4E0;
  --soft: #EFEFEB;
  --accent: #5A4AA8;
  --accent-soft: #ECE9F8;
  --on-accent: #FFFFFF;
  --warn: #8A5A12;
  --sheet-shadow: 0 8px 24px -12px rgba(0, 0, 0, .12);
  --r: 12px;
  --r-btn: 10px;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111213; --card: #1A1B1D; --ink: #ECECEA; --ink-2: #C9CAC7; --muted: #8E9096; --line: #2A2B2E; --soft: #222326;
    --accent: #A99CF0; --accent-soft: #221F36; --on-accent: #111213;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111213; --card: #1A1B1D; --ink: #ECECEA; --ink-2: #C9CAC7; --muted: #8E9096; --line: #2A2B2E; --soft: #222326;
  --accent: #A99CF0; --accent-soft: #221F36; --on-accent: #111213;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.6; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
.num, input, select, table { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--card); padding: 8px 12px; border-radius: var(--r-btn); z-index: 99; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* 상단바 */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { max-width: 640px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.brand svg { width: 24px; height: 24px; fill: var(--ink); }
.brand svg .acc { fill: var(--accent); }
.top-sp { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

/* 첫 화면 */
.hero { padding: 28px 0 4px; }
.eyebrow { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.hero h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.035em; font-weight: 700; margin: 6px 0 8px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--ink-2); margin: 0 0 20px; font-size: 16px; }

/* 탭 */
.tabs { position: sticky; top: 61px; z-index: 9; background: var(--bg); display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; }

.panel { padding-top: 24px; }
.sec-h { font-size: 20px; letter-spacing: -.03em; font-weight: 700; margin: 0 0 4px; }
.sec-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.sub-h { font-size: 16px; font-weight: 700; margin: 28px 0 10px; }

/* 카드·폼 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.form .field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.form .lbl { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.form .lbl small { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 4px; }
.input { width: 100%; height: 48px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); padding: 0 14px; font-size: 16px; font-weight: 500; min-width: 0; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6E74' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px; }
.input:focus { outline: none; border-color: var(--accent); }
.input-unit { position: relative; }
.input-unit .input { padding-right: 52px; text-align: right; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 2px 0; text-align: right; min-height: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { flex: 1 1 0; min-width: 88px; text-align: center; padding: 11px 8px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 500; font-size: 14px; user-select: none; }
.seg input:checked + label { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 700; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; }
.stepper .icon-btn { width: 48px; height: 48px; }
.stepper .input { text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 18px; border-radius: var(--r-btn); border: 0; cursor: pointer; font-weight: 700; font-size: 16px; text-decoration: none; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.btn-sm { height: 44px; font-size: 14px; padding: 0 14px; }
.fine { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* 결과 */
.result { margin-top: 20px; }
.result:empty { display: none; }
.res-k { font-size: 14px; color: var(--muted); font-weight: 500; margin: 0; }
.res-big { font-size: 28px; font-weight: 700; letter-spacing: -.035em; line-height: 1.3; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.res-big b { color: var(--accent); }
.res-big small { font-size: 16px; color: var(--muted); font-weight: 500; }
.res-sub { margin: 0; color: var(--ink-2); font-size: 14px; }
.res-empty { color: var(--muted); font-size: 14px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); margin: 0; }
.meter { height: 8px; border-radius: 999px; background: var(--soft); margin: 14px 0 6px; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; background: var(--accent); }
.meter i + i { background: var(--ink-2); opacity: .35; }
.meter-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.breakdown { display: grid; gap: 8px; margin-top: 16px; }
.bd { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.bd .t { font-weight: 700; font-size: 14px; }
.bd .v { font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; text-align: right; grid-row: span 2; align-self: center; }
.bd .v small { font-size: 12px; font-weight: 500; color: var(--muted); }
.bd .d { font-size: 12px; color: var(--muted); }
.bd .bar { grid-column: 1 / -1; height: 4px; background: var(--soft); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bd .bar i { display: block; height: 100%; background: var(--accent); }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 16px 0 0; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.kv .sum { font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); padding-top: 8px; }

.tbl-wrap { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--bg); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.hl td { font-weight: 700; }

.res-foot { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--soft); font-size: 12px; color: var(--ink-2); }
.res-foot p { margin: 0; }
.res-foot p + p { margin-top: 4px; }
.res-foot a { color: var(--ink-2); }
.res-foot .disc { color: var(--ink); font-weight: 500; }

/* 설명 상자 */
details.rules, details.src { margin-top: 20px; padding: 0; }
details.rules > summary, details.src > summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 700; font-size: 16px; display: flex; align-items: center; }
details.rules > summary::-webkit-details-marker, details.src > summary::-webkit-details-marker { display: none; }
details.rules > summary::after, details.src > summary::after { content: '+'; margin-left: auto; color: var(--muted); font-weight: 500; font-size: 20px; line-height: 1; }
details[open].rules > summary::after, details[open].src > summary::after { content: '−'; }
details.rules > :not(summary), details.src > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.rules > :last-child, details.src > :last-child { margin-bottom: 16px; }
details.rules h3 { font-size: 14px; margin: 12px 0 6px; }
details.rules ul, details.src ul { padding-left: 18px; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
details.rules li, details.src li { margin: 4px 0; }
details.src p { font-size: 14px; color: var(--ink-2); margin-top: 0; }
details.src { margin-bottom: 40px; }

/* 예금자보호 줄 */
.dp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 0 14px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.dp-row .full { grid-column: 1 / -1; }
.dp-row .dp-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 500; }
.dp-row .rm { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 0; text-decoration: underline; }
.dp-row .input { height: 44px; font-size: 15px; }
.bank-list { display: grid; gap: 8px; margin-top: 16px; }
.bank { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
.bank .bn { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.bank .bn span { font-variant-numeric: tabular-nums; }
.bank .row { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bank .row.warn { color: var(--accent); font-weight: 700; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.tag.acc { border-color: var(--accent); color: var(--accent); }

/* 사기 체크 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chips button { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; cursor: pointer; }
.chips button[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 700; }
.checks { padding: 6px 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.check:last-child { border-bottom: 0; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--muted); display: grid; place-items: center; margin-top: 1px; }
.check .box svg { width: 14px; height: 14px; stroke: var(--on-accent); fill: none; stroke-width: 2; opacity: 0; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.todo { margin: 12px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.todo li { margin: 4px 0; }
.urgent { margin-top: 20px; }
.urgent h3 { margin: 0 0 6px; font-size: 16px; }
.urgent ol { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.urgent li { margin: 4px 0; }
.call-row { display: flex; gap: 8px; margin-top: 12px; }
.call-row .btn { flex: 1; }
.scam-list { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.scam-list li + li { border-top: 1px solid var(--line); }
.scam-list a { display: block; padding: 12px 40px 12px 14px; text-decoration: none; position: relative; }
.scam-list a::after { content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: translateY(-50%) rotate(45deg); }
.scam-list b { display: block; font-size: 15px; }
.scam-list span { display: block; font-size: 12px; color: var(--muted); }

/* 사기 유형 문서 */
.doc { padding: 24px 16px 8px; }
.crumb { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.crumb a { color: var(--muted); }
.doc h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.035em; margin: 0 0 8px; }
.doc .lead { margin-bottom: 8px; }
.doc h2 { font-size: 20px; letter-spacing: -.03em; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink-2); font-size: 15.5px; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc .meta { color: var(--muted); font-size: 13px; }
.doc .card h2 { margin-top: 0; font-size: 16px; }
.doc .card ol { margin-bottom: 0; }
.doc code { font-size: 13px; }

@media (min-width: 720px) {
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 28px; }
}
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kv { column-gap: 0; }
.kv dd { padding-left: 12px; }
@media (max-width: 479px) {
  .dp-row { grid-template-columns: 1fr; }
}
.panel, #sources { scroll-margin-top: 120px; }
