.masters-view-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:18px 0}
.masters-view-controls>span{font-size:12px;color:var(--muted)}
.masters-view-switch{display:flex;gap:5px;padding:5px;border:1px solid var(--line);border-radius:13px;background:var(--soft)}
.masters-view-switch button{min-height:44px;padding:10px 19px;border:0;border-radius:9px;background:transparent;color:var(--ink);font:600 13px Arial,sans-serif;cursor:pointer}
.masters-view-switch button[aria-pressed=true]{background:#ff501b;color:#fff;box-shadow:0 3px 10px #ee481b22}
.masters-map-panel{border:1px solid var(--line);border-radius:18px;padding:16px;background:var(--soft);scroll-margin-top:110px}
.masters-map-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.masters-map-toolbar p{flex:1 1 180px;font-size:13px;line-height:1.5;color:var(--ink);margin:0}
.masters-map-toolbar button,.masters-map-retry{min-height:42px;padding:10px 13px;border:1px solid var(--line);border-radius:9px;background:var(--request-surface,#fff);color:var(--request-text,#17212b);font:600 12px Arial,sans-serif;cursor:pointer}
#masters-map{height:500px;min-height:340px;border-radius:13px;background:#e8eee8;isolation:isolate;z-index:0;font-family:Arial,sans-serif}
.masters-map-message{font-size:12px;line-height:1.6;color:var(--request-text,#17212b);margin:12px 0 0}
.masters-map-privacy{font-size:11px;line-height:1.65;color:var(--muted);margin:10px 0 0}
.masters-map-retry{margin-top:10px}
#masters-map .leaflet-control-attribution{font:10px/1.5 Arial,sans-serif;background:#ffffffed;color:#293947}
#masters-map .leaflet-control-attribution a{color:#175a82}
.master-map-pin{background:transparent;border:0;cursor:pointer}
.master-map-avatar{display:block;position:relative;flex:none;width:56px;height:56px;aspect-ratio:1;border-radius:50%;background:#e7edf3;color:#2b455b}
.master-map-avatar-crop{display:block;position:absolute;inset:0;overflow:hidden;border-radius:50%;isolation:isolate}
.master-map-avatar-crop>span{position:absolute;inset:0;display:grid;place-items:center;font:bold 23px/1 Arial,sans-serif}
/* Leaflet loads later and sets marker images to width:auto. Keep this scoped
   override stronger than that reset; map tiles must retain Leaflet's sizing. */
#masters-map .master-map-avatar img{display:block;position:absolute;inset:0;width:100%;height:100%;max-width:100%!important;max-height:100%!important;object-fit:cover;object-position:center;border-radius:50%;margin:0;padding:0;border:0;filter:none!important;mix-blend-mode:normal!important}
.master-map-pin-photo{box-sizing:border-box;border:3px solid white;box-shadow:0 0 0 2px #d04a22,0 4px 14px #18293755}
.master-map-pin.is-nearest .master-map-pin-photo{box-shadow:0 0 0 3px #168268,0 4px 14px #18293755}
.master-map-pin:focus-visible{outline:3px solid #176deb;outline-offset:6px;border-radius:50%}
.master-map-group-count{position:absolute;right:-8px;bottom:-4px;min-width:23px;height:23px;padding:0 5px;border:2px solid #fff;border-radius:20px;background:#d34116;color:white;text-align:center;font:bold 12px/19px Arial,sans-serif}
#masters-map .master-photo-popup .leaflet-popup-content-wrapper,#masters-map .master-photo-popup .leaflet-popup-tip{background:var(--request-surface,#fff);color:var(--request-text,#17212b)}
#masters-map .master-photo-popup .leaflet-popup-content{margin:22px 17px 17px;font:12px/1.6 Arial,sans-serif;overflow-wrap:anywhere}
#masters-map .master-photo-popup a.leaflet-popup-close-button{width:36px;height:36px;font:24px/36px Arial;color:var(--request-text,#17212b)}
.master-map-detail+.master-map-detail{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}
.master-map-detail-head{display:flex;align-items:center;gap:12px;padding-right:12px}
.master-map-detail-head>div{min-width:0}
.master-map-detail h3{font:bold 18px/1.25 Arial,sans-serif;margin:4px 0;color:var(--request-text,#17212b)}
.master-map-specialty{color:var(--request-muted,#566473);font-size:11px}
#masters-map .master-map-detail p{margin:10px 0;font-size:12px;line-height:1.6;color:var(--request-text,#17212b)}
.master-map-nearest-label{font-size:9px;font-weight:bold;color:#168268}
.master-map-services{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}
.master-map-services span{padding:4px 7px;border-radius:6px;background:var(--request-field,#f5f7fa);color:var(--request-text,#17212b);font-size:10px}
.master-map-detail details{margin:12px 0}.master-map-detail summary{cursor:pointer;font-weight:600}.master-map-detail details p{white-space:pre-line}
.master-map-contact{display:grid;gap:8px;margin-top:14px}
#masters-map .master-map-contact a{display:block;min-height:42px;padding:10px;border-radius:8px;text-align:center;text-decoration:none;font-weight:bold}
#masters-map .master-map-call{background:#f44d1d;color:white}
#masters-map .master-map-route{border:1px solid var(--request-border,#aab6c3);color:var(--request-text,#17212b);background:var(--request-field,#f5f7fa)}
.master-map-shared{font-weight:bold;border-bottom:1px solid var(--line);padding-bottom:9px}
html[data-theme=dark] #masters-map{background:#22303a}
html[data-theme=dark] #masters-map .leaflet-tile-pane{filter:brightness(.7) saturate(.65)}
html[data-theme=dark] .master-map-nearest-label{color:#6fdfb1}
html[data-theme=dark] .masters-view-switch button:not([aria-pressed=true]){color:#e4edf4}
@media(max-width:600px){.masters-view-switch{width:100%}.masters-view-switch button{flex:1;padding:10px 8px}.masters-map-panel{padding:10px;border-radius:14px}#masters-map{height:460px;max-height:70svh;min-height:370px}.masters-map-toolbar p{flex-basis:100%}.masters-map-toolbar button{flex:1}.masters-map-privacy{font-size:10px}.master-map-detail-head{gap:9px}.master-map-detail-head .master-map-avatar{width:44px;height:44px}.master-map-detail h3{font-size:16px}}
