html, body {
    height: 100%;
    margin: 0;
    background-color: #2b2b2b;
    --distance-marker-size: 24px;
    --distance-marker-font-size: 12px;
    --distance-marker-radius: 20px;
}
#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    z-index: 1;
}
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: rgba(43, 43, 43, 0.8);
    text-align: center;
    pointer-events: auto;
    padding: 10px 0;
}
header .logo {
    max-height: 50px;
    max-width: 30%;
    margin: 0 10px;
    display: inline-block;
}
.menu-toggle {
    position: absolute;
    top: 14px;
    right: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 10px 16px;
    font-family: Verdana, sans-serif;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hamburger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 20px;
}
.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
}
.controls {
    position: absolute;
    bottom: 10px; /* checkbox blijft onderaan */
    left: 10px;
    z-index: 999;
    background: rgba(0,0,0,0.5);
    padding: 6px 10px;
    border-radius: 6px;
    color: white;
    font-family: verdana;
    font-size: 14px;
    width: auto;
    display: flex;
    align-items: center;
    pointer-events: auto;
}
input {
    margin-left: 10px;
}
.leaflet-top.leaflet-left {
    top: 70px; /* zoom knoppen onder header */
}
.settings-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1090;
}
.settings-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.settings-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, calc(100vw - 24px));
    height: 100%;
    padding: 22px 20px 28px;
    box-sizing: border-box;
    background: rgba(28, 28, 28, 0.96);
    color: #fff;
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -16px 0 30px rgba(0, 0, 0, 0.28);
    overflow-y: auto;
    font-family: Verdana, sans-serif;
}
.settings-drawer.is-open {
    transform: translateX(0);
}
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.settings-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}
.menu-close {
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 9px 14px;
    font-family: inherit;
    cursor: pointer;
}
.settings-section {
    margin-bottom: 18px;
}
.settings-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}
.settings-section select,
.settings-section input[type="color"],
.settings-section input[type="range"] {
    width: 100%;
    margin-left: 0;
    box-sizing: border-box;
}
.settings-section select {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 12px;
    font-family: inherit;
    appearance: none;
}
.settings-section select option {
    background: #1f1f1f;
    color: #ffffff;
}
.settings-section input[type="color"] {
    height: 44px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}
.settings-section-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.settings-section-inline label {
    margin-bottom: 0;
}
.settings-section-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-left: 0;
}
.range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.range-row span {
    min-width: 62px;
    text-align: right;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
}
.settings-hint {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.4;
}
.settings-actions {
    margin-top: 28px;
}
.reset-settings {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}
@media (max-width: 640px) {
    header .logo {
        max-width: 44%;
    }
    .menu-toggle {
        top: 12px;
        right: 12px;
        padding: 9px 14px;
    }
    .controls {
        max-width: calc(100vw - 20px);
    }
}