.lsc-directory {
    --lsc-yellow: #ffd500;
    --lsc-orange: #ff7a00;
    --lsc-magenta: #e5006d;
    --lsc-black: #111;
    --lsc-white: #fff;
    --lsc-border: #d9d9d9;
    --lsc-muted: #666;
    width: 100%;
    color: var(--lsc-black);
    font: inherit;
}
.lsc-directory *, .lsc-directory *::before, .lsc-directory *::after { box-sizing: border-box; }
.lsc-search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(130px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 22px;
    background: var(--lsc-black);
    color: var(--lsc-white);
}
.lsc-search-panel label { display: block; margin: 0 0 7px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.lsc-search-panel input,
.lsc-search-panel select {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 12px;
    border: 2px solid var(--lsc-white);
    border-radius: 0;
    background: var(--lsc-white);
    color: var(--lsc-black);
    font: inherit;
    font-size: 16px;
}
.lsc-search-panel input:focus,
.lsc-search-panel select:focus { outline: 3px solid var(--lsc-yellow); outline-offset: 2px; }
.lsc-reset, .lsc-map-button {
    min-height: 48px;
    border: 0;
    border-radius: 0;
    padding: 11px 17px;
    background: var(--lsc-yellow);
    color: var(--lsc-black);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}
.lsc-reset:hover, .lsc-map-button:hover { background: var(--lsc-orange); }
.lsc-summary { display: flex; align-items: baseline; gap: 7px; padding: 18px 0 13px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.lsc-summary strong { font-size: 28px; line-height: 1; }
.lsc-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); border-top: 1px solid var(--lsc-border); }
.lsc-layout--map { grid-template-columns: 1fr; }
.lsc-layout--list { grid-template-columns: 1fr; }
.lsc-map-wrap { position: sticky; top: 84px; align-self: start; min-width: 0; background: #eee; }
.lsc-map { width: 100%; min-height: 320px; z-index: 1; }
.lsc-map.is-unavailable { display: none; }
.lsc-map-status { padding: 24px; margin: 0; background: #f2f2f2; font-weight: 700; }
.lsc-list { min-width: 0; border-left: 1px solid var(--lsc-border); }
.lsc-layout--list .lsc-list { border-left: 0; }
.lsc-card { position: relative; padding: 24px 26px 25px; border-bottom: 1px solid var(--lsc-border); background: var(--lsc-white); }
.lsc-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: transparent; }
.lsc-card:hover::before { background: var(--lsc-yellow); }
.lsc-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.lsc-card-meta span { display: inline-block; padding: 3px 7px; background: #f1f1f1; font-size: 11px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.lsc-card-type { background: var(--lsc-yellow) !important; }
.lsc-card-title { margin: 0 0 9px; font-size: clamp(22px, 2.25vw, 34px); line-height: 1.02; font-weight: 900; letter-spacing: -.025em; }
.lsc-card-dedication, .lsc-card-address { margin: 6px 0; line-height: 1.45; }
.lsc-card-dedication { font-weight: 750; }
.lsc-card-address { color: #333; }
.lsc-card-contacts { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 13px; }
.lsc-card-link { color: var(--lsc-black); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.lsc-card-link:hover { text-decoration-color: var(--lsc-magenta); }
.lsc-map-button { margin-top: 17px; min-height: 42px; padding: 9px 13px; }
.lsc-empty { padding: 30px 26px; margin: 0; font-weight: 700; }

/* Leaflet marker senza immagini esterne. */
.lsc-marker-shell { background: transparent !important; border: 0 !important; }
.lsc-marker-shell span {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
    border: 4px solid #111;
    border-radius: 50% 50% 50% 0;
    background: var(--lsc-yellow);
    transform: rotate(-45deg);
    transform-origin: center;
    box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.lsc-marker-shell span::after { content: ''; position: absolute; width: 8px; height: 8px; left: 7px; top: 7px; border-radius: 50%; background: #111; }
.lsc-marker-shell.is-coordinamento span { background: var(--lsc-magenta); }
.lsc-popup { min-width: 190px; line-height: 1.35; }
.lsc-popup-title { display: block; font-size: 16px; line-height: 1.12; margin-bottom: 4px; }
.lsc-popup-type { font-size: 11px; text-transform: uppercase; font-weight: 800; margin-bottom: 6px; }
.lsc-popup-place { margin-bottom: 7px; }
.lsc-popup a { display: block; color: #111; margin-top: 4px; }

@media (max-width: 980px) {
    .lsc-search-panel { grid-template-columns: 1fr 1fr; }
    .lsc-search-main { grid-column: 1 / -1; }
    .lsc-reset { width: 100%; }
    .lsc-layout { grid-template-columns: 1fr; }
    .lsc-map-wrap { position: relative; top: auto; }
    .lsc-list { border-left: 0; border-top: 1px solid var(--lsc-border); }
}
@media (max-width: 600px) {
    .lsc-search-panel { grid-template-columns: 1fr; padding: 17px; }
    .lsc-search-main { grid-column: auto; }
    .lsc-summary { padding-inline: 4px; }
    .lsc-card { padding: 21px 18px 22px; }
    .lsc-card-title { font-size: 26px; }
    .lsc-map { max-height: 440px; }
}


.lsc-card-references{margin:.7rem 0 .8rem;display:grid;gap:.2rem}.lsc-card-reference{margin:0;font-size:.94rem;line-height:1.4}.lsc-card-reference strong{font-weight:800}.lsc-popup-reference{margin-top:.35rem;font-size:.9rem;line-height:1.35}

/* v1.4 — Desktop split view: map and scrollable directory are equal halves
   and share exactly the same height. Mobile keeps the previous stacked flow. */
@media (min-width: 981px) {
    .lsc-layout:not(.lsc-layout--map):not(.lsc-layout--list) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
        height: var(--lsc-directory-height, 680px);
        min-height: 0;
    }

    .lsc-layout:not(.lsc-layout--map):not(.lsc-layout--list) .lsc-map-wrap {
        position: relative;
        top: auto;
        align-self: stretch;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .lsc-layout:not(.lsc-layout--map):not(.lsc-layout--list) .lsc-map {
        height: 100% !important;
        min-height: 0;
    }

    .lsc-layout:not(.lsc-layout--map):not(.lsc-layout--list) .lsc-list {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .lsc-layout:not(.lsc-layout--map):not(.lsc-layout--list) .lsc-list::-webkit-scrollbar {
        width: 10px;
    }

    .lsc-layout:not(.lsc-layout--map):not(.lsc-layout--list) .lsc-list::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .lsc-layout:not(.lsc-layout--map):not(.lsc-layout--list) .lsc-list::-webkit-scrollbar-thumb {
        background: #b8b8b8;
        border: 2px solid #f1f1f1;
    }
}

@media (max-width: 980px) {
    .lsc-directory { --lsc-directory-height: auto !important; }
    .lsc-list {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/* v1.7 — Mobile: force results before the map.
   The DOM order is map -> list, so column-reverse renders list -> map. */
@media screen and (max-width: 980px) {
    .lsc-directory .lsc-layout.lsc-layout--both {
        display: flex !important;
        flex-direction: column-reverse !important;
        width: 100%;
    }

    .lsc-directory .lsc-layout.lsc-layout--both .lsc-list,
    .lsc-directory .lsc-layout.lsc-layout--both .lsc-map-wrap {
        width: 100%;
        min-width: 0;
        order: initial !important;
    }

    .lsc-directory .lsc-layout.lsc-layout--both .lsc-list {
        border-top: 0;
        border-bottom: 1px solid var(--lsc-border);
    }

    .lsc-directory .lsc-layout.lsc-layout--both .lsc-map-wrap {
        border-top: 1px solid var(--lsc-border);
    }
}
