:root{
    --bg: #f0f0f0;
    --panel: #ffffff;
    --border: rgba(0,0,0,0.12);
    --shadow: 0 10px 28px rgba(0,0,0,0.10);
}
body{
    background: var(--bg);
    padding: 1rem;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
    margin: 0;
}
h2, h3{ margin: 0.25rem 0; }
.layout{
    display: flex;
    gap: 1rem;
    align-items: stretch;
}
.map-col{
    flex: 1 1 65%;
    min-width: 360px;
}
.side-col{
    flex: 0 0 440px;
    max-width: 560px;
    width: 100%;
}
.card{
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 0.85rem;
}
#map {
    height: calc(100vh - 160px);
    min-height: 520px;
    border-radius: 10px;
    overflow: hidden;
}
label, select{
    display: block;
}
select{
    width: 100%;
    padding: 0.45rem 0.6rem;
    margin-top: 0.35rem;
}
.muted{
    opacity: 0.78;
    font-size: 0.92rem;
    line-height: 1.35;
}
.row{
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
button{
    appearance: none;
    border: 1px solid var(--border);
    background: #111;
    color: #fff;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    font-weight: 600;
}
button:disabled{
    opacity: 0.5;
    cursor: not-allowed;
}
.pill{
    display: inline-block;
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.85rem;
}
.coords{
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Leaflet search control */
.leaflet-control.geocoder{
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
    padding: 8px;
    min-width: 280px;
}
.geocoder-row{
    display: flex;
    gap: 6px;
    align-items: center;
}
.geocoder-row input{
    flex: 1 1 auto;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
}
.geocoder-row button{
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: #111;
}
.geocoder-results{
    margin-top: 8px;
    max-height: 180px;
    overflow: auto;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 6px;
    display: none;
    color: #000;
}
.geocoder-results button{
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 7px 6px;
    cursor: pointer;
    color: #000;
    font-weight: 500;
}
.geocoder-results button:hover{
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
}

@media (max-width: 980px){
    .layout{ flex-direction: column; }
    .side-col{ flex: 1 1 auto; max-width: none; }
    #map{ height: 60vh; min-height: 420px; }
}

