/* 파일: web/style.css — 지원금 웹 (한 페이지)
   외부 폰트/스크립트 없음. 시스템 글꼴만 씁니다. 모바일 우선(360px 기준). */

:root {
  --ink: #1b1b1b;
  --muted: #5a5a5a;
  --line: #dcdcd4;
  --bg: #f5f5f1;
  --paper: #ffffff;
  --accent: #2f6f5e;
  --accent-ink: #ffffff;
  --badge: #eeece4;
  --sample-bg: #fff1cf;
  --sample-ink: #7a4a00;
  --soon-bg: #fde2de;
  --soon-ink: #9c2a17;
  --note-bg: #fff6e5;
  --note-ink: #5a3a00;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 18px 14px 0;
}

h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 4px 0 6px;
}

.lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}

h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 17px; margin: 0 0 8px; }
h4 { font-size: 17px; margin: 0 0 6px; line-height: 1.4; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 14px;
}

.field { margin: 0 0 16px; }
.field > label,
.label-like {
  display: block;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.req {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
}

select {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 12px 10px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

select:disabled { background: #f1f0ea; color: #8a8a84; }

input[type="number"] {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 12px 10px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

fieldset.field {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 16px;
}

legend {
  font-weight: 700;
  font-size: 16px;
  padding: 0 4px;
}

.badge-pending {
  font-size: 12px;
  font-weight: 700;
  background: var(--badge);
  color: #4a4a44;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
}

.hint {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.checks {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 auto; }

.actions { margin-top: 4px; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 12px;
  width: 100%;
  padding: 15px;
  font-size: 18px;
  font-weight: 700;
  border: 1px solid transparent;
}

button[type="submit"] {
  background: var(--accent);
  color: var(--accent-ink);
}

button.ghost {
  margin-top: 8px;
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  font-size: 16px;
  font-weight: 400;
}

.error {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--soon-ink);
}

.notice {
  border: 1px solid #e6d6a8;
  background: var(--sample-bg);
  color: #5a3d00;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 0 0 14px;
}

.notice p { margin: 0; }

/* 결과 영역 바로 위 한 줄 요약 (고정 아님) */
.notice-line {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.results-head {
  margin: 18px 0 8px;
}

.results-head h2 { margin-bottom: 2px; }

.results-summary {
  margin: 0;                     /* 결과 맨 위 한 줄: 거의 해당 N건 · 확인 필요 N건 */
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.results-summary-hint {
  margin: 2px 0 4px;
  font-size: 14px;
  color: var(--muted);
}

.results-sub {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.results-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.columns {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 760px) {
  .columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .col-local { grid-column: 1 / -1; }
}

.col {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf9f5;
  padding: 12px;
  min-width: 0;
}

.col > h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }

.count {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0 0;
}

.item:first-of-type { margin-top: 0; }

.tags { margin: 0 0 6px; }

.tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--badge);
  color: #4a4a44;
  margin: 0 6px 4px 0;
}

.tag-sample { background: var(--sample-bg); color: var(--sample-ink); font-weight: 700; }
.tag-soon { background: var(--soon-bg); color: var(--soon-ink); font-weight: 700; }

.summary { margin: 6px 0 8px; }

.meta {
  margin: 3px 0;
  font-size: 14px;
  color: var(--muted);
}

.meta b { color: var(--ink); font-weight: 700; }

.item a {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}

.link-none { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.notes {
  margin: 8px 0 0;
  padding: 8px 10px;
  list-style: none;
  background: var(--note-bg);
  color: var(--note-ink);
  border-radius: 8px;
  font-size: 14px;
}

.notes li { margin: 2px 0; }

.col-empty { margin: 0; font-size: 14px; color: var(--muted); }

/* 칸마다 20개씩 보여 주고 '더 보기'로 20개씩 더 (버튼은 목록 안에서 작게) */
.more-wrap { margin: 10px 0 0; }

button.more {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 12px;
}

/* 홈 화면에 추가 안내 (작게, 닫기 가능). 고정하지 않고 내용 맨 아래에 둡니다. */
.install-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 10px 12px;
  background: #eef3ef;
  border: 1px solid #cfe0d7;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #2c463c;
}

.install-tip p { margin: 0; flex: 1 1 auto; }

/* hidden 속성이 display:flex 에 밀리지 않게 (이게 없으면 안내가 항상 보임) */
.install-tip[hidden] { display: none; }

.install-tip button.ghost {
  margin: 0;
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 13.5px;
  border-radius: 8px;
}

@media (max-width: 380px) {
  .install-tip { flex-wrap: wrap; }
  .install-tip button.ghost { width: 100%; }
}

footer.disclaimer {
  margin: 22px 0 0;
  background: #edebe3;
  border-top: 1px solid var(--line);
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  font-size: 13px;
  line-height: 1.5;
  color: #3a3a36;
}

footer.disclaimer p { margin: 0 auto; max-width: 780px; }
footer.disclaimer .src { margin-top: 4px; color: #55554f; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
