/* Карта: холст, карточки в заметке, окна, управление, запись маршрута. */
.geomap { position: relative; overflow: hidden; background: #e9ebee; }
.geomap-dark { background: #101216; }
.geomap-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.geomap-attr { position: absolute; right: 6px; bottom: 4px; padding: 1px 6px; border-radius: 8px; font-size: 10px; color: #333; background: #ffffffb0; pointer-events: none; }
.geomap-dark .geomap-attr { color: #ccc; background: #000a; }

.geo-card { margin: 10px 0; max-width: 520px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: 0 2px 14px #0000001a; transition: transform .2s, box-shadow .2s, border-color .2s; }
.geo-card.clickable { cursor: pointer; }
.geo-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 28px #1e96eb33; }
.geo-map { height: 210px; }
.geo-map::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 -26px 30px -22px #0005; }
.geo-caption { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 13px; }
.geo-caption .icon { color: var(--accent); flex: none; }
.geo-caption strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-coords { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.geo-error { padding: 20px; }
.board-node .geo-card { margin: 0; max-width: none; position: absolute; inset: 0; display: flex; flex-direction: column; box-shadow: none; border: 0; border-radius: 0; }
.board-node .geo-card .geo-map { flex: 1; height: auto; min-height: 0; }
.board-node:has(.geo-card) { padding: 0; overflow: hidden; }
.board-node:has(.geo-card) .node-body, .board-node:has(.geo-card) .markdown { padding: 0; height: 100%; }

dialog.modal#map-sheet, dialog.modal#place-modal { width: min(1100px, 97vw); height: min(780px, 94dvh); max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
dialog#map-sheet[open], dialog#place-modal[open] { display: flex; }
#map-sheet .modal-head, #place-modal .modal-head { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.map-sheet-body { position: relative; flex: 1; min-height: 0; }
.map-full { position: absolute; inset: 0; }
.glass { background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 6px 26px #0003; }

.map-controls { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.map-btn { width: 44px; height: 44px; display: grid; place-content: center; border-radius: 14px; color: var(--text); cursor: pointer; background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: 0 4px 16px #0003; transition: transform .12s, background .15s; }
.map-btn:hover { background: var(--card); color: var(--accent); }
.map-btn:active { transform: scale(.92); }

.map-info { position: absolute; left: 12px; bottom: 14px; z-index: 2; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 18px; max-width: min(420px, calc(100% - 24px)); animation: map-rise .35s ease-out; }
@keyframes map-rise { from { opacity: 0; transform: translateY(16px); } }
.map-info:empty { display: none; }
.map-coords { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: 15px; }
.map-coords .icon { color: var(--accent); }
.map-stats { display: flex; gap: 22px; }
.map-stat { display: flex; flex-direction: column; }
.map-stat strong { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.map-stat span { font-size: 12px; color: var(--muted); }
.map-pick { right: 70px; max-width: none; }
.map-pick .input { width: 100%; font-size: 15px; }

.map-search { position: absolute; left: 12px; top: 12px; right: 70px; max-width: 460px; z-index: 3; border-radius: 16px; overflow: hidden; }
.map-search-row { display: flex; align-items: center; gap: 8px; padding: 4px 12px; color: var(--muted); }
.map-search-row .input { flex: 1; border: 0; background: transparent; font-size: 15px; padding: 9px 4px; }
.map-search-row .input:focus { outline: none; }
.map-results { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; }
.map-results:empty { display: none; }
.map-results .hint, .map-results .warn { padding: 8px 14px; margin: 0; }
.map-result { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 9px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-size: 13px; }
.map-result:hover { background: var(--hover); }
.map-result .icon { flex: none; color: var(--accent); margin-top: 2px; }

.track-pill { position: fixed; z-index: 40; left: 50%; translate: -50% 0; bottom: calc(var(--nav-h, 0px) + 14px); display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 14px; border-radius: 26px; font-size: 13px; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 8px 30px #0004; animation: map-rise .3s ease-out; }
.track-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: track-blink 1.4s infinite; }
@keyframes track-blink { 0% { box-shadow: 0 0 0 0 #eb433588; } 100% { box-shadow: 0 0 0 11px #eb433500; } }
.track-pill .icon-button { width: 34px; height: 34px; }
.track-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-items: flex-start; }
.track-item { display: inline-flex; gap: 8px; align-items: center; }

@media (max-width: 760px) {
  dialog.modal#map-sheet, dialog.modal#place-modal { width: 100vw; height: 100dvh; max-width: none; border-radius: 0; }
  .map-search { right: 70px; }
  .map-pick { right: 12px; left: 12px; max-width: none; bottom: 10px; }
  .map-controls { top: 70px; }
  #map-sheet .map-controls { top: 12px; }
  .geo-map { height: 180px; }
}
@media (prefers-reduced-motion: reduce) { .map-info, .track-pill, .geo-card { animation: none; transition: none; } .track-dot { animation: none; } }
