/* jiwon.manuz.com — 밝은 단일 테마. 정부 사이트의 파랑을 피해 청록. 서체는 Pretendard 하나. */
:root {
  color-scheme: light;
  --bg: #f6f8f7; --card: #fff; --bg-2: #eef2f0;
  --line: #dfe5e2; --line-2: #c9d2cd;
  --text: #1b201e; --text-2: #4b5551; --muted: #6f7a75;
  --accent: #0f766e; --accent-ink: #fff; --accent-soft: #e3f2ef; --accent-line: #9fd3c9;
  --warn: #b45309; --warn-soft: #fdf1dc;
  --ok: #15803d; --ok-soft: #e4f5e9;
  --closed: #6b7280; --closed-soft: #eceff1;
  --up: #4f46e5; --up-soft: #e8e7fb;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --wrap: 1040px; --measure: 740px; --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font); font-size: 16.5px; line-height: 1.7; color: var(--text); background: var(--bg); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b { font-weight: 700; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
.main { flex: 1; padding-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; font-weight: 700; }
.skip:focus { left: 10px; }

/* 헤더 */
.mast { background: var(--card); border-bottom: 1px solid var(--line); }
.mast-in { display: flex; align-items: center; gap: 20px; height: 62px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.03em; flex: none; }
.wordmark:hover { text-decoration: none; }
.wm-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; }
.wm-mark::after { content: ""; position: absolute; left: 6px; top: 4px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 11px; font-size: 15px; font-weight: 600; color: var(--text-2); border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--bg-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.mast-note { font-size: 13px; color: var(--muted); padding-block: 6px; border-top: 1px solid var(--line); text-align: center; }

/* 히어로 */
.hero { padding: 40px 0 8px; max-width: var(--measure); }
.hero h1 { font-size: clamp(26px, 4.2vw, 38px); font-weight: 800; }
.hero-sub { margin-top: 14px; color: var(--text-2); font-size: 17px; }
.kicker { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.kicker a { color: inherit; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hub-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--card); }
.hub-chips a b { color: var(--accent); }
.hub-chips a:hover, .hub-chips a[aria-current="page"] { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* 조건 필터 */
.filter { margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; }
.filter-head h2 { font-size: 20px; }
.filter-note { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; align-items: end; }
.filter-form label, .f-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.f-lab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.f-help { font-size: 12.5px; white-space: nowrap; color: var(--accent); }
button.f-help { font: inherit; font-size: 12.5px; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
button.f-help:hover { text-decoration: underline; text-underline-offset: 3px; }
.filter-form input, .filter-form select { width: 100%; min-width: 0; font: inherit; font-size: 15px; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--text); min-height: 42px; }
.filter-form input:focus, .filter-form select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn-reset { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); color: var(--text-2); cursor: pointer; min-height: 42px; }
.btn-reset:hover { background: var(--line); }
.filter-count { margin-top: 18px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.filter-count em { font-style: normal; color: var(--accent); }
.btn-more[hidden] { display: none; }
.btn-more { display: block; margin: 14px auto 0; font: inherit; font-size: 14px; font-weight: 600; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--text-2); cursor: pointer; }

/* 카드 목록 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.card:hover { border-color: var(--accent-line); }
.card[data-status="closed"] { background: var(--bg-2); }
.card[data-status="closed"] .card-title a { color: var(--text-2); }
.card[data-match="out"] { display: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.card-title { font-size: 17px; font-weight: 700; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-sum { font-size: 14.5px; color: var(--text-2); }
.card-amount { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: auto; padding-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-match { font-size: 12.5px; font-weight: 600; color: var(--warn); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge--open, .badge--always { background: var(--ok-soft); color: var(--ok); }
.badge--soon { background: var(--warn-soft); color: var(--warn); }
.badge--upcoming { background: var(--up-soft); color: var(--up); }
.badge--closed { background: var(--closed-soft); color: var(--closed); }

/* 광고 상자: 신청 버튼과 헷갈리지 않게 라벨을 붙인다 */
.ad { margin: 28px 0; padding: 8px 0 0; border-top: 1px dashed var(--line-2); }
.ad-label { display: block; font-size: 11px; color: var(--muted); letter-spacing: .1em; margin-bottom: 4px; }

/* 블록 */
.block { margin-top: 40px; }
.block h2 { font-size: 22px; margin-bottom: 4px; }
.block--closed { opacity: .92; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.hub { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; color: var(--text); }
.hub:hover { border-color: var(--accent); text-decoration: none; }
.hub b { font-size: 18px; color: var(--accent); }
.hub span { font-size: 14px; color: var(--text-2); }
.hub small { font-size: 13px; color: var(--muted); margin-top: 6px; }
.notice { background: var(--accent-soft); border-radius: var(--r); padding: 22px 20px; max-width: none; }
.notice ul { display: grid; gap: 6px; margin-top: 10px; font-size: 15px; color: var(--text-2); }
.notice li::before { content: "✓ "; color: var(--accent); font-weight: 800; }

/* 상세 */
.item { max-width: var(--measure); padding-top: 32px; }
.item-head h1 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 800; margin-top: 10px; }
.item-lead { margin-top: 12px; font-size: 18px; color: var(--text-2); }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.alert { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 15px; }
.alert--closed { background: var(--closed-soft); color: var(--closed); }
.sec { margin-top: 36px; }
.sec h2 { font-size: 21px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.sec h3 { font-size: 16px; margin: 18px 0 6px; }
.check { display: grid; gap: 8px; }
.check li { position: relative; padding-left: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 10px 40px; font-size: 15.5px; }
.check li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--accent); }
.check li::after { content: ""; position: absolute; left: 19px; top: 16px; width: 4px; height: 8px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check--doc li::before { border-radius: 50%; }
.check--doc li::after { display: none; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0; }
.kv dt { font-size: 14px; font-weight: 600; color: var(--muted); }
.kv dd { margin: 0; font-size: 16px; font-weight: 600; }
.cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 20px; border: 2px solid var(--accent); border-radius: 10px; color: var(--accent); font-weight: 700; font-size: 16px; background: var(--card); }
.cta:hover { background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 15.5px; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-size: 20px; color: var(--accent); }
.faq[open] summary::after { content: "−"; }
.faq p { padding: 0 0 14px; color: var(--text-2); font-size: 15px; }
.item-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.report { font-weight: 600; color: var(--warn); border: 1px solid currentColor; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.prose h2 { font-size: 20px; margin-top: 28px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose p { margin-top: 10px; }
.prose ul { padding-left: 20px; list-style: disc; display: grid; gap: 6px; margin-top: 8px; }

/* 푸터 */
.foot { border-top: 1px solid var(--line); background: var(--card); }
.foot-in { padding: 24px 16px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.foot-note { margin-top: 10px; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .mast-in { height: 56px; gap: 12px; }
  .hero { padding-top: 26px; }
  .filter { padding: 16px 14px; }
  .filter-form { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

/* 생년월일 다이얼로그 */
.dlg { border: 0; border-radius: 14px; padding: 22px 20px 18px; width: min(340px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.2); color: var(--text); }
.dlg::backdrop { background: rgba(15, 23, 20, .45); }
.dlg h3 { font-size: 18px; }
.dlg-lab { display: block; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.dlg input { width: 100%; margin-top: 5px; font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 8px; min-height: 44px; }
.dlg input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.dlg-out { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--accent); min-height: 1.7em; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.dlg-btns button { font: inherit; font-size: 15px; font-weight: 700; padding: 9px 18px; border-radius: 8px; cursor: pointer; min-height: 42px; }
.dlg-cancel { border: 1px solid var(--line-2); background: var(--card); color: var(--text-2); }
.dlg-ok { border: 0; background: var(--accent); color: var(--accent-ink); }
