html {
    overflow: hidden;
}

body.page-home {
    height: 100vh;
    height: 100dvh;
}

body.page-home main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

#cards-section {
    position: relative;
    z-index: 0;
    flex-grow: 1;
    width: 100%;
    margin: 0;
    padding: 0 16px 120px;
    overflow-y: auto;
}

#home-map {
    flex-shrink: 0;
    isolation: isolate;
    width: 100%;
    height: 384px;
    margin: 16px 0;
    background-image: none;
    box-shadow: 0 4px 8px 1px #0d111745;
}

.live-map-background {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    border-radius: 56px;
    background: #dde6f0;
}

#home-map .card-details {
    position: relative;
    z-index: 1000;
    pointer-events: auto;
}

#home-map .card-details > div {
    display: flex;
    flex-direction: row;
    align-items: center;
}

#home-map img {
    width: 48px;
    vertical-align: middle;
}

#home-map h1 {
    border: none;
    font-size: 26px;
}

#home-map .location-name {
    min-height: 0;
    padding: 0;
}

#role-note {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 8px;
    font-size: 15px;
    color: #44505c;
}

#role-note a {
    color: #0071e3;
}

#sections {
    margin: 0;
}

#home-map .leaflet-top.leaflet-right {
    margin: 10px 30px 0 0;
}

#home-map .leaflet-control-attribution {
    max-width: calc(100% - 100px);
    border-radius: 100vh;
    padding: 2px 10px;
}

#home-map .leaflet-top.leaflet-left {
    margin: 68px 0 0 16px;
}

#home-map .leaflet-top.leaflet-left .leaflet-control {
    margin: 0;
}

.map-style-toggle {
    min-width: 44px;
    height: 36px;
    padding: 0 14px;
    color: #0d1117;
    background: #ffffff;
    border: 0;
    border-radius: 100vh;
    box-shadow: 0 2px 6px rgba(13, 17, 23, 0.3);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.map-style-toggle:focus-visible {
    outline: 3px solid #0071e3;
    outline-offset: 2px;
}

#locate-button {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #4b5563;
    background: #ffffff;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(13, 17, 23, 0.3);
    cursor: pointer;
}

#locate-button.is-active {
    color: #0071e3;
}

#locate-button:focus-visible {
    outline: 3px solid #0071e3;
    outline-offset: 2px;
}

#route-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin: 12px 16px 0;
    padding: 12px 16px;
    color: #0d1117;
    background: #e8f1fd;
    border-radius: 16px;
}

#route-banner[hidden] {
    display: none;
}

#route-banner[data-tone="error"] {
    background: #fdecec;
}

#route-banner .route-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#route-banner .route-title {
    font-weight: 700;
}

#route-banner .route-meta {
    font-size: 0.9rem;
}

#route-banner .route-buttons {
    display: flex;
    gap: 8px;
}

#route-banner button {
    padding: 8px 14px;
    font: inherit;
    font-size: 0.9rem;
    color: #0d1117;
    background: #ffffff;
    border: 1px solid #c7d2e0;
    border-radius: 999px;
    cursor: pointer;
}

#directions-button {
    position: absolute;
    top: 68px;
    left: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #4b5563;
    background: #ffffff;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(13, 17, 23, 0.3);
    cursor: pointer;
}

#directions-button:focus-visible {
    outline: 3px solid #0071e3;
    outline-offset: 2px;
}

#route-steps {
    margin: 8px 16px 0;
    padding: 12px 16px 12px 36px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(13, 17, 23, 0.15);
}

#route-steps[hidden],
#route-planner[hidden] {
    display: none;
}

#route-steps li {
    padding: 6px 0;
}

#route-steps .step-distance {
    color: #5b6672;
}

#route-planner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 16px 0;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(13, 17, 23, 0.15);
}

.planner-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.planner-field label {
    width: 44px;
    font-weight: 700;
}

.planner-form {
    position: relative;
    flex: 1;
    min-width: 0;
    margin: 0;
}

.planner-form input {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    border: 1px solid #c7d2e0;
    border-radius: 999px;
}

.planner-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2000;
    max-height: 50vh;
    margin: 4px 0 0;
    padding: 8px;
    overflow-y: auto;
    list-style: none;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 24px #0d111755;
}

.planner-list[hidden] {
    display: none;
}

#route-planner button {
    padding: 8px 12px;
    font: inherit;
    font-size: 0.9rem;
    color: #0d1117;
    background: #ffffff;
    border: 1px solid #c7d2e0;
    border-radius: 999px;
    cursor: pointer;
}

#shortcuts {
    display: flex;
    gap: 8px;
    padding: 4px 16px 8px;
    overflow-x: auto;
}

#shortcuts[hidden] {
    display: none;
}

#shortcuts button {
    flex-shrink: 0;
    padding: 8px 16px;
    font: inherit;
    font-size: 0.9rem;
    color: #0d1117;
    background: #ffffff;
    border: 1px solid #c7d2e0;
    border-radius: 999px;
    cursor: pointer;
}

#shortcuts button:focus-visible {
    outline: 3px solid #0071e3;
}
