/* 동두천 드론 매핑 페이지 스타일 (View). 색은 :root 변수로만 바꾼다. */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1d2327;
  --muted: #5b6670;
  --line: #dcdcd4;
  --accent: #1f6f5c;
  --accent-soft: #e2efe9;
  --warn: #b5532a;
  --ai: #6a3fd1;
  --ai-soft: #efe9fc;
  --human: #5b6670;
  --viewer-bg: #0f1418;
  --radius: 10px;
  --font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171a;
    --surface: #1a2125;
    --ink: #e7ebee;
    --muted: #9aa6ae;
    --line: #2c363c;
    --accent: #5cc4a6;
    --accent-soft: #1d3029;
    --warn: #e08a5f;
    --ai: #b49bff;
    --ai-soft: #251d3b;
    --human: #9aa6ae;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 1.5rem; margin: 0 0 0.4rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.3rem; }
a { color: var(--accent); }

.hero { padding: 48px 0 28px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--muted); font-size: 0.9rem; margin: 0; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0.2rem 0 0.6rem; }
.lead { max-width: 760px; font-size: 1.05rem; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 24px 0 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stats dt { color: var(--muted); font-size: 0.82rem; }
.stats dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 700; }
.stats dd span { font-size: 0.85rem; font-weight: 500; margin-left: 3px; color: var(--muted); }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; position: sticky; top: 0; background: var(--bg); z-index: 1000; }
.tabs a { white-space: nowrap; text-decoration: none; color: var(--ink); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 0.9rem; }
.tabs a:hover { border-color: var(--accent); }

main section { padding: 36px 16px; }
.hint, .note { color: var(--muted); font-size: 0.9rem; }

.viewer-box, .map-box { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--viewer-bg); }
.viewer { width: 100%; height: min(72vh, 640px); }
.viewer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); font-size: 0.9rem; }
button { font: inherit; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--accent-soft); color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--accent); }
.status { color: var(--muted); margin-left: auto; }

.readout { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.8rem; color: var(--muted); }
.legend > div { min-width: 200px; }
.legend-title { color: var(--ink); }
.legend .bar { height: 10px; border-radius: 4px; margin: 4px 0; }
.legend .ends { display: flex; justify-content: space-between; }
.map-tools { padding: 10px 0; font-size: 0.9rem; color: var(--muted); }
.map-tools input { vertical-align: middle; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.card .label { color: var(--muted); font-size: 0.82rem; }
.card .value { font-size: 1.35rem; font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child, table.plain th, table.plain td { text-align: left; }
table.plain td { white-space: normal; }
tr.check td { background: var(--accent-soft); }
.big { color: var(--warn); font-weight: 600; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 44px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.steps figure { margin: 10px 0 0; }
.steps figure img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
/* 지도 타일 이미지에는 위 사진 스타일이 닿지 않게 (타일마다 테두리가 생겨 격자처럼 보였다) */
.leaflet-container img { border: 0; border-radius: 0; max-width: none; }
.facts li { margin-bottom: 6px; }
footer { padding: 24px 16px 48px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }

.leaflet-container { background: var(--viewer-bg); font-family: var(--font); }
.gcp-label { background: rgba(15, 20, 24, 0.85); color: #fff; border: none; box-shadow: none; font-weight: 600; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button { border: none; border-radius: 0; background: var(--surface); }
.segmented button.on { background: var(--accent); color: #fff; }
th[colspan] { text-align: center; border-bottom: 1px solid var(--line); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 860px) { .pair { grid-template-columns: 1fr; } }
.pane { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--viewer-bg); }
.pane figcaption { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--surface); font-weight: 600; font-size: 0.95rem; border-bottom: 1px solid var(--line); }
.pane .status { font-weight: 400; font-size: 0.8rem; margin-left: 0; }
.pane .viewer { height: min(60vh, 560px); }
.map-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
#model .viewer-tools { border: 1px solid var(--line); border-radius: var(--radius); margin-top: 10px; }
.hero .spec { margin-top: 18px; }
.hero .spec-title { font-size: 1.05rem; margin: 0 0 8px; }
.measure-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.measure-tools button.on { background: var(--accent); color: #fff; }
.measure-result { font-variant-numeric: tabular-nums; font-weight: 600; }
.software { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 860px) { .software { grid-template-columns: 1fr; } }
.sw-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.sw-card.wide { grid-column: 1 / -1; }
.sw-card h3 { margin: 0; font-size: 1.1rem; }
.sw-card h3 span { font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.sw-card .sw-meta { margin: 2px 0 8px; color: var(--muted); font-size: 0.85rem; }
.sw-card p { margin: 0 0 6px; font-size: 0.95rem; }

/* 누가 만들었나: 사람 대 AI */
.ai-text { color: var(--ai); }
.who { display: inline-block; margin: 0 0 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.who-human { color: var(--human); border: 1px solid var(--line); }
.who-ai { color: #fff; background: var(--ai); }
.sw-card.sw-ai { border: 2px solid var(--ai); background: var(--ai-soft); }
.ai-callout { margin-top: 14px; padding: 16px 18px; border-radius: var(--radius); border: 2px solid var(--ai); background: var(--ai-soft); }
.ai-callout h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--ai); }
.ai-callout p { margin: 0 0 8px; font-size: 0.95rem; }
.ai-steps { margin: 0 0 8px; padding-left: 1.3rem; font-size: 0.93rem; }
.ai-steps li { margin-bottom: 4px; }
