.track-widget {
    position: relative;
    min-height: 560px;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 560px;
    background: #101820;
}

.track-header {
    position: absolute;
    z-index: 500;
    top: 22px;
    left: 22px;
    right: 22px;

    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;

    pointer-events: none;
}

.track-header > * {
    pointer-events: auto;
}

.track-header h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.track-range-control {
    position: absolute;
    z-index: 500;
    top: 94px;
    left: 22px;

    display: flex;
    gap: 8px;

    padding: 6px;
    border-radius: 999px;

    background: rgba(8,14,20,0.78);
    border: 1px solid rgba(255,255,255,0.12);

    backdrop-filter: blur(12px);
}

.track-range-control button {
    border: 0;
    border-radius: 999px;

    padding: 8px 13px;

    background: transparent;
    color: var(--text-soft);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.track-range-control button.active {
    background: rgba(79,180,255,0.18);
    color: #fff;
}

.track-footer {
    position: absolute;
    z-index: 500;
    left: 22px;
    bottom: 22px;

    padding: 10px 14px;
    border-radius: 999px;

    background: rgba(8, 14, 20, 0.78);
    border: 1px solid rgba(255,255,255,0.12);

    color: var(--text-soft);
    font-size: 13px;

    backdrop-filter: blur(12px);
}

.ym-anchor-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: rgba(8,14,20,0.86);
    border: 1px solid rgba(79,180,255,0.45);

    color: #ffffff;
    font-size: 20px;

    box-shadow:
        0 0 0 4px rgba(79,180,255,0.12),
        0 0 24px rgba(79,180,255,0.45);
}

.leaflet-control-attribution {
    background: rgba(8,14,20,0.72) !important;
    color: rgba(255,255,255,0.55) !important;
}

.leaflet-control-attribution a {
    color: rgba(255,255,255,0.75) !important;
}



@media (max-width: 600px) {
    .track-widget {
        border-radius: 0;
        min-height: 100vh;
    }

    #map {
        min-height: 100vh;
    }

    .track-header {
        flex-direction: column;
    }

    .track-header h1 {
        font-size: 24px;
    }

    .track-range-control {
        top: 130px;
        left: 16px;
        right: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .track-footer {
        left: 16px;
        right: 16px;
        text-align: center;
    }

.leaflet-popup-content-wrapper {
    border-radius: 18px;
    min-width: 380px;
}

.leaflet-popup-content {
    margin: 16px 18px !important;
    min-width: 340px;
    width: 340px !important;
}

.ym-anchor-popup .leaflet-popup-content-wrapper {
    width: 320px !important;
    max-width: 320px !important;
    border-radius: 18px;
}

.ym-anchor-popup .leaflet-popup-content {
    width: 280px !important;
    max-width: 280px !important;
    margin: 16px 20px !important;
}

.anchor-popup {
    width: 280px;
}

.anchor-popup-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1d2a36;
    white-space: nowrap;
}

.anchor-popup-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.anchor-popup-table th {
    width: 155px;
    text-align: left;
    font-weight: 700;
    color: #405060;
    padding: 3px 12px 3px 0;
    white-space: nowrap;
}

.anchor-popup-table td {
    text-align: left;
    color: #1d2a36;
    padding: 3px 0;
    white-space: nowrap;
}

}
