:root {
    color-scheme: light;
    --paper: #f7f5f1;
    --bg: #f7f5f1;
    --surface: #ffffff;
    --surface-raised: #f7f5f1;
    --surface-hover: #edf3f1;
    --ink: #0e1b2c;
    --muted: #5d6874;
    --line: #d7dddc;
    --green: #0b5d5a;
    --green-dark: #e3efed;
    --teal-soft: #e3efed;
    --coral: #e88b69;
    --coral-soft: #fbece6;
    --coral-deep: #b9431f;
    --success: #178a50;
    --warning: #b97d10;
    --danger: #c93a3a;
    --amber: #b97d10;
    --red: #b9431f;
    --blue: #356b86;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}

* {
    box-sizing: border-box;
    scrollbar-color: #aebbb7 transparent;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    background: #aebbb7;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: #879791;
    background-clip: padding-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--bg);
}

body {
    height: 100vh;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    background: var(--paper);
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button,
a {
    touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.app-shell {
    width: calc(100% - 36px);
    height: 100vh;
    height: 100dvh;
    max-width: 1540px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr) 38px;
}

main,
.finder-head,
.search-panel,
.search-panel > *,
.results-toolbar,
.toolbar-actions,
.finder-workspace,
.result-list,
.facility-card {
    min-width: 0;
}

main {
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 46px minmax(0, 1fr);
}

.topbar {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
}

.header-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.facility-account,
.sign-in-link {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 750;
    text-decoration: none;
}

.facility-account {
    gap: 7px;
    border: 1px solid #355148;
    padding: 7px 10px;
    background: #18231f;
}

.facility-account:hover {
    border-color: var(--green);
}

.facility-account svg {
    width: 16px;
    height: 16px;
    color: var(--green);
}

.sign-in-link {
    padding: 7px 5px;
    color: var(--muted);
}

.sign-in-link:hover {
    color: var(--ink);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--green);
    color: #07110d;
    place-items: center;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.brand > span:last-child,
.emergency-link > span:nth-child(2) {
    display: grid;
}

.brand strong {
    font-size: 1rem;
}

.brand small,
.emergency-link small {
    color: var(--muted);
    font-size: 0.7rem;
}

.emergency-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    border: 1px solid #56312e;
    border-radius: 9px;
    padding: 5px 9px;
    background: #211513;
    color: var(--ink);
    text-decoration: none;
}

.emergency-link strong {
    color: #ffaaa3;
    font-size: 0.84rem;
}

.emergency-link > svg {
    width: 18px;
    height: 18px;
    color: var(--red);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 5px rgba(255, 120, 110, 0.1);
}

.finder-head {
    display: grid;
    grid-template-columns: minmax(270px, 0.72fr) minmax(580px, 1.28fr);
    align-items: center;
    gap: 28px;
    padding: 18px 0 14px;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--green);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.intro h1 {
    max-width: 570px;
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.85rem);
    font-weight: 610;
    line-height: 0.98;
    letter-spacing: 0;
}

.intro > p:last-child {
    max-width: 520px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) minmax(145px, 0.85fr) minmax(135px, 0.78fr) auto;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 6px;
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.search-stack {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
}

.search-field,
.select-field {
    display: grid;
    gap: 5px;
    border-radius: 9px;
    padding: 6px 10px;
    background: var(--surface-raised);
}

.search-field > span:first-child,
.select-field > span:first-child {
    padding-left: 27px;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
}

.input-wrap {
    display: grid;
    min-width: 0;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.input-wrap > svg {
    width: 18px;
    height: 18px;
    color: var(--green);
}

.input-wrap input,
.input-wrap select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 650;
}

.input-wrap select {
    grid-column: 2 / 4;
    grid-row: 1;
    min-height: 24px;
    padding-right: 25px;
    appearance: none;
    cursor: pointer;
}

.input-wrap select option {
    background: var(--surface-raised);
    color: var(--ink);
}

.input-wrap .select-chevron {
    z-index: 1;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 16px;
    color: var(--muted);
    pointer-events: none;
}

.clear-search {
    display: grid;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #24302d;
    color: var(--muted);
    cursor: pointer;
    place-items: center;
}

.clear-search svg {
    width: 14px;
    height: 14px;
}

.nearby-button {
    display: inline-flex;
    min-width: 132px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 9px;
    padding: 8px 13px;
    background: var(--green);
    color: #07130e;
    cursor: pointer;
}

.nearby-button:hover {
    background: #63e0aa;
}

.nearby-button.loading {
    cursor: wait;
    opacity: 0.72;
}

.nearby-button > svg {
    width: 19px;
    height: 19px;
}

.nearby-button > span {
    display: grid;
    text-align: left;
}

.nearby-button small {
    font-size: 0.59rem;
    opacity: 0.67;
}

.nearby-button strong {
    font-size: 0.77rem;
}

.location-status {
    min-height: 13px;
    margin: 0;
    padding: 0 10px;
    color: var(--muted);
    font-size: 0.62rem;
}

.location-status.error {
    color: var(--red);
}

.results-toolbar {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
}

.results-toolbar > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.results-toolbar strong {
    font-size: 0.83rem;
}

.results-toolbar #result-context {
    color: var(--muted);
    font-size: 0.72rem;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.reset-button {
    border: 0;
    padding: 5px 0;
    background: transparent;
    color: var(--green);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.emergency-mode {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 6px;
    border: 1px solid #533735;
    border-radius: 7px;
    padding: 6px 10px;
    background: #211716;
    color: #eeb1ab;
    font-size: 0.66rem;
    font-weight: 750;
    cursor: pointer;
}

.emergency-mode:hover,
.emergency-mode.active {
    border-color: var(--red);
    background: #3a1d1b;
    color: #ffd6d2;
}

.emergency-mode svg {
    width: 14px;
    height: 14px;
}

.view-switcher {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 3px;
    background: var(--surface);
}

.view-switcher button {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 5px;
    border: 0;
    border-radius: 6px;
    padding: 5px 9px;
    background: transparent;
    color: var(--muted);
    font-size: 0.67rem;
    cursor: pointer;
}

.view-switcher button.active {
    background: #26332f;
    color: var(--ink);
}

.view-switcher svg {
    width: 14px;
    height: 14px;
}

.finder-workspace {
    display: grid;
    height: auto;
    min-height: 0;
    grid-template-columns: 450px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.result-list {
    overflow-y: auto;
    border-right: 1px solid var(--line);
    padding: 8px;
    overscroll-behavior: contain;
}

.facility-card {
    position: relative;
    display: grid;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 13px 14px;
    background: transparent;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}

.facility-card + .facility-card {
    border-top-color: var(--line);
}

.facility-card:hover {
    background: var(--surface-hover);
}

.facility-card.selected {
    border-color: #355148;
    background: #18231f;
}

.facility-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
}

.facility-type {
    margin: 0 0 4px;
    color: var(--green);
    font-size: 0.63rem;
    font-weight: 780;
    text-transform: uppercase;
}

.facility-card h2 {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.35;
    letter-spacing: 0;
}

.registered-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    color: var(--amber);
    font-size: 0.58rem;
    font-weight: 750;
    white-space: nowrap;
}

.registered-badge svg {
    width: 13px;
    height: 13px;
}

.journey {
    display: inline-flex;
    height: fit-content;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: var(--muted);
    font-size: 0.66rem;
    white-space: nowrap;
}

.journey svg {
    width: 13px;
    height: 13px;
}

.journey strong {
    color: var(--ink);
}

.journey small {
    border-left: 1px solid var(--line);
    padding-left: 5px;
    color: var(--green);
    font-size: 0.62rem;
    font-weight: 700;
}

.emergency-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    border-radius: 5px;
    padding: 4px 7px;
    font-size: 0.61rem;
    font-weight: 760;
}

.emergency-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.emergency-status.accepting {
    background: #133126;
    color: #79e6b5;
}

.emergency-status.accepting i {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(72, 213, 151, 0.1);
}

.emergency-status.unavailable {
    background: #2a2020;
    color: #c6a09d;
}

.emergency-status.unavailable i {
    background: #a77570;
}

.capability-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.capability-tags span {
    border: 1px solid #34443e;
    border-radius: 5px;
    padding: 3px 5px;
    background: #111a17;
    color: #a7b5b0;
    font-size: 0.56rem;
    font-weight: 700;
}

.capability-tags span.matched {
    border-color: #4d8a70;
    background: #153126;
    color: #8ce8be;
}

.facility-address {
    display: flex;
    align-items: start;
    gap: 7px;
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.5;
}

.facility-address svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    margin-top: 2px;
}

.facility-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 9px;
}

.hours {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.66rem;
}

.hours svg {
    width: 14px;
    height: 14px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-actions a,
.save-button,
.notify-button {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #34423e;
    border-radius: 7px;
    padding: 6px 9px;
    background: #17201e;
    color: #d9e2df;
    font-size: 0.65rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.card-actions a:hover,
.save-button:hover,
.save-button.saved,
.notify-button:hover {
    border-color: #40715f;
    background: var(--green-dark);
    color: var(--green);
}

.notify-button {
    border-color: #3e745e;
    background: #133126;
    color: #75e1b0;
}

.notify-button.sent,
.notify-button:disabled {
    cursor: default;
    opacity: 0.8;
}

.card-actions svg {
    width: 14px;
    height: 14px;
}

.save-button {
    width: 32px;
    padding: 0;
}

.map-panel {
    position: relative;
    min-width: 0;
    background: #0d1312;
}

#map {
    width: 100%;
    height: 100%;
    background: #0d1312;
}

.leaflet-container {
    font-family: inherit;
}

.leaflet-control-zoom {
    overflow: hidden;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.leaflet-control-zoom a {
    border: 0 !important;
    background: var(--surface-raised) !important;
    color: var(--ink) !important;
}

.leaflet-control-zoom a + a {
    border-top: 1px solid var(--line) !important;
}

.leaflet-control-attribution {
    background: rgba(9, 13, 12, 0.78) !important;
    color: #89958f;
}

.leaflet-control-attribution a {
    color: #b4c0bb;
}

.facility-marker {
    display: grid;
    width: 34px;
    height: 34px;
    border: 3px solid #edf8f3;
    border-radius: 50% 50% 50% 9px;
    background: var(--green);
    color: #07130e;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36);
    font-size: 11px;
    font-weight: 850;
    transform: rotate(-45deg);
    place-items: center;
}

.facility-marker span {
    transform: rotate(45deg);
}

.facility-marker.standard {
    background: var(--blue);
}

.facility-marker.registered {
    border-color: #d9a952;
    background: #f3ba63;
    color: #21170a;
}

.facility-marker.emergency-accepting {
    border-color: #ffd7d3;
    background: var(--red);
    color: #250b09;
}

.facility-marker.selected {
    width: 40px;
    height: 40px;
    background: var(--amber);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    border: 1px solid var(--line);
    background: var(--surface-raised);
    color: var(--ink);
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(72, 213, 151, 0.2);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    display: grid;
    width: 32px;
    height: 32px;
    margin: 4px;
    border: 1px solid #9cf0c9;
    border-radius: 50%;
    background: #183a2d;
    color: #e8fff5;
    font-size: 0.68rem;
    font-weight: 800;
    place-items: center;
}

.marker-cluster span {
    line-height: 1;
}

.map-popup {
    display: grid;
    min-width: 190px;
    gap: 5px;
}

.map-popup strong {
    font-size: 0.8rem;
}

.map-popup span {
    color: var(--muted);
    font-size: 0.68rem;
}

.map-popup .popup-availability {
    width: fit-content;
    border-radius: 4px;
    padding: 3px 5px;
    background: #133126;
    color: #79e6b5;
    font-weight: 750;
}

.map-popup a {
    width: fit-content;
    margin-top: 4px;
    color: var(--green);
    font-size: 0.68rem;
    font-weight: 750;
}

.map-key {
    position: absolute;
    right: 14px;
    bottom: 26px;
    z-index: 500;
    display: flex;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(16, 22, 21, 0.92);
    color: #b7c2be;
    font-size: 0.61rem;
    backdrop-filter: blur(8px);
}

.map-key span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.key-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
}

.key-dot.registered {
    background: var(--amber);
}

.map-fallback {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(300px, 80%);
    margin: 0;
    transform: translate(-50%, -50%);
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

.empty-state {
    min-height: 0;
    align-content: center;
    justify-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    text-align: center;
}

.empty-state:not([hidden]) {
    display: grid;
}

.empty-state > svg {
    width: 34px;
    height: 34px;
    color: var(--green);
}

.empty-state h2 {
    margin: 16px 0 5px;
    font-size: 1rem;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.empty-state button {
    border: 0;
    border-radius: 7px;
    margin-top: 18px;
    padding: 9px 12px;
    background: var(--green);
    color: #07130e;
    font-size: 0.7rem;
    font-weight: 750;
    cursor: pointer;
}

.emergency-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2000;
    display: flex;
    width: min(420px, calc(100vw - 32px));
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #3f765f;
    border-radius: 8px;
    padding: 13px 15px;
    background: #13251f;
    color: #ddf8ec;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
    font-size: 0.74rem;
    line-height: 1.45;
}

.emergency-toast.error {
    border-color: #75423e;
    background: #2a1918;
    color: #ffd8d4;
}

.emergency-toast svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: var(--green);
}

.emergency-toast.error svg {
    color: var(--red);
}

footer {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    font-size: 0.61rem;
}

footer p {
    margin: 0;
}

footer a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #bbc6c1;
    text-decoration: none;
    white-space: nowrap;
}

footer svg {
    width: 12px;
    height: 12px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .finder-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding-top: 16px;
    }

    .intro h1 {
        max-width: 680px;
    }

    .finder-workspace {
        grid-template-columns: 390px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-shell {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-inline: 12px;
    }

    main {
        width: 100%;
        max-width: 100%;
        grid-template-rows: auto auto minmax(0, 1fr);
    }

    .finder-head,
    .search-stack,
    .search-panel {
        width: 100%;
        max-width: 100%;
    }

    .topbar {
        min-height: 0;
    }

    .brand small,
    .emergency-link small {
        display: none;
    }

    .header-actions {
        gap: 6px;
    }

    .facility-account span {
        display: none;
    }

    .facility-account {
        width: 36px;
        padding: 0;
    }

    .emergency-link {
        min-height: 40px;
        border-radius: 9px;
    }

    .finder-head {
        padding: 14px 0 10px;
    }

    .intro h1 {
        font-size: 2rem;
    }

    .search-panel {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        border-radius: 12px;
    }

    .search-field {
        grid-column: 1 / -1;
    }

    .nearby-button {
        min-height: 42px;
        grid-column: 1 / -1;
    }

    .results-toolbar {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 6px 0;
    }

    .results-toolbar > div:first-child {
        min-width: 0;
        flex: 1 1 120px;
    }

    .toolbar-actions {
        max-width: 100%;
        flex: 0 1 auto;
        justify-content: flex-end;
        gap: 7px;
    }

    .finder-workspace {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .result-list {
        border-right: 0;
        overflow-x: hidden;
    }

    .map-panel {
        display: none;
    }

    .finder-workspace.map-view .result-list {
        display: none;
    }

    .finder-workspace.map-view .map-panel {
        display: block;
    }

    footer {
        gap: 10px;
        padding: 5px 0;
    }
}

@media (max-width: 460px) {
    .brand strong {
        font-size: 0.9rem;
    }

    .emergency-link {
        padding: 6px 9px;
    }

    .sign-in-link {
        font-size: 0.66rem;
    }

    .intro h1 {
        font-size: 1.85rem;
    }

    .intro > p:last-child {
        display: none;
    }

    .search-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-field,
    .select-field,
    .nearby-button {
        grid-column: 1;
    }

    .toolbar-actions {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .view-switcher {
        margin-left: auto;
    }

    .view-switcher button {
        padding-inline: 7px;
    }

    .results-toolbar #result-context,
    footer a {
        display: none;
    }

    .facility-card {
        padding: 12px;
    }

    .facility-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-actions {
        width: 100%;
    }

    .card-actions a {
        flex: 1;
    }

    footer p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Public finder uses the patient-facing Calm Authority palette. */
.facility-account {
    border-color: var(--line);
    background: var(--surface);
}

.facility-account:hover {
    border-color: var(--green);
    background: var(--teal-soft);
}

.emergency-link {
    border-color: rgba(185, 67, 31, 0.28);
    background: var(--coral-soft);
}

.emergency-link strong,
.location-status.error {
    color: var(--coral-deep);
}

.pulse {
    background: var(--coral);
    box-shadow: 0 0 0 5px rgba(232, 139, 105, 0.18);
}

.search-panel {
    box-shadow: 0 18px 45px rgba(14, 27, 44, 0.09);
}

.clear-search {
    background: var(--teal-soft);
}

.nearby-button,
.empty-state button {
    background: var(--green);
    color: #ffffff;
}

.nearby-button:hover,
.empty-state button:hover {
    background: #084846;
}

.emergency-mode {
    border-color: rgba(185, 67, 31, 0.24);
    background: var(--coral-soft);
    color: var(--coral-deep);
}

.emergency-mode:hover,
.emergency-mode.active {
    border-color: var(--coral-deep);
    background: var(--coral);
    color: var(--ink);
}

.view-switcher button.active {
    background: var(--teal-soft);
    color: var(--green);
}

.finder-workspace {
    box-shadow: 0 24px 65px rgba(14, 27, 44, 0.11);
}

.facility-card.selected {
    border-color: rgba(11, 93, 90, 0.38);
    background: var(--teal-soft);
}

.registered-badge {
    color: var(--warning);
}

.emergency-status.accepting {
    background: #e8f3ec;
    color: var(--success);
}

.emergency-status.accepting i {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(23, 138, 80, 0.12);
}

.emergency-status.unavailable {
    background: #f8e8e8;
    color: var(--danger);
}

.emergency-status.unavailable i {
    background: var(--danger);
}

.capability-tags span {
    border-color: var(--line);
    background: var(--paper);
    color: var(--muted);
}

.capability-tags span.matched {
    border-color: rgba(11, 93, 90, 0.28);
    background: var(--teal-soft);
    color: var(--green);
}

.card-actions a,
.save-button {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.card-actions a:hover,
.save-button:hover,
.save-button.saved {
    border-color: var(--green);
    background: var(--teal-soft);
    color: var(--green);
}

.notify-button {
    border-color: var(--coral);
    background: var(--coral);
    color: var(--ink);
}

.notify-button:hover {
    border-color: var(--coral-deep);
    background: var(--coral-deep);
    color: #ffffff;
}

.map-panel,
#map {
    background: #dce7e4;
}

.leaflet-control-zoom a {
    background: var(--surface) !important;
}

.leaflet-control-attribution {
    background: rgba(247, 245, 241, 0.9) !important;
    color: var(--muted);
}

.leaflet-control-attribution a {
    color: var(--green);
}

.facility-marker {
    border-color: #ffffff;
    background: var(--green);
    color: #ffffff;
    box-shadow: 0 7px 18px rgba(14, 27, 44, 0.25);
}

.facility-marker.standard {
    background: var(--ink);
}

.facility-marker.registered {
    border-color: #ffffff;
    background: var(--warning);
    color: #ffffff;
}

.facility-marker.emergency-accepting {
    border-color: #ffffff;
    background: var(--coral);
    color: var(--ink);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--surface);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(11, 93, 90, 0.18);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    border-color: rgba(11, 93, 90, 0.35);
    background: var(--green);
    color: #ffffff;
}

.map-popup .popup-availability {
    background: #e8f3ec;
    color: var(--success);
}

.map-key {
    background: rgba(247, 245, 241, 0.94);
    color: var(--ink);
}

.emergency-toast {
    border-color: rgba(23, 138, 80, 0.32);
    background: #e8f3ec;
    color: #0d6138;
    box-shadow: 0 18px 45px rgba(14, 27, 44, 0.18);
}

.emergency-toast.error {
    border-color: rgba(201, 58, 58, 0.32);
    background: #f8e8e8;
    color: #922929;
}

footer a {
    color: var(--ink);
}
