/* «Карта» v2 (public/family-map.js, Andrew 23.10 — as the photo sites): the full site's window and /m/'s screen. */
.family-map{display:grid;gap:12px}
.fm-head{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.fm-switch{display:inline-flex;border:1px solid #cfd6c8;border-radius:999px;padding:3px;background:#fffefa;gap:2px}
.fm-switch button{border:0;border-radius:999px;padding:8px 14px;min-height:36px;background:transparent;color:#365c48;font:600 14px/1.2 system-ui,sans-serif;cursor:pointer}
.fm-switch button[aria-pressed=true]{background:#365c48;color:#fff}
.fm-note{margin:0;color:#596657;font:14px/1.4 system-ui,sans-serif}
.fm-box{position:relative}
.fm-map{border:1px solid #dddeda;border-radius:14px;background:#e8eef0;overflow:hidden;width:100%}
.fm-map svg{display:block;width:100%;height:auto;max-height:calc(100dvh - 230px);touch-action:pan-y}
.fm-map svg path{fill:#d9dccf;stroke:#fff;stroke-width:.5;vector-effect:non-scaling-stroke}
.fm-map svg path.has{cursor:pointer;stroke:#fffdf8;stroke-width:.8}
.fm-map svg path.l1{fill:#e8c98a}.fm-map svg path.l2{fill:#d9a95a}.fm-map svg path.l3{fill:#c08235}.fm-map svg path.l4{fill:#94601f}
.fm-map svg path.has:hover,.fm-map svg path.has:focus-visible,.fm-map svg path.on{fill:#5b3d12;outline:none}
.fm-map.zoomed svg{cursor:grab}.fm-map.zoomed svg:active{cursor:grabbing}
/* The dots: white bold figures on dark terracotta with a white rim (sizes set in screen pixels by the script). */
.fm-dot{cursor:pointer;outline:none}
.fm-dot circle{fill:#8f3b23;stroke:#fff}
.fm-dot text{fill:#fff!important;stroke:none!important;paint-order:normal;font-weight:800;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;pointer-events:none}
.fm-dot.on circle,.fm-dot:hover circle,.fm-dot:focus-visible circle{fill:#365c48}
.fm-zoom{position:absolute;top:10px;inset-inline-end:10px;display:flex;flex-direction:column;gap:6px}
.fm-zoom button{width:44px;height:44px;border-radius:10px;border:1px solid #dddeda;background:rgba(255,253,248,.94);color:#232923;font:600 20px/1 system-ui,sans-serif;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.fm-zoom button:focus-visible{outline:2px solid #b68c50;outline-offset:1px}
@media (max-width:599px){.fm-zoom{flex-direction:row;top:auto;bottom:8px;inset-inline-end:8px}}
.fm-list{display:grid;gap:6px}
.fm-title{margin:4px 0 0;font:600 18px/1.3 system-ui,sans-serif}
.fm-places{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px 18px}
.fm-place h4{margin:6px 0 4px;font:600 16px/1.3 system-ui,sans-serif}.fm-place h4 small{color:#596657;font-weight:500}
.fm-place ul{margin:0;padding-inline-start:18px}.fm-place li{margin:3px 0}
.fm-place a{color:#365c48;text-underline-offset:3px}
/* The full site: the map's window over the page and its button in the header, seen at once (Andrew 23.10). */
.family-map-dialog{width:min(1160px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:18px;background:#f5f3ed;box-shadow:0 20px 60px #0005;overflow:auto}
.family-map-dialog::backdrop{background:#1f2a2399}
.fmd-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#232923;color:#fff}
.fmd-head h2{margin:0;font:600 20px/1.2 Georgia,serif}
.fmd-close{min-width:44px;min-height:40px;border:1px solid #f3dca680;border-radius:20px;background:transparent;color:#f3dca6;font:600 16px/1 system-ui,sans-serif;cursor:pointer}
.fmd-body{padding:14px 18px 22px}
.map-button{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 14px;margin-inline-end:8px;border:1px solid #f3dca680;border-radius:20px;background:transparent;color:#f3dca6;font:600 14px/1 system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.map-button:hover{background:#ffffff14}.map-button:focus-visible{outline:2px solid #f3dca6;outline-offset:2px}
@media (max-width:1120px){.map-button-text{display:none}.map-button{padding:0 10px}}
/* /m/: the map's screen fitted to the width, the note in the usual size (Andrew's iPad 23.10). */
.m-map-screen{padding:12px 16px 24px}.m-map-screen h1{margin:4px 0 10px;font-size:1.5rem}
/* /m/: the title with a large ✕ at its end (right; left in Hebrew), never over the map's + and −. */
.m-map-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.m-map-head h1{margin:0;min-width:0}
.m-map-close{flex:none;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;background:#232923;color:#fff;font:600 22px/1 system-ui,sans-serif;box-shadow:0 3px 10px #0003;cursor:pointer}
.m-map-close:focus-visible{outline:3px solid #b68c50;outline-offset:2px}
.m-map-screen .fm-map svg{max-height:none}
/* «⚙ Администратор» (public/family-admin-cabinet.js): the full site's dialog and the /m/ screen share these. */
.admin-cabinet-dialog{width:min(760px,calc(100vw - 24px))}.admin-cabinet-dialog h2{margin:0 0 8px}
.fac{display:grid;gap:12px}
.fac-sec{border:1px solid #dddeda;border-radius:14px;padding:14px 16px;background:#fffefa}
.fac-sec h3{margin:0 0 8px;font-size:16px}
.fac-muted{color:#596657;font-size:14px;margin:0 0 8px}
.fac-row{display:flex;flex-wrap:wrap;gap:8px}
.fac-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 14px;border:1px solid #cfd6c8;border-radius:12px;background:#f2f5ee;color:#24342b;font:600 14px/1.2 system-ui,sans-serif;text-decoration:none;cursor:pointer}
.fac-btn:disabled{opacity:.55;cursor:default}
.fac-share{display:grid;gap:8px;margin-top:10px}
.fac-text{width:100%;box-sizing:border-box;font:14px/1.45 system-ui,sans-serif;padding:8px 10px;border:1px solid #cfd6c8;border-radius:10px;resize:vertical}
.fac-log{margin:0;padding-inline-start:18px;font-size:14px}.fac-log li{margin:4px 0}.fac-when{color:#596657}
.fac-face .face-portraits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:10px 0}
@media(min-width:600px){.fac-face .face-portraits{grid-template-columns:repeat(3,minmax(0,1fr))}}
.fac-face .face-portrait{margin:0;display:grid;gap:6px;min-width:0}.fac-face .face-portrait img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px}
.fac-face .face-portrait.is-shown img{outline:3px solid #365c48;outline-offset:2px}
.fac-face .face-portrait button{width:100%;min-height:40px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fac-face .profile-actions{display:flex;flex-wrap:wrap;gap:8px}
.fac-access h4{display:none}
/* A finger's screen (Andrew 24.10: the map was a thin strip on the iPad and a phone): a taller map, the family's places filling it. */
@media (hover:none),(max-width:899px){.fm-map svg,.m-map-screen .fm-map svg{height:clamp(280px,56dvh,640px);max-height:none}}
/* «Во весь экран»: the map over the whole screen; one finger moves it there; «✕ Выйти» always seen; a place's people below. */
.fm-exit,.fm-list-x{display:none}
html.fm-full-open{overflow:hidden}
.family-map.fm-full .fm-box{position:fixed;inset:0;z-index:2147482600;display:flex;flex-direction:column;background:#e8eef0}
.family-map.fm-full .fm-map{flex:1;min-height:0;border:0;border-radius:0}
.family-map.fm-full .fm-map svg{height:100%;max-height:none;touch-action:none}
.family-map.fm-full .fm-full-btn{display:none}
.family-map.fm-full .fm-zoom{flex-direction:column;top:auto;bottom:calc(16px + env(safe-area-inset-bottom,0px));inset-inline-end:max(12px,env(safe-area-inset-right,0px))}
.family-map.fm-full .fm-exit{display:inline-flex;align-items:center;gap:6px;position:absolute;top:calc(12px + env(safe-area-inset-top,0px));inset-inline-start:max(12px,env(safe-area-inset-left,0px));z-index:2;min-height:44px;padding:0 18px;border:0;border-radius:22px;background:#232923;color:#fff;font:600 15px/1 system-ui,sans-serif;box-shadow:0 4px 14px #0004;cursor:pointer}
.family-map.fm-full .fm-list{display:none}
.family-map.fm-full.fm-picked .fm-list{display:block;position:fixed;inset-inline:0;bottom:0;z-index:2147482700;max-height:45dvh;overflow:auto;padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px));background:#fffefa;border-radius:18px 18px 0 0;box-shadow:0 -10px 30px #0003}
.family-map.fm-full .fm-list-x{display:grid;place-items:center;float:inline-end;width:44px;height:44px;margin-block:-4px 0;margin-inline:8px -6px;border:0;border-radius:50%;background:#eef1e9;color:#232923;font:600 18px/1 system-ui,sans-serif;cursor:pointer}
