:root {
  color-scheme: light;
  --ink: #1d2a24;
  --muted: #66736c;
  --paper: #f6f2e8;
  --card: #fffdf8;
  --line: #d9d3c5;
  --green: #176b4c;
  --green-dark: #0d4d36;
  --mint: #d9eee3;
  --orange: #e86f3d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 4%, rgba(232, 111, 61, 0.16), transparent 25rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.hero { padding: 76px 0 48px; max-width: 780px; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 680px; margin-bottom: 18px; font-family: Georgia, serif; font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 500; letter-spacing: -0.055em; line-height: 0.92; }
.lede { max-width: 650px; margin-bottom: 34px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.55; }

form { max-width: 670px; }
label { display: block; margin-bottom: 8px; font-weight: 750; }
.form-row { display: flex; gap: 10px; }
input, button, .secondary-button { border-radius: 10px; font: inherit; }
input { min-width: 0; flex: 1; border: 1px solid var(--line); background: var(--card); padding: 16px 18px; color: var(--ink); font-size: 1.15rem; box-shadow: 0 5px 18px rgba(40, 52, 45, 0.06); }
input:focus { border-color: var(--green); outline: 3px solid rgba(23, 107, 76, 0.18); }
button, .secondary-button { border: 0; background: var(--green); color: white; padding: 15px 22px; font-weight: 750; cursor: pointer; text-decoration: none; }
button:hover, .secondary-button:hover { background: var(--green-dark); }
.form-message { min-height: 1.5em; margin: 9px 0 0; color: var(--muted); font-size: 0.9rem; }
.form-message.error { color: #a02f1f; font-weight: 650; }

.results { padding-bottom: 72px; }
.result-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
h2 { margin-bottom: 4px; font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 500; letter-spacing: -0.04em; }
.place-name { margin: 0; color: var(--muted); font-size: 1.05rem; }
.badge { flex: none; border: 1px solid #b8d9c7; border-radius: 99px; background: var(--mint); padding: 7px 11px; color: var(--green-dark); font-size: 0.78rem; font-weight: 800; }

.map-card, .address-card, .notice { border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 12px 30px rgba(40, 52, 45, 0.07); overflow: hidden; }
#area-map { height: min(56vw, 560px); min-height: 380px; background: #e8e3d8; }
.map-caption { display: flex; justify-content: space-between; gap: 18px; padding: 14px 18px; color: var(--muted); font-size: 0.83rem; }
.map-caption strong { color: var(--ink); }

.address-card { margin-top: 22px; padding: 24px; }
.address-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.address-heading h3 { margin-bottom: 0; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
#record-count { color: var(--muted); font-size: 0.86rem; }
.address-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: addresses; }
.address-list li { counter-increment: addresses; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.address-list li::before { content: counter(addresses, decimal-leading-zero); display: block; margin-bottom: 7px; color: var(--orange); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; }
.address-list strong, .address-list span { display: block; }
.address-list span { margin-top: 4px; color: var(--muted); font-size: 0.82rem; }
.empty-result { grid-column: 1 / -1; color: var(--muted); line-height: 1.55; }
.notice { margin-top: 22px; padding: 22px 24px; box-shadow: none; }
.notice p { margin: 5px 0 0; color: var(--muted); line-height: 1.55; }

footer { display: flex; justify-content: space-between; gap: 16px; width: min(1120px, calc(100% - 32px)); margin: 0 auto; border-top: 1px solid var(--line); padding: 22px 0 32px; color: var(--muted); font-size: 0.78rem; }

@media (max-width: 700px) {
  .hero { padding-top: 48px; }
  .form-row { flex-direction: column; }
  button { width: 100%; }
  .result-heading { align-items: start; flex-direction: column; gap: 10px; }
  .address-list { grid-template-columns: 1fr; }
  .map-caption, footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
