:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --card: #fafafa;
  --edge: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.site-header, .site-footer { text-align: center; padding: 40px 20px; }
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.logo-icon {
  font-size: 36px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
.logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.5px;
}
.site-header h1 {
  margin: 0 0 16px;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -1px;
  color: var(--fg);
}
.site-header p { 
  margin: 0; 
  color: var(--muted); 
  font-size: 18px; 
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; }

.card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

form label { 
  display: flex; 
  align-items: center;
  gap: 8px;
  margin-bottom: 8px; 
  color: var(--fg); 
  font-size: 14px; 
  font-weight: 500;
  letter-spacing: 0.025em;
}
.label-icon {
  font-size: 16px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
.address-inputs { display: grid; gap: 12px; }
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 12px;
  font-size: 16px;
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
.address-inputs input[type="text"] {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}
.address-inputs input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.address-actions { margin-top: 12px; display: flex; gap: 12px; }
.type-row { margin-top: 20px; }
.type-row select {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.type-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.actions { margin-top: 24px; }
button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  font-family: inherit;
  transition: background-color 0.2s ease;
}
button:hover { background: var(--accent-hover); }
button#remove-address { 
  background: var(--muted); 
  color: white;
}
button#remove-address:hover { 
  background: #4b5563; 
}
button:disabled { 
  opacity: 0.6; 
  cursor: not-allowed; 
  background: var(--muted);
}
.hint { 
  color: var(--muted); 
  font-size: 14px; 
  margin-top: 12px; 
  font-style: italic;
}

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
}

.results h2, .map h3 { 
  margin: 0 0 16px; 
  font-size: 24px; 
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-icon {
  font-size: 20px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
.summary { 
  color: var(--muted); 
  margin-bottom: 16px; 
  font-size: 16px; 
  padding: 12px 16px;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--edge);
}
.results-list { 
  margin: 0; 
  padding: 0;
  display: grid; 
  gap: 12px; 
  list-style: none;
}
.results-list li { 
  padding: 16px; 
  border-radius: 8px; 
  background: var(--bg); 
  border: 1px solid var(--edge);
  transition: box-shadow 0.2s ease;
}
.results-list li:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.results-list a { 
  color: var(--fg); 
  text-decoration: none; 
  font-weight: 500;
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}
.results-list a:hover { 
  color: var(--accent);
  text-decoration: underline; 
}
.results-list .meta { 
  font-size: 14px; 
  color: var(--muted); 
  margin-top: 8px;
  line-height: 1.4;
}

.map-canvas { 
  width: 100%; 
  height: 520px; 
  border-radius: 12px; 
  overflow: hidden; 
  border: 1px solid var(--edge);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-footer { 
  color: var(--muted); 
  font-size: 14px; 
  padding: 20px;
  border-top: 1px solid var(--edge);
  margin-top: 40px;
}


