@import url('https://fonts.googleapis.com/css2?family=SN+Pro:ital,wght@0,200..900;1,200..900&display=swap');

@font-face {
    font-family: 'OpenDyslexic';
    src: url('assets/fonts/OpenDyslexic-Regular.otf') format('opentype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('assets/fonts/OpenDyslexic-Italic.otf') format('opentype');
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('assets/fonts/OpenDyslexic-Bold.otf') format('opentype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('assets/fonts/OpenDyslexic-BoldItalic.otf') format('opentype');
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}

.cooling-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 0.4rem solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.144);
    transform: scale(1);
    transform-origin: center;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.cooling-map-marker img {
    width: 1.8rem;
    height: 1.8rem;
    filter: brightness(0) invert(1);
}

.cooling-marker { background: #76c6ff; }
.water-marker { background: #1366ff; }
.washroom-marker { background: #7c5bd6; }
.bench-marker { background: #ec8f2a; }
.transit-marker { background: #76afff; }
.rapid-marker { background: #1f5a9d; }
.resident-good-marker { background: #2fbf71; }
.resident-hot-marker { background: #f54b20; }
.resident-need-marker { background: #ffd900; }

.note-marker {
    transform: scale(0);
    transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1.15), box-shadow 220ms ease, border-color 220ms ease;
    background: #00aeff;
}

/* new styles for the search control */

* {
    box-sizing: border-box;
    font-family: 'SN Pro', Inter, system-ui, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -webkit-touch-callout: none;
}

html {
    font-size: 16px !important;
}

body {
    margin: 0;
    color: #1f2a44;
    background: #eef3f8;
}

html,
body {
    width: 100%;
    height: 100%;
}

button,
input {
    font: inherit;
}

.app {
    min-height: 100vh;
    display: grid;
}

#map {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.leaflet-container {
    font-size: 1rem;
}

.cooling-div-icon {
    background: transparent;
    border: 0;
}

.leaflet-marker-icon.cooling-div-icon.is-selected {
    z-index: 2200 !important;
}

.cooling-div-icon.is-selected .cooling-map-marker {
    border-color: #ffffff;
    box-shadow: 0 22px 34px rgba(20, 40, 70, 0.28);
    transform: scale(1.28) translateY(-1rem);
    z-index: 2200;
}

.cooling-div-icon.is-selected .note-marker {
    border-color: #ffffff;
    box-shadow: 0 22px 34px rgba(20, 40, 70, 0.28);
    transform: scale(1.25);
    z-index: 2200;
}

.leaflet-interactive {
    transition: stroke-width 220ms ease, stroke-opacity 220ms ease, filter 220ms ease;
}

.leaflet-interactive.is-selected {
    filter: drop-shadow(0 6px 8px rgba(20, 40, 70, 0.22));
    stroke-width: 6;
    stroke-opacity: 1;
}

.logo-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    text-decoration: none;
}

.logo-container p {
    line-height: 1;
    margin: 0;
}

.logo-container img {
    width: 40%;
}

.panel {
    position: fixed;
    background: #fff;
    width: 20%;
    min-width: 380px;
    height: 100%;
    padding: 1.5rem;
    overflow-y: visible;
    box-shadow: 0 0 18px rgba(20, 40, 70, 0.12);
    z-index: 1000;
    border-radius: 0 1rem 1rem 0;
}

h1 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
}

h2,
h3 {
    font-size: 13px;
    text-transform: uppercase;
    margin-top: 24px;
}

p {
    color: #6d7890;
}

.search,
.panel input {
    width: 100%;
    height: 42px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    padding: 0 12px;
    margin-bottom: 10px;
}

.search-bridge {
    position: relative;
}

.leaflet-control-search {
    display: none;
}

.panel-search-tooltip {
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    z-index: 1002;
    display: none;
    max-height: 180px;
    margin: 0;
    padding: 4px;
    overflow-y: auto;
    list-style: none;
    background: white;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(31, 42, 68, 0.16);
}

.panel-search-tooltip.is-open {
    display: block;
}

.panel-search-tooltip li {
    margin: 0;
}

.panel-search-tooltip button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1f2a44;
    text-align: left;
    cursor: pointer;
}

.panel-search-tooltip button:hover,
.panel-search-tooltip button:focus-visible {
    background: #f0f5fb;
    outline: 0;
}

.panel-search-tooltip .search-tip {
    display: block;
    padding: 8px 10px;
    color: #1f2a44;
    border-radius: 6px;
    text-decoration: none;
}

.panel-search-tooltip .search-tip:hover,
.panel-search-tooltip .search-tip-select {
    background: #f0f5fb;
}

.panel section h2{
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

.map-feedback {
    margin-top: 1.5rem;
}

.feedback-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #4b84ca;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.feedback-button:hover {
    background: #0b4f9f;
}

.feedback-button:focus-visible {
    outline: 3px solid #76c6ff;
    outline-offset: 3px;
}

.map-feedback p {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
}

.location-btn,
.secondary {
    width: 100%;
    border: 1px solid #cfe1f7;
    background: #f3f8ff;
    color: #1063c7;
    border-radius: 8px;
    padding: 10px;
    display: none; /* hide for now until feature is implemented */
}

.chips,
.actions,
.route-options {
    display: grid;
    gap: 8px;
}

.chips {
    grid-template-columns: repeat(4, 1fr);
}

.actions {
    grid-template-columns: repeat(5, 1fr);
}

.toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-bar span {
    cursor: pointer;
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #00000056;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.toggle-bar span[aria-expanded="true"] {
    transform: rotate(180deg);
}

.toggle-bar span:focus-visible {
    outline: 3px solid #1063c7;
    outline-offset: 3px;
    border-radius: 4px;
}

.chips button,
.actions button,
.route-options button {
    border: 0;
    border-radius: 10px;
    padding: 12px 6px;
    background: #f0f5fb;
    font-size: 0.8rem;
    cursor: pointer;
}

.chips button img,
.actions button img,
.route-options button img {
    width: 2rem;
    height: 2rem;
    display: block;
    margin: 0 auto 4px;
    fill: white;
}

button.general {
    color: #3BC1FF;
}

button.general img {
    filter: invert(51%) sepia(80%) saturate(797%) hue-rotate(179deg) brightness(113%) contrast(100%);
}

button.general.selected {
    color: white;
    background: linear-gradient(227deg, rgba(59, 193, 255, 1) 0%, rgba(34, 138, 186, 1) 100%);
}

button.general.selected img {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

button.family {
    color: #b12bff;
}

button.family img {
    filter: invert(54%) sepia(92%) saturate(7257%) hue-rotate(269deg) brightness(98%) contrast(105%);
}

button.family.selected {
    color: white;
    background: linear-gradient(227deg, rgb(177, 43, 255) 0%, rgba(142, 50, 191, 1) 100%);
}

button.family.selected img {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

button.senior {
    color: #ec7c2a;
}

button.senior img {
    filter: invert(97%) sepia(81%) saturate(5063%) hue-rotate(298deg) brightness(108%) contrast(101%);
}

button.senior.selected {
    color: white;
    background: linear-gradient(227deg, rgba(255, 196, 153, 1) 0%, rgba(255, 160, 102, 1) 100%);
}

button.senior.selected img {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

button.extreme-heat {
    color: #f54b20;
}

button.extreme-heat img {
    filter: invert(43%) sepia(70%) saturate(5311%) hue-rotate(351deg) brightness(103%) contrast(92%);
}

button.extreme-heat.selected {
    color: white;
    background: linear-gradient(227deg, rgba(255, 141, 112, 1) 0%, rgba(245, 75, 32, 1) 100%);
}

button.extreme-heat.selected img {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

.leaflet-top.leaflet-left {
    left: max(20%, 380px);
}

/* hide the default leaflet search control */
.leaflet-control-layers {
    display: none;
}

.legend {
    background: white;
    border: 0;
    padding-bottom: 4px;
    font-size: 12px;
    overflow-x: scroll;
    position: relative;
    width: 100%;
    max-width: calc(100vw - 2rem);
    border-radius: 0;
    transition: width 0.3s ease, border-radius 0.3s ease;
}

.legend[aria-expanded="true"] {
    width: min(980px, calc(100vw - 2rem));
    border-radius: 1rem;
    overflow-x: hidden;
}

.legend-items {
    display: flex;
    gap: 8px;
    width: max-content;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 82px;
    min-height: 82px;
    padding: 10px 6px;
    border: 0;
    border-radius: 10px;
    background: white;
    color: #1f2a44;
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.legend-item.is-off {
    color: #6d7890;
    opacity: 0.5;
}

.legend-item.is-selected {
    background: #e5f2ff;
    box-shadow: inset 0 0 0 2px #1063c7;
    opacity: 1;
}

.legend-item:focus-visible {
    outline: 3px solid #1063c7;
    outline-offset: 2px;
}

.legend-item:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.legend-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--legend-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.legend-icon img {
    width: 1.8rem;
    height: 1.8rem;
    filter: brightness(0) invert(1);
}

.legend-route {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--legend-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.legend-route::before {
    content: "";
    width: 1.1rem;
    height: 0.2rem;
    border-radius: 999px;
    background: white;
    transform: rotate(-22deg);
}

.back {
    font-weight: 700;
    margin-bottom: 18px;
}

.image-placeholder {
    height: 140px;
    border-radius: 16px;
    background: linear-gradient(135deg, #98c379, #e8f4d8);
    margin-bottom: 20px;
}

.details {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    border-top: 1px solid #e4ebf3;
}

.details li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e4ebf3;
    gap: 16px;
}

.details strong {
    color: #6d7890;
    font-weight: 500;
    text-align: right;
}

.grecaptcha-badge {
    visibility: hidden;
}



.weather-widget {
    width: 100%;
    aspect-ratio: 1 / 0.7;
    border-radius: 1rem;
    padding: 1rem;
    margin: 18px 0;
    display: flex;
    z-index: 1000;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    background: linear-gradient(145deg, #0f5e9c, #65b5d9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(31, 42, 68, 0.16);
    overflow: hidden;
    transition: background 400ms ease;
}

.weather-widget__header,
.weather-widget__range,
.weather-widget__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.weather-widget__eyebrow,
.weather-widget__condition,
.weather-widget__range,
.weather-widget__stats,
.weather-widget__status {
    font-size: 12px;
    line-height: 1.25;
}

.weather-widget__eyebrow,
.weather-widget__condition {
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 800;
}

.weather-widget__condition,
.weather-widget__range,
.weather-widget__stats,
.weather-widget__status {
    color: rgba(255, 255, 255, 0.84);
}

.weather-widget__temp {
    font-size: 54px;
    line-height: 0.9;
    font-weight: 850;
}

.weather-widget__temp sup {
    font-size: 22px;
    font-weight: 750;
    vertical-align: super;
}

.weather-widget strong {
    color: white;
}

.weather-widget__stats {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.weather-widget__status {
    margin: 0;
}

.resource-popup {
    min-width: 220px;
    color: #1f2a44;
}

.resource-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1200;
    width: min(360px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 1rem;
    overflow-y: auto;
    background: white;
    border: 1px solid #d8e1ec;
    border-radius: 1rem;
    box-shadow: 0 18px 42px rgba(20, 40, 70, 0.22);
}

.resource-toast.is-open {
    animation: toast-slide-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.resource-toast.is-closing {
    animation: toast-slide-out 240ms cubic-bezier(0.4, 0, 1, 1) both;
    pointer-events: none;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateY(-1.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-1.5rem);
    }
}

.resource-toast[hidden] {
    display: none;
}

.accessibility-control {
    position: fixed;
    z-index: 1350;
}

.accessibility-control.is-left { left: 0; }
.accessibility-control.is-right { right: 0; }

.accessibility-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem;
    height: 3.75rem;
    padding: 0.7rem;
    border: 2px solid white;
    background: #1063c7;
    border-radius: 0.9rem 0 0 0.9rem;
    box-shadow: 0 8px 24px rgba(20, 40, 70, 0.28);
    cursor: grab;
    touch-action: none;
}

.accessibility-control.is-left .accessibility-button {
    border-radius: 0 0.9rem 0.9rem 0;
}

.accessibility-button:active { cursor: grabbing; }
.accessibility-button img { width: 100%; height: 100%; filter: brightness(0) invert(1); }
.accessibility-button:focus-visible,
.accessibility-panel button:focus-visible,
.accessibility-panel input:focus-visible { outline: 3px solid #ffd900; outline-offset: 3px; }

.accessibility-panel {
    position: absolute;
    top: 0;
    right: calc(100% + 0.75rem);
    width: min(20rem, calc(100vw - 5.5rem));
    padding: 1rem;
    background: white;
    border: 1px solid #cbd8e7;
    border-radius: 1rem;
    box-shadow: 0 16px 38px rgba(20, 40, 70, 0.25);
}

.accessibility-control.is-left .accessibility-panel { right: auto; left: calc(100% + 0.75rem); }
.accessibility-panel[hidden] { display: none; }
.accessibility-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.accessibility-panel__header h2 { margin: 0; font-size: 1.1rem; }
.accessibility-panel__close { width: 2rem; height: 2rem; border: 0; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.accessibility-panel label { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; color: #1f2a44; cursor: pointer; }
.accessibility-panel input { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.accessibility-reset { width: 100%; margin-top: 0.5rem; padding: 0.7rem; border: 0; border-radius: 0.6rem; background: #e7f1fd; color: #0b4f9f; font-weight: 700; cursor: pointer; }

body.a11y-larger-text { font-size: 1.2rem; }
body.a11y-larger-text .panel,
body.a11y-larger-text .resource-toast,
body.a11y-larger-text .accessibility-panel { font-size: 1.2rem; }
body.a11y-larger-text h1 { font-size: 1.8rem; }
body.a11y-larger-text h2,
body.a11y-larger-text h3 { font-size: 1.15rem; }
body.a11y-larger-text .legend-item,
body.a11y-larger-text .chips button,
body.a11y-larger-text .actions button { font-size: 1rem; }
body.a11y-larger-text .legend[aria-expanded="true"] .legend-item { font-size: 1.5rem; }
body.a11y-larger-controls button,
body.a11y-larger-controls input { min-height: 3rem; }
body.a11y-larger-controls .legend-icon,
body.a11y-larger-controls .legend-route { width: 3.75rem; height: 3.75rem; }
body.a11y-larger-controls .cooling-map-marker { transform: scale(1.2); }

body.a11y-high-contrast { color: #000; background: #fff; }
body.a11y-high-contrast .panel,
body.a11y-high-contrast .resource-toast,
body.a11y-high-contrast .accessibility-panel,
body.a11y-high-contrast .legend,
body.a11y-high-contrast .legend-item { color: #000; background: #fff; border-color: #000; }
body.a11y-high-contrast p { color: #111; }
body.a11y-high-contrast button:focus-visible,
body.a11y-high-contrast input:focus-visible { outline: 4px solid #000; outline-offset: 3px; }

body.a11y-dyslexia,
body.a11y-dyslexia * { font-family: 'OpenDyslexic', Verdana, Arial, sans-serif !important }
body.a11y-dyslexia .legend-items { gap: 1rem; }

.resource-toast__close {
    position: sticky;
    top: 0;
    float: right;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f0f5fb;
    color: #1f2a44;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.resource-toast__close:hover,
.resource-toast__close:focus-visible {
    background: #d8e1ec;
    outline: 0;
}

.resource-toast .smaller {
    display: inline-block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.resource-toast a {
    color: #5e5e5e;
    text-decoration: dotted underline;
}

.resource-toast .resource-toast__navigate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.75rem;
    background: #1063c7;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.resource-toast__navigate:hover,
.resource-toast__navigate:focus-visible {
    background: #0c4f9f;
    color: #ffffff;
    outline: 3px solid rgba(16, 99, 199, 0.22);
    outline-offset: 2px;
    text-decoration: none;
}

.resource-toast__feedback,
.resource-feedback__submit,
.resource-feedback__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 0;
    border-radius: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.resource-toast__feedback {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.7rem 0.9rem;
    background: #eef5ff;
    color: #1063c7;
}

.resource-toast__feedback:hover,
.resource-toast__feedback:focus-visible {
    background: #dbeaff;
    outline: 3px solid rgba(16, 99, 199, 0.18);
    outline-offset: 2px;
}

.resource-feedback {
    display: grid;
    gap: 0.75rem;
}

.resource-feedback__intro,
.resource-feedback__status {
    margin: 0;
}

.resource-feedback__fieldset {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.resource-feedback__fieldset legend,
.resource-feedback__field span {
    margin-bottom: 0.25rem;
    color: #1f2a44;
    font-weight: 800;
}

.resource-feedback__option {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    color: #1f2a44;
}

.resource-feedback__field {
    display: grid;
    gap: 0.3rem;
}

.resource-feedback__field input,
.resource-feedback__field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd6e5;
    border-radius: 0.6rem;
    padding: 0.55rem 0.65rem;
    color: #1f2a44;
    font: inherit;
}

.resource-feedback__field textarea {
    resize: vertical;
}

.resource-feedback__recaptcha-note {
    margin: 0;
    color: #6d7890;
    font-size: 0.78rem;
}

.resource-feedback__status {
    color: #5f6f89;
    font-size: 0.9rem;
}

.resource-feedback__status.is-error {
    color: #b42318;
}

.resource-feedback__status.is-success {
    color: #1f7a45;
}

.resource-feedback__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.resource-feedback__back,
.resource-feedback__submit {
    min-height: 42px;
    padding: 0.65rem 0.8rem;
}

.resource-feedback__back {
    background: #f0f5fb;
    color: #1f2a44;
}

.resource-feedback__submit {
    background: #1063c7;
    color: #ffffff;
}

.resource-feedback__back:hover,
.resource-feedback__back:focus-visible {
    background: #d8e1ec;
    outline: 3px solid rgba(31, 42, 68, 0.14);
    outline-offset: 2px;
}

.resource-feedback__submit:hover,
.resource-feedback__submit:focus-visible {
    background: #0c4f9f;
    outline: 3px solid rgba(16, 99, 199, 0.22);
    outline-offset: 2px;
}

.resource-feedback__submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.resource-toast .smaller.blue {
    color: #1386af;
}

.resource-toast .green {
    color: #2fbf71;
}

.popup-title {
    color: #1f2a44;
    font-weight: 800;
}

.popup-source {
    margin-top: 8px;
    color: #6d7890;
    font-size: 0.8rem;
    text-align: center;
}

@media (max-width: 1100px) {
    .app {
        grid-template-columns: 1fr;
    }

    .left-panel {
        overflow-y: scroll;
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        width: 50vw;
        max-height: 45vh;
        border-radius: 1rem;
        z-index: 1000;
        box-shadow: 0 -3px 30px #00000033;
    }

    .leaflet-top.leaflet-left {
        left: 0;
    }


    .weather-widget {
        aspect-ratio: 1 / 0.4 !important;
    }

    .weather-widget__range {
        display: none !important;
    }

    .toggle-bar span {
        display: none;
    }
}

@media (max-width: 760px) {
    .app {
        grid-template-columns: 1fr;
    }

    .left-panel {
        position: fixed;
        overflow-y: auto;
        bottom: 0;
        left: 0;
        width: 100vw;
        min-width: 0;
        height: 35vh;
        padding-top: 0 !important;
        border-radius: 2rem 2rem 0 0;
        z-index: 1000;
        box-shadow: 0 -3px 30px #00000033;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        transition: bottom 240ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    .left-panel.is-toast-collapsed {
        bottom: -35vh;
    }

    .leaflet-top.leaflet-left {
        left: 0;
    }

    .leaflet-bottom.leaflet-right {
        display: none;
    }

    .logo-container,
    .search-section,
    .scenario-section {
        display: none;
    }

    .weather-widget {
        position: fixed;
        top: 0;
        right: 1rem;
        width: 7rem;
        aspect-ratio: 1 / 1.1 !important;
    }

    .weather-widget__header,
    .weather-widget__range,
    .weather-widget__status {
        display: none !important;
    }

    .weather-widget__temp {
        font-weight: 700;
    }

    .weather-widget__stats {
        border-top: 0 !important;
    }

    .toggle-bar span {
        display: inline-block;
    }

    body.a11y-options-active .legend-toggle {
        display: none;
    }

    .legend[aria-expanded="true"] {
        width: 100%;
        max-height: calc(45vh - 7rem);
        overflow-x: hidden;
        overflow-y: auto;
    }

    .legend[aria-expanded="true"] .legend-items {
        flex-direction: column;
        width: 100%;
    }

    .legend[aria-expanded="true"] .legend-item {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        min-height: 0;
        text-align: left;
        font-size: 1rem;
        gap: 1rem;
    }

    .resource-toast {
        font-size: 1.1rem;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-height: 40vh;
        padding: 2rem;
        border-radius: 2rem 2rem 0 0;
    }

    .resource-toast.is-open {
        animation-name: toast-slide-in-mobile;
    }

    .resource-toast.is-closing {
        animation-name: toast-slide-out-mobile;
    }

    @keyframes toast-slide-in-mobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes toast-slide-out-mobile {
        from {
            opacity: 1;
            transform: translateY(0);
        }
        to {
            opacity: 0;
            transform: translateY(100%);
        }
    }
}
