/* Map desk (s10mapdesk, #6599; universal). */
/* the map fills the app's whole working area on desktop: rail to right edge, down to the bottom; pills and card float over it */
@media (min-width: 761px) { .ui-main:has(.umd) { max-width: none; width: 100%; margin: 0; padding: 0; } }
.umd { position: relative; width: 100%; height: var(--umd-h, 100dvh); min-height: 420px; overflow: hidden; background: var(--bg); }
.umd-map { position: absolute; inset: 0; z-index: 0; background: #e8e6df; }
.umd-bar { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 500; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; }
.umd.has-sel .umd-bar { right: 414px; }
.umd-pill { pointer-events: auto; min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
.umd-pill.on:not(.is-layer) { background: var(--primary); border-color: var(--primary); color: #fff; }
.umd-pill.is-layer:not(.on) { opacity: .6; }
.umd-pill.is-layer:not(.on) i { background: transparent !important; box-shadow: inset 0 0 0 2px var(--muted); }
.umd-pill i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.umd-pill small { color: var(--muted); font-weight: 600; }
/* s8legend (#6683): the color key of a layer that colors its pins by a value */
.umd-legend { pointer-events: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 38px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.umd-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.umd-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.umd-legend small { color: var(--muted); font-weight: 600; }
.umd-pill:focus-visible, .umd-x:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.umd-sep { width: 8px; }
.umd-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; z-index: 600; width: 390px; max-width: calc(100% - 24px); overflow: auto; padding: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius, 12px); box-shadow: 0 10px 34px rgba(0, 0, 0, .24); }
.umd-panel[hidden] { display: none; }
.umd-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.umd-x:hover { background: var(--bg); }
.umd-kind { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.umd-card h3 { margin: 4px 36px 4px 0; font-size: 20px; line-height: 1.25; }
.umd-sub { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.umd-card > * + * { margin-top: 10px; }
.umd-pin { background: none; border: 0; }
.umd-pin span { display: flex; width: 100%; height: 100%; box-sizing: border-box; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid #fff; color: #fff; font-size: 11.5px; font-weight: 800; box-shadow: 0 2px 7px rgba(0, 0, 0, .4); transition: transform .12s; }
/* dedgroupmap */
.umd-pin.is-group span { font-size: 15px; font-weight: 800; }
.umd-list { display: flex; flex-direction: column; gap: 8px; }
.umd-row { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 48px; padding: 10px 12px; text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.umd-row span { font-size: 13px; color: var(--muted); }
.umd-back { display: inline-block; min-height: 40px; padding: 0 2px; font: inherit; font-size: 14px; color: var(--primary); background: none; border: 0; cursor: pointer; }
.umd-pin.is-sel span { transform: scale(1.22); box-shadow: 0 0 0 3px var(--primary), 0 3px 10px rgba(0, 0, 0, .45); }
.umd-pin.is-pulse { animation: umd-pulse 1.6s ease-out infinite; border-radius: 50%; }
@keyframes umd-pulse { 0% { box-shadow: 0 0 0 0 rgba(196, 61, 46, .55); } 100% { box-shadow: 0 0 0 20px rgba(196, 61, 46, 0); } }
@media (prefers-reduced-motion: reduce) { .umd-pin.is-pulse { animation: none; box-shadow: 0 0 0 5px rgba(196, 61, 46, .4); } .umd-pin span { transition: none; } }
.umd-edit { border: 1px dashed var(--border); border-radius: var(--radius, 12px); padding: 14px; display: grid; gap: 10px; min-height: 200px; }
.umd-edit-h { font-weight: 600; font-size: 14px; }
.umd-layer-edit { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.umd-layer-edit small { color: var(--muted); }
@media (max-width: 760px) {
  .umd.has-sel .umd-bar { right: 14px; }
  .umd-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; pointer-events: auto; }
  .umd-pill { flex: none; }
  .umd-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 62%; border-radius: 16px 16px 0 0; }
}
/* s6599fit (#6599, opt-in prop phone_fit): the map in its own layer (its pills and card stay inside it, under the sticky top bar), and on a
   phone the page's bottom padding is not added below it (the map already stops at the bottom menu). Not set = no change. */
.umd.umd--fit { isolation: isolate; min-height: 320px; }
@media (max-width: 760px) { .ui-main:has(.umd--fit) { padding-bottom: 0; } }
/* s6599fit2: pinned on a phone between the top bar (--umd-top) and the bottom menu (--umd-bot); the page under it cannot move it */
@media (max-width: 760px) { .umd.umd--fit.umd--pin { position: fixed; left: 0; right: 0; top: var(--umd-top, 0px); bottom: var(--umd-bot, 0px); height: auto; min-height: 0; z-index: 5; } .ui-main:has(.umd--pin) { min-height: 0; } }
.umd-pin span img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.umd-pin span:has(img) { padding: 0; border-width: 3px; }
/* areadraw (#6599 osdzone, universal): draw an area on a map */
.uad{display:flex;flex-direction:column;gap:10px}
.uad-new{display:grid;grid-template-columns:1fr 1fr;gap:10px}.uad-new label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600;color:var(--text)}
.uad-map{height:min(60vh,460px);min-height:300px;border:1px solid var(--border);border-radius:var(--radius,12px);overflow:hidden;background:color-mix(in srgb,var(--text) 4%,transparent)}
.uad-ph{display:grid;place-items:center;height:100%;color:var(--muted);font-size:14px}
.uad-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.uad-n{flex:1;min-width:160px;color:var(--muted);font-size:13.5px}
.uad-msg{font-size:13.5px;color:#067647;min-height:1.2em}.uad-msg.is-bad{color:#B42318}
.uad-h{display:grid;place-items:center}.uad-h span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#2f6f9f;color:#fff;font:700 12px/1 var(--font,inherit);border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.35);cursor:grab}
@media (max-width:520px){.uad-new{grid-template-columns:1fr}.uad-bar .u-button{flex:1}}
/* s6599card (#6599, opt-in card_photo): photo left of the name in the selection card */
.umd-head{display:flex;align-items:center;gap:14px;margin-right:36px}.umd-head>div{min-width:0}.umd-head h3{margin-right:0}.umd-head .umd-sub{margin-bottom:0}
.umd-hphoto{width:56px;height:56px;border-radius:50%;object-fit:cover;flex:none;background:var(--bg)}
