/* Clanert Maps (/map/). Ported from the EMS codebase (static/css/map.css) with the EMS
   design tokens declared here, the page fitted under the site header, and new styles for the
   compare swipe, time-lapse, Clanert Air station pins, satellite statistics and the PDF sheet. */
.gm { --blue: #233b91; --dark-blue: #1b2e70; --green: #8cc641; --green-ink: #4d7a12; --blue-10: rgba(35,59,145,.09); --green-10: rgba(140,198,65,.16);
  --z50: #fafafa; --z100: #f4f4f5; --z200: #e4e4e7; --z300: #d4d4d8; --z400: #a1a1aa; --z500: #71717a; --z600: #52525b; --z700: #3f3f46; --z900: #18181b;
  --ease: cubic-bezier(0.16,1,0.3,1); font-family: Arial, sans-serif; }
.gm { --dark-blue: #1b2e70; position: relative; isolation: isolate; display: flex; flex-direction: column; height: calc(100vh - 140px); min-height: 540px;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--z100); background: #fff; }
.gm [hidden] { display: none !important; }
.gm button, .gm a { transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease); }

/* header bar */
.gm-bar { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 14px; background: var(--blue); color: #fff; flex: none; }
.gm-brand { display: flex; align-items: center; gap: 8px; font-weight: 400; letter-spacing: .02em; min-width: 0; }
.gm-brand svg { width: 18px; height: 18px; } .gm-brand small { font-weight: 400; opacity: .7; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-modes { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.1); }
.gm-modes button { border: 1.5px solid transparent; padding: 6px 16px; border-radius: 999px; background: none; color: #fff; font: inherit; font-size: 13px; font-weight: 400; cursor: pointer; white-space: nowrap; }
.gm-modes button:hover { background: rgba(255,255,255,.12); }
.gm-modes button.on { border-color: var(--green); background: rgba(140,198,65,.18); }
.gm-bar-end { width: 60px; }

.gm-body { position: relative; flex: 1; min-height: 0; }
.gm-map { position: absolute; inset: 0; background: #dfe3e8; }
.gm .leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.8); }
.gm .leaflet-control-scale-line { border-color: var(--blue); color: var(--blue); background: rgba(255,255,255,.85); }

/* toolbar */
.gm-toolbar { position: absolute; top: 10px; left: 10px; z-index: 1000; display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.gm-t { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 7px; background: none; color: var(--blue); cursor: pointer; }
.gm-t svg { width: 17px; height: 17px; }
.gm-t:hover { background: var(--blue-10); }
.gm-t.on, .gm-t[aria-pressed=true] { background: var(--blue); color: #fff; }
.gm-menu { position: relative; }
.gm-pop { position: absolute; top: 40px; left: 0; z-index: 5; display: grid; min-width: 130px; padding: 4px; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.gm-pop button { border: 0; padding: 8px 10px; border-radius: 7px; background: none; color: var(--z700); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.gm-pop button:hover { background: var(--blue-10); color: var(--blue); } .gm-pop button.on { background: var(--blue); color: #fff; }
.gm-search { position: absolute; top: 56px; left: 10px; z-index: 1001; display: flex; align-items: center; gap: 8px; width: 280px; max-width: calc(100% - 20px); height: 40px; padding: 0 12px;
  border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.gm-search svg { width: 16px; height: 16px; color: var(--z400); } .gm-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 13px; }

/* layer tree */
.gm-panel { position: absolute; top: 56px; left: 10px; z-index: 1000; width: 250px; max-height: calc(100% - 110px); display: flex; flex-direction: column; border-radius: 10px; background: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.22); overflow: hidden; }
.gm-search:not([hidden]) ~ .gm-panel { top: 104px; max-height: calc(100% - 158px); }
.gm-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid var(--z100); }
.gm-tabs [role=tab] { border: 0; border-bottom: 2px solid transparent; padding: 7px 12px; background: none; font: inherit; font-size: 13px; font-weight: 400; color: var(--z500); cursor: pointer; }
.gm-tabs [role=tab].on { color: var(--blue); border-bottom-color: var(--blue); }
.gm-x { margin-left: auto; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--z500); cursor: pointer; }
.gm-x:hover { background: var(--z100); color: var(--blue); } .gm-x svg { width: 15px; height: 15px; }
.gm-tab { overflow-y: auto; padding: 4px 4px 8px; }
.gm-node > .gm-row-h { display: flex; align-items: center; gap: 4px; padding: 5px 4px; border-radius: 7px; }
.gm-node > .gm-row-h:hover { background: var(--z50); }
.gm-caret, .gm-eye { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 5px; background: none; color: var(--z500); cursor: pointer; flex: none; }
.gm-caret svg { width: 14px; height: 14px; transition: transform .2s var(--ease); } .gm-node.open > .gm-row-h .gm-caret svg { transform: rotate(90deg); }
.gm-eye svg { width: 15px; height: 15px; } .gm-eye { color: var(--blue); }
.gm-node.off > .gm-row-h .gm-eye, .gm-leaf.off .gm-eye { color: var(--z300); }
.gm-node-name { flex: 1; font-size: 13px; font-weight: 400; color: var(--z900); }
.gm-kids { display: none; padding-left: 22px; } .gm-node.open > .gm-kids { display: block; }
.gm-leaf { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 7px; font-size: 12.5px; color: var(--z700); }
.gm-leaf:hover { background: var(--z50); } .gm-leaf.off { color: var(--z400); } .gm-leaf.off .sym { opacity: .35; }
.gm-leaf .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-leaf .n { font-size: 11px; color: var(--z400); }
.gm-leaf a { color: var(--z400); display: inline-grid; } .gm-leaf a svg { width: 13px; height: 13px; } .gm-leaf a:hover { color: var(--blue); }
.sym { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.18); flex: none; }
.sym.square { border-radius: 3px; } .sym.diamond { border-radius: 2px; transform: rotate(45deg) scale(.85); }
.sym.area { border-radius: 2px; border: 1.5px solid currentColor; background: none !important; box-shadow: none; opacity: .8; }
.gm-only { display: flex; align-items: center; gap: 8px; margin: 6px 6px 0; padding-top: 8px; border-top: 1px solid var(--z100); font-size: 12.5px; color: var(--z700); }
.gm-only input { accent-color: var(--blue); }
.gm-legend-row { display: flex; align-items: center; gap: 10px; padding: 6px; font-size: 12.5px; color: var(--z700); }

/* right-hand controls */
.gm-controls { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 1000; display: grid; gap: 6px; justify-items: center; }
.gm-compass { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--blue); box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.gm-compass svg { width: 18px; height: 18px; fill: var(--blue); } .gm-compass b { position: absolute; top: -2px; font-size: 8px; color: var(--blue); }
.gm-c { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: #fff; color: var(--blue); cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.gm-c:hover { background: var(--blue); color: #fff; } .gm-c svg { width: 17px; height: 17px; }

/* detail / preview panel */
.gm-detail { position: absolute; top: 10px; right: 58px; bottom: 50px; z-index: 1002; width: 330px; max-width: calc(100% - 70px); display: flex; flex-direction: column; border-radius: 12px; background: #fff;
  box-shadow: 0 14px 38px rgba(0,0,0,.25); overflow: hidden; animation: gm-in .3s var(--ease); }
@keyframes gm-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.gm-detail-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.gm-detail-head .gm-x { color: #fff; } .gm-detail-head .gm-x:hover { background: rgba(255,255,255,.15); color: #fff; }
.gm-detail-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.gm-detail-body h2 { font-size: 18px; font-weight: 400; color: var(--z900); margin-bottom: 4px; }
.gm-detail-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; }
.gm-detail-body dt { color: var(--z500); } .gm-detail-body dd { margin: 0; color: var(--z900); word-break: break-word; }
.gm-detail-body h3, .gm-extra h3 { margin: 16px 0 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--z400); }
.gm-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gm-items li a, .gm-items li span.it { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; color: var(--z900); background: var(--z50); }
.gm-items li a:hover { background: var(--blue-10); color: var(--blue); }
.gm-items small { color: var(--z500); white-space: nowrap; } .gm-items .bad, .gm-items .bad small { color: #c2362b; font-weight: 400; }
.gm-files { display: grid; gap: 8px; }
.gm-file { display: block; border: 1px solid var(--z100); border-radius: 9px; overflow: hidden; }
.gm-file img { display: block; width: 100%; max-height: 200px; object-fit: cover; background: var(--z50); }
.gm-file iframe { display: block; width: 100%; height: 240px; border: 0; background: var(--z50); }
.gm-file > a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 12.5px; color: var(--blue); }
.gm-file > a svg { width: 15px; height: 15px; flex: none; }
.gm-spark { width: 100%; height: 56px; margin-top: 8px; }
.gm-loading { color: var(--z400); font-size: 13px; }
.gm-open { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 16px 14px; height: 40px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 400; font-size: 13px; flex: none; }
.gm-open:hover { background: var(--dark-blue); color: #fff; } .gm-open svg { width: 16px; height: 16px; }

/* guide */
.gm-guide { position: absolute; inset: 0; z-index: 1003; display: grid; place-content: center; background: rgba(35,59,145,.45); }
.gm-guide > * { max-width: 420px; }
.gm-guide h2, .gm-guide ul, .gm-guide .gm-btn { background: #fff; }
.gm-guide h2 { padding: 18px 20px 4px; border-radius: 14px 14px 0 0; font-size: 20px; font-weight: 400; color: var(--blue); }
.gm-guide ul { list-style: none; margin: 0; padding: 8px 20px 12px; display: grid; gap: 10px; font-size: 14px; color: var(--z700); }
.gm-guide li { display: flex; align-items: center; gap: 10px; } .gm-guide li svg { width: 18px; height: 18px; color: var(--blue); flex: none; }
.gm-guide .gm-btn { margin: 0; width: 100%; border-radius: 0 0 14px 14px; justify-content: center; height: 46px; background: var(--blue); }

/* selection, status */
.gm-selected { position: absolute; right: 10px; bottom: 30px; z-index: 1000; padding: 7px 14px; border: 0; border-radius: 999px; background: #fff; color: var(--z700); font: inherit; font-size: 12.5px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2); cursor: pointer; }
.gm-selected b { color: var(--blue); } .gm-selected.has { background: var(--blue); color: #fff; } .gm-selected.has b { color: #fff; }
.gm-sel-list { position: absolute; right: 10px; bottom: 70px; z-index: 1002; width: 260px; max-height: 50%; overflow-y: auto; padding: 6px; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.gm-sel-list button { display: block; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: none; color: var(--z900); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.gm-sel-list button:hover { background: var(--blue-10); color: var(--blue); }
.gm-sel-list .clear { color: var(--blue); font-weight: 400; border-top: 1px solid var(--z100); margin-top: 4px; }
.gm-status { position: absolute; left: 10px; bottom: 30px; z-index: 1000; display: flex; gap: 6px; pointer-events: none; }
.gm-status span { padding: 4px 9px; border-radius: 7px; background: rgba(35,59,145,.88); color: #fff; font-size: 11px; font-family: Consolas, monospace; }
#gm-measure { background: var(--blue); }
.gm-box { position: absolute; z-index: 999; border: 2px dashed var(--green); background: rgba(140,198,65,.15); pointer-events: none; }

/* markers */
.gm-pin { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.55); }
.gm-pin::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.gm-pin.site { width: 26px; height: 26px; border-radius: 7px; } .gm-pin.site::after { width: 8px; height: 8px; border-radius: 2px; }
.gm-pin.noise_source { border-radius: 4px; transform: rotate(45deg); width: 20px; height: 20px; }
.gm-pin.noise_study { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.gm-pin.sel { box-shadow: 0 0 0 4px #8cc641, 0 2px 8px rgba(0,0,0,.55); }
.gm-pin.exceed { position: relative; }
.gm-pin.exceed::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid #e04f44; animation: gm-pulse 1.6s ease-out infinite; }
@keyframes gm-pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.gm-label.leaflet-tooltip { padding: 2px 6px; border: 0; border-radius: 5px; background: rgba(255,255,255,.92); color: var(--z900); font-size: 11px; font-weight: 400; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.gm-label.leaflet-tooltip::before { display: none; }
.gm.nolabels .gm-label { display: none; }
.gm.selecting .gm-map, .gm.measuring .gm-map { cursor: crosshair; }

/* import dialog */
.gm-modal { position: absolute; inset: 0; z-index: 1004; display: grid; place-items: center; padding: 16px; background: rgba(35,59,145,.45); }
.gm-dialog { width: min(440px, 100%); display: grid; gap: 14px; padding: 20px; border-radius: 14px; background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.gm-dialog h2 { font-size: 19px; font-weight: 400; color: var(--z900); }
.gm-row { display: flex; align-items: center; gap: 8px; } .gm-end { justify-content: flex-end; }
.gm-drop { display: grid; justify-items: center; gap: 8px; padding: 22px 14px; border: 1.5px dashed var(--z300); border-radius: 12px; background: var(--z50); color: var(--z600); font-size: 12.5px; text-align: center; cursor: pointer; }
.gm-drop:hover { border-color: var(--blue); background: var(--blue-10); } .gm-drop svg { width: 24px; height: 24px; color: var(--blue); }
.gm-drop input { max-width: 100%; font-size: 12px; }
.gm-input { height: 40px; border: 1px solid var(--z200); border-radius: 9px; padding: 0 12px; font: inherit; }
.gm-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font: inherit; font-size: 13px; font-weight: 400; cursor: pointer; }
.gm-btn:hover { background: var(--dark-blue); } .gm-btn svg { width: 16px; height: 16px; }
.gm-btn.ghost { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1px var(--z200); } .gm-btn.ghost:hover { background: var(--blue-10); }

@media (max-width: 700px) {
  .gm { height: calc(100vh - 110px); }
  .gm-bar { gap: 8px; padding: 0 8px; } .gm-brand small, .gm-bar-end { display: none; }
  .gm-modes { margin: 0 0 0 auto; } .gm-modes button { padding: 6px 9px; font-size: 12px; }
  .gm-toolbar { right: 58px; flex-wrap: wrap; }
  .gm-panel, .gm-search:not([hidden]) ~ .gm-panel { top: auto; bottom: 66px; left: 8px; right: 58px; width: auto; max-height: 45%; }
  .gm-detail { top: auto; left: 8px; right: 8px; width: auto; max-width: none; height: 60%; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .gm *, .gm-detail { animation: none !important; transition: none !important; } }
.gm a.gm-open, .gm a.gm-open:hover { color: #fff; }
.gm a.gm-t { color: var(--blue); }

/* compact, plain - like the reference: thin bar, small icons, tight layer list, slim controls */
.gm { height: calc(100vh - 118px); border-radius: 10px; }
.gm-bar { height: 44px; padding: 0 12px; }
.gm-brand { font-size: 14px; } .gm-brand svg { width: 16px; height: 16px; }
.gm-modes { padding: 3px; } .gm-modes button { padding: 4px 14px; font-size: 12.5px; }
.gm-toolbar { top: 8px; left: 8px; padding: 3px; border-radius: 6px; gap: 1px; }
.gm-t { width: 28px; height: 28px; border-radius: 5px; } .gm-t svg { width: 15px; height: 15px; }
.gm-search { top: 44px; left: 8px; height: 34px; border-radius: 6px; width: 240px; }
.gm-panel { top: 44px; left: 8px; width: 220px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
.gm-search:not([hidden]) ~ .gm-panel { top: 84px; }
.gm-tabs { padding: 4px 4px 0; } .gm-tabs [role=tab] { padding: 5px 10px; font-size: 12px; }
.gm-x { width: 24px; height: 24px; }
.gm-node > .gm-row-h { padding: 2px; } .gm-node-name { font-size: 12.5px; font-weight: 500; }
.gm-caret, .gm-eye { width: 20px; height: 20px; } .gm-eye svg { width: 14px; height: 14px; }
.gm-leaf { padding: 2px 4px; font-size: 12px; } .gm-kids { padding-left: 20px; }
.gm-only { font-size: 12px; margin-top: 4px; padding-top: 6px; }
.gm-controls { right: 8px; gap: 4px; }
.gm-c, .gm-compass { width: 30px; height: 30px; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.22); } .gm-compass { border-radius: 50%; }
.gm-c svg, .gm-compass svg { width: 15px; height: 15px; }
.gm-selected { right: 8px; bottom: 24px; padding: 4px 12px; font-size: 12px; border-radius: 6px; }
.gm-status { left: 8px; bottom: 24px; }
.gm-detail { top: 8px; right: 46px; bottom: 56px; width: 310px; border-radius: 8px; }
.gm-pin { width: 18px; height: 18px; border-width: 2.5px; } .gm-pin::after { width: 5px; height: 5px; }
.gm-pin.site { width: 22px; height: 22px; } .gm-pin.noise_source { width: 16px; height: 16px; }
@media (max-width: 700px) { .gm-toolbar { right: 46px; } .gm-panel, .gm-search:not([hidden]) ~ .gm-panel { right: 46px; } }

/* menus: headings, checkboxes, icons */
.gm-pop-h { padding: 8px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--z500); }
.gm-pop-h small { margin-left: 6px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--green-ink, #5c8a1f); }
.gm-pop label { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--z700); cursor: pointer; transition: background .2s ease; }
.gm-pop label:hover { background: var(--blue-10); }
.gm-pop input[type=checkbox] { accent-color: var(--blue); width: 15px; height: 15px; flex: none; }
.gm-pop button { display: flex; align-items: center; gap: 8px; transition: background .2s ease, color .2s ease; }
.gm-pop button svg { width: 16px; height: 16px; color: var(--blue); } .gm-pop button:hover svg { color: var(--blue); }
#gm-draw-menu { min-width: 200px; }

/* satellite panel */
.gm-sat { width: 330px; max-height: min(70vh, 560px); grid-template-rows: auto 1fr auto; overflow: hidden; }
#gm-sat-list { overflow-y: auto; display: grid; padding-bottom: 4px; }
.gm-sat-g { padding: 10px 10px 2px; font-size: 11px; font-weight: 400; color: var(--blue); }
.gm-sat label span { flex: 1; line-height: 1.3; }
.gm-sat label small { font-size: 10.5px; color: var(--z500); white-space: nowrap; }
.gm-sat-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 10px 6px; border-top: 1px solid var(--z100); }
.gm-sat-foot label { display: grid; gap: 4px; padding: 0; font-size: 11px; font-weight: 400; color: var(--z500); }
.gm-sat-foot label:hover { background: none; }
.gm-sat-foot input[type=date] { height: 30px; padding: 0 6px; border: 1px solid var(--z200); border-radius: 7px; font: inherit; font-size: 12px; color: var(--z900); }
.gm-sat-foot input[type=range] { accent-color: var(--blue); width: 100%; }

/* legend: satellite products */
#gm-legend h4 { margin: 14px 6px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--z500); }
.gm-legend-sat { display: grid; gap: 3px; padding: 6px; }
.gm-legend-sat b { font-size: 12.5px; color: var(--z900); font-weight: 400; }
.gm-legend-sat small { font-size: 11px; color: var(--z500); }
.gm-legend-sat img { width: 100%; max-height: 150px; object-fit: contain; object-position: left; background: #fff; border-radius: 6px; }
.gm-ramp { display: block; height: 10px; border-radius: 5px; }

/* drawing bar */
.gm-drawbar { position: absolute; left: 50%; bottom: 22px; z-index: 6; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 12px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.22); max-width: calc(100% - 24px); flex-wrap: wrap; animation: gm-rise .25s ease; }
.gm-drawbar #gm-draw-info { font-size: 13px; font-weight: 400; color: var(--z900); margin-right: 4px; }
.gm-btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
@keyframes gm-rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* analysis panel */
.gm-ref { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 8px; font-size: 12.5px; color: var(--z700); }
.gm-ref input { width: 110px; height: 32px; padding: 0 8px; border: 1px solid var(--z200); border-radius: 8px; font: inherit; font-size: 13px; }
.gm-ref input:focus { outline: 2px solid var(--blue-10); border-color: var(--blue); }
.gm-lcbar { display: flex; height: 12px; margin: 4px 0 8px; border-radius: 6px; overflow: hidden; background: var(--z100); }
.gm-lcbar span { display: block; height: 100%; }
.gm-sw { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 3px; vertical-align: -1px; }
.gm-extra { display: grid; gap: 8px; padding: 0 16px 14px; }
.gm-extra .gm-btn { justify-self: start; }
.gm-extra h3 { margin: 6px 0 0; }
.gm-pop button.on svg { color: #fff; }

/* live legend: class meanings + class under the cursor */
.gm-live { position: absolute; right: 52px; bottom: 62px; z-index: 1000; width: 280px; max-height: min(52%, 460px); overflow-y: auto; border-radius: 12px; background: rgba(255,255,255,.97); box-shadow: 0 10px 28px rgba(0,0,0,.22); animation: gm-fade .25s ease; }
.gm-live-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 14px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.gm-live-h .gm-x { color: #fff; } .gm-live-h .gm-x:hover { background: rgba(255,255,255,.15); color: var(--green); }
.gm-live.min .gm-live-l { display: none; }
.gm-live-l { display: grid; gap: 4px; padding: 10px 14px 12px; border-bottom: 1px solid var(--z100); }
.gm-live-l:last-child { border-bottom: 0; }
.gm-live-l b { font-size: 12.5px; font-weight: 400; color: var(--blue); line-height: 1.3; }
.gm-live-d, .gm-live-note, .gm-live-t { font-size: 11px; color: var(--z500); }
.gm-live-t { font-weight: 400; color: var(--z700); margin-top: 4px; }
.gm-live-mm { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--z700); }
.gm-live-classes { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 1px; }
.gm-live-classes li { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 11.5px; color: var(--z700); transition: background .2s ease, color .2s ease; }
.gm-live-classes li i { width: 14px; height: 14px; flex: none; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.gm-live-classes li.hit { background: var(--green-10); color: var(--green-ink); font-weight: 400; }
.gm-live-at { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: var(--z50); font-size: 11.5px; color: var(--z500); transition: background .2s ease, color .2s ease; }
.gm-live-at svg { width: 14px; height: 14px; flex: none; color: var(--blue); }
.gm-live-at.on { background: var(--blue-10); color: var(--blue); font-weight: 400; }
@keyframes gm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) { .gm-live { right: 8px; left: 8px; width: auto; bottom: 60px; max-height: 40%; } }

/* minimised live legend: a small pill, never a bar across the map */
.gm-live.min { width: auto; max-height: none; overflow: visible; background: none; box-shadow: none; border-radius: 0; }
.gm-live-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px 0 12px; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font: inherit; font-size: 12.5px; font-weight: 400; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: background .25s ease; }
.gm-live-pill:hover { background: var(--dark-blue); }
.gm-live-pill svg { width: 15px; height: 15px; color: #fff; }
.gm-live-pill:hover svg { color: var(--green); }
.gm-live-pill b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--green); color: var(--blue); font-size: 11px; }
@media (max-width: 700px) { .gm-live.min { left: auto; right: 8px; } }

/* ---- Clanert Sustain page fit: the map fills the window under the site header ---- */
.gm-page { padding: 12px 12px 16px; background: #f5f4f0; }
.gm, .gm-page .gm { height: calc(100vh - 112px); height: calc(100dvh - 112px); min-height: 520px; border-radius: 14px; }
@media (max-width: 700px) { .gm-page { padding: 6px; } .gm, .gm-page .gm { height: calc(100dvh - 92px); } }
.gm-brand a { color: #fff; } .gm-brand .gm-beta { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--green); color: var(--blue); font-size: 9.5px; font-weight: 400; letter-spacing: .06em; }
.gm-bar-end { width: auto; display: flex; gap: 6px; }
.gm-bar-cta { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--green); color: var(--blue) !important; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.gm-bar-cta:hover { background: #fff; } .gm-bar-cta svg { width: 14px; height: 14px; }
@media (max-width: 900px) { .gm-bar-cta span { display: none; } .gm-bar-cta { padding: 0 8px; } }

/* Clanert Air station pins (live public network) */
.gm-pin.air { border-radius: 50%; }
.gm-pin.air.off { opacity: .55; }
.gm-pin.air::after { background: #fff; }
.gm-aqi { display: inline-block; padding: 2px 8px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 400; }

/* compare: swipe between two dates, and the time-lapse */
.gm-cmp { width: 300px; }
.gm-cmp .gm-sat-foot { grid-template-columns: 1fr 1fr; }
.gm-cmp select { height: 30px; border: 1px solid var(--z200); border-radius: 7px; font: inherit; font-size: 12px; padding: 0 6px; width: 100%; }
.gm-cmp-row { display: grid; gap: 4px; padding: 6px 10px; font-size: 11px; font-weight: 400; color: var(--z500); }
.gm-cmp-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 10px; }
.gm-swipe { position: absolute; top: 0; bottom: 0; z-index: 650; width: 0; pointer-events: none; }
.gm-swipe::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.gm-swipe button { position: absolute; top: 50%; left: -19px; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: ew-resize; pointer-events: auto; display: grid; place-items: center; touch-action: none; }
.gm-swipe button svg { width: 18px; height: 18px; }
.gm-swipe-tag { position: absolute; top: 10px; z-index: 651; padding: 4px 10px; border-radius: 999px; background: rgba(35,59,145,.88); color: #fff; font-size: 11px; font-weight: 400; pointer-events: none; white-space: nowrap; }
.gm-lapse { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 1001; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 400; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.gm-lapse .gm-x { color: #fff; } .gm-lapse .gm-x:hover { background: rgba(255,255,255,.15); color: #fff; }
.gm-lapse progress { width: 110px; height: 6px; accent-color: var(--green); }

/* statistics, air quality and calls to action in the analysis panel */
.gm-stat { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; margin: 4px 0; border-radius: 8px; background: var(--z50); font-size: 12.5px; }
.gm-stat b { color: var(--z900); font-weight: 400; } .gm-stat small { grid-column: 1 / -1; color: var(--z500); font-size: 11px; }
.gm-cta { display: grid; gap: 8px; margin: 16px 0 4px; padding: 14px; border-radius: 12px; background: var(--blue); color: #fff; }
.gm-cta p { margin: 0; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.88); }
.gm-cta b { font-size: 13px; }
.gm-cta a { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--green); color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.gm-cta a:hover { background: #fff; }
.gm-aq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.gm-aq { padding: 8px 10px; border-radius: 8px; background: var(--z50); }
.gm-aq span { display: block; font-size: 10.5px; color: var(--z500); text-transform: uppercase; letter-spacing: .05em; }
.gm-aq b { font-size: 16px; color: var(--z900); } .gm-aq small { font-size: 10.5px; color: var(--z500); }
.gm-aq.up b { color: #c2362b; } .gm-aq.down b { color: #2f7d32; }

/* export dialog */
.gm-dialog label.gm-f { display: grid; gap: 4px; font-size: 12px; font-weight: 400; color: var(--z600); }
.gm-dialog .gm-input, .gm-dialog select { width: 100%; }
.gm-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gm-choice button { height: 38px; border: 1px solid var(--z200); border-radius: 9px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 400; color: var(--z700); cursor: pointer; }
.gm-choice button.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.gm-toast { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 1005; padding: 8px 16px; border-radius: 999px; background: rgba(35,59,145,.92); color: #fff; font-size: 12.5px; pointer-events: none; animation: gm-fade .25s ease; }
.gm-guide .gm-guide-more { padding: 0 20px 14px; font-size: 12.5px; color: var(--z500); background: #fff; margin: 0; }
.gm-guide .gm-guide-more a { color: var(--blue); font-weight: 400; }
/* toolbar menus open above the layer panel (both sat at z 1000; the later panel won) */
.gm-toolbar { z-index: 1006; }
/* keep the selection counter clear of the site's chat bubble */
.gm-page .gm-selected { right: 84px; }
.gm-page .gm-sel-list { right: 84px; }
/* phones: one clean bar: icon, the three views, the pod button */
@media (max-width: 700px) {
  .gm-brand h1, .gm-brand .gm-beta { display: none; }
  .gm-modes { margin: 0 auto; }
  .gm-modes button { padding: 4px 9px; font-size: 11.5px; }
  .gm-bar-cta { width: 28px; padding: 0; justify-content: center; }
  .gm-toolbar { max-width: calc(100% - 56px); }
  .gm-detail { height: 65%; }
  .gm-drawbar { bottom: 64px; }
}
/* phones: every toolbar menu opens full width under the toolbar, never past the screen edge */
@media (max-width: 700px) {
  .gm-toolbar .gm-menu { position: static; }
  .gm-toolbar .gm-pop { left: 0; right: 0; top: calc(100% + 6px); width: auto; min-width: 0; max-width: none; max-height: min(62vh, 520px); overflow-y: auto; }
  .gm-toolbar .gm-sat { display: grid; }
}
/* phones: panels sit above the two-row toolbar, so their close buttons are always reachable */
@media (max-width: 700px) {
  .gm-detail { top: auto !important; bottom: 8px !important; left: 8px !important; right: 8px !important; width: auto !important; max-width: none !important; height: 62% !important; z-index: 1008; }
  .gm-live { z-index: 1007; }
}
@media (max-width: 700px) { .gm-detail { bottom: 86px !important; height: 54% !important; } }

/* analysis charts */
.gm-chart { position: relative; height: 170px; margin: 8px 0 6px; padding: 8px 8px 4px; border-radius: 10px; background: var(--z50); }
.gm-chart canvas { width: 100% !important; }
.gm-chart-t { display: block; margin: 0 0 4px; font-size: 10.5px; color: var(--z500); }
.gm-chart:has(.gm-chart-t) canvas { height: calc(100% - 18px) !important; }

/* export designer: settings on the left, live preview on the right */
.gm-designer { width: min(1060px, 100%); max-height: calc(100% - 16px); overflow: hidden; display: flex; flex-direction: column; }
.gm-designer-body { display: grid; grid-template-columns: 360px 1fr; gap: 16px; min-height: 0; overflow: hidden; flex: 1; }
.gm-designer-opts { overflow-y: auto; padding-right: 6px; display: grid; gap: 12px; align-content: start; }
.gm-designer-opts fieldset { border: 1px solid var(--z200); border-radius: 12px; padding: 8px 12px 12px; margin: 0; display: grid; gap: 8px; }
.gm-designer-opts legend { padding: 0 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.gm-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.gm-seg label { position: relative; } .gm-seg input { position: absolute; opacity: 0; }
.gm-seg span { display: grid; place-items: center; height: 34px; border: 1px solid var(--z200); border-radius: 9px; font-size: 12px; font-weight: 400; color: var(--z700); cursor: pointer; }
.gm-seg input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.gm-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.gm-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12.5px; color: var(--z700); }
.gm-checks label { display: flex; align-items: center; gap: 7px; cursor: pointer; } .gm-checks input { accent-color: var(--blue); width: 15px; height: 15px; }
.gm-designer-prev { display: grid; align-content: start; gap: 8px; min-height: 0; overflow: auto; background: var(--z100); border-radius: 12px; padding: 12px; }
.gm-designer-prev canvas { width: 100%; height: auto; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.15); border-radius: 2px; }
.gm-designer .gm-input { height: 34px; font-size: 12.5px; } .gm-designer textarea.gm-input { height: auto; padding: 8px 12px; }
.gm-designer .gm-btn:disabled { opacity: .5; cursor: wait; }
@media (max-width: 860px) {
  .gm-designer-body { grid-template-columns: 1fr; overflow-y: auto; }
  .gm-designer-prev { order: -1; max-height: 34vh; }
  .gm-designer-opts { overflow: visible; }
}
.gm-modal .gm-dialog a.gm-btn { text-decoration: none; }

/* wind rose, sources, attribute table */
.gm-rose { display: grid; justify-items: center; gap: 6px; }
.gm-rose canvas { max-width: 100%; }
.gm-rose > dl, .gm-rose > .gm-chart, .gm-rose > .gm-src { justify-self: stretch; }
.gm-rose-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 10.5px; color: var(--z600); }
.gm-rose-key span { display: inline-flex; align-items: center; gap: 4px; } .gm-rose-key i { width: 10px; height: 10px; border-radius: 2px; }
.gm-src { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 10px; padding: 6px 8px; border-radius: 8px; background: var(--blue-10); color: var(--z600); font-size: 10.5px; line-height: 1.45; }
.gm-src svg { width: 12px; height: 12px; flex: none; margin-top: 2px; color: var(--blue); }
.gm-table { max-height: 220px; overflow: auto; border: 1px solid var(--z100); border-radius: 8px; }
.gm-table table { border-collapse: collapse; width: 100%; font-size: 11px; }
.gm-table th { position: sticky; top: 0; background: var(--z50); text-align: left; padding: 5px 6px; color: var(--blue); }
.gm-table td { padding: 4px 6px; border-top: 1px solid var(--z100); white-space: nowrap; }
.gm-ref select.gm-input { width: 150px; height: 32px; }

/* boundary names, style editor */
.gm-blabel { background: none; border: 0; }
.gm-blabel span { display: inline-block; transform: translate(-50%, -50%); white-space: nowrap; font: 400 11px/1.1 Arial, sans-serif; letter-spacing: .02em;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; pointer-events: none; }
.gm-blabel-regions span { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.gm-blabel-wards span { font-size: 10px; font-weight: 400; }
.gm-sat label .gm-bstyle-btn { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 6px; color: var(--z500); }
.gm-sat label .gm-bstyle-btn:hover { color: var(--blue); background: var(--blue-10); }
.gm-bstyle-btn svg { width: 14px; height: 14px; }
.gm-bstyle { display: grid; gap: 6px; margin: 0 10px 8px 34px; padding: 8px 10px; border-radius: 8px; background: var(--z50); }
.gm-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-pop .gm-swatch, .gm-swatch { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--z300); cursor: pointer; }
.gm-pop .gm-swatch.on, .gm-swatch.on { box-shadow: 0 0 0 2px var(--blue); }
.gm-sat .gm-bs-row { display: flex; align-items: center; gap: 8px; padding: 0; font-size: 11.5px; color: var(--z600); }
.gm-sat .gm-bs-row:hover { background: none; }
.gm-bs-row span { flex: none !important; width: auto; } .gm-bs-row input[type=range] { flex: 1; accent-color: var(--blue); }
.gm-pop .gm-link, .gm-link { justify-self: start; padding: 0; border: 0; background: none; color: var(--blue); font-size: 11.5px; text-decoration: underline; cursor: pointer; }

/* place line + AI analysis */
.gm-place { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px; font-size: 12px; font-weight: 400; color: var(--blue); }
.gm-place svg { width: 14px; height: 14px; flex: none; }
.gm-ai { display: grid; gap: 8px; margin: 12px 0 6px; padding: 12px; border-radius: 10px; border: 1px solid var(--blue-10); background: linear-gradient(180deg, rgba(35,59,145,.05), rgba(140,198,65,.06)); }
.gm-ai-h { display: flex; align-items: center; gap: 6px; color: var(--blue); font-size: 13px; }
.gm-ai-h svg { width: 15px; height: 15px; }
.gm-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-chip { padding: 5px 10px; border: 1px solid var(--z200); border-radius: 999px; background: #fff; color: var(--z700); font: inherit; font-size: 11.5px; cursor: pointer; }
.gm-chip:hover { border-color: var(--blue); color: var(--blue); }
.gm-chip.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.gm-ai textarea.gm-input { width: 100%; min-height: 54px; padding: 8px; resize: vertical; font: inherit; font-size: 12.5px; box-sizing: border-box; }
.gm-ai .gm-btn { justify-self: start; }
.gm-ai-note { color: var(--z500); font-size: 11px; }
.gm-ai-text { font-size: 12.5px; line-height: 1.5; color: var(--z700); }
.gm-ai-text h4 { margin: 10px 0 2px; font-size: 12px; color: var(--blue); }
.gm-ai-text p { margin: 4px 0; } .gm-ai-text ul { margin: 2px 0 4px; padding-left: 18px; } .gm-ai-text li { margin: 2px 0; }
.gm-ai-text p:first-child { font-weight: 400; color: var(--z900); }
@media (max-width: 640px) { .gm-ai-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; } .gm-chip { flex: none; } }
.gm-detail-body .gm-report { display: flex; margin: 0 0 4px auto; }
.gm-ws-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0 6px; font-size: 11px; color: var(--z600); }
.gm-ws-legend span { display: inline-flex; align-items: center; gap: 5px; } .gm-ws-legend i { display: inline-block; width: 18px; border-radius: 2px; }
@media (max-width: 640px) { .gm:has(#gm-detail:not([hidden])) #gm-live { display: none; } }

/* Clanert type: light uppercase blue headings, normal-weight text and values (no heavy bold) */
.gm, .gm .leaflet-container { font-family: Arial, sans-serif; }
.gm b, .gm strong, .gm th, .gm dd, .gm h4, .gm-detail-body h3 + dl dd { font-weight: 400; }
.gm-detail-body h2, .gm-dialog h2, .gm-guide h2 { font-weight: 300; text-transform: uppercase; letter-spacing: .02em; color: var(--blue); }
.gm-detail-body dd, .gm-stat b, .gm-live-l b, .gm-legend-sat b { color: var(--z900); }
.gm-ai-text h4 { font-weight: 400; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.gm-ai-h b { font-weight: 400; }
.gm-blabel-regions span { font-weight: 400; }

/* coordinate grid + coordinate system controls (crs.js) */
.gm-gridcv { position: absolute; inset: 0; z-index: 450; pointer-events: none; }
.gm-status { align-items: center; }
.gm-chip { pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border: 0; border-radius: 7px; background: rgba(35,59,145,.88); color: #fff; font: 11px Arial, sans-serif; cursor: pointer; }
.gm-chip svg { width: 13px; height: 13px; }
.gm-chip[aria-pressed="true"] { background: #8cc641; color: #233b91; font-weight: 600; }
select.gm-chip { appearance: none; -webkit-appearance: none; padding-right: 9px; }
select.gm-chip option { color: #233b91; background: #fff; }
@media (max-width: 640px) { #gm-coords { display: none; } }
/* export preview: drag to move, scroll to zoom */
.gm-prev-wrap { position: relative; }
.gm-prev-wrap canvas { cursor: grab; touch-action: none; }
.gm-prev-wrap canvas.drag { cursor: grabbing; }
.gm-prev-tools { position: absolute; right: 10px; top: 10px; display: grid; gap: 4px; }
.gm-prev-tools button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #233b91; color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.gm-prev-tools button:hover { background: #8cc641; color: #233b91; }
.gm-prev-hint { margin: 6px 0 0; font-size: 11.5px; color: var(--z500); }
/* boundaries (regions, districts, wards) are lines in every legend */
.gm-sw.line, li > i.line { height: 3px !important; width: 18px !important; border-radius: 2px !important; vertical-align: middle !important; }
/* dialogs (export, sign in) always sit above the toolbar, legend and panels; messages above dialogs */
.gm-modal { z-index: 1020; }
.gm-toast { z-index: 1030; }
/* phones: the export preview comes first, the options under it */
@media (max-width: 700px) {
  .gm-designer-prev { order: -1; padding: 8px; overflow: visible; }
  .gm-designer { max-height: calc(100% - 8px); }
  .gm-modal { padding: 4px; }
}
@media (max-width: 700px) {
  .gm-designer-body { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
  .gm-designer-prev, .gm-designer-opts { flex: none; min-height: auto; max-height: none; overflow: visible; }
}
/* guide: never taller than the map; it scrolls, sits above the toolbar, and always shows a way out */
.gm-guide { place-content: start center; align-content: start; overflow-y: auto; padding: 24px 16px; z-index: 1012; }
.gm-guide > * { width: min(420px, 100%); }
.gm-guide h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gm-guide-x { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 999px; background: var(--z100); color: var(--blue); cursor: pointer; }
.gm-guide-x svg { width: 18px; height: 18px; }
.gm-guide .gm-btn { position: sticky; bottom: 0; }
@media (max-width: 700px) {
  .gm-guide { padding: 10px; }
  .gm-guide h2 { padding: 12px 14px 2px; font-size: 18px; }
  .gm-guide ul { padding: 6px 14px 10px; gap: 7px; font-size: 13px; }
  .gm-guide .gm-guide-more { padding: 0 14px 10px; }
}
/* phones: a simple map. Six main tools in one row, the rest under "More"; counter only when something is selected */
.gm-more { display: none; }
@media (max-width: 700px) {
  .gm-more { display: grid; }
  .gm-toolbar [data-more] { display: none; }
  .gm-toolbar.more [data-more] { display: grid; }
  .gm-toolbar.more .gm-menu[data-more] { display: block; }
  .gm-toolbar { flex-wrap: wrap; }
  .gm-selected:not(.has) { display: none; }
}
