:root {
    --bg: #dfe7ee;
    --panel: rgba(255, 255, 255, 0.92);
    --border: rgba(16, 24, 40, 0.12);
    --text: #12202f;
    --muted: #52606d;
    --ok: #246b3b;
    --warn: #9a6700;
    --pending: #38557a;
    --shadow: 0 14px 40px rgba(20, 36, 58, 0.16);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 30%),
        linear-gradient(180deg, #edf3f8 0%, #d9e4ec 100%);
}

body {
    min-height: 100%;
}

.app-shell {
    height: 100%;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    z-index: 4000;
    overflow-x: auto;
    overflow-y: hidden;
}

.topbar h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}

.topbar p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.status-panel {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.gps-toggle {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.gps-off {
    color: #7a2030;
}

.gps-on {
    color: var(--ok);
}

.utility-hidden {
    visibility: hidden;
    pointer-events: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    white-space: nowrap;
}

#networkStatus {
    min-width: 108px;
}

#tileStatus {
    min-width: 150px;
}

#poiStatus {
    min-width: 118px;
}

.status-ok {
    color: var(--ok);
    background: rgb(204, 232, 212);
    border-color: rgb(122, 177, 137);
}

.status-warn {
    color: var(--warn);
    background: rgb(243, 212, 212);
    border-color: rgb(205, 139, 139);
}

.status-pending {
    color: var(--pending);
    background: rgb(216, 226, 241);
    border-color: rgb(145, 167, 201);
}

#map {
    width: 100%;
    height: 100vh;
}

.leaflet-top.leaflet-right {
    top: 110px;
}

.startup-warning {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 76px;
    z-index: 4100;
    padding: 10px 12px;
    border: 1px solid rgba(140, 70, 30, 0.45);
    background: rgba(255, 244, 212, 0.96);
    color: #4f2d12;
    font-size: 13px;
    line-height: 1.35;
    box-shadow: 0 6px 18px rgba(20, 36, 58, 0.16);
}

.startup-warning strong {
    display: inline-block;
    margin-bottom: 4px;
}

.startup-warning ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.startup-warning li {
    margin: 4px 0;
}

.startup-warning code {
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
}

.startup-warning-note {
    margin-top: 8px;
}

.zoom-rail {
    position: fixed;
    left: 14px;
    top: 110px;
    bottom: 38px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
}

.zoom-rail-button {
    min-width: 42px;
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: #4b5563;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(20, 36, 58, 0.12);
}

.zoom-rail-button.zoom-cached {
    background: rgba(173, 216, 230, 0.78);
    color: #0f3550;
}

.zoom-rail-button.zoom-current {
    border-color: #083f68;
    color: #000;
    box-shadow: 0 0 0 2px rgba(10, 85, 140, 0.55), 0 4px 12px rgba(20, 36, 58, 0.18);
}

.zoom-rail-button.zoom-current.zoom-cached {
    background: rgba(123, 192, 218, 0.95);
    border-color: #084e7a;
    color: #000;
}

.zoom-rail-button.zoom-control {
    font-size: 24px;
    min-height: 34px;
}

.gps-info {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    min-width: 220px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    font-size: 12px;
    line-height: 1.45;
}

.gps-info.gps-hidden {
    display: none !important;
}

.measure-info {
    position: fixed;
    left: 65px;
    top: 65px;
    right: auto;
    bottom: auto;
    z-index: 1000;
    display: inline-block;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #000;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: none;
    font-size: 11px;
    line-height: 1.35;
    text-align: left;
    white-space: nowrap;
}

.measure-hidden {
    display: none;
}

.edit-info {
    position: fixed;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 0;
    width: fit-content;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 250, 228, 0.96);
    box-shadow: var(--shadow);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    white-space: nowrap;
}

.download-progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    margin: 7px 0 5px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(36, 107, 59, 0.35);
    background: rgba(255, 255, 255, 0.72);
}

.download-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: #79b48c;
}

.edit-hidden {
    display: none;
}

.fadenkreuz {
    position: fixed;
    left: -9999px;
    top: -9999px;
    z-index: 1004;
    width: 30px;
    height: 30px;
    pointer-events: none;
    text-align: center;
}

.fadenkreuz-hidden {
    display: none;
}

.fadenkreuz img {
    display: block;
    width: 30px;
    height: 30px;
}

.richtungspfeil {
    position: fixed;
    left: -9999px;
    top: -9999px;
    z-index: 1003;
    width: 60px;
    height: 60px;
    pointer-events: none;
    text-align: center;
    overflow: visible;
}

.richtungspfeil-hidden {
    display: none;
}

.richtungspfeil-icon {
    position: absolute;
    left: 50%;
    top: 0;
    width: 0;
    height: 0;
    margin-left: -16px;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 38px solid rgba(10, 85, 140, 0.95);
    filter: drop-shadow(0 0 0.5px rgba(255,255,255,0.95)) drop-shadow(0 0 2px rgba(255,255,255,0.95));
    transform-origin: 50% 85%;
}

.richtungspfeil-projection {
    position: absolute;
    left: 50%;
    bottom: 30px;
    width: 3px;
    height: 18px;
    border-radius: 2px;
    background: rgba(10, 85, 140, 0.8);
    box-shadow: 0 0 0.5px rgba(255,255,255,0.95), 0 0 2px rgba(255,255,255,0.95);
    transform-origin: 50% 100%;
    display: none;
}

.angle-overlay {
    position: fixed;
    left: -9999px;
    top: -9999px;
    z-index: 900;
    width: 480px;
    height: 480px;
    pointer-events: auto;
}

.angle-hidden {
    display: none;
}

.angle-overlay img {
    display: block;
    width: 480px;
    height: 480px;
    user-select: none;
    -webkit-user-drag: none;
}

.gps-heading {
    width: 16px;
    height: 16px;
    border-top: 16px solid #0a558c;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    transform-origin: 50% 70%;
}

.gps-position-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0a558c;
    border: 3px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(10, 85, 140, 0.45);
}

.ft-poi-popup h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.ft-poi-popup .desc {
    font-size: 12px;
    line-height: 1.35;
}

.ft-poi-popup a,
.leaflet-popup-content a {
    color: #0a558c;
    text-decoration: none;
}

.leaflet-popup-content .edit-action {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border: 1px solid rgba(10, 85, 140, 0.2);
    border-radius: 8px;
    background: rgba(10, 85, 140, 0.08);
}

.leaflet-popup.ft-poi-popup-passive,
.leaflet-popup.ft-poi-popup-passive .leaflet-popup-content-wrapper,
.leaflet-popup.ft-poi-popup-passive .leaflet-popup-tip-container {
    pointer-events: none;
}

.leaflet-popup.ft-poi-popup-passive .leaflet-popup-close-button {
    pointer-events: auto;
}

.depth-label {
    color: #083358;
    font-size: 11px;
    font-weight: bold;
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.95),
        1px -1px 0 rgba(255, 255, 255, 0.95),
        -1px 1px 0 rgba(255, 255, 255, 0.95),
        1px 1px 0 rgba(255, 255, 255, 0.95);
    white-space: nowrap;
}

.grid-label {
    color: rgba(8, 51, 88, 0.75);
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.95),
        1px -1px 0 rgba(255, 255, 255, 0.95),
        -1px 1px 0 rgba(255, 255, 255, 0.95),
        1px 1px 0 rgba(255, 255, 255, 0.95);
}

@media (max-width: 900px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-panel {
        justify-content: flex-start;
    }
}

@media (max-width: 1100px) {
    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .topbar > div:first-child {
        flex: 1 1 100%;
        min-width: 0;
    }

    .status-panel {
        flex: 1 1 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .gps-toggle,
    .status-pill {
        min-height: 30px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .leaflet-top.leaflet-right {
        top: 110px;
    }

    .edit-info {
        top: 74px;
        max-width: calc(100vw - 32px);
    }
}

@media (max-width: 760px) {
    .topbar {
        padding: 8px 10px;
        gap: 8px;
    }

    .topbar h1 {
        font-size: 18px;
    }

    .topbar p {
        font-size: 11px;
        margin-top: 2px;
    }

    .status-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        align-items: stretch;
        width: 100%;
    }

    .gps-toggle,
    .status-pill {
        width: 100%;
        min-width: 0 !important;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.2;
    }

    .leaflet-top.leaflet-right {
        top: 198px;
        right: 10px;
    }

    .zoom-rail {
        left: 8px;
        top: 198px;
        bottom: 16px;
    }

    .zoom-rail-button {
        min-width: 36px;
        min-height: 26px;
        font-size: 14px;
    }

    .zoom-rail-button.zoom-control {
        min-height: 30px;
        font-size: 20px;
    }

    .gps-info {
        left: 10px;
        right: 10px;
        min-width: 0;
        width: auto;
        bottom: 10px;
    }

    .measure-info {
        left: 65px;
        right: auto;
        top: 65px;
        bottom: auto;
        min-width: 0;
        width: auto;
        max-width: none;
        white-space: nowrap;
    }

    .edit-info {
        top: 62px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: 0;
        width: fit-content;
        max-width: calc(100vw - 20px);
    }
}

@media (max-width: 480px) {
    .status-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar h1 {
        font-size: 16px;
    }

    .topbar p {
        display: none;
    }

    .leaflet-top.leaflet-right {
        top: 188px;
    }

    .zoom-rail {
        top: 188px;
    }

    .edit-info {
        top: 58px;
    }
}

.gps-toggle,
.status-pill {
    font-size: 13px;
}

.icon-button {
    position: relative;
    padding-left: 34px;
    min-width: 108px;
    background-position: 10px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
}

.icon-gps { background-image: url('../../Grafik/Seekarte/ft-track2-off.png'); }
.icon-angle { background-image: url('../../Grafik/Seekarte/ft-winkelmesser.png'); }
.icon-edit { background-image: url('../../Grafik/Seekarte/edit_mode.png'); }
.icon-measure { background-image: url('../../Grafik/Seekarte/ft-lineal.png'); }
.icon-measure-clear { background-image: url('../../Grafik/Seekarte/ft-lineal.png'); }
.icon-grid { background-image: url('../../Grafik/Seekarte/ft-grid.png'); }
.icon-tiles { background-image: url('../../Grafik/Seekarte/ft-gettiles.png'); }
.icon-update { background-image: url('../../Grafik/Seekarte/ft-data-zip.png'); }

@media (max-width: 1100px) {
    .gps-toggle,
    .status-pill {
        font-size: 12px;
    }

    .icon-button {
        min-width: 96px;
        padding-left: 32px;
        background-position: 9px center;
        background-size: 15px 15px;
    }
}

@media (max-width: 760px) {
    .gps-toggle,
    .status-pill {
        font-size: 12px;
    }

    .icon-button {
        min-width: 0;
        padding-left: 30px;
        background-position: 8px center;
        background-size: 15px 15px;
    }
}

@media (max-width: 480px) {
    .gps-toggle,
    .status-pill {
        font-size: 13px;
    }

    .icon-button {
        min-width: 0;
        min-height: 34px;
        padding: 6px 8px 6px 30px;
        background-position: 8px center;
        background-size: 16px 16px;
    }

    #networkStatus,
    #tileStatus,
    #poiStatus {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .icon-button {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        min-height: 36px;
        padding: 0;
        background-position: center center;
        background-size: 18px 18px;
        text-indent: -9999px;
        overflow: hidden;
        white-space: nowrap;
        border-radius: 10px;
    }

    .status-panel {
        grid-template-columns: repeat(4, minmax(0, 40px)) repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    #networkStatus,
    #tileStatus,
    #poiStatus {
        text-indent: 0;
        overflow: visible;
        white-space: normal;
    }
}

.topbar-brand {
    flex: 0 0 auto;
}

.topbar-brand h1 {
    font-size: 16px;
    line-height: 1;
}

.topbar-brand p {
    display: none;
}

.status-panel {
    gap: 6px;
}

.gps-toggle.icon-button {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    min-height: 34px;
    padding: 0;
    background-position: center center;
    background-size: 18px 18px;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 10px;
}

#measureClear {
    background-image: url('../../ft-delete.png');
}

@media (max-width: 1100px) {
    .topbar {
        gap: 10px;
        padding: 10px 12px;
    }

    .topbar-brand h1 {
        font-size: 14px;
    }
}

@media (max-width: 760px) {
    .topbar-brand {
        display: none;
    }

    .status-panel {
        justify-content: flex-start;
    }
}

.topbar {
    left: 12px;
    right: auto;
    width: auto;
    display: block;
    padding: 0;
    overflow: visible;
}

.button-panel {
    display: grid;
    grid-template-columns: repeat(4, 76px);
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
}

.status-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.gps-toggle.icon-button {
    width: 76px;
    min-width: 76px;
    max-width: 76px;
    min-height: 68px;
    background-size: 36px 36px;
    border-radius: 14px;
}

@media (max-width: 1100px) {
    .button-panel {
        grid-template-columns: repeat(4, 68px);
    }

    .gps-toggle.icon-button {
        width: 68px;
        min-width: 68px;
        max-width: 68px;
        min-height: 60px;
        background-size: 32px 32px;
    }
}

@media (max-width: 760px) {
    .button-panel {
        grid-template-columns: repeat(4, 60px);
        gap: 6px;
        padding: 8px;
    }

    .gps-toggle.icon-button {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        min-height: 54px;
        background-size: 28px 28px;
    }

    .status-panel {
        top: auto;
        right: 12px;
        bottom: 12px;
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (max-width: 480px) {
    .button-panel {
        grid-template-columns: repeat(4, 54px);
    }

    .gps-toggle.icon-button {
        width: 54px;
        min-width: 54px;
        max-width: 54px;
        min-height: 48px;
        background-size: 24px 24px;
    }
}

.topbar {
    left: 12px;
    right: auto;
    width: auto;
    display: block;
    padding: 0;
    overflow: visible;
}

.button-panel {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 6px;
    padding: 6px;
    background: transparent;
    border-radius: 0;
}

.gps-toggle.icon-button {
    width: 76px;
    min-width: 76px;
    max-width: 76px;
    min-height: 68px;
    background-color: transparent;
    background-position: center center;
    background-size: 36px 36px;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.zoom-rail {
    left: 14px;
    top: 96px;
    bottom: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    padding: 0;
    background: transparent;
}

.zoom-rail-button {
    box-shadow: none;
}

@media (max-width: 1100px) {
    .button-panel {
        gap: 5px;
        padding: 5px;
    }

    .gps-toggle.icon-button {
        width: 68px;
        min-width: 68px;
        max-width: 68px;
        min-height: 60px;
        background-size: 32px 32px;
    }

    .zoom-rail {
        top: 88px;
    }
}

@media (max-width: 760px) {
    .button-panel {
        gap: 4px;
        padding: 4px;
    }

    .gps-toggle.icon-button {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        min-height: 54px;
        background-size: 28px 28px;
    }

    .status-panel {
        top: auto;
        right: 12px;
        bottom: 12px;
        flex-direction: column;
        align-items: flex-end;
    }

    .zoom-rail {
        top: 80px;
    }
}

@media (max-width: 480px) {
    .gps-toggle.icon-button {
        width: 54px;
        min-width: 54px;
        max-width: 54px;
        min-height: 48px;
        background-size: 24px 24px;
    }

    .zoom-rail {
        top: 72px;
    }
}

.button-panel {
    gap: 2px;
    padding: 2px;
}

.gps-toggle.icon-button {
    width: 76px;
    min-width: 76px;
    max-width: 76px;
    min-height: 68px;
    margin: 0;
}

.zoom-rail {
    left: 14px;
    top: 110px;
    bottom: 38px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    background: transparent;
}

.status-panel {
    position: fixed;
    left: 15px;
    right: auto;
    top: auto;
    bottom: 3px;
    display: inline-flex;
    gap: 4px;
    justify-content: flex-start;
    align-items: center;
    padding: 2px 6px;
    background: rgba(255,255,255,0.85);
    border: 1px solid #000;
    border-radius: 8px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    white-space: nowrap;
}

.status-pill {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 10px;
}

#networkStatus,
#tileStatus,
#poiStatus {
    min-width: 0;
}

@media (max-width: 1100px) {
    .button-panel {
        gap: 2px;
        padding: 2px;
    }

    .status-panel {
        bottom: 3px;
    }
}

@media (max-width: 760px) {
    .button-panel {
        gap: 2px;
        padding: 2px;
    }

    .status-panel {
        left: 12px;
        bottom: 8px;
        flex-direction: row;
        align-items: center;
    }

    .zoom-rail {
        top: 88px;
        bottom: 54px;
    }
}

@media (max-width: 480px) {
    .status-panel {
        left: 10px;
        bottom: 8px;
        font-size: 9px;
    }

    .status-pill {
        font-size: 9px;
    }

    .zoom-rail {
        top: 80px;
        bottom: 50px;
    }
}

.icon-search { background-image: url('../../Grafik/Seekarte/ft-suche.png'); }
.icon-tiles { background-image: url('../../Grafik/Seekarte/maperitive.png'); }

.icon-grid.gps-on { background-image: url('../../Grafik/Seekarte/ft-grid_on.png'); }
.grid-label {
    display: inline-block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #083f68;
    white-space: nowrap;
}

.gps-info {
    position: fixed;
    z-index: 1002;
    right: 20px;
    bottom: 35px;
    left: auto;
    min-width: 0;
    padding: 2px 6px;
    text-align: center;
    display: block;
    border: 1px solid #000;
    border-radius: 8px;
    background-color: #fff;
    opacity: 0.8;
    box-shadow: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 24px;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
}

@media (max-width: 760px) {
    .gps-info {
        font-size: 18px;
    }
}


.topbar {
    position: fixed;
    top: 6px;
    left: 6px;
    right: 6px;
    width: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    z-index: 2000;
    overflow-x: auto;
    overflow-y: hidden;
}

.old-button-panel {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 5px;
    padding: 5px;
    margin: 0;
    border: 1px solid rgba(8, 32, 48, 0.08);
    border-radius: 16px;
    background: rgba(246, 250, 252, 0.34);
    box-shadow: 0 8px 22px rgba(9, 28, 44, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: max-content;
}

.mainMenuButton {
    display: block;
    width: 45px;
    height: 45px;
    margin: 0;
    padding: 5px;
    border: 1px solid rgba(12, 43, 62, 0.18);
    border-radius: 13px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(222, 233, 238, 0.78));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 3px 9px rgba(6, 23, 36, 0.12);
    opacity: 0.78;
    cursor: pointer;
    transition: opacity 0.16s ease, transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.mainMenuButton:hover,
.mainMenuButton:focus-visible {
    opacity: 1;
    filter: saturate(1.08);
    transform: translateY(-1px);
    border-color: rgba(12, 43, 62, 0.38);
    outline: none;
}

.mainMenuButton[src*="_on"] {
    opacity: 1;
    border-color: rgba(36, 107, 59, 0.72);
    background:
        linear-gradient(180deg, rgba(234, 250, 238, 0.96), rgba(186, 225, 199, 0.88));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -2px 0 rgba(36, 107, 59, 0.18),
        0 0 0 2px rgba(36, 107, 59, 0.13),
        0 5px 13px rgba(6, 23, 36, 0.18);
}

#gpsToggle[src*="-on"] {
    opacity: 1;
    border-color: rgba(36, 107, 59, 0.72);
    background:
        linear-gradient(180deg, rgba(234, 250, 238, 0.96), rgba(186, 225, 199, 0.88));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -2px 0 rgba(36, 107, 59, 0.18),
        0 0 0 2px rgba(36, 107, 59, 0.13),
        0 5px 13px rgba(6, 23, 36, 0.18);
}

.mainMenuButton:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(6, 23, 36, 0.18);
}

.mainMenuButton.utility-hidden {
    display: none;
}

@media (max-width: 900px) {
    .old-button-panel {
        gap: 4px;
        padding: 4px;
        border-radius: 14px;
    }

    .mainMenuButton {
        width: 42px;
        height: 42px;
        padding: 5px;
        border-radius: 12px;
    }
}

@media (max-width: 640px) {
    .old-button-panel {
        gap: 3px;
        padding: 3px;
        border-radius: 12px;
    }

    .mainMenuButton {
        width: 37px;
        height: 37px;
        padding: 4px;
        border-radius: 10px;
    }
}


#zoomRail,
.leaflet-top.leaflet-right {
    transition: opacity 0.22s ease;
}

#zoomRail.touch-ui-hidden,
.leaflet-top.leaflet-right.touch-ui-hidden {
    opacity: 0;
    pointer-events: none;
}

.leaflet-top.leaflet-right {
    top: 110px;
}

.leaflet-top.leaflet-right .leaflet-control {
    margin-top: 0;
}

@media (max-width: 760px) {
    .leaflet-top.leaflet-right {
        top: 88px;
    }
}

@media (max-width: 480px) {
    .leaflet-top.leaflet-right {
        top: 80px;
    }
}
