/* PC해결사 기사 휴대폰 화면 - 모양은 docs/mockups/phone.html (후보 3 · 아래 메뉴형) */
:root {
  --bg: #f3f3f3; --card: #ffffff; --line: #e6e6e6; --text: #1b1b1b; --sub: #6b6b6b;
  --blue: #0067c0; --red: #d13438; --amber: #a86400; --green: #107c10;
  --red-bg: #fde7e9; --amber-bg: #fff4ce; --green-bg: #dff6dd; --blue-bg: #e5f1fb;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 15px; line-height: 1.45; overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}
#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; background: var(--bg); }

/* 위 머리 */
#top { background: var(--card); padding: 10px 16px 9px; border-bottom: 1px solid var(--line); flex: none; }
#top .app-name { font-size: 13px; color: var(--blue); font-weight: 700; }
#top .who { font-size: 18px; font-weight: 700; margin-top: 1px; }
#top .meta { font-size: 12.5px; color: var(--sub); margin-top: 1px; }
#top .meta:empty { display: none; }
#top .back { display: inline-block; min-height: 44px; line-height: 44px; margin: -8px 0 -6px -8px; padding: 0 8px; color: var(--blue); font-size: 15px; text-decoration: none; }

/* 알림 띠 */
.band { flex: none; padding: 10px 16px; font-size: 14px; display: flex; align-items: flex-start; gap: 10px; border-bottom: 1px solid var(--line); }
.band[hidden] { display: none; }
.band .msg { flex: 1; min-width: 0; }
.band.err { background: var(--red-bg); color: #8a1f23; }
.band.ok { background: var(--green-bg); color: #0b5a0b; }
.band .x { flex: none; min-width: 44px; min-height: 44px; margin: -10px -12px -10px 0; border: 0; background: transparent; font-size: 18px; color: inherit; font-family: inherit; }

/* 가운데 내용 */
#view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 12px; outline: none; -webkit-overflow-scrolling: touch; }
#view > * + * { margin-top: 12px; }

/* 아래 메뉴 */
#tabs { flex: none; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); }
#tabs[hidden] { display: none; }
#tabs a { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--sub); text-decoration: none; padding: 4px 0; }
#tabs a i { font-style: normal; font-size: 18px; line-height: 1.2; }
#tabs a.on { color: var(--blue); font-weight: 700; }

/* 카드 · 목록 */
.card { background: var(--card); border-radius: 10px; padding: 12px; }
.card h2 { font-size: 15px; margin: 0 0 8px; }
.card p { margin: 0 0 8px; }
.card p:last-child { margin-bottom: 0; }
.list { background: var(--card); border-radius: 10px; overflow: hidden; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 56px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.item:last-child { border-bottom: 0; }
a.item:active, button.item:active { background: #f0f6fc; }
button.item { width: 100%; border-left: 0; border-right: 0; border-top: 0; background: transparent; text-align: left; font-family: inherit; font-size: inherit; color: inherit; }
.item .tx { flex: 1; min-width: 0; }
.item .tx b { font-size: 15px; display: block; }
.item .tx span { font-size: 12.5px; color: var(--sub); display: block; margin-top: 1px; }
.item .go { flex: none; color: var(--sub); font-size: 18px; }
.empty { background: var(--card); border-radius: 10px; padding: 24px 16px; text-align: center; color: var(--sub); }
.sect { font-size: 13px; font-weight: 700; color: var(--sub); margin: 16px 4px 6px; }
.sect:first-child { margin-top: 0; }

/* 위험 · 주의 · 정상 */
.sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sum div { background: var(--card); border-radius: 10px; padding: 10px 12px; }
.sum span { font-size: 12.5px; color: var(--sub); display: block; }
.sum b { font-size: 24px; }
.st { font-size: 12px; font-weight: 700; width: 34px; flex: none; }
.r { color: var(--red); } .a { color: var(--amber); } .g { color: var(--green); } .bl { color: var(--blue); }
.chip { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 10px; font-weight: 700; margin-left: 4px; vertical-align: 1px; }
.chip.r { background: var(--red-bg); }
.chip.a { background: var(--amber-bg); }
.chip.g { background: var(--green-bg); }
.chip.bl { background: var(--blue-bg); }
.chip.n { background: #ececec; color: var(--sub); }
.item .tx b .chip, .find .tx b .chip { display: inline-block; margin-top: 0; font-size: 11.5px; }
.item .tx b .chip.r, .find .tx b .chip.r { color: var(--red); }
.item .tx b .chip.a, .find .tx b .chip.a { color: var(--amber); }
.item .tx b .chip.g, .find .tx b .chip.g { color: var(--green); }
.item .tx b .chip.bl, .find .tx b .chip.bl { color: var(--blue); }
.item .tx b .chip.n, .find .tx b .chip.n { color: var(--sub); }

/* 단추 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border: 1px solid #cfcfcf; background: #fff; border-radius: 8px; font-size: 15px; font-family: inherit; color: var(--text);
  text-decoration: none; cursor: pointer;
}
.btn.p { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.btn.d { color: var(--red); border-color: #e3b7b9; }
.btn.big { display: flex; width: 100%; min-height: 52px; font-size: 17px; font-weight: 700; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:active:not(:disabled) { filter: brightness(.95); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > .btn { flex: 1 1 120px; }

/* 입력 */
label.f, div.f { display: block; font-size: 13px; color: var(--sub); margin-bottom: 10px; }
label.f:last-child { margin-bottom: 0; }
input[type=text], input[type=password], input[type=search], input[type=tel], textarea {
  display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 9px 12px; font-size: 16px; font-family: inherit; color: var(--text);
  border: 1px solid #c8c8c8; border-radius: 8px; background: #fff;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
input:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.hint { font-size: 12.5px; color: var(--sub); margin-top: 4px; }

/* 예 / 아니요 / 모름 */
.seg { display: flex; gap: 8px; margin-top: 6px; }
.seg button { flex: 1; min-height: 44px; border: 1px solid #cfcfcf; background: #fff; border-radius: 8px; font-size: 15px; font-family: inherit; color: var(--text); }
.seg button[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }

/* 짝 맺기 번호 */
.code { text-align: center; padding: 20px 12px; }
.code .digits { font-size: 48px; font-weight: 700; letter-spacing: .12em; color: var(--blue); font-variant-numeric: tabular-nums; line-height: 1.2; }
.code .left { font-size: 18px; margin-top: 6px; }
.code .left.late { color: var(--red); }
.code .how { margin-top: 12px; text-align: left; }

/* 찾은 것 · 고친 결과 */
.find { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.find:last-child { border-bottom: 0; }
.find .tx { flex: 1; min-width: 0; }
.find .tx b { display: block; font-size: 14.5px; }
.find .tx span { display: block; font-size: 12.5px; color: var(--sub); margin-top: 1px; white-space: pre-wrap; }
.ai { background: var(--card); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.ai b { color: var(--blue); }
.confirm { background: var(--amber-bg); border-radius: 10px; padding: 12px; }
.confirm p { margin: 0 0 10px; }
.kv { display: flex; gap: 8px; font-size: 14px; padding: 3px 0; }
.kv b { flex: none; width: 56px; color: var(--sub); font-weight: 400; }
.kv span { flex: 1; min-width: 0; }
.link { color: var(--blue); text-decoration: none; }
.spin { text-align: center; color: var(--sub); padding: 28px 0; }
.note-line { font-size: 13px; color: var(--sub); }
