* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #3b2f1e;
  background: #fdf8ec;
}
#panel {
  width: 360px;
  max-width: 100%;
  padding: 16px;
  overflow-y: auto;
  border-right: 1px solid #e8dcc0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#map { flex: 1; min-height: 100%; }
h1 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: 8px; }
.tagline, .hint { margin: 4px 0 0; color: #7a6a4f; }
.hint { margin-top: -6px; font-size: 0.9em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#place-form { display: flex; gap: 6px; }
input[type="search"], select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d9c9a3;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
select { width: 100%; }
button {
  padding: 8px 12px;
  border: 1px solid #d9c9a3;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}
button:hover { background: #fbf1d9; }
button.primary { background: #d9a441; border-color: #c08a2a; color: #fff; font-weight: 600; }
button.primary:hover { background: #c08a2a; }
button:disabled { opacity: 0.6; cursor: wait; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

#place-results { list-style: none; margin: -6px 0 0; padding: 0; border: 1px solid #e8dcc0; border-radius: 8px; background: #fff; }
#place-results button { width: 100%; text-align: left; border: 0; border-radius: 0; font-size: 0.9em; }

fieldset { border: 1px solid #e8dcc0; border-radius: 8px; margin: 0; padding: 8px 12px; }
legend { font-weight: 600; padding: 0 4px; }
#categories label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.swatch { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.35); flex: none; }

#status { min-height: 1.4em; font-weight: 500; }
#status.error { color: #b42318; }

#results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#results li {
  padding: 8px 10px;
  border: 1px solid #e8dcc0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
#results li:hover, #results li:focus { border-color: #d9a441; }
.r-title { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.r-meta { font-size: 0.85em; color: #7a6a4f; }
.r-links { font-size: 0.85em; display: flex; gap: 10px; margin-top: 2px; }
a { color: #8a5a00; }

footer { margin-top: auto; font-size: 0.8em; color: #7a6a4f; }

.popup-title { font-weight: 600; }

@media (max-width: 720px) {
  body { flex-direction: column-reverse; }
  #panel { width: 100%; height: 55%; border-right: 0; border-top: 1px solid #e8dcc0; }
  #map { min-height: 45%; }
}
