/* Scoped to Em Morro's directory. Journey feature bars retain their original layout. */
.category-map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:18px 0}
.category-map-toggle{display:flex;gap:4px;padding:4px;border:1px solid var(--line,#d3dfea);border-radius:999px;background:var(--surface,#f2f7fc)}
.category-map-toggle button{border:0;border-radius:999px;padding:10px 20px;background:transparent;color:inherit;font:inherit;font-size:14px;font-weight:750;cursor:pointer;white-space:nowrap}
.category-map-toggle button[aria-pressed="true"]{background:#0868df;color:#fff;box-shadow:0 3px 10px #0868df24}
.category-map-region{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:650;min-width:0}
.category-map-region select{max-width:100%;border:1px solid var(--line,#cbd9e6);border-radius:12px;padding:10px;background:var(--surface,#fff);color:inherit;font:inherit}
.category-map-panel{min-width:0;scroll-margin-top:90px}
.category-map-summary{font-size:13px;line-height:1.6;margin:0 0 14px;color:var(--muted,#526580)}
.category-map-layout{display:grid;grid-template-columns:minmax(180px,250px) minmax(0,1fr);gap:16px;align-items:start}
.category-map-main{min-width:0}
.category-map-list{display:flex;flex-direction:column;gap:8px;max-height:480px;overflow-y:auto;padding:3px 6px 3px 2px;overscroll-behavior:contain}
.category-map-area{min-width:0;flex-shrink:0}
.category-map-area summary{display:flex;align-items:center;gap:8px;padding:12px 4px;cursor:pointer;list-style:none;border-bottom:1px solid var(--line,#d4deeb);font-size:14px;font-weight:750;line-height:1.4;color:inherit}
.category-map-area summary::-webkit-details-marker{display:none}
.category-map-area summary>span{flex:1;min-width:0}
.category-map-area summary small{font-weight:500;color:inherit;white-space:nowrap}
.category-map-area summary b{font-size:18px;font-weight:500}
.category-map-area[open] summary b{font-size:0}.category-map-area[open] summary b:after{content:'−';font-size:18px}
.category-map-area-items{display:flex;flex-direction:column;gap:8px;padding:8px 0}
.category-map-area:not([open])>.category-map-area-items{display:none}
.category-map-visible{display:table;border:1px solid var(--line,#d4deeb);border-radius:999px;padding:7px 12px;margin:0 0 10px;font-size:12px;font-weight:650;line-height:1.4;color:inherit}
.category-map-pin-label{display:flex;flex-direction:column;align-items:center;gap:4px}
.category-map-pin b.has-logo{width:36px;height:36px;padding:3px;box-sizing:border-box;background:#fff;overflow:hidden}
.category-map-pin[aria-pressed="true"] b.has-logo{border-color:#ef8e22;background:#fff}
.category-map-pin .partner-logo{display:block;width:100%!important;height:100%!important;max-width:100%;object-fit:contain;transform:scale(var(--map-logo-zoom,1));border:0;border-radius:0;background:transparent;padding:0;margin:0}
.category-map-pin .partner-logo[hidden]{display:none!important}
.category-map-pin.is-crowded .category-map-pin-label{display:none}.category-map-pin.is-crowded:hover .category-map-pin-label,.category-map-pin.is-crowded:focus-visible .category-map-pin-label{display:flex}
.category-map-list button{display:grid;gap:6px;text-align:left;padding:13px;border:1px solid var(--line,#d4deeb);border-radius:14px;background:var(--surface,#fff);color:inherit;cursor:pointer}
.category-map-list-heading{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.category-map-list-heading strong{width:100%;min-width:0;overflow-wrap:normal;word-break:normal;hyphens:none}
.category-map-list .directory-verified-badge{flex:0 0 auto;max-width:none;padding:1px 4px;font-size:8px;line-height:1.2;white-space:nowrap;box-sizing:border-box}
.category-map-list strong{font-size:14px;line-height:1.4}.category-map-list small{font-size:11px;color:var(--muted,#526580)}
.category-map-list button[aria-pressed="true"]{border-color:#1178f2;box-shadow:inset 3px 0 #1178f2;background:#e8f3ff;color:#153453}.category-map-list button[aria-pressed="true"] small{color:#48617a}
.category-map-canvas{position:relative;isolation:isolate;width:100%;height:480px;overflow:hidden;border:1px solid #b9cadd;border-radius:22px;background:#e7eef1;touch-action:none;overscroll-behavior:contain;user-select:none;-webkit-user-select:none;cursor:grab;color:#152c45}
.category-map-canvas:active{cursor:grabbing}.category-map-canvas:focus-visible{outline:3px solid #ffbf31;outline-offset:3px}
.category-map-tiles,.category-map-pins{position:absolute;inset:0;pointer-events:none}
.category-map-tiles img{position:absolute;width:256px!important;height:256px!important;max-width:none!important;border-radius:0!important;user-select:none;transform-origin:0 0}
.category-map-pin{position:absolute;z-index:1;display:flex;flex-direction:column;align-items:center;gap:3px;transform:translate(-50%,-100%);border:0;padding:0;background:none;color:#17518c;pointer-events:auto;cursor:pointer;max-width:145px}
.category-map-pin span{background:#fff;border:1px solid #cbd9e6;border-radius:8px;padding:4px 7px;font-size:10px;font-weight:750;line-height:1.2;box-shadow:0 2px 8px #12334d26;text-align:center;color:#183752}
.category-map-pin b{display:grid;place-items:center;width:20px;height:20px;border:3px solid #fff;border-radius:50%;background:#0869dd;color:#fff;font-size:11px;box-shadow:0 2px 6px #092e5766}
.category-map-pin.is-crowded span{display:none}.category-map-pin.is-crowded:hover span,.category-map-pin.is-crowded:focus-visible span{display:block}
.category-map-pin:is(.is-verified,.is-essential) .category-map-pin-label{display:none}
.category-map-pin:is(.is-verified,.is-essential):hover .category-map-pin-label,.category-map-pin:is(.is-verified,.is-essential):focus-visible .category-map-pin-label,.category-map-pin:is(.is-verified,.is-essential).is-name-revealed .category-map-pin-label{display:flex}
.category-map-pin:is(.is-verified,.is-essential):hover span,.category-map-pin:is(.is-verified,.is-essential):focus-visible span,.category-map-pin:is(.is-verified,.is-essential).is-name-revealed span{display:block}
.category-map-pin[aria-pressed="true"],.category-map-pin:focus-visible{z-index:4}.category-map-pin[aria-pressed="true"] span{background:#0768dc;color:#fff;border-color:#fff}.category-map-pin[aria-pressed="true"] b{background:#ef8e22}
.category-map-controls{position:absolute;top:12px;right:12px;z-index:5;display:grid;gap:6px}
.category-map-controls button{width:38px;height:38px;border:1px solid #c6d4df;border-radius:11px;background:#fff;color:#123657;font-size:24px;box-shadow:0 2px 8px #12334d26;cursor:pointer}
.category-map-attribution{position:absolute;bottom:0;right:0;z-index:5;display:flex;align-items:center;gap:4px;padding:3px 5px;background:#fffffff0;color:#263d55;font-size:9px;line-height:1.4;max-width:100%}
.category-map-attribution button{border:0;background:none;color:#155b9a;padding:3px;font-size:15px;cursor:pointer}
.category-map-status{font-size:12px;line-height:1.5;margin:10px 2px;color:var(--muted,#526580)}
.category-map-status[data-kind="error"]{background:#fff1d6;border-radius:10px;padding:10px;color:#783c09}
.category-map-selection{border:1px solid var(--line,#d3dfea);border-radius:18px;padding:18px;background:var(--surface,#fff)}
.category-map-selection:empty{display:none}.category-map-selection .category-map-selection-area{font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#526580)}
.category-map-selection h3{font-size:19px;margin:7px 0;line-height:1.3}.category-map-selection p{font-size:13px;line-height:1.5;margin:7px 0 14px;color:var(--muted,#526580)}
.category-map-actions{display:flex;gap:8px;flex-wrap:wrap}.category-map-actions button{font-size:13px;padding:10px 16px}
/* A profile sheet is not the directory's multi-column list. */
.business-profile-card{min-width:0;max-width:100%;--partner-ink:#183653;--partner-muted:#50647b;--partner-line:#cbdbea;--partner-soft:#edf5ff}
.business-profile-card>.directory-card{display:flex;flex-direction:column;align-items:stretch;gap:16px;width:100%;max-width:100%;min-width:0;box-sizing:border-box;padding:16px}
.business-profile-card>.directory-card>*{min-width:0;max-width:100%;box-sizing:border-box}
.business-profile-card .directory-card-heading{width:100%}
.business-profile-card .directory-listing-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:10px;margin:0 0 11px}
.business-profile-card .directory-type{min-width:0;margin:0;font-size:12px;line-height:1.35;letter-spacing:.025em;text-wrap:pretty}
.business-profile-card .directory-verified-badge{flex:none;padding:2px 6px;border-radius:7px;font-size:9px;line-height:1.4;letter-spacing:0;text-transform:none;white-space:nowrap}
.business-profile-card .partner-identity{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0}
.business-profile-card .partner-identity>.partner-logo{width:44px;height:44px;flex:0 0 44px;box-sizing:border-box;padding:4px;border:1px solid var(--partner-line);border-radius:10px;background:#fff;object-fit:contain}
.business-profile-card .partner-identity h3{flex:1;min-width:0;margin:0;overflow-wrap:break-word;text-wrap:pretty}
.business-profile-card .directory-copy{width:100%;overflow-wrap:anywhere}
.business-profile-card .directory-copy>p,.business-profile-card .directory-route-notice{font-size:14px;line-height:1.55;margin:0;color:var(--partner-muted)}
.business-profile-card .directory-card-actions{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;gap:8px;width:100%;padding:0}
.business-profile-card .directory-card-actions :is(a,button){min-width:0;max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere;padding:10px 12px;font-size:13px;line-height:1.4}
html[data-theme="dark"] .business-profile-card{--partner-ink:#eff6ff;--partner-muted:#bacde1;--partner-line:#355475;--partner-soft:#142f4c}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .business-profile-card{--partner-ink:#eff6ff;--partner-muted:#bacde1;--partner-line:#355475;--partner-soft:#142f4c}}
@media(max-width:420px){.business-profile-card>.directory-card{padding:12px}.business-profile-card .partner-identity>.partner-logo{width:36px;height:36px;flex-basis:36px;padding:3px;border-radius:8px}.business-profile-card .partner-identity h3{font-size:20px;line-height:1.25}.business-profile-card .directory-type{font-size:11.5px;letter-spacing:.015em}}
#directory-categories.category-row{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;max-width:100%;min-width:0}
.category-story-media svg{display:block;width:100%;height:100%}
.category-map-panel[hidden],.category-map-region[hidden],.category-map-canvas[hidden]{display:none!important}
html[data-theme="dark"] .category-map-selection,html[data-theme="dark"] .category-map-list button:not([aria-pressed="true"]),html[data-theme="dark"] .category-map-region select,html[data-theme="dark"] .category-map-toggle{background:#12263d;border-color:#2f4862;color:#e7f1ff}
html[data-theme="dark"] .category-map-summary,html[data-theme="dark"] .category-map-selection p,html[data-theme="dark"] .category-map-selection .category-map-selection-area,html[data-theme="dark"] .category-map-status,html[data-theme="dark"] .category-map-list button:not([aria-pressed="true"]) small{color:#afc4dc}
html[data-theme="dark"] .category-map-status[data-kind="error"]{background:#41321a;color:#ffdc9c}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .category-map-selection,html:not([data-theme="light"]) .category-map-list button:not([aria-pressed="true"]),html:not([data-theme="light"]) .category-map-region select,html:not([data-theme="light"]) .category-map-toggle{background:#12263d;border-color:#2f4862;color:#e7f1ff}html:not([data-theme="light"]) .category-map-summary,html:not([data-theme="light"]) .category-map-selection p,html:not([data-theme="light"]) .category-map-selection .category-map-selection-area,html:not([data-theme="light"]) .category-map-status,html:not([data-theme="light"]) .category-map-list button:not([aria-pressed="true"]) small{color:#afc4dc}html:not([data-theme="light"]) .category-map-status[data-kind="error"]{background:#41321a;color:#ffdc9c}}
@media(max-width:720px){.category-map-toolbar{gap:10px}.category-map-layout{display:flex;flex-direction:column-reverse;gap:12px}.category-map-main{width:100%}.category-map-canvas{height:390px;border-radius:18px}.category-map-list{flex-direction:row;width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:3px 2px 10px;scroll-snap-type:x proximity}.category-map-list button{flex:0 0 174px;scroll-snap-align:start}.category-map-toggle button{font-size:13px;padding:9px 15px}.category-map-region{font-size:12px}.category-map-selection{padding:15px}.category-map-pin span{font-size:9px;max-width:105px}.category-map-summary{font-size:12px}}
@media(max-width:720px){.category-map-list:has(.category-map-area){flex-direction:column;overflow-x:hidden;overflow-y:auto}.category-map-area-items button{flex:0 0 auto;width:100%}}

/* Full-window map reuses the same canvas, markers and controls. */
.category-map-fullscreen{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);box-sizing:border-box;border:0;background:var(--surface,#fff);color:var(--text,#153453);}
.category-map-fullscreen[open]{display:flex;flex-direction:column;gap:0;}
.category-map-fullscreen::backdrop{background:#10243deb;}
.category-map-fullscreen>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;flex:none;}
.category-map-fullscreen>header button{min-height:44px;white-space:nowrap;}
.category-map-fullscreen-body{flex:1;min-height:0;min-width:0;}
.category-map-fullscreen .category-map-canvas{height:100%;border-radius:0;box-sizing:border-box;}
.category-map-fullscreen [data-category-map="fullscreen"]{display:none;}
html[data-theme="dark"] .category-map-fullscreen{background:#12263d;color:#e7f1ff;}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .category-map-fullscreen{background:#12263d;color:#e7f1ff;}}

/* The floating place card travels with the same map in fullscreen. */
.category-map-stage{position:relative;min-width:0;isolation:isolate;}
.category-map-stage .category-map-selection{position:absolute;z-index:6;left:50%;bottom:36px;transform:translateX(-50%);width:calc(100% - 24px);max-width:420px;box-sizing:border-box;padding:13px;border-radius:20px;background:var(--surface,#fff);color:var(--text,#153453);box-shadow:0 12px 38px #071c3b36;cursor:auto;}
.category-map-selection[hidden]{display:none!important;}
.category-map-selection-head{margin-bottom:13px;padding-right:46px;min-height:36px;}
.category-map-selection .category-map-selection-close{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid var(--line,#d3dfea);border-radius:50%;background:transparent;color:inherit;font:inherit;font-size:27px;line-height:1;cursor:pointer;}
.category-map-selection .category-map-selection-close:focus-visible{outline:3px solid #0868df;outline-offset:2px;}
.category-map-selection-meta{display:flex;align-items:center;gap:6px;min-width:0;}
.category-map-selection-meta .category-map-selection-area{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;}
.category-map-selection-head h3{margin:4px 0 0;font-size:17px;line-height:1.25;overflow-wrap:anywhere;}
.category-map-selection-head .directory-verified-badge{flex:none;max-width:100%;padding:1px 4px;font-size:8px;line-height:1.2;white-space:nowrap;box-sizing:border-box;}
.category-map-selection .category-map-actions{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.2fr);gap:8px;}
.category-map-selection .category-map-actions button{width:100%;min-width:0;min-height:48px;padding:10px;font-size:12px;line-height:1.3;white-space:normal;overflow-wrap:anywhere;text-wrap:balance;}
.category-map-fullscreen .category-map-stage{height:100%;}
.category-map-fullscreen .category-map-selection{bottom:max(36px,calc(env(safe-area-inset-bottom,0px) + 24px));}
html[data-theme="dark"] .category-map-stage .category-map-selection{background:#12263d;color:#e7f1ff;border-color:#355475;}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .category-map-stage .category-map-selection{background:#12263d;color:#e7f1ff;border-color:#355475;}}
@media(max-width:420px){.category-map-stage .category-map-selection{width:calc(100% - 20px);padding:13px;border-radius:17px;}.category-map-selection-head{margin-bottom:11px;}.category-map-selection-head h3{font-size:17px;}.category-map-selection .category-map-actions button{padding:10px 8px;}}

.category-map-stage .category-map-selection{max-height:calc(100% - 72px);overflow-y:auto;overscroll-behavior:contain;}
.category-map-stage:has(.category-map-canvas[hidden]):has(.category-map-selection:not([hidden])){min-height:260px;}

/* Manual map rotation preserves upright place names and logos at rotated coordinates. */
.category-map-tiles{transform-origin:50% 50%;will-change:transform;}
.category-map-pin{padding-bottom:11px;}
.category-map-pin::after,.category-map-pin::before{content:"";position:absolute;left:50%;width:0;height:0;transform:translateX(-50%);pointer-events:none;}
.category-map-pin::after{bottom:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:13px solid #fff;filter:drop-shadow(0 2px 2px #092e5766);}
.category-map-pin::before{z-index:1;bottom:3px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:9px solid #0869dd;}
.category-map-pin[aria-pressed="true"]::before{border-top-color:#ef8e22;}
.category-map-pin>b{position:relative;z-index:2;}
.category-map-pin b.has-logo{border-color:#0869dd;}
.category-map-pin[aria-pressed="true"] b.has-logo{border-color:#ef8e22;}
.category-map-controls [data-category-map="north"]{display:flex;align-items:center;justify-content:center;gap:1px;font-size:12px;font-weight:800;}
.category-map-north-arrow{display:inline-block;font-size:21px;line-height:1;color:#ba3f39;transform-origin:center;}
.category-map-north-label{font-size:10px;line-height:1;}
.category-map-controls [data-category-map="north"][data-rotated="true"]{border-color:#0869dd;box-shadow:0 0 0 2px #0869dd22;}
.category-map-controls [data-category-map="north"]{position:absolute;top:0;right:calc(100% + 8px);}
