:root { --bg: #f5f5f3; --card: #fff; --line: #e2e2de; --ink: #1c1c1a; --sub: #66665f; --accent: #1f4fd1; --bad: #b42318; --warn: #a15c00; --good: #1d6b3a; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif; word-break: keep-all; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
header.top { border-bottom: 1px solid var(--line); background: var(--card); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
header nav a { color: var(--sub); text-decoration: none; margin-left: 18px; font-size: 15px; }
header nav a:hover { color: var(--ink); }
h1 { font-size: 30px; line-height: 1.35; margin: 48px 0 12px; }
h2 { font-size: 21px; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p.lead { color: var(--sub); font-size: 17px; margin: 0 0 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin: 12px 0; }
form.scan { display: flex; gap: 8px; }
form.scan input { flex: 1; min-width: 0; font: inherit; padding: 13px 14px; border: 1px solid #c9c9c3; border-radius: 8px; background: #fff; }
form.scan input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
button, .btn { font: inherit; font-weight: 600; padding: 13px 20px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:disabled { opacity: .6; cursor: default; }
button.plain { background: #fff; color: var(--ink); border: 1px solid #c9c9c3; padding: 8px 14px; font-weight: 500; }
.hint { color: var(--sub); font-size: 14px; margin-top: 8px; }
.err { color: var(--bad); margin-top: 10px; }
ul.plain { padding-left: 20px; margin: 8px 0; }
ul.plain li { margin: 4px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 25px; } form.scan { flex-direction: column; } }
.area-list p { margin: 0; color: var(--sub); font-size: 15px; }

/* 결과 */
.score-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.score-big { font-size: 56px; font-weight: 700; line-height: 1; }
.grade { font-size: 18px; font-weight: 600; }
.g-좋음 { color: var(--good); } .g-보통 { color: var(--ink); } .g-부족 { color: var(--warn); } .g-나쁨 { color: var(--bad); }
.meta-line { color: var(--sub); font-size: 14px; margin-top: 8px; overflow-wrap: anywhere; }
.area { display: grid; grid-template-columns: 120px 1fr 64px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.area:first-child { border-top: 0; }
.bar { height: 6px; background: #ececea; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); }
.area .num { text-align: right; font-weight: 600; }
.area .pending { color: var(--sub); font-weight: 400; font-size: 14px; }
.todo { border-top: 1px solid var(--line); padding: 14px 0; }
.todo:first-child { border-top: 0; }
.todo summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.todo summary::-webkit-details-marker { display: none; }
.tag { font-size: 13px; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--line); color: var(--sub); white-space: nowrap; }
.tag.p1 { border-color: var(--bad); color: var(--bad); }
.todo .t { font-weight: 600; flex: 1; }
.todo .pts { color: var(--sub); font-size: 14px; white-space: nowrap; }
.todo .body { padding: 8px 0 0; font-size: 15px; }
.todo .body p { margin: 6px 0; }
.todo pre { background: #f2f2ef; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; white-space: pre-wrap; font-size: 13px; overflow-wrap: anywhere; }
.todo ul { margin: 4px 0; padding-left: 18px; color: var(--sub); font-size: 14px; overflow-wrap: anywhere; }
.loading { color: var(--sub); }
table.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
table.facts td { border-top: 1px solid var(--line); padding: 7px 4px; vertical-align: top; overflow-wrap: anywhere; }
table.facts td:first-child { color: var(--sub); width: 34%; }
footer { margin: 64px 0 0; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--sub); font-size: 13px; }
footer details summary { cursor: pointer; }

/* 미리보기 카드(카카오톡 모양을 흉내 내지 않고 일반 링크 카드로 보여 준다) */
.preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 360px; background: #fff; }
.preview img { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: #eee; }
.preview .pv { padding: 10px 12px; }
.preview .pv b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview .pv span { color: var(--sub); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ok { color: var(--good); } .no { color: var(--bad); }
