html, body, #map { margin: 0; height: 100%; }
body { font: 13px/1.35 system-ui, sans-serif; }
#coords { position: absolute; left: 8px; bottom: 28px; z-index: 2; background: #fffc; padding: 2px 6px; border-radius: 3px; font: 12px ui-monospace, monospace; }
.gp-panel { position: absolute; top: 10px; left: 10px; z-index: 3; max-width: 270px; background: #fffffff2; border-radius: 6px;
  box-shadow: 0 1px 6px #0004; max-height: calc(100% - 60px); display: flex; flex-direction: column; }
.gp-panel > header { display: flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer; font-weight: 600; user-select: none; }
.gp-panel > header span { flex: 1; }
.gp-panel .body { overflow: auto; padding: 0 10px 8px; }
.gp-panel.collapsed .body { display: none; }
.gp-panel h4 { margin: 8px 0 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #555; }
.gp-panel label { display: flex; align-items: center; gap: 6px; padding: 1px 0; cursor: pointer; }
.gp-panel input[type=range] { width: 70px; margin-left: auto; }
.gp-panel .row { display: flex; align-items: center; gap: 6px; }
.gp-note { padding: 6px 10px 8px; font-size: 11px; color: #555; border-top: 1px solid #0001; }
.gp-title { padding: 8px 10px 2px; font-size: 15px; font-weight: 700; color: #305000; }
@media (max-width: 600px) { .gp-panel { max-width: 200px; } }

/* dock for the tool panels (right of the control column) */
#dock { position: absolute; top: 10px; right: 50px; z-index: 4; display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  max-height: calc(100% - 50px); overflow: auto; max-width: calc(100% - 230px); pointer-events: none; }
.gp-float { pointer-events: auto; background: #fffffff5; border-radius: 6px; box-shadow: 0 1px 6px #0004; max-width: 100%; box-sizing: border-box; }
.gp-float[hidden] { display: none; }
.gp-float > header { display: flex; align-items: center; padding: 6px 6px 4px 10px; font-weight: 600; }
.gp-float > header span { flex: 1; }
.gp-float .x { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 6px; color: #444; }
.gp-float .body { padding: 0 10px 10px; }
.gp-float h4 { margin: 8px 0 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #555; }
.gp-float .hint, .gp-float .msg { font-size: 11px; color: #555; margin: 4px 0; min-height: 1em; }
.gp-float .btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.gp-float button:not(.x) { font: inherit; padding: 4px 9px; border: 1px solid #bbb; border-radius: 4px; background: #f6f6f4; cursor: pointer; }
.gp-float button:not(.x):hover { background: #eaeae4; }
.gp-float .url { width: 100%; box-sizing: border-box; font: 11px ui-monospace, monospace; padding: 4px; }
.gp-float .chk { display: flex; gap: 4px; align-items: center; margin: 4px 0; }
.gp-float .srow { display: flex; align-items: center; gap: 6px; margin: 4px 0; } .gp-float .srow span { width: 62px; } .gp-float .srow input { flex: 1; } .gp-float .srow b { width: 24px; text-align: right; }
.gp-float .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 4px 8px; margin: 6px 0; }
.gp-float .stats div { display: flex; flex-direction: column; } .gp-float .stats span { font-size: 10px; text-transform: uppercase; color: #666; } .gp-float .stats b { font-size: 13px; }
.gp-float .chart { width: 100%; height: auto; touch-action: none; background: #fff; border: 1px solid #0002; border-radius: 3px; }
.gp-float .tip { font: 11px ui-monospace, monospace; color: #333; min-height: 1.3em; }
.lg-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.lg-sw { width: 30px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; font-size: 12px; line-height: 1; }
.lg-sw svg { display: block; }
.gp-btn.active { background: #d8e8c4; }
.pop { font-size: 12px; } .pop-item { margin-bottom: 5px; } .pop-foot { color: #666; font-size: 11px; border-top: 1px solid #0002; padding-top: 4px; margin-top: 4px; }
@media (max-width: 600px) { #dock { right: 46px; max-width: calc(100% - 60px); } .gp-float { width: auto !important; min-width: 220px; } }

.maplibregl-ctrl-top-right { max-height: calc(100% - 24px); overflow-y: auto; scrollbar-width: none; pointer-events: none; }
.maplibregl-ctrl-top-right > * { pointer-events: auto; }

.gp-panel .lg-slot { display: inline-flex; flex: none; }
.gp-panel .lg-sw { width: 30px; height: 16px; }
.gp-panel .lg-sub { margin: 0 0 3px 26px; font-size: 12px; color: #444; }
.gp-panel .lg-sub.off { opacity: .4; }
.gp-panel .lg-sub .lg-row { padding: 1px 0; gap: 6px; }
.gp-panel .lg-tog { margin-left: auto; border: 0; background: none; cursor: pointer; font-size: 13px; padding: 0 4px; color: #555; }
.gp-panel .lg-sub[hidden] { display: none; }
.gp-panel .lg-tog::before { content: "\25B8"; }
.gp-panel .lg-tog.open::before { content: "\25BE"; }
.gp-float .btns .tab.on { background: #d8e8c4; border-color: #8aa66a; }
