/* Land Master Pro — 공통 스타일 (민트 프레시 테마, 큰 글씨 기준) */
:root {
  --bg: #F2FAF7;
  --bg-soft: #FFFFFF;
  --card: #FFFFFF;
  --card2: #EAF6F0;
  --line: #D3EAE1;
  --primary: #0EA672;
  --primary-hover: #0B8A5F;
  --magenta: #2EE6A8;
  --text: #16231D;
  --muted: #5B6B63;
  --blue: #2E86DE;
  --green: #16B981;
  --red: #E0524B;
  --amber: #E8A33D;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 18px; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 1rem;
}
a { color: var(--blue); }
b, strong { font-weight: 700; }

/* 헤더 & 내비 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid #A78BFA;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 16px 20px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; text-decoration: none; }
.brand b { color: var(--primary); font-size: 1.35em; font-weight: 900; }
.brand span { color: var(--muted); font-size: 0.8em; flex-basis: 100%; }
.header-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xp-chip {
  background: #FDF3E2; border: 1px solid #F0D9A8; border-radius: 8px;
  padding: 6px 14px; font-size: 0.85em; font-weight: 700; color: var(--amber); white-space: nowrap;
}
.streak-chip {
  background: #FDEEE2; border: 1px solid #F0CBA8; border-radius: 8px;
  padding: 6px 12px; font-size: 0.85em; font-weight: 700; color: #C2600F; white-space: nowrap;
}
.search-input { background: var(--card2); border: 2px solid #A78BFA; color: var(--text); padding: 9px 14px;
  border-radius: 8px; font-family: inherit; font-size: 0.92em; max-width: 200px; }
.site-nav {
  max-width: 1080px; margin: 0 auto; padding: 2px 12px 12px;
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.site-nav a {
  flex-shrink: 0; text-decoration: none; color: var(--muted);
  font-size: 0.92em; font-weight: 700; padding: 9px 15px;
  border-radius: 8px; border: 1px solid transparent;
}
.site-nav a:hover { color: var(--primary); background: #EAF6F0; }
.site-nav a.active { color: #fff; background: var(--primary); }

main { max-width: 1080px; margin: 0 auto; padding: 30px 20px 70px; }

.page-head { margin-bottom: 24px; border-bottom: 2px solid #A78BFA; padding-bottom: 18px; }
.page-head h1 { margin: 0 0 10px; font-size: 1.7em; font-weight: 900; letter-spacing: -0.2px; }
.page-head p { margin: 0; color: var(--muted); font-size: 1.02em; }
.section-h { font-size: 1.25em; font-weight: 900; color: var(--text); margin: 36px 0 16px; }

.intro-box {
  background: #EAF6F0; border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0; padding: 18px 20px; margin-bottom: 24px; color: var(--text); font-size: 1em;
}

/* 카드 공통 */
.card {
  background: var(--card); border: 2px solid #A78BFA;
  border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(20,30,45,0.05);
}
.card h3 { margin-top: 0; color: var(--primary); font-size: 1.15em; }

/* 홈 히어로 (지적도 청사진 배경 + 측량경계선 그래픽) */
.site-hero {
  position: relative; overflow: hidden; border-radius: 16px; padding: 42px 40px 44px; margin-bottom: 26px;
  background:
    repeating-linear-gradient(0deg, rgba(14,166,114,0.14) 0 1.5px, transparent 1.5px 30px),
    repeating-linear-gradient(90deg, rgba(14,166,114,0.14) 0 1.5px, transparent 1.5px 30px),
    radial-gradient(760px 380px at 88% 6%, #D3EAE1, transparent 60%),
    linear-gradient(160deg,#EAF9F2,#F7FCFA 78%);
  border: 1px solid #C3E5D6;
}
.sh-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88em; font-weight: 800; margin-bottom: 16px; color: #0B8A5F; }
.sh-eyebrow .dot { width: 6px; height: 6px; background: #0EA672; border-radius: 1px; transform: rotate(45deg); }
.sh-h1 { margin: 0 0 26px; font-weight: 900; line-height: 1.34; letter-spacing: -0.3px; max-width: 640px; text-wrap: balance; }
.sh-l1 { font-size: 1.5em; color: #5B6B63; }
.sh-l2 { font-size: 1.68em; margin-top: 6px; background: linear-gradient(90deg,#16231D 15%, #0EA672 55%, #2EE6A8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sh-compare { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.sh-compare div { font-size: 0.96em; font-weight: 600; display: flex; gap: 9px; align-items: center; color: #6B7B72; }
.sh-compare div b { font-weight: 800; color: #16231D; }
.sh-compare .dash { color: #0EA672; }
.sh-cta {
  display: inline-block; text-decoration: none; font-weight: 800; font-size: 0.98em; padding: 13px 26px; border-radius: 999px;
  color: #fff; background: linear-gradient(120deg,#0EA672,#2EE6A8); box-shadow: 0 8px 22px rgba(14,166,114,0.35);
}
.sh-parcel { position: absolute; right: -10px; top: 0; bottom: 0; width: 42%; opacity: 0.9; }
@media (max-width: 640px) { .sh-parcel { display: none; } .site-hero { padding: 32px 24px 36px; } }

/* 오늘의 상식 히어로 카드 (홈) */
.fact-hero { background: var(--card); border: 2px solid #A78BFA; border-radius: 14px; padding: 24px;
  margin-bottom: 26px; box-shadow: 0 2px 10px rgba(20,30,45,0.06); }
.fh-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.fh-label { font-weight: 900; color: var(--primary); font-size: 1.1em; }
.fh-count { font-size: 0.88em; font-weight: 700; color: var(--amber); }
.fh-card { background: var(--bg); border-radius: 10px; padding: 28px; text-align: center; }
.fh-diff { font-size: 0.85em; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 12px; }
.fh-q { font-size: 1.28em; font-weight: 700; margin: 0 0 12px; line-height: 1.5; }
.fh-ox-statement { font-size: 0.98em; color: var(--text); margin: 0 0 20px; padding: 12px 16px; background: var(--card2);
  border: 2px solid #A78BFA; border-radius: 8px; display: inline-block; }
.fh-ox-statement b { font-weight: 700; }
.fh-ox { display: flex; gap: 14px; justify-content: center; margin-bottom: 6px; }
.fh-feedback { display: none; margin-top: 18px; padding: 16px 18px; border-radius: 8px; font-size: 1em; text-align: left; }
.fh-feedback.ok { display: block; background: #E8F9F1; color: #0B8A5F; }
.fh-feedback.no { display: block; background: #FDEDEB; color: #B23A2E; }
.fh-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.ox-btn { background: var(--card2); color: var(--text); border: 3px solid #A78BFA; padding: 12px 26px; border-radius: 8px;
  cursor: pointer; font-weight: 700; font-size: 1em; font-family: inherit; }
.ox-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: #EAF6F0; }
.ox-btn:disabled { cursor: default; }
.ox-btn.lg { padding: 14px 34px; font-size: 1.05em; }
.ox-btn.correct { background: #E8F9F1; border-color: var(--green); color: #0B8A5F; }
.ox-btn.wrong { background: #FDEDEB; border-color: var(--red); color: #B23A2E; }

/* 검색/필터 (홈) */
.search-box { margin-bottom: 34px; }
.field { width: 100%; background: var(--card2); border: 2px solid #A78BFA; color: var(--text); padding: 14px 16px;
  border-radius: 10px; font-family: inherit; font-size: 1em; margin-bottom: 12px; }
textarea.field { min-height: 110px; resize: vertical; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { background: var(--card2); border: 2px solid #A78BFA; color: var(--muted); border-radius: 999px; padding: 7px 15px;
  font-size: 0.9em; font-weight: 600; cursor: pointer; font-family: inherit; }
.chip.active { color: #fff; border-color: var(--primary); background: var(--primary); }
.diffchip.active[data-diff="초급"] { background: var(--green); border-color: var(--green); }
.diffchip.active[data-diff="중급"] { background: var(--amber); border-color: var(--amber); }
.diffchip.active[data-diff="고급"] { background: var(--red); border-color: var(--red); }
.search-count { color: var(--muted); font-size: 0.9em; margin: 10px 0 14px; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.fact-chip { text-align: left; text-decoration: none; display: block; background: var(--card); border: 2.5px solid #A78BFA;
  border-radius: 10px; padding: 16px 18px; color: var(--text); box-shadow: 0 1px 3px rgba(20,30,45,0.04); }
.fact-chip:hover { box-shadow: 0 4px 12px rgba(20,30,45,0.09); }
.fact-chip.filtered-out { display: none; }
.fc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; font-size: 0.82em; color: var(--muted); font-weight: 600; }
.diff-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.fc-q { font-size: 0.98em; font-weight: 700; margin-bottom: 9px; line-height: 1.5; }
.fc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag-pill { font-size: 0.82em; font-weight: 600; color: var(--primary); background: #EAF6F0; border-radius: 6px; padding: 3px 10px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }

/* 홈 그리드 / 학습 로드맵 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 24px; }
.trail-map { position: relative; margin-bottom: 24px; padding-left: 6px; }
.trail-map::before { content: ""; position: absolute; left: 26px; top: 28px; bottom: 28px; width: 2px; background: var(--line); }
.stage-card { position: relative; display: flex; align-items: flex-start; gap: 18px; text-decoration: none;
  color: var(--text); background: var(--card); border: 2px solid #A78BFA; border-radius: 12px; padding: 18px 20px;
  margin-bottom: 14px; box-shadow: 0 1px 3px rgba(20,30,45,0.05); }
.stage-card:hover { box-shadow: 0 4px 14px rgba(20,30,45,0.1); }
.stage-card.plain { flex-direction: column; align-items: stretch; margin-bottom: 0; }
.node-badge { position: relative; z-index: 1; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.05em; }
.node-badge.current { animation: nodePulse 1.8s infinite; }
@keyframes nodePulse { 0% { box-shadow: 0 0 0 0 rgba(14,166,114,0.45); } 70% { box-shadow: 0 0 0 12px rgba(14,166,114,0); } 100% { box-shadow: 0 0 0 0 rgba(14,166,114,0); } }
@media (prefers-reduced-motion: reduce) { .node-badge.current { animation: none; box-shadow: 0 0 0 4px rgba(14,166,114,0.35); } }
.node-badge.done::after { content: "✓"; position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 0.7em; font-weight: 900; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.stage-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stage-card .s-num { font-size: 0.82em; font-weight: 800; letter-spacing: 0.5px; }
.stage-card h3 { margin: 4px 0 8px; font-size: 1.18em; font-weight: 800; color: var(--text); }
.stage-card p { margin: 0 0 12px; color: var(--muted); font-size: 0.95em; }
.mini-dots { display: flex; gap: 4px; margin-bottom: 10px; }
.mini-dots i { width: 18px; height: 6px; border-radius: 3px; display: inline-block; }
.mini-bar { background: var(--line); height: 7px; border-radius: 4px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; width: 0; transition: width .4s; }
.mini-label { font-size: 0.85em; color: var(--muted); margin-top: 7px; font-weight: 600; }
.diff-dots { display: flex; align-items: center; gap: 5px; font-size: 0.88em; color: var(--muted); margin-top: 10px; }
.diff-dots i { width: 20px; height: 7px; border-radius: 3px; display: inline-block; }

/* 학습 모듈 */
.module-card {
  background: var(--card); border: 2px solid #A78BFA;
  border-radius: 12px; padding: 24px; margin-bottom: 22px; scroll-margin-top: 130px;
  box-shadow: 0 1px 3px rgba(20,30,45,0.05);
}
.module-card.flash { animation: flashHi 1.6s ease; }
@keyframes flashHi { 0%,100% { box-shadow: 0 1px 3px rgba(20,30,45,0.05); } 25% { box-shadow: 0 0 0 3px var(--primary); } }
@media (prefers-reduced-motion: reduce) { .module-card.flash { animation: none; box-shadow: 0 0 0 3px var(--primary); } }
.mod-top { display: flex; justify-content: space-between; align-items: center; }
.mod-num { font-size: 0.85em; font-weight: 800; color: var(--primary); letter-spacing: 0.3px; }
.diff-badge { font-size: 0.85em; font-weight: 800; border: 1px solid; border-radius: 6px; padding: 3px 11px; }
.module-card h3 { margin: 10px 0 14px; font-size: 1.25em; font-weight: 800; }
.done-badge { display: none; color: var(--green); font-size: 0.8em; font-weight: 700; margin-left: 10px; }
.module-card.completed .done-badge { display: inline; }
.hook-q { font-size: 1.12em; font-weight: 700; margin: 0 0 12px; color: var(--text); line-height: 1.55; }
.ox-statement { font-size: 1em; color: var(--text); margin: 0 0 16px; padding: 12px 16px; background: var(--bg); border-radius: 8px; }
.ox-statement b { font-weight: 700; }
.ox-row { display: flex; gap: 10px; margin-bottom: 10px; }
.ox-feedback { display: none; margin-bottom: 6px; padding: 14px 16px; border-radius: 8px; font-size: 0.98em; }
.ox-feedback.ok { display: block; background: #E8F9F1; color: #0B8A5F; }
.ox-feedback.no { display: block; background: #FDEDEB; color: #B23A2E; }
.more-btn { width: 100%; background: #EAF6F0; color: var(--primary); border: 1px solid #B9E5D2; padding: 12px;
  border-radius: 8px; cursor: pointer; font-size: 0.95em; font-weight: 700; font-family: inherit; margin-top: 8px; }
.more-btn:hover { background: #DCF3E9; }
.deep-dive { margin-top: 20px; padding-top: 4px; }
.deep-dive.hidden { display: none; }

.lesson-box {
  background: #E8F9F1; border-left: 4px solid var(--green);
  padding: 16px 20px; margin-bottom: 16px; border-radius: 0 8px 8px 0; color: #0B8A5F; font-size: 1em;
}
.lesson-box b { color: #0B8A5F; }
.case-box {
  background: var(--bg); border: 2px solid #A78BFA;
  padding: 16px 20px; border-radius: 8px; margin-bottom: 16px; font-size: 0.98em;
}
.case-box .ct { font-weight: 800; margin-bottom: 9px; }
.case-box .cs { color: #0B8A5F; background: #E8F9F1; padding: 11px 13px; border-radius: 6px; }
.trap-box {
  background: #FDEDEB; border-left: 4px solid var(--red);
  padding: 14px 20px; margin-bottom: 18px; border-radius: 0 8px 8px 0; color: #B23A2E; font-size: 0.98em;
}
.trap-box b { color: #B23A2E; }

/* 퀴즈 */
.quiz-box { background: var(--bg); border: 2px solid #A78BFA; border-radius: 10px; padding: 22px; }
.quiz-box .q { font-weight: 800; margin: 0 0 15px; font-size: 1.12em; line-height: 1.5; }
.quiz-opt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card2); color: var(--text); border: 2px solid #A78BFA;
  padding: 13px 16px; margin: 10px 0; border-radius: 8px; font-size: 1em; font-family: inherit;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--primary); background: #EAF6F0; }
.quiz-opt.correct { background: #E8F9F1; border-color: var(--green); color: #0B8A5F; font-weight: 800; }
.quiz-opt.wrong { background: #FDEDEB; border-color: var(--red); color: #B23A2E; }
.quiz-feedback { display: none; margin-top: 14px; padding: 16px 18px; border-radius: 8px; font-size: 1em; white-space: pre-line; line-height: 1.6; }
.quiz-feedback.ok { display: block; background: #E8F9F1; color: #0B8A5F; }
.quiz-feedback.no { display: block; background: #FDEDEB; color: #B23A2E; }
.xp-gain { color: var(--amber); font-weight: 800; }

/* ---- 정답 축하 연출 (컨페티 + XP 토스트) ---- */
.confetti-piece { position: fixed; z-index: 499; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; }
.xp-toast { position: fixed; z-index: 500; pointer-events: none; font-weight: 900; font-size: 1.1em; color: var(--amber); background: #fff; border: 2px solid var(--amber); border-radius: 999px; padding: 6px 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); transform: translate(-50%, 0); animation: xpFloat 1.15s ease forwards; white-space: nowrap; }
@keyframes xpFloat {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -10px) scale(1.05); }
  80% { opacity: 1; transform: translate(-50%, -50px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -66px) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .xp-toast { animation: none; opacity: 1; transform: translate(-50%, -30px); } }

/* 진행 바 */
.progress-wrap { background: var(--card); border: 2px solid #A78BFA; border-radius: 10px; padding: 16px 20px; margin-bottom: 26px; }
.progress-title { display: flex; justify-content: space-between; font-size: 0.92em; color: var(--muted); margin-bottom: 9px; font-weight: 600; }
.progress-bar-bg { background: var(--line); height: 9px; border-radius: 5px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0; background: var(--primary); border-radius: 5px; transition: width .4s; }

/* 스테이지 이동 */
.stage-nav { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 30px; }
.stage-nav .btn { text-decoration: none; flex-shrink: 0; white-space: nowrap; display: inline-block; }
.stage-nav .btn:only-child { margin-left: auto; }
.stage-done { flex: 1 1 auto; min-width: 0; text-align: center; background: #EAF6F0; border: 1px solid var(--primary);
  border-radius: 12px; padding: 26px; font-size: 1.08em; }
.stage-done-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* 공고 */
.notice-item { background: var(--card); border: 2px solid #A78BFA; border-radius: 10px; padding: 18px 20px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(20,30,45,0.04); }
.notice-meta { font-size: 0.88em; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.notice-meta .region { color: var(--primary); font-weight: 800; }
.notice-item a.title { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.02em; }
.notice-item a.title:hover { text-decoration: underline; color: var(--primary); }
.update-line { font-size: 0.88em; color: var(--muted); margin-bottom: 18px; }

/* 커뮤니티 */
.auth-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 2px solid #A78BFA; border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.auth-bar .who { font-size: 0.95em; color: var(--primary); font-weight: 700; }
input.field, textarea.field {
  width: 100%; background: var(--card2); border: 2px solid #A78BFA; color: var(--text);
  padding: 12px 14px; border-radius: 8px; font-family: inherit; font-size: 0.98em; margin-bottom: 10px;
}
.btn { background: var(--primary); color: #fff; border: none; padding: 11px 20px; border-radius: 8px;
  cursor: pointer; font-weight: 700; font-size: 0.95em; font-family: inherit; }
.btn:hover { background: var(--primary-hover); }
.btn.ghost { background: var(--card2); color: var(--text); border: 2px solid #A78BFA; }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: #FDEDEB; color: #B23A2E; }
.btn.sm { padding: 8px 15px; font-size: 0.88em; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.post { background: var(--card); border: 2px solid #A78BFA; border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; }
.post .p-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 0.9em; }
.post .p-author { color: var(--primary); font-weight: 800; }
.post .p-date { color: var(--muted); }
.post .p-body { white-space: pre-wrap; word-break: break-word; font-size: 1em; margin-bottom: 9px; }
.comment { background: var(--bg); border-radius: 8px; padding: 10px 14px; margin-top: 8px; font-size: 0.92em; }
.comment .c-author { color: var(--primary); font-weight: 800; margin-right: 8px; }
.comment-row { display: flex; gap: 8px; margin-top: 10px; }
.comment-row input { flex: 1; margin: 0; }
.setup-note { background: #FDF3E2; border: 1px solid #F0D9A8; border-radius: 10px; padding: 22px; margin-bottom: 22px; font-size: 0.98em; }
.hidden { display: none !important; }
.msg { font-size: 0.9em; margin: 8px 0; font-weight: 600; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }

/* 전면광고 임시 슬롯 (기본 숨김, 준비만 된 상태) */
.ad-slot { margin: 26px 0; text-align: center; min-height: 0; }
.ad-interstitial { position: fixed; inset: 0; background: rgba(20,26,33,0.6); z-index: 300; display: flex;
  align-items: center; justify-content: center; padding: 16px; }
.ad-slot-card { background: var(--card); border: 2px solid #A78BFA; border-radius: 12px; padding: 28px;
  max-width: 420px; width: 100%; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.ad-slot-label { font-size: 0.82em; font-weight: 700; color: var(--amber); letter-spacing: 0.3px; margin-bottom: 16px; }
.ad-slot-box { background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 42px 16px;
  color: var(--muted); font-size: 0.96em; margin-bottom: 18px; }

/* 전역 검색 오버레이 */
.search-overlay { position: fixed; inset: 0; background: rgba(20,26,33,0.55); z-index: 200; display: none;
  align-items: flex-start; justify-content: center; padding: 8vh 16px; }
.search-overlay.open { display: flex; }
.search-panel { background: var(--card); border: 2px solid #A78BFA; border-radius: 14px; max-width: 640px;
  width: 100%; max-height: 76vh; overflow-y: auto; padding: 22px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); }
.search-panel h4 { margin: 0 0 14px; color: var(--primary); font-size: 1.02em; font-weight: 800; }
.sr-item { display: block; width: 100%; text-align: left; text-decoration: none; background: var(--bg); border: 2px solid #A78BFA;
  border-radius: 8px; padding: 14px 16px; margin-bottom: 8px; cursor: pointer; font-family: inherit; color: var(--text); font-size: 0.98em; }
.sr-item:hover { border-color: var(--primary); background: #EAF6F0; }
.sr-item small { color: var(--muted); display: block; margin-bottom: 5px; font-weight: 600; }
.sr-close { background: var(--line); color: var(--text); border: none; padding: 9px 18px; border-radius: 8px;
  cursor: pointer; font-family: inherit; font-weight: 600; margin-top: 6px; }

/* 본문형 문서 (가이드/정책) */
.doc h2 { color: var(--primary); font-size: 1.2em; font-weight: 800; margin-top: 32px; border-bottom: 2px solid #A78BFA; padding-bottom: 9px; }
.doc p, .doc li { color: var(--text); font-size: 1em; }
.doc table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 0.94em; }
.doc th, .doc td { border: 2px solid #A78BFA; padding: 10px 12px; text-align: left; }
.doc th { background: var(--bg); color: var(--primary); }
.table-scroll { overflow-x: auto; }

/* 푸터 */
.site-footer { border-top: 2px solid #A78BFA; margin-top: 40px; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 26px 20px; color: var(--muted); font-size: 0.88em; }
.footer-inner a { color: var(--muted); margin-right: 14px; }
.disclaimer { margin-top: 10px; font-size: 0.94em; line-height: 1.7; }

@media (max-width: 640px) {
  html { font-size: 17px; }
  main { padding: 22px 14px 60px; }
  .page-head h1 { font-size: 1.4em; }
  .module-card, .card { padding: 18px; }
  .header-inner { padding: 12px 14px 8px; }
  .fh-ox { flex-direction: column; }
  .fh-ox .ox-btn { width: 100%; }
  .stage-nav { flex-direction: column; }
  .stage-nav .btn { width: 100%; text-align: center; }
  .stage-nav .btn:only-child { margin-left: 0; }
  .trail-map::before { left: 19px; }
  .node-badge { width: 34px; height: 34px; font-size: 0.95em; }
}
