html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f6f8;
}

* {
    box-sizing: border-box;
}

body {
    overflow: hidden;
}

.app-header {
    height: 63px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #ffffff;
    border-bottom: 1px solid #e0e3e7;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    position: relative;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: #f1f3f5;
    font-size: 20px;
}

.app-title {
    font-size: 17px;
    line-height: 1.05;
    font-weight: 750;
    color: #20252b;
}

.app-subtitle {
    margin-top: 3px;
    font-size: 11px;
    color: #6b7280;
}

.app-main {
    height: calc(100vh - 63px);
}

.map-page {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.route-toolbar {
    position: absolute;
    z-index: 20;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    max-width: calc(100% - 20px);
    padding: 7px;
    border-radius: 13px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 4px 18px rgba(0,0,0,.15);
    overflow-x: auto;
    scrollbar-width: none;
}

.route-toolbar::-webkit-scrollbar {
    display: none;
}

.route-btn {
    flex: 0 0 auto;
    min-width: 85px;
    padding: 8px 13px;
    border: 1px solid #d2d6dc;
    border-radius: 9px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.route-btn.active {
    background: #20252b;
    color: #ffffff;
    border-color: #20252b;
}

.status-bar {
    position: absolute;
    z-index: 19;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.status-bar.error {
    background: #fff2f2;
}

.route-info-card {
    position: absolute;
    z-index: 20;
    left: 12px;
    bottom: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(95px, auto));
    gap: 20px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 4px 18px rgba(0,0,0,.17);
}

.info-label {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    color: #6b7280;
}

.route-info-card strong {
    display: block;
    font-size: 13px;
}

.map-popup {
    min-width: 210px;
    line-height: 1.55;
    font-size: 12px;
}

.popup-name {
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 750;
}

@media (max-width: 768px) {

    .app-header {
        height: 57px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-title {
        font-size: 14px;
    }

    .app-subtitle {
        font-size: 10px;
    }

    .app-main {
        height: calc(100vh - 57px);
    }

    .route-toolbar {
        left: 7px;
        right: 7px;
        transform: none;
        max-width: none;
        justify-content: flex-start;
    }

    .route-btn {
        min-width: 72px;
        padding: 7px 9px;
        font-size: 11px;
    }

    .status-bar {
        top: 69px;
        max-width: calc(100% - 20px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .route-info-card {
        left: 8px;
        right: 8px;
        bottom: 8px;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
        padding: 8px 10px;
    }

    .route-info-card strong {
        font-size: 11px;
    }
}
