:root {
  color-scheme: light;
  --ink: #17342e;
  --ink-soft: #5f726d;
  --green: #176b54;
  --green-dark: #0f503e;
  --mint: #e8f3ed;
  --cream: #f6f4ed;
  --paper: #fffefb;
  --line: #dce5df;
  --gold: #bc8e3e;
  --shadow: 0 24px 70px rgba(24, 59, 49, .12);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--cream); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.page-glow { position: fixed; z-index: -1; border-radius: 50%; filter: blur(3px); pointer-events: none; }
.page-glow--one { width: 520px; height: 520px; top: -260px; right: -170px; background: rgba(127, 190, 157, .22); }
.page-glow--two { width: 430px; height: 430px; top: 480px; left: -300px; background: rgba(217, 188, 118, .15); }

.site-header { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--green); box-shadow: 0 8px 20px rgba(23, 107, 84, .23); }
.brand-mark svg { width: 27px; fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 19px; letter-spacing: -.04em; }
.brand-copy small { color: var(--ink-soft); font-family: Georgia, serif; font-size: 10px; letter-spacing: .06em; }
.official-note { padding: 8px 12px; border: 1px solid #cbd9d2; border-radius: 999px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.hero { max-width: 850px; margin: 80px auto 0; text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 0 17px; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.eyebrow span { width: 22px; height: 1px; background: currentColor; }
h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(42px, 6vw, 72px); font-weight: 500; letter-spacing: -.055em; line-height: 1.12; }
h1 em { color: var(--green); font-style: normal; }
.hero-copy { max-width: 570px; margin: 24px auto 0; color: var(--ink-soft); font-size: 17px; line-height: 1.75; }

.search-form { position: relative; margin: 44px auto 0; text-align: left; }
.search-form > label { display: block; margin: 0 0 10px 5px; color: var(--ink); font-size: 13px; font-weight: 800; }
.search-field { position: relative; display: flex; align-items: center; min-height: 72px; padding: 8px 8px 8px 22px; border: 1px solid #cfdbd5; border-radius: 21px; background: var(--paper); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.search-field:focus-within { border-color: var(--green); box-shadow: 0 22px 70px rgba(23, 107, 84, .17), 0 0 0 4px rgba(23, 107, 84, .08); }
.search-field svg { width: 25px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-linecap: round; stroke-width: 1.8; }
.search-field input { min-width: 0; flex: 1; height: 52px; padding: 0 17px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; font-weight: 600; }
.search-field input::placeholder { color: #91a09b; font-weight: 500; }
.search-field button { min-width: 116px; height: 52px; border: 0; border-radius: 15px; background: var(--green); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; transition: background .2s, transform .2s; }
.search-field button:hover { background: var(--green-dark); }
.search-field button:active { transform: translateY(1px); }
.search-field button:disabled { cursor: wait; opacity: .68; }
.history-autocomplete { position: absolute; z-index: 30; top: 99px; left: 0; right: 0; overflow: hidden; border: 1px solid #cbdad3; border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: 0 24px 70px rgba(20,57,46,.2); backdrop-filter: blur(14px); }
.history-autocomplete[hidden] { display: none; }
.history-autocomplete__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 15px 9px; border-bottom: 1px solid #e4ebe7; color: var(--ink-soft); font-size: 10px; }
.history-autocomplete__head strong { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.history-autocomplete__list { max-height: 286px; overflow-y: auto; padding: 6px; }
.history-autocomplete__item { width: 100%; min-width: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.history-autocomplete__item:hover, .history-autocomplete__item.active { outline: none; background: #eef7f2; }
.history-autocomplete__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mint); color: var(--green); font-size: 15px; font-weight: 900; }
.history-autocomplete__copy { min-width: 0; display: grid; gap: 3px; }
.history-autocomplete__copy strong, .history-autocomplete__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-autocomplete__copy strong { font-size: 12px; }
.history-autocomplete__copy small { color: var(--ink-soft); font-size: 10px; }
.history-autocomplete__arrow { color: var(--green); font-size: 18px; font-weight: 800; }
.search-hint { margin: 12px 0 0 6px; color: #778984; font-size: 12px; }
.recent-history { margin-top: 22px; padding: 19px; border: 1px solid #d6e1db; border-radius: 18px; background: rgba(255, 254, 251, .72); text-align: left; }
.recent-history__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.recent-history__head span { color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.recent-history__head h2 { margin: 3px 0 0; font-size: 16px; letter-spacing: -.03em; }
.recent-history__head button { padding: 5px 2px; border: 0; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 700; cursor: pointer; }
.recent-history__head button:hover, .recent-history__head button:focus-visible { color: #a23d37; outline: none; text-decoration: underline; }
.recent-history__list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recent-history__item { min-width: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.recent-history__item:hover, .recent-history__item:focus-visible { border-color: #82ae9e; outline: none; background: #f4faf6; transform: translateY(-1px); }
.recent-history__icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: var(--mint); color: var(--green); font-size: 15px; font-weight: 800; }
.recent-history__copy { min-width: 0; display: grid; gap: 3px; }
.recent-history__copy strong, .recent-history__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-history__copy strong { font-size: 12px; }
.recent-history__copy small { color: var(--ink-soft); font-size: 10px; }
.recent-history__arrow { color: var(--green); font-size: 18px; }
.status { min-height: 24px; margin-top: 16px; color: var(--ink-soft); font-size: 13px; }
.status.error { color: #a23d37; font-weight: 700; }

.search-results { margin-top: 28px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 254, 251, .9); box-shadow: 0 16px 50px rgba(24, 59, 49, .08); text-align: left; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading span, .info-card header small { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-heading h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.04em; }
.section-heading > b { color: var(--ink-soft); font-size: 12px; }
.result-list { display: grid; gap: 9px; }
.result-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.result-item:hover, .result-item:focus-visible { border-color: #82ae9e; outline: none; background: #f4faf6; transform: translateY(-1px); }
.result-type { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--mint); color: var(--green); font-size: 11px; font-weight: 900; }
.result-copy { min-width: 0; display: grid; gap: 4px; }
.result-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.result-copy small { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.result-arrow { color: var(--green); font-size: 22px; }
.empty-result { padding: 28px 15px; color: var(--ink-soft); text-align: center; }

.lookup-progress { margin-top: 28px; padding: 27px; overflow: hidden; border: 1px solid #cfe0d7; border-radius: 22px; background: rgba(255, 254, 251, .96); box-shadow: 0 20px 60px rgba(24, 59, 49, .11); text-align: left; }
.lookup-progress__head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.lookup-progress__head span { color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.lookup-progress__head h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.04em; }
.lookup-progress__head p { margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; }
.lookup-progress__head > strong { color: var(--green); font-family: Georgia, serif; font-size: 24px; }
.progress-track { height: 7px; margin-top: 21px; overflow: hidden; border-radius: 999px; background: #e5ece8; }
.progress-track > span { display: block; width: 10%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #75ad8f); transition: width .3s ease; }
.lookup-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 23px 0 0; padding: 0; list-style: none; }
.lookup-steps li { display: flex; align-items: center; gap: 10px; min-width: 0; opacity: .42; transition: opacity .25s; }
.lookup-steps li.active, .lookup-steps li.done { opacity: 1; }
.lookup-steps i { position: relative; width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid #b9cbc2; border-radius: 50%; }
.lookup-steps li.active i { border-color: var(--green); border-top-color: transparent; animation: spin .8s linear infinite; }
.lookup-steps li.done i { border-color: var(--green); background: var(--green); }
.lookup-steps li.done i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lookup-steps span { min-width: 0; display: grid; gap: 2px; }
.lookup-steps b { font-size: 12px; }
.lookup-steps small { overflow: hidden; color: var(--ink-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.lookup-skeleton { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr; gap: 10px; margin-top: 24px; }
.lookup-skeleton span { height: 48px; border-radius: 10px; background: linear-gradient(100deg, #eef2ef 20%, #f8faf8 42%, #eef2ef 64%); background-size: 220% 100%; animation: shimmer 1.35s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position-x: -220%; } }

.summary { margin: 56px auto 0; padding: 42px; border: 1px solid var(--line); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.summary-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.summary-heading .eyebrow { justify-content: flex-start; margin-bottom: 9px; }
.summary-heading h2 { margin: 0; font-size: clamp(25px, 4vw, 38px); letter-spacing: -.045em; }
.summary-heading > div > p:last-child { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }
.reference-badge { padding: 8px 12px; border-radius: 999px; background: #f5edda; color: #8d6728; font-size: 11px; font-weight: 900; white-space: nowrap; }
.fact-grid { display: grid; grid-template-columns: 1.5fr .7fr .8fr 1fr; margin: 0; padding: 25px 0; border-bottom: 1px solid var(--line); }
.fact-grid > div { min-width: 0; padding: 0 22px; border-left: 1px solid var(--line); }
.fact-grid > div:first-child { padding-left: 0; border-left: 0; }
.fact-grid dt { margin-bottom: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.fact-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 16px; font-weight: 800; }
.fact-grid dd small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 10px; font-weight: 600; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 25px; }
.info-card { padding: 23px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.info-card--wide { grid-column: 1 / -1; }
.info-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-number { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; border-radius: 12px; background: var(--mint); color: var(--green); font-family: Georgia, serif; font-size: 14px; font-weight: 700; }
.info-card header h3 { margin: 2px 0 0; font-size: 17px; letter-spacing: -.035em; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.zone-tag { padding: 8px 10px; border: 1px solid #d6e4dc; border-radius: 9px; background: #f4f8f5; color: #2c5548; font-size: 12px; font-weight: 700; }
.empty-data { margin: 0; padding: 14px 0; color: var(--ink-soft); font-size: 13px; }
.more-data { margin-top: 10px; }
.more-data summary { color: var(--green); font-size: 12px; font-weight: 800; cursor: pointer; }
.more-data[open] summary { margin-bottom: 10px; }
.restriction-list { display: grid; gap: 10px; }
.restriction-group { padding: 15px; border-radius: 13px; background: #f7f8f5; }
.restriction-group > strong { display: block; margin-bottom: 8px; color: var(--green-dark); font-size: 13px; }
.restriction-group ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.restriction-group li { display: grid; gap: 3px; padding-top: 8px; border-top: 1px solid #e1e6e1; }
.restriction-group li:first-child { padding-top: 0; border-top: 0; }
.restriction-group b { font-size: 12px; }
.restriction-group span { color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.summary-actions { display: flex; gap: 10px; margin-top: 24px; }
.primary-action, .secondary-action, .download-action, .map-action { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: 14px; font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-action { gap: 8px; border: 1px solid var(--green); background: var(--green); color: #fff; }
.primary-action:hover { background: var(--green-dark); }
.secondary-action { border: 1px solid #cbd9d2; background: #fff; color: var(--ink); }
.map-action { gap: 8px; border: 1px solid #bdd2c8; background: #fff; color: var(--green-dark); }
.map-action:hover { border-color: var(--green); background: #f2f8f4; }
.map-action svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.download-action { gap: 8px; border: 1px solid #c8d9d1; background: var(--mint); color: var(--green-dark); }
.download-action:hover { border-color: #8fb5a5; background: #dceee4; }
.download-action:disabled { cursor: wait; opacity: .58; }
.download-action svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.legal-notice { margin: 18px 0 0; padding: 15px 17px; border-radius: 12px; background: #f5f2e9; color: #6f674f; font-size: 11px; line-height: 1.7; }

.export-progress { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(18, 39, 33, .42); backdrop-filter: blur(7px); }
.export-progress__card { width: min(430px, 100%); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 24px; border: 1px solid rgba(255,255,255,.75); border-radius: 22px; background: #fffefb; box-shadow: 0 28px 90px rgba(10, 35, 27, .28); }
.export-progress__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--mint); color: var(--green); }
.export-progress__icon svg { width: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.export-progress__card small { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.export-progress__card h2 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.035em; }
.export-progress__card p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; }
.export-progress__card > strong { color: var(--green); font-family: Georgia, serif; font-size: 20px; }
.export-progress__card .progress-track { grid-column: 1 / -1; margin-top: 4px; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.map-dialog { width: min(1080px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 24px; background: transparent; color: var(--ink); box-shadow: 0 32px 110px rgba(9, 34, 27, .32); }
.map-dialog::backdrop { background: rgba(15, 38, 31, .58); backdrop-filter: blur(6px); }
.map-dialog__panel { position: relative; display: grid; grid-template-rows: auto auto minmax(360px, 58dvh) auto; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: var(--paper); }
.map-dialog__head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 19px 22px 15px; border-bottom: 1px solid var(--line); }
.map-dialog__head small { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.map-dialog__head h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.04em; }
.map-dialog__head p { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; }
.map-dialog__close { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid #d6e1db; border-radius: 12px; background: #fff; color: var(--ink-soft); font-size: 25px; line-height: 1; cursor: pointer; }
.map-dialog__close:hover, .map-dialog__close:focus-visible { border-color: var(--green); outline: none; color: var(--green); }
.map-dialog__toolbar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f8faf8; }
.map-search { min-width: 0; display: flex; flex: 1; gap: 7px; }
.map-search input { min-width: 0; flex: 1; height: 42px; padding: 0 14px; border: 1px solid #cbd9d2; border-radius: 11px; outline: none; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.map-search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,84,.1); }
.map-search button, .map-select-action { border: 0; border-radius: 11px; background: var(--green); color: #fff; font-size: 12px; font-weight: 850; cursor: pointer; }
.map-search button { min-width: 72px; height: 42px; }
.map-search button:disabled { cursor: wait; opacity: .6; }
.map-mode-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid #d5e0da; border-radius: 11px; background: #fff; }
.map-mode-switch button { min-width: 54px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 800; cursor: pointer; }
.map-mode-switch button.active { background: var(--green); color: #fff; }
.map-search-results { position: absolute; z-index: 24; top: 137px; left: 14px; width: min(560px, calc(100% - 28px)); max-height: 280px; overflow-y: auto; padding: 6px; border: 1px solid #cad9d1; border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: 0 18px 50px rgba(12,45,35,.2); }
.map-search-results[hidden] { display: none; }
.map-search-result { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.map-search-result:hover, .map-search-result:focus-visible { outline: none; background: #eef7f2; }
.map-search-result > span:first-child { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--mint); color: var(--green); font-size: 10px; font-weight: 900; }
.map-search-result div { min-width: 0; display: grid; gap: 3px; }
.map-search-result strong, .map-search-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-search-result strong { font-size: 12px; }
.map-search-result small { color: var(--ink-soft); font-size: 10px; }
.map-search-result > i { color: var(--green); font-size: 18px; font-style: normal; }
.map-search-empty { margin: 0; padding: 18px; color: var(--ink-soft); font-size: 12px; text-align: center; }
.map-dialog__canvas { position: relative; min-height: 360px; background: #e8eeea; cursor: crosshair; }
.map-dialog__canvas .ol-viewport { font-family: inherit; }
.map-dialog__canvas .ol-control button { background: rgba(23,63,55,.86); }
.map-dialog__canvas .ol-zoom { top: 14px; left: 14px; }
.map-dialog__canvas .ol-attribution { right: 10px; bottom: 10px; max-width: calc(100% - 20px); }
.map-click-guide { position: absolute; z-index: 4; left: 50%; top: 12px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.85); border-radius: 9px; background: rgba(255,255,255,.9); color: #34564c; font-size: 10px; font-weight: 750; transform: translateX(-50%); pointer-events: none; backdrop-filter: blur(8px); }
.map-dialog__loading, .map-dialog__error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 13px; margin: 0; padding: 30px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.map-dialog__loading { z-index: 8; background: rgba(232,238,234,.86); }
.map-dialog__loading i { width: 28px; height: 28px; border: 3px solid #b9cbc2; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.map-dialog__error { z-index: 9; color: #a23d37; font-weight: 700; background: rgba(255,255,255,.9); }
.map-dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px 16px; }
.map-selection-copy { min-width: 0; display: grid; grid-template-columns: auto auto; align-items: center; justify-content: start; gap: 4px 14px; color: var(--ink-soft); font-size: 10px; }
.map-selection-copy b { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; }
.map-selection-copy b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-selection-copy b i { width: 13px; height: 10px; flex: 0 0 auto; border: 2px solid #fff; border-radius: 3px; background: rgba(245,29,118,.3); box-shadow: 0 0 0 2px #f51d76; }
.map-selection-copy small { grid-column: 1 / -1; color: #778984; font-size: 10px; line-height: 1.5; }
.map-select-action { min-width: 128px; min-height: 44px; padding: 0 16px; }
.map-select-action:hover { background: var(--green-dark); }
.map-select-action:disabled { cursor: not-allowed; opacity: .42; }

.report-dialog { width: min(1180px, calc(100% - 24px)); height: min(920px, calc(100% - 24px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 22px; background: transparent; color: var(--ink); box-shadow: 0 32px 110px rgba(9, 34, 27, .35); }
.report-dialog::backdrop { background: rgba(15, 38, 31, .62); backdrop-filter: blur(6px); }
.report-dialog__panel { height: 100%; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 22px; background: #e8ecea; }
.report-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px 15px 22px; border-bottom: 1px solid #d4ded8; background: var(--paper); }
.report-dialog__head small { color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.report-dialog__head h2 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.035em; }
.report-dialog__head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; }
.report-dialog__actions { display: flex; align-items: center; gap: 8px; }
.report-dialog__actions a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 11px; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; }
.report-dialog__actions a:hover, .report-dialog__actions a:focus-visible { background: var(--green-dark); outline: none; }
.report-dialog__actions button { width: 40px; height: 40px; border: 1px solid #d6e1db; border-radius: 11px; background: #fff; color: var(--ink-soft); font-size: 24px; line-height: 1; cursor: pointer; }
.report-dialog__actions button:hover, .report-dialog__actions button:focus-visible { border-color: var(--green); outline: none; color: var(--green); }
.report-dialog iframe { width: 100%; height: 100%; border: 0; background: #e8ecea; }

.download-report { position: fixed; z-index: -10; top: 0; left: -12000px; width: 794px; padding: 54px 58px; background: #fff; color: #17342e; font-family: "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif; }
.download-report__brand { margin: 0 0 12px; color: #176b54; font-size: 14px; font-weight: 800; letter-spacing: .06em; }
.download-report h1 { margin: 0; color: #17342e; font-family: inherit; font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.download-report h1.compact { font-size: 25px; }
.download-report__address { margin: 14px 0 0; color: #294b41; font-size: 20px; font-weight: 800; }
.download-report__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; color: #687a73; font-size: 11px; }
.download-report section { margin-top: 30px; }
.download-report__continuation { margin-top: 22px !important; }
.download-report section h2 { margin: 0 0 10px; padding-left: 10px; border-left: 4px solid #176b54; font-size: 18px; }
.download-report table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.download-report th, .download-report td { padding: 9px 10px; border: 1px solid #d9e1dd; vertical-align: top; line-height: 1.5; overflow-wrap: anywhere; }
.download-report th { background: #eaf3ef; color: #17342e; font-weight: 800; text-align: left; }
.download-report .key-value th { width: 23%; }
.download-report .data-table thead th { background: #176b54; color: #fff; }
.download-report__empty { padding: 12px; border: 1px solid #d9e1dd; color: #687a73; font-size: 11px; }
.download-report__notice { margin: 30px 0 0; padding: 13px 15px; border-radius: 8px; background: #f5f2e9; color: #6f674f; font-size: 10px; line-height: 1.65; }
.download-report__footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 17px; padding-top: 12px; border-top: 1px solid #d9e1dd; color: #78857f; font-size: 9px; }
.download-report__vicinity { margin-top: 24px !important; }
.download-report__map { width: 100%; aspect-ratio: 1024 / 620; overflow: hidden; border: 1px solid #cbd9d2; border-radius: 12px; background: #edf2ef; }
.download-report__map img { width: 100%; height: 100%; display: block; object-fit: cover; }
.download-report__map-error { height: 100%; display: grid; place-items: center; padding: 40px; color: #687a73; font-size: 13px; line-height: 1.7; text-align: center; }
.download-report__map-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 13px; color: #687a73; font-size: 10px; }
.download-report__map-caption strong { display: flex; align-items: center; gap: 7px; color: #294b41; font-size: 11px; }
.download-report__map-caption i { width: 13px; height: 10px; border: 2px solid #fff; border-radius: 3px; background: rgba(245,29,118,.3); box-shadow: 0 0 0 2px #f51d76; }
.download-report__vicinity > p { margin: 17px 0 0; padding: 13px 15px; border-radius: 8px; background: #f5f2e9; color: #6f674f; font-size: 10px; line-height: 1.65; }

.process { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 22px; margin: 60px auto; padding: 0 30px; }
.process article { display: flex; align-items: center; gap: 13px; }
.process article > span { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #c9d8d0; border-radius: 50%; color: var(--green); font-family: Georgia, serif; font-weight: 700; }
.process strong { font-size: 13px; }
.process p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; }
.process i { width: 38px; height: 1px; background: #c9d8d0; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px max(20px, calc((100% - 1120px) / 2)); border-top: 1px solid #d9dfda; color: var(--ink-soft); font-size: 11px; }
footer strong { color: var(--ink); font-size: 12px; }
footer p { margin: 0; }
footer a { color: var(--green); font-weight: 700; text-decoration: none; }
footer a:hover, footer a:focus-visible { text-decoration: underline; }

@media (max-width: 760px) {
  .site-header, main { width: min(100% - 28px, 1120px); }
  .site-header { padding-top: max(18px, env(safe-area-inset-top)); }
  .official-note { display: none; }
  .hero { margin-top: 54px; }
  h1 { font-size: clamp(38px, 11vw, 54px); }
  .hero-copy { font-size: 15px; }
  .search-field { min-height: 64px; padding: 6px 6px 6px 17px; border-radius: 18px; }
  .search-field input { padding: 0 11px; font-size: 15px; }
  .search-field button { min-width: 88px; height: 50px; padding: 0 12px; }
  .history-autocomplete { top: 91px; border-radius: 16px; }
  .recent-history__list { grid-template-columns: 1fr; }
  .search-results { padding: 18px; }
  .lookup-progress { padding: 22px 18px; }
  .lookup-steps { grid-template-columns: 1fr; }
  .lookup-skeleton { grid-template-columns: 1fr 1fr; }
  .summary { padding: 24px 18px; border-radius: 22px; }
  .summary-heading { align-items: flex-start; }
  .fact-grid { grid-template-columns: 1fr 1fr; gap: 20px 0; }
  .fact-grid > div { padding: 0 14px; }
  .fact-grid > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .summary-grid { grid-template-columns: 1fr; }
  .info-card--wide { grid-column: auto; }
  .summary-actions { flex-direction: column; }
  .map-dialog { width: calc(100% - 20px); border-radius: 18px; }
  .map-dialog__panel { grid-template-rows: auto auto minmax(300px, 52dvh) auto; border-radius: 18px; }
  .map-dialog__head { padding: 15px 16px 13px; }
  .map-dialog__head h2 { font-size: 18px; }
  .map-dialog__toolbar { align-items: stretch; flex-direction: column; padding: 9px; }
  .map-search-results { top: 184px; left: 9px; width: calc(100% - 18px); }
  .map-mode-switch button { flex: 1; }
  .map-dialog__canvas { min-height: 300px; }
  .map-click-guide { top: 10px; max-width: calc(100% - 90px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .map-dialog__foot { align-items: stretch; flex-direction: column; gap: 11px; padding: 12px 14px 14px; }
  .map-selection-copy { grid-template-columns: 1fr; gap: 4px; }
  .map-selection-copy small { grid-column: auto; }
  .map-select-action { width: 100%; }
  .report-dialog { width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 15px; }
  .report-dialog__panel { border-radius: 15px; }
  .report-dialog__head { align-items: flex-start; padding: 12px; }
  .report-dialog__head h2 { font-size: 15px; }
  .report-dialog__head p { max-width: 48vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .report-dialog__actions a { min-height: 38px; padding: 0 11px; font-size: 11px; }
  .report-dialog__actions button { width: 38px; height: 38px; }
  .process { grid-template-columns: 1fr; gap: 14px; padding: 0 10px; }
  .process i { width: 1px; height: 14px; margin-left: 17px; }
  footer { flex-direction: column; padding-bottom: max(25px, env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .brand-copy small { display: none; }
  .hero { margin-top: 40px; }
  .hero-copy br { display: none; }
  .search-field svg { display: none; }
  .history-autocomplete__item { grid-template-columns: auto 1fr; }
  .history-autocomplete__arrow { display: none; }
  .result-item { grid-template-columns: auto 1fr; }
  .result-arrow { display: none; }
  .fact-grid dd { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
