/* Field maps v2. Values are from docs/redesign/design_handoff_facility_map/README.md
   (high fidelity: colors, type, spacing, radii and shadows are final).
   Desktop >= 761px: floating left panel. Phones <= 760px: concept 7b (glass nav + bottom sheet). */

:root {
  --ink: #17161C; --ink-hover: #2E2C36;
  --text: #1A1820; --text-2: #44404D; --text-3: #514C59; --muted: #6B6774; --muted-2: #6E6A76; --muted-3: #8A8592; --faint: #B7B2A8;
  --page: #FAF9F5; --card: #FFFFFF; --sunken: #F3F1EA; --row-hover: #FAF9F5;
  --hair: #E6E3DA; --control: #DAD6CC; --row-div: #F1EFE9; --handle: #D5D1C6;
  --night: #12203A; --night-3d: #0E1729; --on-dark: #F3F5F8; --on-dark-muted: #A9B4C2;
  --ok: #10D56C;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sg: 'Schibsted Grotesk', system-ui, sans-serif;
  --hg: 'Hanken Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); font-family: var(--hg); -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.fm-btn-reset, .fm button { all: unset; box-sizing: border-box; cursor: pointer; }
.fm button:focus-visible, .fm a:focus-visible, .fm input:focus-visible { outline: 2px solid #4F7BF7; outline-offset: 2px; border-radius: 8px; }
.fm-scroll { scrollbar-width: thin; scrollbar-color: var(--handle) transparent; }

/* ---------------------------------------------------------------- header/footer */
.fm-header { position: relative; z-index: 20; background: var(--page); border-bottom: 1px solid var(--hair); }
.fm-header .in { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 73px; }
.fm-header .logo { display: flex; align-items: center; }
.fm-header .logo img { height: 72px; width: auto; display: block; margin: -16px 0 -16px -24px; }
.fm-header nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.fm-header nav a { color: var(--text-2); text-decoration: none; }
.fm-header nav a:hover { color: var(--ink); }
.fm-header nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.fm-header nav a.cta { display: flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; }
.fm-header nav a.cta:hover { background: var(--ink-hover); color: #fff; }
.fm-footer { border-top: 1px solid var(--hair); background: var(--page); }
.fm-footer .in { max-width: 1200px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.fm-footer .links { display: flex; flex-wrap: wrap; gap: 24px; }
.fm-footer a { color: var(--muted); text-decoration: none; }
.fm-footer a:hover { color: var(--ink); }

/* -------------------------------------------------------------------- map stage */
.fm { position: relative; height: calc(100vh - 73px); min-height: 600px; overflow: hidden; background: var(--night); color: var(--text); }
#fmMap { position: absolute; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 9px !important; background: rgba(23,22,28,.5) !important; color: #D5D1C6 !important; }
.maplibregl-ctrl-attrib a { color: #D5D1C6 !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

/* Facility pin (README "Facility pin"): anchored bottom-center. */
.fm-pin { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 2.5px solid #fff; box-shadow: 0 3px 8px -2px rgba(23,22,28,.55); display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; transition: opacity .2s, transform .2s; transform-origin: 50% 92%; }
.fm-pin.hov { transform: scale(1.18); }
.fm-pin.on { transform: scale(1.3); }
.fm-pin.dim { opacity: .45; }
.fm-tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; pointer-events: none; font: 700 12px var(--hg); color: var(--text); background: #fff; border: 1px solid var(--hair); border-radius: 8px; box-shadow: 0 6px 16px -8px rgba(23,22,28,.45); padding: 5px 9px; opacity: 0; transition: opacity .15s; }
.fm-pinwrap:hover .fm-tip, .fm-pinwrap.hov .fm-tip { opacity: 1; }
.fm-pinwrap.on .fm-tip { opacity: 0 !important; }
/* State cluster (US level). */
.fm-cluster { height: 30px; padding: 0 4px 0 11px; border-radius: 999px; background: var(--ink); border: 2px solid #fff; box-shadow: 0 6px 16px -6px rgba(0,0,0,.6); display: flex; align-items: center; gap: 7px; white-space: nowrap; color: #fff; cursor: pointer; transition: transform .2s; }
.fm-cluster.hov { transform: scale(1.12); }
.fm-cluster .k { font: 800 12px var(--hg); letter-spacing: .06em; }
.fm-cluster .n { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; font: 800 11.5px var(--sg); }
/* .fm-cluster-wrap: MapLibre positions it (absolute), which also anchors its tooltip. */
.fm-cluster-wrap .fm-tip { bottom: calc(100% + 6px); }
.fm-cluster-wrap:hover .fm-tip { opacity: 1; }
/* Selected-facility callout (desktop). */
.fm-callout { margin-bottom: 30px; cursor: default; }
.fm-callout .card { background: #fff; border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 14px 32px -12px rgba(0,0,0,.6); padding: 10px 10px 10px 12px; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.fm-callout .nm { display: flex; flex-direction: column; gap: 1px; }
.fm-callout .nm b { font: 800 13.5px var(--sg); letter-spacing: -.01em; color: var(--text); }
.fm-callout .nm span { font: 600 11px var(--hg); color: var(--muted-3); }
.fm-callout .acts { display: flex; gap: 6px; }
.fm-callout a.dir { height: 32px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; display: flex; align-items: center; gap: 5px; font: 700 12px var(--hg); }
.fm-callout a.dir:hover { background: var(--ink-hover); }
.fm-callout button.d3 { all: unset; box-sizing: border-box; height: 32px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid var(--control); background: #fff; color: var(--text); display: flex; align-items: center; gap: 5px; font: 700 12px var(--hg); cursor: pointer; }
.fm-callout button.d3:hover { background: var(--sunken); }
.fm-callout .caret { position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: #fff; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); transform: rotate(45deg); }
/* Amenity map pill. */
.fm-apill { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 7px; border-radius: 999px; background: var(--ink); border: 2px solid #fff; box-shadow: 0 6px 14px -4px rgba(0,0,0,.6); white-space: nowrap; font: 700 12px var(--hg); color: #fff; }
.fm-apill { transition: transform .2s, box-shadow .2s; }
.fm-apill.focus { transform: scale(1.12); box-shadow: 0 0 0 3px #fff, 0 8px 18px -4px rgba(0,0,0,.6); }
.fm-apill .ic { width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; }

/* ------------------------------------------------------------------ desktop panel */
.fm-panel { position: absolute; top: 16px; left: 16px; bottom: 16px; width: min(400px, calc(100% - 32px)); z-index: 10; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hair); border-radius: 18px; box-shadow: 0 18px 48px -18px rgba(0,0,0,.55); overflow: hidden; }
.fm-top { position: relative; flex-shrink: 0; padding: 16px 16px 14px; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 12px; }
.fm-searchrow { display: flex; align-items: center; gap: 8px; }
.fm-search { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border-radius: 12px; background: var(--sunken); border: 1px solid transparent; cursor: text; color: var(--text); }
.fm-search input { all: unset; flex: 1; min-width: 0; font: 600 14.5px var(--hg); color: var(--text); }
.fm-search input::placeholder { color: var(--muted-3); }
.fm-search .clear { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(23,22,28,.12); display: flex; align-items: center; justify-content: center; }
.fm-search .slash { flex-shrink: 0; height: 20px; min-width: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--handle); display: flex; align-items: center; justify-content: center; font: 700 11px ui-monospace, Menlo, monospace; color: var(--muted-3); }
.fm .fm-hide { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--hair); display: flex; align-items: center; justify-content: center; color: var(--text); }
.fm .fm-hide:hover { background: var(--sunken); }
.fm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-statechip { position: relative; height: 34px; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--control); background: #fff; color: var(--text); font: 700 12.5px var(--hg); }
.fm-statechip.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.fm .fm-statechip .fm-dd { width: 28px; height: 32px; margin-right: -4px; display: flex; align-items: center; justify-content: center; }
.fm .fm-chip { height: 34px; padding: 0 14px; border-radius: 999px; display: flex; align-items: center; border: 1px solid var(--control); background: #fff; color: var(--text); font: 700 12.5px var(--hg); }
.fm .fm-chip:hover { border-color: var(--muted-3); }
.fm .fm-chip.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.fm-statedd { position: absolute; left: 0; top: 40px; width: 180px; z-index: 3; background: #fff; border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 14px 34px -14px rgba(23,22,28,.45); overflow: hidden; color: var(--text); }
.fm .fm-statedd button { width: 100%; min-height: 44px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; font: 700 13px var(--hg); color: var(--text); border-bottom: 1px solid var(--row-div); }
.fm .fm-statedd button:hover { background: var(--row-hover); }
.fm-results { position: absolute; left: 16px; right: 16px; top: 64px; z-index: 4; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(23,22,28,.45); }
.fm-result { min-height: 52px; padding: 10px 16px; display: flex; flex-direction: column; justify-content: center; gap: 2px; text-decoration: none; border-bottom: 1px solid var(--row-div); }
.fm-result:hover { background: var(--row-hover); }
.fm-result .n { font: 700 13.5px var(--hg); color: var(--text); }
.fm-result .m { font: 600 12px var(--hg); color: var(--muted-3); }
.fm-noresults { padding: 18px 16px; text-align: center; font: 600 13px var(--hg); color: var(--muted-2); }
#fmBody { flex: 1; min-height: 0; overflow-y: auto; }
.fm-scope { padding: 18px 20px 10px; display: flex; flex-direction: column; gap: 4px; }
.fm .fm-back { align-self: flex-start; display: flex; align-items: center; gap: 6px; min-height: 32px; font: 700 12.5px var(--hg); color: var(--muted-3); }
.fm-scope .fm-back { margin: -6px 0 4px; }
.fm .fm-back:hover { color: var(--text); }
.fm-title { margin: 0; font: 800 22px var(--sg); letter-spacing: -.02em; color: var(--text); }
.fm-meta { display: flex; align-items: center; gap: 6px; color: var(--muted-3); }
.fm-meta span { font: 700 12.5px var(--hg); color: var(--text-3); }
.fm-label { padding: 8px 20px 6px; font: 700 11px var(--hg); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-3); }
.fm-detail + .fm-label { padding-top: 16px; }
.fm-label.in { padding: 0; margin-top: 20px; }
.fm-detail { padding: 14px 20px 20px; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; }
.fm-ftitle { margin: 8px 0 0; font: 800 24px/1.1 var(--sg); letter-spacing: -.02em; text-wrap: pretty; color: var(--text); }
.fm-fmeta { margin-top: 4px; font: 600 13px var(--hg); color: var(--muted-3); }
.fm-faddr, .fmm-addr { margin-top: 3px; font: 500 13px var(--hg); color: var(--muted-3); user-select: text; -webkit-user-select: text; }
.fm-detail .fm-label.in + .fm-amens { margin-top: 8px; }
.fm-detail .fm-label.in:nth-of-type(n) { }
.fm-fields { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.fm .fm-fieldc { min-width: 40px; height: 40px; padding: 0 4px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--control); color: var(--text); font: 700 13px var(--hg); }
.fm .fm-fieldc.wide { padding: 0 12px; }
.fm .fm-fieldc:hover { border-color: var(--muted-3); }
.fm .fm-fieldc.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.fm-loading { font: 600 12.5px var(--hg); color: var(--muted-3); line-height: 40px; }
.fm-amens { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.fm .fm-amen { height: 38px; padding: 0 14px 0 12px; border-radius: 999px; display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--control); color: var(--text); font: 700 12.5px var(--hg); }
.fm .fm-amen:hover { border-color: var(--muted-3); }
.fm .fm-amen.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.fm .fm-amen[disabled] { opacity: .45; cursor: default; }
.fm-amenlist { margin-top: 10px; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.fm-amenrow { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-bottom: 1px solid var(--row-div); }
/* Icon + name: tap to zoom the map to this point (10/8). */
.fm .fm-amenzoom { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; }
.fm .fm-amenzoom:hover, .fm .fm-amenzoom.on { background: var(--sunken); }
.fm .fm-amenzoom.on .ic { background: var(--ink); color: #fff; }
.fm-amenrow:last-child { border-bottom: 0; }
.fm-amenrow .ic { flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; background: var(--sunken); color: var(--text); display: flex; align-items: center; justify-content: center; }
.fm-amenrow .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fm-amenrow .l { font: 700 13.5px var(--hg); color: var(--text); }
.fm-amenrow .s { font: 500 12px var(--hg); color: var(--muted-3); }
.fm-amenrow .go { flex-shrink: 0; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--control); display: flex; align-items: center; gap: 5px; text-decoration: none; font: 700 12px var(--hg); color: var(--text); }
.fm-amenrow .go:hover { background: var(--sunken); }
.fm-actions { margin-top: 20px; display: flex; gap: 8px; }
.fm-osm { margin: 14px 0 0; font: 500 12px/1.45 var(--hg); color: var(--muted); }
.fm-osm a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.fmm-osm { margin: 16px 20px 0; }
.fm-clubs { margin-top: 0; }
.fm-clubs ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fm-clubs li { font: 600 14px var(--hg); color: var(--text); }
.fm-clubs a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.fmm-clubs { margin: 16px 20px 0; }
.fm-fstatus { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #FFF6E5; border: 1px solid #F1D9A6; display: flex; flex-direction: column; gap: 4px; font: 500 13px/1.45 var(--hg); color: var(--text-2); }
.fm-fstatus b { font: 700 14px var(--hg); color: var(--text); }
.fm-fstatus.ok { background: none; border: 0; padding: 0; flex-direction: row; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.fm-fstatus.ok a { color: inherit; text-decoration: underline; }
.fm .fm-fsbtns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fm .fm-fsbtns .fm-secondary { flex: 0 0 auto; height: 36px; font-size: 13px; padding: 0 14px; text-decoration: none; }
.fm-fsthanks { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--hg); color: #2E7D4F; }
/* Community validation (10/25): confirmed state keeps the quiet look, open problem goes red-ish. */
.fm-fstatus.ok { flex-direction: column; align-items: flex-start; gap: 2px; }
.fm-fstatus .fm-fsline { display: inline-flex; align-items: center; gap: 6px; }
.fm-fstatus.ok .fm-fsbtns { margin-top: 6px; }
.fm-fstatus.ok .fm-fsbtns .fm-secondary { height: 30px; font-size: 12px; padding: 0 12px; }
.fm-fstatus.warn { background: #FDECEA; border-color: #F2C3BD; }
.fmm-fstatus { margin: 12px 20px 0; }
.fmm-fstatus.ok { margin: 10px 20px 0; }
.fm-primary { flex: 1.6; height: 46px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 7px; background: var(--ink); color: #fff !important; text-decoration: none; font: 700 13.5px var(--hg); padding: 0 12px; text-align: center; }
.fm-primary:hover { background: var(--ink-hover); }
.fm .fm-secondary { flex: 1; height: 46px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--control); background: #fff; color: var(--text); font: 700 13.5px var(--hg); padding: 0 12px; white-space: nowrap; }
.fm .fm-secondary:hover { background: var(--sunken); }
.fm-row { width: 100%; min-height: 60px; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; border-bottom: 1px solid var(--row-div); }
.fm-row:hover, .fm-row.hov { background: var(--row-hover); }
.fm-row .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fm-row .n { font: 700 14px var(--hg); color: var(--text); }
.fm-row .c { font: 500 12px var(--hg); color: var(--muted-3); }
.fm-row .m { flex-shrink: 0; display: flex; align-items: center; gap: 6px; font: 700 12px var(--hg); color: var(--text-3); }
.fm-row .m svg { color: var(--faint); }
.fm .fm-collapsed { position: absolute; top: 16px; left: 16px; z-index: 10; height: 48px; padding: 0 18px 0 14px; display: flex; align-items: center; gap: 10px; border-radius: 999px; background: #fff; border: 1px solid var(--hair); box-shadow: 0 12px 30px -12px rgba(0,0,0,.55); color: var(--text); }
.fm .fm-collapsed:hover { background: var(--row-hover); }
.fm-collapsed span { font: 800 15px var(--sg); letter-spacing: -.01em; color: var(--text); }

/* ---------------------------------------------------------------- map controls */
.fm-ctrls { position: absolute; right: 16px; bottom: 32px; z-index: 16; display: flex; align-items: flex-end; gap: 8px; }
.fm-toolbar { display: flex; align-items: center; gap: 6px; margin-bottom: 1px; }
.fm-pair { flex-shrink: 0; display: flex; align-items: center; height: 42px; border-radius: 21px; background: rgba(23,22,28,.86); backdrop-filter: blur(20px) saturate(1.7); -webkit-backdrop-filter: blur(20px) saturate(1.7); box-shadow: 0 10px 26px -10px rgba(0,0,0,.5); color: var(--on-dark); }
.fm .fm-pair button { width: 34px; height: 42px; display: flex; align-items: center; justify-content: center; }
.fm .fm-pair button:first-child { border-radius: 21px 0 0 21px; }
.fm .fm-pair button:last-child { border-radius: 0 21px 21px 0; }
.fm .fm-pair button:hover { background: rgba(255,255,255,.1); }
.fm-pair i { width: 1px; height: 16px; background: rgba(255,255,255,.18); }
.fm-ctrlcol { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fm .fm-round { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(23,22,28,.86); backdrop-filter: blur(20px) saturate(1.7); -webkit-backdrop-filter: blur(20px) saturate(1.7); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 26px -10px rgba(0,0,0,.5); color: var(--on-dark); }
.fm .fm-round.on { background: rgba(255,255,255,.22); }

.fm-toast { position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 30; height: 44px; padding: 0 18px 0 12px; display: flex; align-items: center; gap: 10px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 13.5px var(--hg); box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); white-space: nowrap; animation: fmRise .32s var(--ease) both; }
.fm-toast .ok { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); display: flex; align-items: center; justify-content: center; color: #fff; }
@keyframes fmRise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ------------------------------------------------------------------- 3D overlay */
.fm3 { position: absolute; inset: 0; z-index: 15; background: var(--night-3d); }
#fm3dMount { position: absolute; inset: 0; }
#fm3dMount gmp-map-3d { width: 100%; height: 100%; display: block; }
.fm3-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; pointer-events: none; }
.fm3-pill { pointer-events: auto; display: flex; align-items: center; height: 48px; border-radius: 999px; background: #fff; border: 1px solid var(--hair); box-shadow: 0 12px 30px -12px rgba(0,0,0,.55); }
.fm .fm3-pill button { height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 6px; border-radius: 999px 0 0 999px; font: 700 13px var(--hg); color: var(--text); }
.fm .fm3-pill button:hover { background: var(--sunken); }
.fm3-pill i { width: 1px; height: 22px; background: var(--hair); }
.fm3-pill .nm { padding: 0 18px 0 14px; display: flex; align-items: center; gap: 8px; }
.fm3-pill .nm span { font: 800 15px var(--sg); letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.fm3-pill .nm b { height: 20px; padding: 0 7px; border-radius: 6px; background: var(--ink); color: #fff; display: flex; align-items: center; font: 800 10.5px var(--hg); letter-spacing: .06em; }
.fm3-hint { pointer-events: auto; height: 36px; padding: 0 14px; border-radius: 999px; display: flex; align-items: center; gap: 14px; background: rgba(23,22,28,.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--on-dark); font: 600 12px var(--hg); white-space: nowrap; margin-top: 6px; }
.fm3-hint i { opacity: .4; font-style: normal; }
.fm .fm3-share { pointer-events: auto; height: 48px; padding: 0 18px 0 16px; display: flex; align-items: center; gap: 8px; border-radius: 999px; background: #fff; border: 1px solid var(--hair); box-shadow: 0 12px 30px -12px rgba(0,0,0,.55); font: 700 13px var(--hg); color: var(--text); }
.fm .fm3-share:hover { background: var(--sunken); }
.fm3-card { position: absolute; left: 16px; bottom: 32px; width: min(360px, calc(100% - 32px)); padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--hair); box-shadow: 0 18px 48px -18px rgba(0,0,0,.6); }
.fm3-card .fm-primary { margin-top: 14px; }
/* Fields: one row that scrolls sideways (10+ fields used to wrap to two rows).
   The fade only shows while more circles are hidden to the right. */
.fm3-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 4px; padding: 1px 0; }
.fm3-strip::-webkit-scrollbar { display: none; }
.fm .fm3-strip .fm-fieldc { flex-shrink: 0; }
.fm3-strip.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.fm3-strip.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.fm3-strip.more-l:not(.more-r) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.fm3-amens { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.fm3-amens::-webkit-scrollbar { display: none; }
.fm .fm3-amens .fm-amen { flex-shrink: 0; padding: 0 10px 0 9px; gap: 6px; }
.fm3-err { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.fm3-err div { max-width: 360px; background: #fff; border-radius: 18px; padding: 20px; text-align: center; font: 600 14px/1.45 var(--hg); color: var(--text-2); }
.fm3-err b { display: block; font: 800 18px var(--sg); color: var(--text); margin-bottom: 6px; }

/* ===================================================================== mobile 7b */
.fmm { display: none; }
@media (max-width: 760px) {
  .fm-footer, .fm-panel, .fm-collapsed, .fm-ctrls { display: none !important; }
  /* Compact site header on phones (10/8): logo left, Get the app right. */
  .fm-header .in { height: 56px; padding: env(safe-area-inset-top) 16px 0; box-sizing: content-box; }
  .fm-header .logo img { height: 48px; margin: -8px 0 -8px -14px; }
  .fm-header nav { gap: 0; }
  .fm-header nav a:not(.cta) { display: none; }
  .fm-header nav a.cta { height: 36px; padding: 0 16px; font-size: 14px; }
  .fm { height: calc(100vh - 57px - env(safe-area-inset-top)); height: calc(100dvh - 57px - env(safe-area-inset-top)); min-height: 460px; }
  .fmm { display: block; }
  .fm3-hint { display: none; }
  .fm3-card { bottom: 24px; }
  /* The map is the whole page on phones: no rubber-band / pull-to-refresh,
     and touches on the sheet's grab zone never become page scrolls. */
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .fmm-handle, .fmm-hrow { touch-action: none; cursor: grab; }
  .fmm-list { overscroll-behavior: contain; }
}
.fmm-nav { position: absolute; left: 16px; right: 16px; top: 12px; z-index: 12; border-radius: 22px; overflow: hidden;
  background: rgba(30,38,54,.5); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.2), 0 14px 34px -12px rgba(0,0,0,.55); }
.fmm-srow { display: flex; align-items: center; gap: 9px; padding: 13px 14px; color: var(--on-dark); }
.fmm-srow input { all: unset; flex: 1; min-width: 0; font: 600 14.5px var(--hg); color: var(--on-dark); }
.fmm-srow input::placeholder { color: var(--on-dark-muted); }
.fm .fmm-clear { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; color: var(--on-dark); }
.fm .fmm-collapse { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; color: var(--on-dark); }
.fmm-divider { height: 1px; background: rgba(255,255,255,.16); }
.fmm-chips { display: flex; gap: 7px; overflow-x: auto; padding: 10px 12px 12px; scrollbar-width: none; }
.fmm-chips::-webkit-scrollbar { display: none; }
/* .fm prefix: beats the `.fm button` reset (region chips are buttons). */
.fm .fmm-chip { flex-shrink: 0; height: 32px; padding: 0 15px; border-radius: 999px; display: flex; align-items: center; font: 700 12.5px var(--hg); white-space: nowrap; color: var(--on-dark); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); }
.fm .fmm-chip.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.fm .fmm-statechip { gap: 4px; padding: 0 6px 0 15px; }
.fm .fmm-statechip .dd { width: 30px; height: 32px; margin: 0 -6px 0 -4px; display: flex; align-items: center; justify-content: center; } /* bigger tap target */
.fmm-statedd { position: absolute; left: 16px; top: 120px; width: 168px; z-index: 14; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.9); backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 14px 34px -14px rgba(0,0,0,.4); }
.fm .fmm-statedd button { width: 100%; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; font: 700 13px var(--hg); color: var(--text); border-bottom: 1px solid rgba(23,22,28,.07); }
.fmm-results { position: absolute; left: 16px; right: 16px; top: 120px; z-index: 13; border-radius: 18px; max-height: 280px; overflow-y: auto; background: rgba(24,31,45,.82); backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 18px 40px -12px rgba(23,22,28,.45); }
.fmm-result { display: flex; flex-direction: column; gap: 2px; padding: 11px 16px; min-height: 44px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.1); }
.fmm-result:hover { background: rgba(255,255,255,.08); }
.fmm-result .n { font: 600 12.5px var(--hg); color: var(--on-dark); }
.fmm-result .m { font: 600 10.5px var(--hg); color: var(--on-dark); opacity: .85; }
.fmm-empty { padding: 16px; font: 600 12.5px var(--hg); color: var(--on-dark-muted); text-align: center; }
.fm .fmm-navbtn { position: absolute; right: 16px; top: 12px; z-index: 12; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--on-dark);
  background: rgba(30,38,54,.5); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 10px 26px -10px rgba(0,0,0,.35); }

/* Bottom sheet: 620 tall, peek 78 / half 437 (translateY = 620 - visible). */
.fmm-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 620px; z-index: 11; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hair); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px -12px rgba(26,24,32,.35); transform: translateY(542px); transition: transform 320ms var(--ease); }
.fmm-handle { padding: 12px 0 10px; display: flex; justify-content: center; cursor: grab; touch-action: none; flex-shrink: 0; }
.fmm-handle i { width: 36px; height: 5px; border-radius: 99px; background: var(--handle); }
.fmm-head { padding: 0 20px 16px; flex-shrink: 0; border-bottom: 1px solid var(--hair); }
.fmm-hrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 2px; user-select: none; -webkit-user-select: none; }
.fmm-title { margin: 0; font: 800 20px var(--sg); letter-spacing: -.02em; color: var(--text); }
.fmm-meta { margin-top: 4px; display: flex; align-items: center; gap: 5px; color: var(--muted-3); }
.fmm-meta span { font: 700 12.5px var(--hg); color: var(--text-3); }
.fm .fmm-close { flex-shrink: 0; font: 700 12px var(--hg); color: var(--muted-3); min-height: 32px; display: flex; align-items: center; }
.fmm-labels { display: flex; gap: 8px; margin-top: 16px; }
.fmm-labels span { font: 700 11px var(--hg); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-3); }
.fmm-labels span:first-child { width: 239px; flex-shrink: 0; }
.fmm-ctrls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fmm-fstrip { flex: 1 1 203px; min-width: 0; max-width: 239px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.fmm-fstrip > div, .fmm-astrip > div { display: flex; align-items: center; gap: 8px; }
.fmm-fstrip .fm-fieldc { min-width: 38px; height: 38px; flex-shrink: 0; }
.fmm-div { flex-shrink: 0; width: 1px; height: 26px; background: var(--control); }
.fmm-astrip { width: 130px; flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.fm .fmm-amen { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--control); background: #fff; color: var(--text); }
.fm .fmm-amen.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.fmm-actions { display: flex; gap: 8px; margin-top: 14px; }
.fmm-actions .fm-primary, .fmm-actions .fm-secondary { height: 44px; font-size: 13px; gap: 6px; }
.fmm-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  /* The part of the sheet slid below the screen (set by setSheet) + Safari's bar. */
  padding-bottom: calc(var(--sheet-hidden, 183px) + env(safe-area-inset-bottom) + 24px); }
.fmm-amenlist { margin: 10px 20px 4px; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.fmm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; min-height: 44px; text-decoration: none; border-bottom: 1px solid var(--row-div); }
.fmm-row .t { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.fmm-row .n { font: 700 14px var(--hg); color: var(--text); }
.fmm-row .c { font: 500 12px var(--hg); color: var(--muted-3); }
.fmm-row .m { flex-shrink: 0; display: flex; align-items: center; gap: 5px; color: var(--muted-3); }
.fmm-row .m span { font: 700 12px var(--hg); color: var(--text-3); min-width: 52px; text-align: right; }
/* Controls ride with the sheet: their bottom sits 12px above its top. */
.fmm-ctrls-ride { position: absolute; right: 16px; bottom: 632px; z-index: 11; display: flex; align-items: flex-end; gap: 8px; transform: translateY(542px); transition: transform 320ms var(--ease); }
.fmm-ctrls-ride .fm-toolbar { max-width: calc(100vw - 92px); overflow-x: auto; scrollbar-width: none; gap: 5px; }
.fmm-ctrls-ride .fm-pair { height: 38px; border-radius: 19px; }
.fm .fmm-ctrls-ride .fm-pair button { width: 28px; height: 38px; }

/* ---------------------------------------------------------------- Add a field
   Entry points + modal (design zip 4, screenshots/add-field/01-07). `.fm`
   prefix beats the `.fm button` reset. */
.fm-metarow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fm .fm-addlink { display: inline-flex; align-items: center; gap: 5px; font: 700 12.5px var(--hg); color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; white-space: nowrap; }
.fm .fm-addlink svg { width: 13px; height: 13px; }
.fm .fm-addlink:hover { color: var(--ink-hover); }
.fmm-hrow .fm-addlink { margin-top: 6px; }
.fm-addfoot { padding: 18px 20px 4px; display: flex; flex-direction: column; gap: 8px; }
.fm-addfoot > span { font: 600 13px var(--hg); color: var(--muted); }
.fm .fm-addfoot button { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font: 700 14px var(--hg); color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.fm .fm-addfoot button svg { width: 14px; height: 14px; }
.fm .fm-fieldadd { border-style: dashed; border-color: var(--faint); color: var(--muted); }
.fm .fm-fieldadd:hover { border-color: var(--muted-3); color: var(--text); }
.fm .fm-fieldadd svg { width: 15px; height: 15px; }
.fm .fm-addpill { margin: 12px auto 0; height: 40px; padding: 0 16px 0 13px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 7px; width: max-content; max-width: 100%; border: 1px solid var(--control); background: #fff; color: var(--text); font: 700 13px var(--hg); overflow: hidden; white-space: nowrap; }
.fm .fm-addpill:hover { border-color: var(--muted-3); }
.fm .fmm-empty .fm-addpill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: var(--on-dark); }
.fm-nojs-add { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; background: #fff; padding: 10px 16px; border-radius: 12px; font: 600 13px var(--hg); }

.fma-scrim { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(23,22,28,.38); animation: fmaFade .18s ease both; }
.fma-scrim[hidden] { display: none; }
body.fma-open { overflow: hidden; }
.fma-card { position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card); border-radius: 26px; padding: 26px 24px 22px; box-shadow: 0 30px 70px -20px rgba(23,22,28,.45); animation: fmaRise .28s var(--ease) both; }
.fma-card h2 { margin: 0 34px 6px 0; font: 800 23px/1.12 var(--sg); letter-spacing: -.02em; color: var(--text); }
.fma-sub { margin: 0 0 18px; font: 500 13.5px/1.45 var(--hg); color: var(--text-2); }
.fm .fma-x { position: absolute; top: 22px; right: 20px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text); }
.fm .fma-x:hover { background: var(--sunken); }
.fma-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; min-width: 0; }
.fma-field > span { font: 700 12.5px var(--hg); color: var(--text); }
.fma-field input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--control); background: #fff; font: 600 14.5px var(--hg); color: var(--text); outline: none; -moz-appearance: textfield; }
.fma-field input::placeholder { color: var(--faint); font-weight: 500; }
.fma-field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,22,28,.08); }
.fma-field input::-webkit-outer-spin-button, .fma-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fma-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.fma-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fma-ts:empty { display: none; }
.fma-ts { margin: 0 0 10px; }
.fma-status { margin: 0 0 10px; min-height: 0; font: 600 12.5px var(--hg); color: #C2331F; }
.fma-status:empty { display: none; }
.fma-checking { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 600 12.5px var(--hg, sans-serif); color: #5F626C; }
.fma-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #D9D4C7; border-top-color: #191A20; animation: fma-spin .8s linear infinite; flex: none; }
@keyframes fma-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fma-spin { animation: none; } }
/* A real button (the .fm button reset out-ranked a bare .fma-retry, leaving status-red text). */
.fm .fma-retry, .fma-retry { display: inline-flex; align-items: center; margin: 6px 0 0; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid #D9D4C7; background: #fff; color: #191A20; font: 700 12.5px var(--hg, sans-serif); cursor: pointer; }
.fm .fma-retry:hover { background: #F4F1EA; }
.fm .fma-status .fma-retry { display: flex; width: fit-content; }
.fma-btns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 4px; }
.fma-btns.one { grid-template-columns: 1fr; }
.fm .fma-btn { height: 46px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 7px; font: 700 14px var(--hg); text-align: center; }
.fm .fma-btn.ghost { border: 1px solid var(--control); color: var(--text); background: #fff; }
.fm .fma-btn.ghost:hover { border-color: var(--muted-3); }
.fm .fma-btn.dark { background: var(--ink); color: #fff; }
.fm .fma-btn.dark:hover { background: var(--ink-hover); }
.fm .fma-btn[disabled] { opacity: .45; cursor: default; }
.fma-ok { width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
@keyframes fmaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fmaRise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .fma-scrim { align-items: flex-end; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .fma-card { max-width: none; padding: 24px 20px 20px; }
  .fma-card h2 { font-size: 21px; }
  .fma-row { grid-template-columns: 1fr 96px; }
}
@media (prefers-reduced-motion: reduce) { .fma-scrim, .fma-card { animation: none; } }

/* "Something's wrong" reason chips (a radiogroup; .fm button reset needs the .fm prefix). */
.fma-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.fm .fma-chip, .fma-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--control); background: #fff;
  font: 600 13px var(--hg, sans-serif); color: var(--text); cursor: pointer; }
.fm .fma-chip[aria-checked="true"], .fma-chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fma-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
