.leaflet-container img,
.leaflet-container .leaflet-tile,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-shadow-pane img {
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
}

.leaflet-container .leaflet-pane img { box-sizing: content-box; }

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
    font-family: 'Geologica', -apple-system, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 40px;
    border-bottom: 4px solid #0054a6;
    flex: none;
}

.page-header__left { display: flex; align-items: center; gap: 22px; min-width: 0; }
.page-header__logo { display: block; line-height: 0; flex: none; }

.page-header__logo img { display: block; height: 71px; width: auto; }

.page-header__titles { min-width: 0; }

.page-header__title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.2;
    margin: 0;
    color: #1c1c1c;
}

.page-header__subtitle {
    font-size: 16px;
    color: #444;
    line-height: 1.3;
    margin: 2px 0 0;
}

.page-header__nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: none;
}

.page-header__nav a {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.page-header__nav a:hover { color: #0054a6; }

.page-header__link {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
}

.page-header__link:hover { color: #0054a6; }

.map-wrap { position: relative; flex: 1 1 auto; min-height: 0; }

#map {
    width: 100%;
    height: 100%;
    background: #e8e8e8;
}

.map-hint {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 90%;
    padding: 11px 16px;
    background: rgba(0, 84, 166, .95);
    color: #fff;
    font-size: 16px;
    line-height: 1.3;
    border-radius: 2px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .3);
    text-align: center;
}

.mappanel {
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .3);
    font-size: 16px;
    line-height: 1.4;
    min-width: 210px;
    max-width: 290px;
    max-height: 70vh;
    overflow-y: auto;
    color: #222;
}

.mappanel__title {
    font-weight: 600;
    font-size: 15px;
    color: #0054a6;
    margin: 0 0 8px;
}

.mappanel__group { margin: 0 0 12px; }
.mappanel__group:last-child { margin-bottom: 0; }

.mappanel__row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 5px;
    padding: 2px 0;
    font-weight: normal;
    cursor: pointer;
}

.mappanel__row:last-child { margin-bottom: 0; }

.mappanel__row--fixed {
    padding-left: 25px;
    cursor: default;
}

.mappanel__row input {
    margin: 0 !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px;
    flex: none;
    accent-color: #0054a6;
    cursor: pointer;
}

.mappanel__row input:disabled { cursor: not-allowed; }
.mappanel__row input:disabled + .mappanel__swatch { opacity: .35; }

.mappanel__swatch {
    width: 14px;
    height: 14px;
    flex: none;
    border-radius: 2px;
    display: inline-block;
}

.mappanel__note {
    font-size: 14px;
    line-height: 1.4;
    color: #565656;
    margin: 0 0 10px 29px;
}

.mappanel__note a {
    color: #0054a6;
    text-decoration: underline;
}

.mappanel__note a:hover { color: #003c78; }

.mappanel__swatch--line {
    height: 3px;
    border-radius: 0;
    align-self: center;
}

.mappanel__status {
    margin-left: auto;
    font-size: 14px;
    font-style: normal;
    color: #565656;
    white-space: nowrap;
}

.maptools {
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
}

a.maptool {
    display: block;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    color: #0054a6;
    border-bottom: 1px solid #ddd;
    text-decoration: none;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 18px 18px;
}

a.maptool:last-child { border-bottom: 0; }
a.maptool:hover { background-color: #f2f7fc; color: #0054a6; text-decoration: none; }
a.maptool.is-active { background-color: #0054a6; }

.maptool--reset {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230054a6' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18'/%3E%3Cpath d='M3 9h18M9 3v18'/%3E%3C/svg%3E");
}

.maptool--locate {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230054a6' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%230054a6'/%3E%3Cpath d='M12 1v3M12 20v3M1 12h3M20 12h3'/%3E%3C/svg%3E");
}

.maptool--measure {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230054a6' stroke-width='2'%3E%3Cpath d='M2 16L16 2l6 6L8 22z'/%3E%3Cpath d='M6 12l2 2M10 8l2 2M14 4l2 2'/%3E%3C/svg%3E");
}

.maptool--measure.is-active {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M2 16L16 2l6 6L8 22z'/%3E%3Cpath d='M6 12l2 2M10 8l2 2M14 4l2 2'/%3E%3C/svg%3E");
}

.leaflet-container.is-measuring { cursor: crosshair; }

.measure-label {
    background: #0054a6;
    border: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    box-shadow: none;
    white-space: nowrap;
}

.measure-label:before { border-right-color: #0054a6; }

.mapcard { min-width: 190px; max-width: 280px; }

.mapcard__title {
    font-weight: 600;
    font-size: 17px;
    color: #0054a6;
    margin: 0 0 6px;
    line-height: 1.25;
}

.mapcard__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.4;
}

.mapcard__table th,
.mapcard__table td {
    text-align: left;
    vertical-align: top;
    padding: 3px 0;
    border-bottom: 1px solid #eee;
}

.mapcard__table th {
    font-weight: normal;
    color: #565656;
    padding-right: 10px;
    white-space: nowrap;
    width: 1%;
}

.mapcard__table tr:last-child th,
.mapcard__table tr:last-child td { border-bottom: 0; }

.leaflet-popup-content { margin: 12px 14px; }

@media (max-width: 767px) {
    .page-header { padding: 12px 16px; gap: 12px; }
    .page-header__left { gap: 14px; }
    .page-header__logo img { height: 50px; }
    .page-header__title { font-size: 17px; }
    .page-header__subtitle { display: none; }
    .page-header__nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: none;
}

.page-header__nav a {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.page-header__nav a:hover { color: #0054a6; }

.page-header__link { display: none; }

    .mappanel {
        min-width: 0;
        max-width: 56vw;
        padding: 8px 10px;
        font-size: 12px;
    }

    .mappanel__note {
    font-size: 14px;
    line-height: 1.4;
    color: #565656;
    margin: 0 0 10px 29px;
}

.mappanel__swatch--line {
    height: 3px;
    border-radius: 0;
    align-self: center;
}

.mappanel__status { display: none; }

    .map-hint {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .mappanel { max-width: 62vw; }
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, .82);
    padding: 2px 7px;
    font-size: 12px;
    line-height: 1.5;
    color: #555;
}

.leaflet-control-attribution a { color: #0054a6; text-decoration: none; }
.leaflet-control-attribution a:hover { color: #0054a6; text-decoration: underline; }

.pcard { min-width: 200px; }

.pcard__date { font-size: 15px; color: #565656; margin: 0 0 6px; }

.pcard__text {
    font-size: 16px;
    line-height: 1.45;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.pcard__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

button.pcard__vote {
    border: 0;
    background: #0054a6;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    padding: 9px 16px;
    cursor: pointer;
}

button.pcard__vote:hover:not(:disabled) { background: #003c78; }
button.pcard__vote:disabled { background: #d4d4d4; color: #767676; }

.pcard__voted { font-size: 15px; color: #4f7a12; font-weight: 500; }
.pcard__votes { font-size: 15px; color: #333; font-weight: 500; }

.pcard__tag {
    margin: 12px 0 0;
    padding: 6px 10px;
    display: inline-block;
    background: #eef2f7;
    color: #0054a6;
    font-size: 14px;
}

.leaflet-container { font-family: inherit; }
.leaflet-popup-content { font-size: 16px; }
