/* Grada zīmols (2026-11-20, kā sākumlapā landing/): dzeltens tikai kā fons vai aizpildījums ar asfalta tekstu, vai uz
   tumšas virsmas — nekad dzeltens teksts uz gaiša (balts uz dzeltena 1,6:1, asfalts uz dzeltena 10,9:1). Maršruta zilā
   (#1565c0 saime) un nozīmes krāsas (legāls, segumi, POI, kārtībā/drīz/jāveic, kļūdas) — nemainās. */
:root {
  --brand: #FFC21A; --brand-hi: #FFCF47; --on-brand: #16191C; --brand-soft: #FFF4D1; --brand-line: #D99A00;
  --ink: #16191C; --graphite: #2A2F34; --dust: #F2F1EE;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* hidden atribūts uzvar arī elementiem ar display: flex/grid (garāžas forma, albums…) */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; font-family: var(--font); color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); } /* bija pārlūka zilās */

#map { position: absolute; inset: 0; }

#menu-fab { display: none; }

/* peldošais sānu panelis (Komoot stils) */
#sidebar {
  position: absolute; left: 14px; top: 14px; bottom: 14px; width: 340px; z-index: 10;
  background: #fff; border-radius: 18px; box-shadow: 0 2px 18px rgba(0,0,0,.18);
  padding: 18px 18px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
}
#sidebar::-webkit-scrollbar { width: 8px; }
#sidebar::-webkit-scrollbar-thumb { background: #d7dbdf; border-radius: 4px; }

h1 { font-size: 20px; margin: 0 0 8px; color: var(--ink); }
h1.brand { display: flex; align-items: center; gap: 10px; font: italic 800 27px/1 var(--font-display); letter-spacing: .03em; margin: 0 0 10px; }
h1.brand .brand-ic { width: 34px; height: 34px; border-radius: 9px; flex: none; }
h2 {
  font-size: 14px; font-weight: 700; color: var(--ink); margin: 0; padding: 9px 2px;
  cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 8px;
}
h2:hover { background: #f4f6f7; }
h2::after { content: "▾"; color: #9aa4ad; font-size: 11px; transition: transform .15s; }
section.collapsed h2::after { transform: rotate(-90deg); }
section.collapsed .sec-body { display: none; }
section { border-bottom: 1px solid #eef1f3; padding-bottom: 4px; }
.sec-body { padding: 2px 2px 6px; }
.sec-divider {
  font-size: 10.5px; letter-spacing: 1.5px; color: #9aa4ad;
  margin: 14px 2px 0; text-transform: uppercase; font-weight: 700;
}
h3 { font-size: 12.5px; margin: 8px 0 4px; color: #6b7680; font-weight: 600; }

.search-row { display: flex; gap: 6px; margin: 4px 0; }
.search-row input {
  flex: 1; background: #f1f3f4; color: var(--ink); border: 1px solid #e0e4e7;
  border-radius: 22px; padding: 8px 12px; font-size: 13px;
}
.search-row .btn { width: auto; margin: 0; }
#search-results { margin: 2px 0 4px; }
#search-results .sr {
  font-size: 12.5px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  color: #444c54; border: 1px solid transparent;
}
#search-results .sr:hover { background: var(--brand-soft); border-color: var(--ink); }

section label { display: block; font-size: 13.5px; margin: 3px 0; cursor: pointer; }
label.small { font-size: 12.5px; color: #55606a; }
select {
  width: 100%; margin-top: 3px; background: #f1f3f4; color: var(--ink);
  border: 1px solid #e0e4e7; border-radius: 10px; padding: 7px 8px; font-size: 13px;
}

.btn {
  background: #f1f3f4; color: var(--ink); border: 1px solid #e0e4e7; border-radius: 22px;
  padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; width: 100%; margin: 3px 0;
}
.btn:hover { background: #e7eaec; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover:not(:disabled) { background: var(--brand-hi); border-color: var(--brand-hi); }
.mode-row, .btn-row { display: flex; gap: 6px; }
.mode-row.small-gap { gap: 12px; }
.btn.mode.active { background: var(--brand); border-color: var(--ink); color: var(--on-brand); }

.status { font-size: 12.5px; color: var(--graphite); min-height: 16px; margin: 4px 0; white-space: pre-line; }
.status.err { color: #c62828; }
.status.note { color: #6b7680; }
.hint { font-size: 11.5px; color: #8a949e; margin: 6px 0 0; }
#zoom-ind.ok { color: #4a7d16; }
#zoom-ind.low { color: #b26a00; }

.lg { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 2px 0; color: #444c54; }
/* apskates objektu kategoriju grupas (2026-11-18: 24 rūtiņas vienā sarakstā vairs nav pārskatāmas) */
.sight-grp { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #8a949e; margin: 9px 0 2px; }
#legend .sw, .lg .sw { display: inline-block; width: 26px; height: 4px; border-radius: 2px; flex-shrink: 0; }
#legend .sw.dashed { background-image: linear-gradient(90deg, currentColor 0 6px, transparent 6px 10px); background-size: 10px 100%; }
/* balts vai gaišs ceļš ar apmali (2026-11-19, kā kartē) */
#legend .sw.cased, .lg .sw.cased { height: 7px; border-radius: 4px; background: var(--f); box-shadow: inset 0 0 0 1.5px var(--k); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d0d5da; flex-shrink: 0; }

/* līniju ikonas emoji vietā (icons.js, Tabler Icons): krāsa = teksta krāsa, izmērs pēc fonta */
.ic { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 1em; height: 1em; vertical-align: -0.15em; }
.ic.fill { fill: currentColor; }
h1 .ic { color: var(--ink); }
label .ic, .hint .ic, #search-results .sr .ic { color: #6b7680; }
.poi-ic { display: inline-flex; color: var(--c, #6b7680); }
.poi-ic .ic { width: 17px; height: 17px; }
/* pieturu kategoriju krāsas: kartes markieri un saraksti */
.c-fuel { --c: #e65100; } .c-food { --c: #2e7d32; } .c-sight { --c: #00838f; } .c-moto { --c: #1565c0; } .c-sleep { --c: #6a1b9a; }
.c-search { --c: #c62828; } .c-fuel30 { --c: #f9a825; } .c-fuel10 { --c: #d32f2f; } .c-fuel0 { --c: #212121; }

footer { margin-top: auto; padding-top: 12px; font-size: 10.5px; color: #9aa4ad; }

.fuel-row { display: flex; gap: 10px; }
.fuel-row label { flex: 1; }
.fuel-row input {
  width: 100%; margin-top: 2px; background: #f1f3f4; color: var(--ink);
  border: 1px solid #e0e4e7; border-radius: 10px; padding: 6px 8px; font-size: 13px;
}
/* kartes markieri: balts aplis ar kategorijas krāsas apmali un ikonu; ieteiktā DUS — pildīta */
.fuel-marker { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--c, #37474f);
  border: 2px solid var(--c, #37474f); display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.fuel-marker .ic { width: 15px; height: 15px; vertical-align: 0; }
.fuel-marker.reco { width: 34px; height: 34px; background: var(--c, #37474f); color: #fff; }
.pop-actions { margin-top: 8px; }
/* apskates objekta bilde logā (Wikimedia Commons) */
.sight-photo { margin: 0 0 8px; }
/* pilsētas kolāža (2026-11-19): pirmā bilde 2x2, pārējās mazas */
.place-card .pc-sub { font-size: 12px; color: #6b7680; margin-top: 2px; }
.place-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 74px; gap: 3px; margin-top: 8px; }
.place-grid button { position: relative; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer;
  background: #e8eaed; min-width: 0; }
.place-grid button:first-child { grid-column: span 2; grid-row: span 2; }
.place-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.place-grid .noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #fff;
  background: #90a4ae; font-size: 22px; }
.place-grid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 4px 3px; font-size: 10.5px;
  line-height: 1.2; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.place-desc { font-size: 12px; color: #4a5560; margin-top: 6px; }
/* zīmīgie objekti kartē — sīktēls ar nosaukumu */
.landmark { display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none;
  cursor: pointer; }
.landmark img { display: block; width: 58px; height: 58px; object-fit: cover; border-radius: 10px; border: 3px solid #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.38); background: #e8eaed; }
.landmark span { margin-top: 2px; max-width: 120px; padding: 1px 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.93);
  color: #263238; font-size: 11px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); }
.landmark:hover img { border-color: #ffc21a; }
/* "Kas šeit ir?" objekti kartē (2026-11-19): zīmīgie paslēpti, kamēr kartīte atvērta */
.near-open .landmark:not(.near-mk) { display: none; }
/* marķieris: viens sīktēls vai kolāža (2–4 bildes, "+N") augstāk sarakstā esošā objekta vietā */
.near-mk .nm-pic { display: grid; gap: 2px; width: 64px; height: 64px; box-sizing: border-box; border: 3px solid #fff;
  border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.38); }
.near-mk.n2 .nm-pic { grid-template-columns: 1fr 1fr; }
.near-mk.n3 .nm-pic, .near-mk.n4 .nm-pic { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.near-mk.n3 .nm-cell:first-child { grid-row: span 2; }
.near-mk .nm-cell { position: relative; display: block; min-width: 0; min-height: 0; padding: 0; border: 0;
  background: #e8eaed; cursor: pointer; overflow: hidden; }
.near-mk .nm-cell img { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; box-shadow: none; }
.near-mk .nm-cell i.noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #fff; }
.near-mk .nm-cell i.noimg .ic { width: 18px; height: 18px; }
.near-mk .nm-cell b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 13px; font-weight: 700; }
.near-mk.hl { z-index: 60 !important; }
.near-mk.hl .nm-pic { border-color: #ffc21a; }
.near-mk .nm-cell.hl { outline: 3px solid #ffc21a; outline-offset: -3px; }
.near-here { width: 14px; height: 14px; border-radius: 50%; background: #1565c0; border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.3), 0 1px 4px rgba(0, 0, 0, 0.4); }
.near-pop .maplibregl-popup-tip { display: none; }
.near-row.hl { background: #fff4cc; }
.sight-nl { font-size: 11.5px; color: #6b7680; margin: -2px 0 2px; }
.mt-note { font-size: 10.5px; color: #90a4ae; white-space: nowrap; }
#sv-head .sv-snap { font-weight: 400; font-size: 11px; color: #6b7680; margin-left: 4px; }
/* "Kas šeit ir?" — apskates objekti tuvumā */
.near-card .near-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; max-height: 330px; overflow-y: auto; }
.near-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px; border: 0; border-radius: 6px;
  background: transparent; cursor: pointer; text-align: left; min-width: 0; }
.near-row:hover { background: #f1f3f4; }
.near-row img, .near-row .noimg { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 5px; object-fit: cover;
  display: flex; align-items: center; justify-content: center; color: #fff; background: #90a4ae; }
.near-row .nr-t { display: flex; flex-direction: column; min-width: 0; }
.near-row b { font-size: 12.5px; font-weight: 600; color: #263238; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-row small { font-size: 11px; color: #6b7680; }
.near-road { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 6px; padding: 6px 8px;
  border: 1px solid #e0e3e7; border-radius: 6px; background: #fafbfc; cursor: pointer; text-align: left; font-size: 12.5px; }
.near-road small { margin-left: auto; color: #1a73e8; white-space: nowrap; }
.place-grid em.unesco { position: absolute; top: 4px; left: 4px; padding: 1px 5px; border-radius: 4px; font-style: normal;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; color: #fff; background: rgba(0, 94, 170, 0.88); }
.sight-photo img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 8px; background: #e8eaed; }
.sight-credit { font-size: 10.5px; color: #6b7680; margin-top: 3px; line-height: 1.3; overflow-wrap: anywhere; }
.sight-credit a { color: inherit; }
.sight-desc { font-size: 12px; color: #4a5560; margin-top: 4px; }
.sight-links { margin-top: 4px; font-size: 12px; }
/* pieturas logā: maršruta km lieliem cipariem, sānis īsi */
.poi-km { margin: 4px 0 2px; font-size: 13px; color: #4a5560; }
/* maršruta fotokolāža (viena liela + mazās; bildes no Wikimedia Commons) */
.rp { margin: 8px 0 10px; }
.rp-grid { display: grid; gap: 4px; height: 190px; border-radius: 12px; overflow: hidden;
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.rp-grid figure { position: relative; margin: 0; overflow: hidden; cursor: pointer; background: #e8eaed; min-width: 0; }
.rp-grid figure:first-child { grid-row: 1 / 3; }
.rp-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rp-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 4px; font-size: 11px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-n1 .rp-grid { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.rp-n2 .rp-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.rp-n2 .rp-grid figure:first-child { grid-row: auto; }
.rp-n3 .rp-grid { grid-template-columns: 2fr 1fr; }
.rp-n4 .rp-grid figure:nth-child(2) { grid-column: 2 / 4; } /* liela + plata augšā + divas apakšā */
.rp-credit { font-size: 10.5px; color: #6b7680; margin-top: 3px; line-height: 1.3; overflow-wrap: anywhere; }
/* saglabātā maršruta vāks bibliotēkā */
.lib-cover { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.lib-credit { font-size: 10.5px; color: #8a949e; }
.poi-km b { font-size: 17px; color: var(--ink); margin-right: 8px; }
/* īss paziņojums (piem., „Turi pirkstu uz kartes…”) */
#toast { position: fixed; left: 50%; bottom: calc(var(--rs-peek, 112px) + 24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 1200; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 20px;
  background: rgba(33,37,41,.92); color: #fff; font-size: 14px; text-align: center; pointer-events: none;
  opacity: 0; transition: opacity .2s; }
#toast.show { opacity: 1; }
/* punkts sagatavots pārvietošanai (turēts ~0,5 s) */
/* (bez transform: MapLibre marķierim pozīciju liek ar iekšējo transform) */
.wp-marker.drag-armed { box-shadow: 0 0 0 5px rgba(255,194,26,.75), 0 6px 18px rgba(0,0,0,.45); }
/* tavi albuma foto pie apskates objekta */
.own-photos { margin-top: 8px; }
.own-photos-t { font-size: 12px; font-weight: 600; color: #4a5560; margin-bottom: 4px; }
.own-photos-row { display: flex; gap: 6px; }
.own-photos-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; background: #e8eaed; }
.pop-add { width: 100%; justify-content: center; }
body.nav-on .pop-add { display: none; } /* navigācijā pieturu maršrutā nepievieno (pārrēķins — plānojot) */
.fuel-marker.reco .ic { width: 20px; height: 20px; }

/* maršruta varianti */
#route-variants { display: flex; gap: 6px; margin: 4px 0; flex-wrap: wrap; }
.var-btn {
  flex: 1; min-width: 90px; border: 1.5px solid #e0e4e7; border-radius: 12px;
  background: #f7f8f8; padding: 6px 8px; font-size: 11.5px; cursor: pointer;
  text-align: center; color: #444c54; line-height: 1.35;
}
.var-btn b { display: block; font-size: 13px; color: var(--ink); }
.var-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; margin-bottom: 2px;
  background: #e7eaec; color: #55606a; font-size: 11px; font-weight: 700;
}
.var-btn.active .var-tag { background: var(--brand); color: var(--on-brand); }
.var-btn.active { border-color: var(--ink); background: var(--brand-soft); }
/* variantu burbuļi kartē (Waze stils): laiks, + minūtes pret ātrāko, km; aktīvais — maršruta krāsā */
.alt-bubble { border: 0; background: #fff; color: #1b1f22; border-radius: 12px; padding: 6px 10px 5px;
  box-shadow: 0 3px 12px rgba(0,0,0,.28); font: 700 13.5px/1.2 var(--font); cursor: pointer;
  text-align: center; white-space: nowrap; margin-bottom: 7px; }
.alt-bubble b { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
  background: #e7eaec; color: #44505a; font-size: 11px; margin-right: 3px; vertical-align: 1px; }
.alt-bubble small { display: block; font-weight: 500; font-size: 11px; color: #5d6870; }
.alt-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
.alt-bubble.active { background: #1565c0; color: #fff; }
.alt-bubble.active b { background: #fff; color: #1565c0; }
.alt-bubble.active small { color: #d8e7fb; }
.alt-bubble.active::after { border-top-color: #1565c0; }
/* telefona maršruta paneļa galvā — varianti vienā rindā (redzami bez paneļa atvēršanas) */
.rs-vars:empty { display: none; }
.rs-vars #route-variants { flex-wrap: nowrap; overflow-x: auto; margin: 2px 0 6px; padding-bottom: 2px; }
.rs-vars .var-btn { flex: 1 0 auto; min-width: 96px; padding: 5px 8px; }

/* segumu sadalījums (Komoot stils) */
#route-bd { margin: 6px 0; }
.bd-title { font-size: 12.5px; font-weight: 700; color: var(--ink); margin: 4px 0; }
.bd-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.bd-seg { min-width: 3px; cursor: pointer; transition: filter .1s; }
.bd-seg:hover { filter: brightness(1.25); }
.bd-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #444c54;
  padding: 4px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
}
.bd-row:hover, .bd-row.active { background: var(--brand-soft); border-color: var(--ink); }
.bd-row .km { margin-left: auto; color: #6b7680; font-weight: 600; }

/* "Kur paēst" saraksts */
.poi-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #444c54;
  padding: 5px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
}
.poi-row:hover { background: var(--brand-soft); border-color: var(--ink); }
.poi-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.poi-main b { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poi-sub { font-size: 11px; color: #8a949e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poi-row .km { color: #6b7680; font-weight: 600; font-size: 11.5px; white-space: nowrap; }

/* waypointu saraksts */
#wp-list { list-style: none; margin: 4px 0; padding: 0; }
#wp-list li {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  background: #f7f8f8; border: 1px solid #e4e7e9; border-radius: 12px;
  padding: 6px 10px; margin: 4px 0; cursor: default;
}
#wp-list li.dragover { border-color: var(--ink); background: var(--brand-soft); }
#wp-list .grip { cursor: grab; color: #9aa4ad; font-size: 14px; }
#wp-list .num {
  font-weight: 700; color: #fff; background: #4a6fa5; border-radius: 50%;
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
}
#wp-list li:first-child .num { background: var(--brand); color: var(--on-brand); }
#wp-list li:last-child:not(:only-child) .num { background: var(--ink); }
#wp-list .coords { color: #6b7680; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wp-list .coords.named { color: var(--ink); }
/* tukša rinda nākamajam punktam (adrese vai vieta) */
.wp-add-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px dashed #c3cad0;
  border-radius: 12px; padding: 2px 10px; margin: 4px 0; }
.wp-add-row:focus-within { border-style: solid; border-color: var(--ink); }
.wp-add-row .num { font-weight: 700; color: #fff; background: #9aa4ad; border-radius: 50%; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
#wp-add-q { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink);
  padding: 7px 0; outline: none; }
.wp-sugg { margin: 2px 0 6px; }
.wp-sugg .sr { font-size: 12.5px; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: #444c54;
  border: 1px solid transparent; }
.wp-sugg .sr:hover { background: var(--brand-soft); border-color: var(--ink); }
.wp-sugg .sr.none { cursor: default; color: #6b7680; }
.wp-sugg .sr .ic { color: #6b7680; }
#wp-list .del { cursor: pointer; color: #b0b8bf; padding: 0 3px; font-size: 13px; }
#wp-list .del:hover { color: #c62828; }

/* labā klikšķa kartīte (Komoot waypoint popup stils) */
#vap-hud {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 900;
  background: rgba(20, 24, 28, .92); color: #fff; border-radius: 14px;
  padding: 10px 18px; text-align: center; min-width: 300px;
  box-shadow: 0 4px 18px rgba(0,0,0,.4); font-size: 13px;
}
#vap-hud.hidden { display: none; }
#vap-hud .big { font-size: 30px; font-weight: 800; line-height: 1.1; }
#vap-hud .ok { color: #66ff8c; }
#vap-hud .bad { color: #ff6659; }
#vap-hud .sub { color: #b7c0c8; font-size: 12px; }

/* navigācijas HUD un pozīcijas bulta */
#nav-hud {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 900;
  background: rgba(20, 24, 28, .92); color: #fff; border-radius: 14px;
  padding: 10px 20px; font-size: 16px; text-align: center; min-width: 240px;
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
#nav-hud.hidden { display: none; }
/* brauciena simulācija (sim.js): virs navigācijas joslas */
.sim-ctl { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 901;
  background: #fff7e6; color: #5d4300; border: 2px solid #f0b400; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.3);
  padding: 6px 8px; display: flex; flex-direction: column; gap: 5px; align-items: center; max-width: calc(100vw - 24px); }
.sim-info { font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.sim-btns { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.sim-btns button { border: 1px solid #e6c766; background: #fff; border-radius: 9px; padding: 5px 9px; font: 600 12.5px/1.2 var(--font);
  color: #3d2f00; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sim-btns button:hover { background: #fff3cc; }
#nav-hud b { font-family: var(--font-display); font-size: 23px; font-weight: 800; }
#nav-hud .nav-off { color: #ff6659; font-weight: 700; }
/* 3D navigācijas bulta (nav.js NAV_PUCK_SVG): guļ uz slīpās kartes, ēna zem tās */
#nav-puck { width: 68px; height: 68px; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(0,0,0,.28)); }
#nav-puck svg { width: 100%; height: 100%; display: block; }

#ctx-menu {
  position: fixed; z-index: 1000; display: flex; flex-direction: column; gap: 6px;
  background: #fff; border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 6px 28px rgba(0,0,0,.28); width: 250px;
}
#ctx-menu.hidden { display: none; }
.ctx-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; }
.ctx-close { background: none; border: none; font-size: 14px; color: #8a949e; cursor: pointer; padding: 2px 4px; }
.ctx-close:hover { color: var(--ink); }
.ctx-coords { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7680; margin-bottom: 4px; }
.ctx-coords button { background: none; border: none; cursor: pointer; font-size: 12px; padding: 0 2px; }
.ctx-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; border-radius: 22px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: #f1f3f4; color: var(--ink); text-align: left;
}
.ctx-btn:hover { background: #e7eaec; }
.ctx-btn.primary { background: var(--brand); color: var(--on-brand); }
.ctx-btn.primary:hover { background: var(--brand-hi); }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  background: #fff; color: var(--ink); flex-shrink: 0;
}
.badge-b { background: var(--ink); color: #fff; }
.badge-via { background: #4a6fa5; color: #fff; }

/* Street View panelis (tajā pašā logā) */
#sv-modal {
  position: fixed; z-index: 1100; right: 14px; bottom: 14px;
  width: min(680px, calc(100vw - 28px)); height: min(440px, 62vh);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
}
#sv-modal.hidden { display: none; }
#sv-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  font-weight: 700; font-size: 13px; color: var(--ink); border-bottom: 1px solid #eef1f3;
}
#sv-head a { margin-left: auto; font-size: 12px; color: #4a6fa5; text-decoration: none; font-weight: 600; }
#sv-head a:hover { text-decoration: underline; }
#sv-close { background: none; border: none; cursor: pointer; font-size: 14px; color: #8a949e; padding: 2px 4px; }
#sv-close:hover { color: var(--ink); }
#sv-frame { flex: 1; border: 0; width: 100%; }
/* Street View vieta kartē: dzeltens punkts (kā Google), konuss — kamera brauciena virzienā */
/* marķieriem bez position: relative — tas pārraksta .maplibregl-marker absolute, elements nonāk plūsmā aiz citiem
   marķieriem un iegūst nemainīgu pikseļu nobīdi, kas tuvinot "staigā" (lietotājs 2026-11-19: Street View punkts) */
.sv-pin { width: 64px; height: 64px; pointer-events: none; }
.sv-dot { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: #fbbc04; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); box-sizing: border-box; }
.sv-cone { position: absolute; inset: 0; width: 64px; height: 64px; }
.sv-cone path { fill: rgba(251,188,4,.5); stroke: rgba(196,140,0,.6); stroke-width: 1; }

/* kartes popupi */
.maplibregl-popup-content {
  color: var(--ink); font-size: 12.5px; max-width: 280px;
  border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.22); padding: 12px 14px;
}
.maplibregl-popup-content table { border-collapse: collapse; }
.maplibregl-popup-content td { padding: 1px 6px 1px 0; vertical-align: top; }
.maplibregl-popup-content td:first-child { color: #8a949e; white-space: nowrap; }
.popup-title { font-weight: 700; margin-bottom: 4px; font-size: 13.5px; }
.popup-warn { color: #c62828; font-weight: 600; }

/* waypointu markeri kartē */
.wp-marker {
  width: 24px; height: 24px; border-radius: 50%; background: #4a6fa5; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border: 2px solid #fff; cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,.4);
}
.wp-marker.start { background: var(--brand); color: var(--on-brand); }
.wp-marker.end { background: var(--ink); }

/* ==================== MOBILAIS (jābūt faila beigās, lai uzvar) ==================== */
/* motocikla tips */
.moto-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 6px 0 2px; }
.moto-types .mt { font: 600 11.5px/1 var(--font); padding: 8px 2px; border-radius: 9px;
  border: 1px solid #d7dbdf; background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.moto-types .mt:hover { border-color: var(--ink); }
.moto-types .mt[aria-pressed="true"] { background: var(--brand); border-color: var(--ink); color: var(--on-brand); }
#moto-type-hint { margin: 2px 0 6px; }

/* brauciena ieraksti */
.ride-row { cursor: default; }
.ride-act { border: 0; background: transparent; cursor: pointer; font-size: 15px; padding: 4px 5px; border-radius: 6px; }
.ride-act:hover { background: var(--brand-soft); }

/* norāžu saraksts plānošanā */
#route-man { margin: 4px 0 6px; font-size: 13px; }
#route-man summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 4px 2px; }
#man-list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
#man-list li { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 8px; align-items: center;
  padding: 4px 6px; border-radius: 6px; cursor: pointer; color: var(--ink); }
#man-list li:hover { background: #f4f6f7; }
#man-list .man-ico { color: var(--ink); display: flex; }
#man-list .man-km { color: #8a949e; font-variant-numeric: tabular-nums; font-size: 12px; }

/* navigācija: nākamā manevra panelis un vadības pogas (cimdiem — lieli mērķi) */
#nav-man {
  position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  z-index: 25; min-width: min(420px, calc(100vw - 24px)); max-width: calc(100vw - 24px);
  background: #1b1f22; color: #fff; border-radius: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.35);
  padding: 12px 16px;
}
#nav-man.hidden { display: none; }
#nav-man .nm-main { display: flex; align-items: center; gap: 14px; }
#nav-man .nm-ico { display: flex; color: var(--brand); }
#nav-man .nm-dist { font-family: var(--font-display); font-size: 38px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
#nav-man .nm-text { font-size: 19px; margin-top: 4px; }
#nav-man .nm-street { font-size: 19px; font-weight: 700; color: #6fd3ff; margin-top: 2px; overflow-wrap: anywhere; } /* ielas nosaukums kā Waze */
#nav-man .nm-then { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.2);
  font-size: 15px; display: flex; align-items: center; gap: 6px; color: var(--dust); }
#nav-man .nm-ico-s { display: inline-flex; color: var(--brand); flex: none; }
#nav-man .nm-then-l { white-space: nowrap; flex: none; }
#nav-ctl { position: absolute; right: calc(12px + env(safe-area-inset-right, 0px)); top: 45%; z-index: 25;
  display: flex; flex-direction: column; gap: 10px; }
#nav-ctl.hidden { display: none; }
#nav-ctl button { width: 56px; height: 56px; border-radius: 14px; border: 0; background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); font-size: 26px; cursor: pointer; color: var(--ink); }
#nav-ctl button:active { background: var(--brand-soft); }

/* legalitātes atruna pirmajā palaišanā */
#legal-notice {
  position: absolute; right: 14px; bottom: 34px; z-index: 30;
  width: min(420px, calc(100vw - 28px));
  background: #fff; border-radius: 14px; box-shadow: 0 2px 18px rgba(0,0,0,.22);
  padding: 14px 16px; font-size: 13.5px; line-height: 1.45;
}
#legal-notice p { margin: 0 0 8px; }
.legal-notice-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.legal-notice-row .btn { width: auto; padding: 8px 22px; }
.legal-notice-row a { color: var(--ink); font-size: 13px; }
.legal-note a { color: var(--ink); }

@media (max-width: 820px) {
  #sidebar {
    display: none !important;
    width: 100%; left: 0; top: 0; bottom: 0;
    border-radius: 0; z-index: 30; padding-top: 70px;
  }
  #sidebar.open { display: flex !important; }
  #menu-fab {
    display: flex; position: fixed; top: 12px; left: 12px; z-index: 40;
    width: 52px; height: 52px; border-radius: 50%; background: #fff; border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.35); font-size: 24px; color: var(--ink);
    align-items: center; justify-content: center; cursor: pointer;
  }
  /* navigācijā norāžu panelis blakus izvēlnes pogai, nevis zem tās */
  body.nav-on #nav-man { left: 74px; right: 10px; transform: none; min-width: 0; max-width: none; padding: 10px 12px; }
  .wp-marker { width: 30px; height: 30px; font-size: 15px; }
  .fuel-marker { width: 32px; height: 32px; }
  .fuel-marker .ic { width: 18px; height: 18px; }
  .fuel-marker.reco { width: 40px; height: 40px; }
  .fuel-marker.reco .ic { width: 24px; height: 24px; }
  #vap-hud { min-width: 92vw; top: 8px; }
  .btn, .ctx-btn { padding: 11px 14px; }
  #ctx-menu { width: 280px; }
  #sv-modal { left: 8px; right: 8px; bottom: 8px; width: auto; height: 55vh; }
  #nav-hud { bottom: 10px; min-width: 88vw; font-size: 17px; }
  #nav-hud b { font-size: 24px; }
}

/* Offline kartes (valstu pakas) */
.offline-tbl { overflow-x: auto; max-height: 260px; overflow-y: auto; }
.offline-tbl table { border-collapse: collapse; width: 100%; font-size: 12px; }
.offline-tbl th { text-align: left; font-weight: 600; color: #5f6b76; border-bottom: 1px solid #e3e7eb; padding: 2px 4px; position: sticky; top: 0; background: #fff; }
.offline-tbl td { padding: 2px 4px; border-bottom: 1px solid #f0f2f4; white-space: nowrap; }
.offline-tbl td:nth-child(n+2), .offline-tbl th:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.offline-tbl td:first-child { overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
#regions-list tr[data-region] { cursor: pointer; }
#regions-list tr[data-region]:hover td { background: #f3f6f8; }
#regions-list tr.sel td { background: #e8eef3; font-weight: 600; }

/* Maršrutēšana telefonā (APK): komplekti, lejupielādes pogas reģionu tabulā, progress */
.prt-block .hint { margin: 4px 0; }
.prt-bundles { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.prt-bundle, .prt-btn {
  font: inherit; font-size: 12px; color: var(--ink); background: #fff; border: 1px solid #cfd6dc; border-radius: 6px;
  padding: 4px 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.prt-btn { padding: 2px 6px; }
.prt-bundle:hover, .prt-btn:hover { background: #f3f6f8; }
.prt-bundle.ok, .prt-btn.ok { color: #2f7a4a; border-color: #9cc9a9; background: #f1f8f3; }
.prt-bundle:disabled { cursor: default; }
.prt-bundle .ic, .prt-btn .ic { width: 14px; height: 14px; }
.prt-busy { font-size: 12px; color: #5f6b76; }
.prt-tbl { max-height: 340px; }
.prt-tbl td:first-child { max-width: none; }
.prt-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; margin: 4px 0 8px; }
.prt-prog span { flex: 1 1 auto; min-width: 0; }
.prt-prog .btn { width: auto; margin: 0; padding: 4px 10px; font-size: 12px; }
.prt-bar { flex: 1 1 100%; height: 6px; background: #e3e7eb; border-radius: 3px; overflow: hidden; }
.prt-bar i { display: block; height: 100%; background: #2f6fa3; transition: width .5s; }
.prt-err { color: #b3261e; }
.prt-err .btn { width: auto; padding: 3px 10px; font-size: 12px; }
.prt-server { font-size: 12px; margin: 2px 0 6px; }
.prt-server input { width: 100%; box-sizing: border-box; font: inherit; padding: 5px 6px; margin: 4px 0;
  border: 1px solid #cfd6dc; border-radius: 6px; }
.prt-server .btn { width: auto; padding: 4px 10px; font-size: 12px; }
@media (max-width: 700px) {
  .prt-bundle { padding: 7px 10px; font-size: 13px; }
  .prt-btn { padding: 5px 8px; font-size: 13px; }
}

/* navigācija Waze stilā (2026-11-17): karte vienmēr redzama; ātruma aplis un ierobežojums apakšā pa kreisi;
   brīvajā skatā (pēc žesta) pogas Centrēt un Pārskats; body.nav-big — lieli cipari saulei un cimdiem */
#nav-speed { display: none; position: fixed; z-index: 902; align-items: flex-end; gap: 8px;
  left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(88px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
body.nav-on #nav-speed { display: flex; }
#nav-speed .ns-cur { width: 66px; height: 66px; border-radius: 50%; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.32);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
#nav-speed .ns-v { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: #1b1f22; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
#nav-speed small { font-size: 10.5px; color: #6b7680; margin-top: 1px; }
#nav-speed.over .ns-cur { background: #e53935; }
#nav-speed.over .ns-v, #nav-speed.over small { color: #fff; }
#nav-speed .ns-lim { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 5px solid #e53935; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; color: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }
#nav-speed .ns-lim[hidden] { display: none; }
#nav-vap-ahead { position: fixed; z-index: 902; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  background: #4a148c; color: #fff; border-radius: 12px; padding: 7px 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 3px 12px rgba(0,0,0,.3); max-width: calc(100vw - 180px); text-align: center; }
#nav-vap-ahead .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e1bee7; margin-right: 4px; }
#nav-vap-ahead[hidden], body:not(.nav-on) #nav-vap-ahead { display: none; }
#nav-free-ctl { display: none; position: fixed; z-index: 903; flex-direction: column; align-items: flex-start; gap: 10px;
  left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
body.nav-on.nav-free #nav-free-ctl { display: flex; }
#nav-free-ctl button { border: 0; border-radius: 26px; padding: 13px 18px; font: 700 15px/1 var(--font);
  background: #fff; color: #1b1f22; box-shadow: 0 3px 12px rgba(0,0,0,.3); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
#nav-free-ctl #nav-recenter { background: #1a73e8; color: #fff; }
#nav-free-ctl .ic { width: 20px; height: 20px; }
#nav-ctl button[aria-pressed="true"]#nav-sport { background: var(--brand); }
/* navigācijā kartes standarta pogas (+ − kompass, atrašanās vieta) neredzam — savas pogas pa labi */
body.nav-on .maplibregl-ctrl-top-right { display: none; }
#nav-hud { cursor: pointer; }
#nav-hud .nh-sub { display: block; font-size: 13.5px; color: #c9d1d6; margin-top: 3px; font-weight: 500; }
body.nav-big #nav-man .nm-dist { font-size: 50px; }
body.nav-big #nav-man .nm-text { font-size: 25px; }
body.nav-big #nav-man .nm-street { font-size: 25px; }
body.nav-big #nav-man .nm-ico svg { width: 92px; height: 92px; }
body.nav-big #nav-man .nm-then { font-size: 19px; }
body.nav-big #nav-speed .ns-cur { width: 108px; height: 108px; }
body.nav-big #nav-speed .ns-v { font-size: 48px; }
body.nav-big #nav-speed small { font-size: 14px; }
body.nav-big #nav-speed .ns-lim { width: 68px; height: 68px; font-size: 25px; border-width: 7px; }
body.nav-big #nav-speed { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
body.nav-big #nav-free-ctl { bottom: calc(220px + env(safe-area-inset-bottom, 0px)); }
body.nav-big #nav-hud b { font-size: 30px; }

/* Garāža (plāns 4.10) */
.bike-sel select { margin-left: 6px; max-width: 220px; }
.bike-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 4px; border-bottom: 1px solid #eef1f3; }
.bike-row.active { background: var(--brand-soft); border-radius: 8px; }
.bike-row .poi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bike-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d5dadf; }
.bike-type { font-size: 11px; color: var(--ink); background: var(--brand-soft); border-radius: 6px; padding: 0 6px; margin-left: 4px; }
.bike-warn { font-size: 12px; color: #b26a00; font-weight: 600; }
.bike-odo { display: flex; gap: 6px; margin-top: 4px; }
.bike-odo input { width: 120px; }
.bike-form { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; padding: 10px; border: 1px solid #e3e7eb; border-radius: 10px; background: #fafbfc; }
.bike-form label { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bike-form input, .bike-form select { width: 100%; box-sizing: border-box; }
.bike-form .bf-row { display: flex; gap: 8px; }
.fuel-marker.spec { box-shadow: 0 0 0 3px #ffb300, 0 2px 6px rgba(0,0,0,.35); }

/* Sponsorētās vietas (plāns 6.4): zīme vienmēr redzama; navigācijā markieri paslēpti */
.sp-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .3px; color: #6a4b00;
  background: #ffe9a8; border: 1px solid #f0c75e; border-radius: 6px; padding: 1px 7px; margin-bottom: 4px; }
.sp-badge.sm { font-size: 10px; padding: 0 5px; margin: 0 0 0 4px; vertical-align: 1px; }
.poi-row.sp-row { background: #fffaf0; }
.fuel-marker.sponsored { box-shadow: 0 0 0 3px #f0b400, 0 2px 6px rgba(0,0,0,.35); }
body.nav-on .fuel-marker.sponsored { display: none; }
.admin-link { float: right; text-decoration: none; font-size: 17px; color: #8a949e; padding: 0 4px; border-radius: 6px; }
.admin-link:hover { background: #f0f2f4; color: var(--ink); }

/* Brauciena albums (plāns 5.8) */
.album { position: absolute; right: 58px; top: 14px; z-index: 20; width: min(400px, calc(100vw - 80px));
  max-height: calc(100% - 28px); overflow-y: auto; background: #fff; border-radius: 16px;
  box-shadow: 0 2px 18px rgba(0,0,0,.22); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.album.drop { outline: 3px dashed #ff6d00; outline-offset: -6px; }
.al-head { display: flex; gap: 8px; align-items: center; }
.al-head input { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; }
.al-head input:hover, .al-head input:focus { border-color: #d5dadf; }
.al-head button { border: 0; background: #f0f2f4; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }
.al-meta { color: #6b7680; font-size: 12.5px; }
#al-notes { width: 100%; resize: vertical; border: 1px solid #e3e7eb; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }
.al-actions { display: flex; align-items: center; gap: 10px; }
.al-actions .btn { width: auto; margin: 0; }
.al-up { font-size: 12px; color: var(--graphite); }
.al-up.err { color: #c62828; }
.al-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.al-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 9px; overflow: hidden; background: #eef1f3; cursor: pointer; max-width: 100%; }
.al-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-ph { font-size: 28px; color: #9aa4ad; }
.al-vid { position: absolute; left: 5px; bottom: 5px; background: rgba(0,0,0,.62); color: #fff; font-size: 11px; border-radius: 6px; padding: 1px 6px; }
.al-proc { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.62); color: #fff; font-size: 10.5px; border-radius: 6px; padding: 0 5px; }
.al-nopos { position: absolute; right: 4px; top: 4px; background: #fff3e0; color: #b26a00; font-size: 10.5px; border-radius: 6px; padding: 0 4px; }
.al-pin { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #fff; background: #ff6d00 center / cover no-repeat;
  box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: pointer; font-size: 18px; padding: 0; color: #fff; }
.al-pin.vid { border-color: #ffccbc; }
.al-pop-img { width: 100%; border-radius: 8px; display: block; margin-bottom: 6px; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 12, 14, .94); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 44px 56px 10px; }
.lb-media { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-note { color: #ddd; text-align: center; }
.lb-close, .lb-prev, .lb-next { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 22px; }
.lb-close { top: 10px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 10px 0 4px; width: 100%; max-width: 900px; }
.lb-bar .btn { width: auto; margin: 0; text-decoration: none; }
.lb-caption { flex: 1; min-width: 180px; border-radius: 8px; border: 1px solid #555; background: #1c2024; color: #fff; padding: 7px 10px; font: inherit; }
.lb-info { color: #b7c0c8; font-size: 12.5px; }
@media (max-width: 820px) {
  .album { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 55vh; }
  .lightbox { padding: 44px 8px 8px; }
}

/* Ceļojumi (trips.js): sānjoslas bloks un kartīte (.album izkārtojums) */
.trip-box { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 6px; }
.trip-box > .btn, .trip-box .btn-row .btn { margin: 2px 0; }
.btn.small { width: auto; margin: 0; padding: 4px 10px; font-size: 12px; }
/* vairāku dienu sadalījums (days.js) */
.route-days { margin: 8px 0; padding: 8px; border: 1px solid #e3e7ea; border-radius: 10px; background: #fafaf8; }
.days-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: #55606a; }
.days-row input[type=number] { width: 72px; }
#route-days .days-row select, #route-days .days-row input { width: auto; max-width: 11em; flex: none; } /* telefona lapā — ne pa visu platumu */
.days-n { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.days-n button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d5dadf; background: #fff; color: var(--ink);
  font: 700 14px/1 var(--font); cursor: pointer; }
.days-n b { color: var(--ink); }
.days-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.days-list li { border: 1px solid #e3e7ea; border-radius: 9px; padding: 7px 8px; background: #fff; cursor: pointer; }
.days-list li.sel { border-color: #1565c0; box-shadow: inset 0 0 0 1px #1565c0; }
.day-h { font-weight: 600; font-size: 13px; color: var(--ink); }
.day-s { font-size: 12px; color: #6b7680; }
.day-l { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 3px; font-size: 12px; color: var(--ink); }
.day-l .ic { width: 14px; height: 14px; flex: none; }
.day-l select { max-width: 100%; font-size: 12px; }
.day-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.day-pin { display: flex; align-items: center; gap: 2px; padding: 3px 7px 3px 5px; border-radius: 14px; background: #1565c0; color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); font: 700 12px/1 var(--font); cursor: grab; }
.day-pin .ic { width: 14px; height: 14px; }
.day-pin.pending { background: #7a8a99; }
.day-pin.sel { background: #0d47a1; transform: scale(1.12); }

/* „Neiet caur valstīm” (app.js avoidCountryRings) */
.avoid-cc { margin: 4px 0 2px; line-height: 1.5; font-size: 12.5px; color: #55606a; }
.avoid-cc b { color: var(--ink); font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0 2px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand-line);
  text-decoration-thickness: 2px; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.avoid-cc-panel { margin: 6px 0; padding: 8px; border: 1px solid #d7dbdf; border-radius: 9px; background: #fafaf8; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.cc-chip { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; border: 1px solid #d3d2cc;
  background: #fff; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.cc-chip:hover { border-color: #e53935; }
.cc-chip .ic { width: 12px; height: 12px; }
#avoid-cc-input { width: 100%; box-sizing: border-box; }
.avoid-cc-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.trip-sug { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid #f3c58f;
  background: #fff7ee; border-radius: 10px; font-size: 12.5px; }
.trip-sug > .ic { color: #e65100; width: 18px; height: 18px; }
.trip-sug .poi-main { flex: 1; min-width: 140px; }
.trip-sug-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.trip-sug-act select { width: auto; margin: 0; }
.trip-pick { max-height: 260px; overflow-y: auto; border: 1px solid #e4e7e9; border-radius: 10px; padding: 4px; }
.trip-pick-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.trip-pick-row:hover { background: var(--brand-soft); }
.tr-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; }
.tr-tot div { background: #f6f7f8; border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; min-width: 0; }
.tr-tot b { font-size: 14px; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.tr-tot span { font-size: 11px; color: #8a949e; }
.tr-days { display: flex; flex-direction: column; gap: 2px; }
.tr-day { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; font-size: 12.5px; }
.tr-day:hover { background: #fff3e6; }
.tr-day.on { background: #fff3e6; border-color: #d84315; }
.tr-day.off { opacity: .45; }
.tr-day.off .tr-day-name { text-decoration: line-through; }
.tr-chip { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 11.5px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.trip-mk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: #d84315; color: #fff; padding: 0;
  font: 700 12px/1 var(--font); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: pointer; }
.trip-mk.end { background: var(--ink); cursor: default; }
.trip-mk .ic { width: 14px; height: 14px; }
.tr-foot .btn { font-size: 12px; margin: 0; }

/* Dalīšanās (plāns 4.11) */
.share-dlg { position: fixed; inset: 0; z-index: 900; background: rgba(15, 18, 20, .55); display: flex;
  align-items: center; justify-content: center; padding: 16px; }
.sh-box { background: #fff; border-radius: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.35); width: min(940px, 100%);
  max-height: 100%; overflow: auto; padding: 14px 16px 16px; }
.sh-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 16px; }
.sh-head button { border: 0; background: #f0f2f4; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }
.sh-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sh-preview { display: flex; justify-content: center; background: #f4f6f7; border-radius: 12px; padding: 10px; min-width: 0; }
.sh-preview canvas { max-width: 100%; max-height: 68vh; height: auto; width: auto; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.25); display: block; }
/* „Kā izskatīsies”: Instagram/Facebook saskarnes atveids (tikai priekšskatījums; --u = 1 % no attēla platuma) */
.sh-frame { --u: 3px; display: flex; flex-direction: column; max-width: 100%; background: #fff; border-radius: 10px; }
.sh-frame.v-ig-post, .sh-frame.v-fb-post { box-shadow: 0 2px 12px rgba(0,0,0,.18); padding-bottom: calc(var(--u) * 2); }
.sh-frame.v-ig-post canvas, .sh-frame.v-fb-post canvas { border-radius: 0; box-shadow: none; }
.ph-stage { position: relative; line-height: 0; }
.ph-head:empty, .ph-foot:empty, .ph-top:empty, .ph-bot:empty, .ph-side:empty { display: none; }
.ph-head, .ph-foot { line-height: 1.3; color: #111; font: 400 calc(var(--u) * 3.4)/1.35 -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: calc(var(--u) * 2) calc(var(--u) * 3) 0; }
.sh-frame.fb .ph-head, .sh-frame.fb .ph-foot { color: #050505; }
.ph-head .ph-cap { padding: calc(var(--u) * 1.5) 0 calc(var(--u) * 1.5); }
.ph-top, .ph-bot { position: absolute; left: 0; right: 0; color: #fff; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.55);
  font: 600 calc(var(--u) * 3.4)/1.3 -apple-system, "Segoe UI", Roboto, sans-serif; padding: calc(var(--u) * 2.5) calc(var(--u) * 3); }
.ph-top { top: 0; }
.ph-bot { bottom: 0; display: flex; align-items: center; gap: calc(var(--u) * 3); }
.sh-frame.reel .ph-bot { display: block; padding-right: 20%; padding-bottom: calc(var(--u) * 6); }
.ph-who { display: flex; align-items: center; gap: calc(var(--u) * 2); }
.ph-who b { font-weight: 600; }
.ph-av { width: calc(var(--u) * 8); height: calc(var(--u) * 8); border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--ink)); box-shadow: 0 0 0 calc(var(--u) * 0.6) #fff; }
.ph-sp { flex: 1; }
.ph-dim { opacity: .75; font-weight: 400; }
.ph-head .ph-dim, .ph-foot .ph-dim { color: #65676b; opacity: 1; }
.ph-prog { display: flex; gap: calc(var(--u) * 0.8); margin-bottom: calc(var(--u) * 2.5); }
.ph-prog i { flex: 1; height: calc(var(--u) * 0.6); background: rgba(255,255,255,.45); border-radius: 2px; }
.ph-prog i:first-child { background: #fff; }
.ph-reply { flex: 1; border: 1.5px solid rgba(255,255,255,.85); border-radius: 999px; padding: calc(var(--u) * 2.2) calc(var(--u) * 4); font-weight: 400; }
.ph-top .ic, .ph-bot .ic, .ph-side .ic { width: calc(var(--u) * 6.5); height: calc(var(--u) * 6.5); vertical-align: middle; }
.ph-follow { border: 1px solid #fff; border-radius: calc(var(--u) * 1.5); padding: 0 calc(var(--u) * 2); font-size: calc(var(--u) * 3); }
.ph-cap { margin-top: calc(var(--u) * 1.2); }
.ph-cap .ic { width: 1.2em; height: 1.2em; vertical-align: -0.25em; }
.ph-side { position: absolute; right: calc(var(--u) * 2.5); bottom: 18%; display: flex; flex-direction: column; gap: calc(var(--u) * 4);
  align-items: center; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.55); font: 600 calc(var(--u) * 3)/1.2 -apple-system, "Segoe UI", Roboto, sans-serif; }
.ph-side div { display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 0.8); }
.ph-acts { display: flex; align-items: center; gap: calc(var(--u) * 4); padding: calc(var(--u) * 1.5) 0; }
.ph-acts .ic { width: calc(var(--u) * 7); height: calc(var(--u) * 7); }
.ph-acts.ph-fb { justify-content: space-around; border-top: 1px solid #e4e6eb; margin-top: calc(var(--u) * 1.5); color: #65676b; font-weight: 600; }
.ph-acts.ph-fb .ic { width: calc(var(--u) * 5); height: calc(var(--u) * 5); vertical-align: -0.2em; }
.ph-safe { display: none; position: absolute; inset: 0; pointer-events: none; }
.sh-frame.safe .ph-safe { display: block; }
.ph-safe i { position: absolute; background: rgba(229,57,53,.16); border: 1.5px dashed rgba(229,57,53,.9); }
.ph-safe .z-t { left: 0; right: 0; top: 0; height: var(--zt); border-width: 0 0 1.5px; }
.ph-safe .z-b { left: 0; right: 0; bottom: 0; height: var(--zb); border-width: 1.5px 0 0; }
.ph-safe .z-l, .ph-safe .z-r { top: var(--zt); bottom: var(--zb); width: var(--zs); }
.ph-safe .z-l { left: 0; border-width: 0 1.5px 0 0; }
.ph-safe .z-r { right: 0; border-width: 0 0 0 1.5px; }
.sh-opts { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sh-opts label.small { display: flex; gap: 6px; align-items: center; }
.sh-opts label.small input:not([type="checkbox"]) { flex: 1; min-width: 0; }
.sh-seg { display: flex; gap: 4px; background: #f0f2f4; padding: 3px; border-radius: 10px; }
.sh-seg button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 7px 4px; cursor: pointer; font: inherit; font-size: 13px; color: #4a545c; }
.sh-seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
@media (max-width: 820px) {
  .sh-body { grid-template-columns: 1fr; }
  .sh-preview canvas { max-height: 42vh; }
}

/* Konti (plāns 6.8) */
.auth-box { position: relative; margin: -2px 0 6px; }
.auth-login, .auth-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d5dadf; background: #fff;
  border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink); max-width: 100%; }
.auth-login { padding: 6px 14px; font-weight: 600; }
.auth-chip img, .auth-chip span { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.auth-chip span { display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 11px; }
.auth-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.auth-chip em { font-style: normal; font-size: 10.5px; color: var(--ink); background: var(--brand-soft); border-radius: 6px; padding: 0 5px; }
.auth-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: 280px; background: #fff; border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.2); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.auth-menu > button, .auth-menu > a:not(.auth-btn) { border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 8px;
  cursor: pointer; font: inherit; font-size: 13.5px; color: var(--ink); text-decoration: none; }
.auth-menu > button:hover, .auth-menu > a:not(.auth-btn):hover { background: #f0f2f4; }
.auth-menu .danger { color: #c62828; }
.auth-who { font-size: 12px; color: #6b7680; padding: 0 8px 4px; border-bottom: 1px solid #eef1f3; }
.auth-btn { display: flex; align-items: center; gap: 10px; justify-content: center; border-radius: 9px; padding: 9px 12px;
  text-decoration: none; font-weight: 600; font-size: 14px; }
.auth-btn.google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.auth-btn.facebook { background: #1877f2; color: #fff; border: 1px solid #1877f2; }
.auth-menu .hint { margin: 4px 2px 0; }
/* e-pasta pieteikšanās (auth.js) */
.auth-form { display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 8px; margin-bottom: 4px; border-bottom: 1px solid #eef1f3; }
.auth-form input[type=email], .auth-form input[type=password], .auth-form input[type=text] { width: 100%; box-sizing: border-box;
  padding: 7px 9px; border: 1px solid #d5dadf; border-radius: 8px; font: inherit; font-size: 13px; }
.auth-tabs { display: flex; gap: 4px; }
.auth-tabs button { flex: 1; border: 1px solid #d5dadf; background: #fff; color: var(--ink); border-radius: 8px; padding: 6px 4px;
  font: 600 12px/1.2 var(--font); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--ink); color: var(--on-brand); }
.auth-show { display: flex; gap: 6px; align-items: center; }
.auth-form .btn.small { width: 100%; padding: 7px 10px; }
.auth-err { color: #c62828; font-size: 12px; margin: 0; }
.auth-err.auth-ok { color: #2e7d32; }

/* Telefona maršruta panelis (Komoot stils, route-sheet.js) — OBLIGĀTI faila beigās */
.rs, .rs-mt, .rs-mt-pop, .rs-go { display: none; } /* datorā viss paliek sānjoslā */
@media (max-width: 820px) {
  .rs { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    max-height: 80vh; background: #fff; color: var(--ink); border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 22px rgba(0,0,0,.18); padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(calc(100% - var(--rs-peek, 112px) - env(safe-area-inset-bottom, 0px)));
    transition: transform .22s ease; }
  .rs.open { transform: none; }
  .rs-head { flex: none; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
  .rs-grab { display: flex; justify-content: center; padding: 8px 0 6px; outline: none; }
  .rs-grab span { width: 44px; height: 5px; border-radius: 3px; background: #c9d0d6; }
  .rs-grab:focus-visible span { background: var(--ink); }
  .rs-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 2px 14px 8px; text-align: center; }
  .rs-sum b { display: block; font-family: var(--font-display); font-size: 25px; font-weight: 800; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .rs-sum b small { font-family: var(--font); font-size: 12.5px; font-weight: 500; margin-left: 2px; color: #4a545c; }
  .rs-sum span { display: block; font-size: 12.5px; color: #6b7680; }
  .rs-bar { display: flex; gap: 2px; height: 8px; margin: 0 16px 10px; }
  .rs-bar i { display: block; height: 100%; min-width: 3px; border-radius: 4px; }
  .rs-msg { margin: -2px 16px 10px; font-size: 13px; color: #6b7680; text-align: center; }
  .rs-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 16px; }
  .rs-tabs { display: flex; gap: 4px; background: #f0f2f4; border-radius: 999px; padding: 4px; margin: 2px 0 12px; }
  .rs-tabs button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px 4px; font: inherit;
    font-size: 14.5px; font-weight: 600; color: #4a545c; cursor: pointer; }
  .rs-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
  .rs label { display: block; font-size: 14px; margin: 4px 0; cursor: pointer; }
  .rs .status { font-size: 13.5px; }
  .rs-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
  .rs-row .btn { margin: 0; }
  .rs label.rs-switch { display: inline-flex; align-items: center; gap: 10px; margin: 0 auto 0 0; font-weight: 600; font-size: 15px; }
  .rs-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .rs-switch span { position: relative; width: 46px; height: 28px; border-radius: 999px; background: #c9d0d6; transition: background .15s; }
  .rs-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
  .rs-switch input:checked + span { background: var(--ink); }
  .rs-switch input:checked + span::after { background: var(--brand); }
  .rs-curvy .ic { width: 20px; height: 20px; color: var(--ink); }
  .rs-switch input:checked + span::after { transform: translateX(18px); }
  .rs-switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(255,194,26,.55); }
  .rs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
  .rs-actions .btn { margin: 0; width: 100%; }
  .rs-actions #btn-nav { grid-column: 1 / -1; padding: 13px 14px; font-size: 16px; }
  .rs-mt { display: flex; align-items: center; gap: 7px; position: fixed; top: 74px; left: 12px; z-index: 26; height: 42px;
    padding: 0 14px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 2px 12px rgba(0,0,0,.3);
    font: 600 15px/1 var(--font); cursor: pointer; }
  .rs-mt .rs-caret { font-size: 12px; color: #6b7680; }
  .rs-mt-pop { display: block; position: fixed; top: 124px; left: 12px; right: 12px; z-index: 27; background: #fff;
    border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 12px; max-height: 60vh; overflow-y: auto; }
  .rs-mt-pop .moto-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
  .rs-go { display: flex; align-items: center; justify-content: center; position: fixed; right: 12px; z-index: 26;
    bottom: calc(var(--rs-peek, 112px) + 60px + env(safe-area-inset-bottom, 0px));
    width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 27px;
    box-shadow: 0 3px 12px rgba(0,0,0,.3); cursor: pointer; }
  body.rs-open .rs-go { display: none; }
  body.rs-on .maplibregl-ctrl-bottom-left, body.rs-on .maplibregl-ctrl-bottom-right {
    bottom: calc(var(--rs-peek, 112px) + env(safe-area-inset-bottom, 0px)); }
  body.nav-on #route-sheet, body.nav-on #rs-mt, body.nav-on #rs-mt-pop, body.nav-on #rs-go { display: none !important; }
}

/* slāņu poga un logs kartē (2026-11-18) */
#btn-layers .ic { width: 20px; height: 20px; }
#layers-pop {
  position: fixed; z-index: 35; width: 252px; max-height: 72vh; overflow-y: auto; padding: 6px;
  background: #fff; border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.28); font-size: 14px; color: var(--ink);
}
#layers-pop .lp-grp {
  font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #8a949e;
  margin: 8px 8px 2px;
}
#layers-pop .lp-row {
  display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 8px; border-radius: 8px; cursor: pointer;
}
#layers-pop .lp-row:hover, #layers-pop .lp-row:active { background: #f1f3f4; }
#layers-pop .lp-row input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
#layers-pop .lp-row .ic { width: 18px; height: 18px; color: #5f6b73; flex-shrink: 0; }
/* pieturas: divas kolonnas — kartē (arī bez maršruta) un gar maršrutu (2026-11-19) */
#layers-pop .lp-grp2, #layers-pop .lp-row2 { display: grid; grid-template-columns: minmax(0, 1fr) 46px 46px; align-items: center; }
#layers-pop .lp-grp2 { margin: 10px 0 0 8px; }
#layers-pop .lp-grp2 span + span { text-align: center; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; }
#layers-pop .lp-row2 { min-height: 40px; padding-left: 8px; }
#layers-pop .lp-row2 .lp-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
#layers-pop .lp-row2 .ic { width: 18px; height: 18px; color: #5f6b73; flex-shrink: 0; }
#layers-pop .lp-cb { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 8px; cursor: pointer; }
#layers-pop .lp-cb:hover, #layers-pop .lp-cb:active { background: #f1f3f4; }
#layers-pop .lp-cb input { width: 18px; height: 18px; margin: 0; }
/* sānjoslā: pieturas kartē */
.stops-map { margin-top: 8px; padding-top: 6px; border-top: 1px solid #eceff1; }
.stops-map .stops-title { color: #6b7680; margin: 0 0 2px; }
#layers-pop .lp-more {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 4px; padding: 11px 8px;
  border: 0; border-top: 1px solid #eceff1; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
/* apskates objektu kategorijas: tā pati ikona kā kartē (krāsains aplis ar baltu ikonu) */
.dot.sdot {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border: 0; box-shadow: none; color: #fff; vertical-align: middle;
}
.dot.sdot .ic { width: 12px; height: 12px; }

/* apskates objekta bildes palielinājums (bez Vikipēdijas raksta; 2026-11-18) */
#photo-view {
  position: fixed; inset: 0; z-index: 60; background: rgba(10,12,14,.92);
  display: flex; align-items: center; justify-content: center; padding: 48px 8px 56px; cursor: zoom-out;
}
#photo-view img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 6px 28px rgba(0,0,0,.5); }
#photo-view .pv-credit {
  position: absolute; left: 12px; right: 12px; bottom: 14px; color: #d9dee2; font-size: 12.5px; text-align: center;
}
#photo-view .pv-credit a { color: var(--brand); }
#photo-view .pv-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.14); color: #fff; font-size: 20px; cursor: pointer;
}

/* Apkope garāžā (maint.js): darbi ar intervāliem, progress, vēsture */
.ride-act.on { background: #e3edf9; color: #1e63d6; }
.maint { margin: 0 0 10px 20px; padding: 8px 10px; border: 1px solid #e3e7eb; border-radius: 10px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 6px; }
.maint .mt-head { display: flex; gap: 8px; flex-wrap: wrap; }
.maint .mt-head label { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 140px; }
.maint .mt-head select { width: 100%; }
.maint .mt-src { font-size: 11px; color: #6b7480; margin: 0; }
.maint .mt-hrs { font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.maint .mt-hrs input { width: 110px; }
.maint .mt-setup { font-size: 12px; background: #fff8e6; border: 1px solid #f2dfb0; border-radius: 8px; padding: 6px 8px;
  display: flex; flex-direction: column; gap: 6px; }
.maint .bf-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-end; }
.maint .bf-row label { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 90px; }
.maint .bf-row input { width: 100%; box-sizing: border-box; }
.mt-list { display: flex; flex-direction: column; }
.mt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 8px; padding: 6px 0; border-bottom: 1px solid #eef1f3; }
.mt-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mt-btns .ride-act { padding: 2px 4px; }
.mt-more summary { cursor: pointer; font-size: 12px; color: var(--ink); padding: 4px 0; }
.mt-row:last-child { border-bottom: 0; }
.mt-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mt-name { font-weight: 600; font-size: 13px; }
.mt-int { font-size: 11px; color: #6b7480; }
.mt-left { font-size: 11px; color: #4a525b; }
.mt-bar { display: block; height: 5px; border-radius: 3px; background: #e6eaee; overflow: hidden; }
.mt-bar i { display: block; height: 100%; background: #4d9a2a; border-radius: 3px; }
.mt-soon .mt-bar i { background: #e0a000; }
.mt-due .mt-bar i { background: #d84315; }
.mt-due .mt-left { color: #c0392b; font-weight: 600; }
.mt-soon .mt-left { color: #b26a00; font-weight: 600; }
.mt-unk .mt-left { color: #8a929b; }
.mt-done, .mt-edit, .mt-addf { grid-column: 1 / -1; flex-basis: 100%; }
.mt-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-log { font-size: 11px; color: #4a525b; display: flex; flex-direction: column; gap: 2px; }

/* Apļa ģenerators (autoloop.js) */
.autoloop { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; padding: 8px 10px; border: 1px solid #e3e7eb;
  border-radius: 10px; background: #fafbfc; }
.autoloop .al-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.autoloop .al-row label { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 110px; }
.autoloop .al-row input, .autoloop .al-row select { width: 100%; box-sizing: border-box; }
.autoloop .hint { margin: 0; }
.rs-loop { flex-wrap: wrap; gap: 8px; align-items: center; }
.rs-loop input { width: 70px; }
