:root {
  --brand-black: #0a0a0a;
  --brand-black-soft: #171717;
  --brand-red: #e30613;
  --brand-red-dark: #b0040e;
  --green: #1a7f37;
  --green-bg: #e6f6ea;
  --blue: #0b5ed7;
  --blue-bg: #e8f0fd;
  --red: #b3261e;
  --red-bg: #fdecea;
  --gray: #555;
  --gray-bg: #f0f0f0;
  --border: #d9dde3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f6f8fa;
  color: #1c1f24;
}

.topbar {
  background: #ffffff;
  padding: 18px 24px 14px;
  border-bottom: 4px solid var(--brand-red);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.brand {
  display: flex;
  align-items: center;
}

.logo-mark {
  height: 60px;
  width: auto;
  display: block;
}

.subtitle {
  margin: 8px 0 0 2px;
  font-size: 0.9rem;
  color: var(--gray);
}

main {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

.search-wrap {
  position: relative;
  margin-bottom: 16px;
  max-width: 720px;
}

#searchForm {
  display: flex;
  gap: 8px;
}

#addressInput {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: white;
}

#addressInput:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(227,6,19,0.15);
}

#searchButton {
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--brand-red);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

#searchButton:hover {
  background: var(--brand-red-dark);
}

#searchButton:disabled {
  opacity: 0.6;
  cursor: default;
}

#resetButton {
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-black);
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

#resetButton:hover {
  background: var(--gray-bg);
}

.suggestions {
  list-style: none;
  margin: 4px 0 0 0;
  padding: 4px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
}

.suggestions.hidden { display: none; }

.suggestions li {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.92rem;
}

.suggestions li:hover,
.suggestions li.active {
  background: var(--brand-red);
  color: white;
}

.result {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.98rem;
  line-height: 1.4;
}

.result.hidden { display: none; }

.result.serviced {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(26,127,55,0.25);
}

.result.serviceable {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid rgba(11,94,215,0.25);
}

.result.not-serviceable {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(179,38,30,0.25);
}

.result.unknown {
  background: var(--gray-bg);
  color: var(--gray);
  border: 1px solid var(--border);
}

.result strong { display: block; margin-bottom: 4px; font-size: 1.05rem; }

.result .nearby {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.1);
  color: #1c1f24;
}

.result .nearby strong {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.result .nearby ul {
  margin: 0;
  padding-left: 18px;
}

.result .nearby li {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.result .accuracy-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.82rem;
  font-style: italic;
  opacity: 0.75;
}

#map {
  height: 560px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.map-click-confirm {
  text-align: center;
}

.map-click-confirm p {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
}

.map-click-confirm-btn {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  background: var(--brand-red);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.map-click-confirm-btn:hover {
  background: var(--brand-red-dark);
}

.map-wrap {
  position: relative;
}

#satelliteToggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--brand-black);
  background: white;
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

#satelliteToggle:hover {
  background: var(--gray-bg);
}

#satelliteToggle.active {
  background: var(--brand-red);
  color: white;
  border-color: var(--brand-red-dark);
}

.loading-note {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  margin-top: 10px;
}

footer {
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  padding: 24px 0 40px;
}

footer code {
  color: var(--brand-red-dark);
  background: var(--gray-bg);
  padding: 1px 5px;
  border-radius: 4px;
}
