:root {
  --ink: #1b2430; --muted: #66707d; --line: #e3e7ec; --bg: #fff; --press: #f2f5f8; --blue: #2b8ef2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
#map { position: fixed; inset: 0; }

/* panel filtrů: vlevo nahoře, na mobilu dole jako vysouvací list */
.panel {
  position: fixed; top: 12px; left: 12px; width: 320px; max-height: calc(100% - 24px);
  display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  border-radius: 14px; box-shadow: 0 6px 24px rgba(14, 31, 58, .18); z-index: 2; overflow: hidden;
}
.toggle {
  width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.title { font-weight: 800; font-size: 17px; }
.summary { color: var(--muted); font-size: 13px; white-space: nowrap; }
.panel-body { display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--line); }
.panel.collapsed .panel-body { display: none; }
.search {
  margin: 12px 16px 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px;
}
.bulk { display: flex; gap: 8px; padding: 0 16px 8px; }
.bulk button {
  flex: 1; padding: 7px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit;
  font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.bulk button:hover { background: var(--press); }
.groups { overflow-y: auto; padding: 0 8px 8px; }
.group { border-bottom: 1px solid var(--line); }
.group:last-child { border-bottom: 0; }
.ghead { display: flex; align-items: center; gap: 10px; padding: 9px 8px; }
.ghead input { width: 18px; height: 18px; margin: 0; accent-color: var(--c); cursor: pointer; }
.gname { flex: 1; font-weight: 700; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chev { border: 0; background: none; padding: 4px 6px; cursor: pointer; color: var(--muted); font-size: 14px; transition: transform .15s; }
.group.open .chev { transform: rotate(90deg); }
.cats { display: none; padding: 0 0 8px 28px; }
.group.open .cats, .groups.searching .cats { display: block; }
.cat { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cat:hover { background: var(--press); }
.cat input { margin: 0; width: 16px; height: 16px; accent-color: var(--c); cursor: pointer; }
.cat .lbl { flex: 1; }
.ico { width: 18px; height: 18px; flex: none; background-repeat: no-repeat; }
.hidden { display: none !important; }
.gbulk { display: flex; gap: 6px; padding: 2px 8px 6px; }
.gbulk button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 4px 9px; font: inherit;
                font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; }
.gbulk button:hover { background: var(--press); }
.panel-body { overflow-y: auto; }
.groups { overflow-y: visible; }
.sec-head { padding: 12px 16px 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sec-poi { border-top: 1px solid var(--line); margin-top: 4px; }
.seg { display: flex; margin: 2px 16px 6px; background: #eef1f4; border-radius: 9px; padding: 2px; }
.seg button { flex: 1; border: 0; background: none; padding: 6px 0; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rsd-cats { padding: 0 8px 6px; }
.rsd-cats .cat { padding-left: 8px; }
.pp-img { display: block; max-width: 100%; margin: 6px 0; border-radius: 6px; background: #111; }
.pp-list { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.meta { margin: 0; padding: 10px 16px 14px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

.zoomhint {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2; padding: 8px 14px;
  background: rgba(27, 36, 48, .86); color: #fff; border-radius: 20px; font-size: 13.5px; pointer-events: none;
}

/* detail místa */
.maplibregl-popup-content { border-radius: 12px; padding: 12px 14px; font-family: inherit; min-width: 210px; max-width: 290px; }
.pp-kind { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pp-name { font-size: 16px; font-weight: 800; margin: 4px 0 6px; color: var(--ink); }
.pp-row { font-size: 13.5px; color: var(--ink); margin: 3px 0; }
.pp-row b { color: var(--muted); font-weight: 600; }
.pp-row a { color: var(--blue); word-break: break-all; }
.pp-src { margin-top: 8px; font-size: 12px; }
.pp-src a { color: var(--muted); }

@media (max-width: 640px) {
  .panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 62%; border-radius: 16px 16px 0 0;
           padding-bottom: env(safe-area-inset-bottom); }
  .zoomhint { bottom: auto; top: 14px; }
  .maplibregl-ctrl-bottom-right { bottom: 56px; }
}
