/* Stránka /mapa: mapa přes celou obrazovku, plovoucí panel s hledáním a trasou. Světlý i tmavý vzhled podle systému. */
:root {
  --bg: rgba(255,255,255,.93); --solid: #fff; --fg: #14201a; --muted: #62706a; --field: #edf4ef; --line: #dbe7e0;
  --accent: #1d5c47; --accent-fg: #fff; --route: #14a36b; --shadow: 0 14px 40px rgba(13,59,44,.22), 0 2px 6px rgba(0,0,0,.08);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: rgba(16,28,23,.93); --solid: #101c17; --fg: #eaf4ee; --muted: #93a79d; --field: #1e2f28; --line: #2c4036; --accent: #5fbf9a; --accent-fg: #0b1a14; --shadow: 0 8px 30px rgba(0,0,0,.5); }
}
* { box-sizing: border-box; }
html, body.mapa { margin: 0; height: 100%; overflow: hidden; background: #e6e6e6; color: var(--fg); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#map { position: fixed; inset: 0; }
.panel { position: absolute; z-index: 10; top: 16px; left: 16px; width: min(400px, calc(100vw - 32px)); max-height: calc(100% - 32px); overflow: auto;
  background: var(--bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 26px; box-shadow: var(--shadow); padding: 16px; border: 1px solid rgba(29,92,71,.12); }
.panel.collapsed .body > :not(#souhrn):not(#nav-start):not(.hledat) { display: none; }
.panel.collapsed .body #kroky { display: none; }
.panel.collapsed { padding-bottom: 12px; }
.top { position: sticky; top: -16px; z-index: 5; margin: -16px -16px 10px; padding: 16px 16px 8px; background: var(--solid); border-radius: 26px 26px 0 0; }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.top a.brand { color: var(--fg); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.top a.brand span { color: var(--accent); }
.top .sub { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); font-size: 12px; margin-left: 8px; padding: 3px 9px; border-radius: 999px; font-weight: 700; letter-spacing: .02em; }
.tools { display: flex; gap: 2px; }
button { font: inherit; cursor: pointer; border: 0; color: inherit; background: none; }
.icon svg { width: 20px; height: 20px; fill: currentColor; }
.icon { width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--muted); }
.icon:hover { background: var(--field); color: var(--fg); }
.route { position: relative; display: grid; gap: 0; margin-bottom: 12px; background: var(--field); border-radius: 20px; padding: 4px; }
.route::before { content: ""; position: absolute; left: 22px; top: 33px; bottom: 33px; border-left: 2px dotted color-mix(in srgb, var(--muted) 70%, transparent); z-index: 1; pointer-events: none; }
.route .f + .f { border-top: 1px solid var(--line); }
.f { position: relative; }
.f input[type=text] { width: 100%; height: 50px; padding: 0 44px 0 44px; border: 0; border-radius: 16px; background: transparent; color: var(--fg); font: inherit; font-size: 16px; outline: none; }
.f input[type=text]:focus { background: var(--bg); box-shadow: inset 0 0 0 2px var(--accent); }
.f input::placeholder { color: var(--muted); }
.dot { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; z-index: 2; border-radius: 50%; pointer-events: none; }
.dot.od { background: var(--bg); border: 4px solid #1d9a6c; box-shadow: 0 0 0 3px rgba(29,154,108,.22); }
.dot.kam { background: #c0392b; box-shadow: 0 0 0 4px rgba(192,57,43,.2); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); width: 15px; height: 15px; }
.f .end { position: absolute; right: 6px; top: 6px; }
.swap { position: absolute; right: 46px; top: 50%; margin-top: -18px; z-index: 3; background: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.18); display: none; }
.f ul { position: absolute; z-index: 20; left: 0; right: 0; top: 54px; margin: 0; padding: 6px; list-style: none; background: var(--bg); border-radius: 16px; box-shadow: var(--shadow); max-height: 260px; overflow: auto; }
.f ul:empty { display: none; }
.f ul li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.f ul li:hover, .f ul li:focus { background: var(--field); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--field); border-radius: 18px; margin-bottom: 8px; }
.modes button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 4px; border-radius: 14px; color: var(--muted); font-weight: 600; transition: background .15s, color .15s; }
.modes button svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.modes button svg.st { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modes button.on { background: var(--accent); color: var(--accent-fg); box-shadow: 0 4px 12px rgba(29,92,71,.3); }
.actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.go { flex: 1; height: 44px; border-radius: 12px; background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.go:hover { filter: brightness(1.08); }
.ghost { padding: 0 12px; height: 32px; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.ghost:hover { background: var(--field); color: var(--fg); }
#souhrn { margin: 8px 0 0; padding: 12px 16px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
#souhrn.msg { font-size: 14px; font-weight: 500; color: var(--muted); background: transparent; padding: 8px 2px; }
#souhrn:empty { display: none; }
#kroky { margin: 8px 0 0; padding: 0; list-style: none; max-height: 28vh; overflow: auto; counter-reset: k; }
#kroky li { counter-increment: k; padding: 8px 2px 8px 30px; border-top: 1px solid var(--line); position: relative; color: var(--fg); font-size: 14px; }
#kroky li::before { content: counter(k); position: absolute; left: 2px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 11px; display: grid; place-items: center; font-weight: 700; }
#kroky:empty { display: none; }
.firms { margin-top: 12px; padding: 12px; border-radius: 18px; background: var(--field); }
.firms .f input[type=text] { background: var(--bg); height: 44px; padding-left: 14px; }
.firms .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.firms .row b { font-weight: 600; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; inset: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 13px; background: var(--line); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
#firmy-info { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.foot { position: absolute; z-index: 9; left: 16px; bottom: 10px; display: flex; gap: 12px; padding: 5px 12px; border-radius: 999px; background: var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 12px; }
.foot a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.foot a:hover { color: var(--fg); }
.maplibregl-popup-content { border-radius: 12px; padding: 12px 14px; font: 14px/1.4 system-ui, sans-serif; color: #1b1f1d; }
.maplibregl-popup-content a { color: #1d5c47; font-weight: 600; }
.maplibregl-popup-content { border-radius: 16px; box-shadow: 0 10px 30px rgba(13,59,44,.25); }
@media (max-width: 640px) {
  .panel { top: 8px; left: 8px; right: 8px; width: auto; max-height: 62%; border-radius: 16px; padding: 12px; }
  .foot { left: 8px; bottom: 8px; gap: 10px; padding: 5px 10px; }
  .foot a:first-child { display: none; }
  .swap { display: grid; }
}
@media (min-width: 641px) { .swap { display: grid; } }

.kontakt a { margin-right: 10px; }
.zdroje { margin: 12px 2px 0; font-size: 11.5px; color: var(--muted); }
.zdroje a { color: inherit; }

#nav-start { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; width: 100%; margin: 10px 0 0; padding: 16px; border-radius: 18px; cursor: pointer; font: inherit; font-size: 17px; font-weight: 700; background: var(--accent); color: var(--accent-fg); box-shadow: 0 6px 18px rgba(29,92,71,.35); }
#nav-start svg { width: 20px; height: 20px; fill: currentColor; }
#nav-start:hover { filter: brightness(1.08); }
#nav-start[hidden] { display: none; }

/* vedení po trase: dvě plovoucí zelené karty (nahoře pokyn, dole shrnutí a tlačítka); na širokých displejích sloupec vlevo */
#navbar, #navfoot { position: fixed; z-index: 50; color: #fff; background: linear-gradient(155deg, #0d3b2c 0%, #1d5c47 100%); box-shadow: 0 10px 34px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); border-radius: 24px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#navbar { top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; padding: 14px 18px; }
#navfoot { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); padding: 12px; background: linear-gradient(155deg, #0a2d21 0%, #154736 100%); }
#navbar[hidden], #navfoot[hidden], #nav-cilbox[hidden], #e4w[hidden] { display: none; }
#nav-main { display: flex; align-items: center; gap: 16px; }
#navbar { --ico: clamp(72px, min(22vw, 20vh), 150px); }
#nav-ico { flex: 0 0 auto; width: var(--ico); height: var(--ico); padding: 7%; border-radius: 26%; background: rgba(126,226,184,.16); box-shadow: inset 0 0 0 2px rgba(126,226,184,.35); }
#nav-ico { display: grid; place-items: center; }
#nav-ico svg { width: 100%; height: 100%; display: block; }
#nav-txt { min-width: 0; }
#nav-d { font-size: clamp(36px, min(10vw, 9vh), 76px); font-weight: 800; line-height: 1; letter-spacing: -1.5px; color: #eafff5; }
#nav-t { font-size: clamp(18px, min(4.8vw, 4vh), 32px); font-weight: 600; line-height: 1.2; margin-top: 6px; overflow-wrap: anywhere; }
#nav-then { font-size: clamp(13px, min(3.4vw, 2.6vh), 19px); color: #9be7c6; margin-top: 6px; }
#nav-then:empty { display: none; }
#nav-z { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 8px; }
#nav-z:empty { display: none; }
#nav-eta { display: flex; justify-content: space-around; gap: 6px; text-align: center; }
#nav-eta > div { flex: 1; }
#nav-eta b { display: block; white-space: nowrap; font-size: clamp(17px, min(4.6vw, 3.6vh), 26px); font-weight: 800; letter-spacing: -.5px; }
#nav-eta span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #9be7c6; }
#navfoot .nav-b { display: flex; gap: 8px; margin-top: 10px; }
#navfoot button { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 8px; border-radius: 16px; border: 0; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; background: rgba(255,255,255,.12); color: #fff; white-space: nowrap; }
@media (max-width: 400px) { #navfoot button { font-size: 14px; gap: 5px; padding: 13px 4px; } #navfoot button svg { width: 17px; height: 17px; } }
#navfoot button:hover { background: rgba(255,255,255,.2); }
#navfoot button svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
#navfoot button#nav-stop { background: #e5484d; }
#navfoot button.off { background: rgba(255,255,255,.05); color: rgba(255,255,255,.55); }
#nav-cilbox { margin-top: 10px; position: relative; }
#cil { width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid rgba(126,226,184,.5); background: #f5fbf8; color: #0d3b2c; font: inherit; font-size: 17px; }
#cil-n { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0 0 6px; padding: 4px 0; list-style: none; background: #f5fbf8; color: #0d3b2c; border-radius: 16px; max-height: 40vh; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
#cil-n li { padding: 12px 16px; border-top: 1px solid #dbe8e1; font-size: 16px; cursor: pointer; }
#cil-n li:first-child { border-top: 0; }
#cil-n:empty { display: none; }
body.nav #panel, body.nav #panel-toggle { display: none !important; }
/* tablet a počítač: karty tvoří sloupec vlevo, mapa zůstane celá vpravo */
@media (min-width: 900px) {
  #navbar { right: auto; width: min(440px, 38vw); top: 16px; left: 16px; padding: 18px 20px; }
  #navfoot { right: auto; width: min(440px, 38vw); left: 16px; bottom: 16px; padding: 14px; }
  #nav-main { flex-direction: column; align-items: flex-start; gap: 14px; }
  #navbar { --ico: clamp(90px, 22vh, 170px); }
}
/* telefon na šířku: úzký sloupec, ať zbyde místo na mapu */
@media (orientation: landscape) and (max-height: 520px) {
  #navbar { width: min(46vw, 420px); top: 8px; left: 8px; padding: 10px 14px; }
  #navfoot { width: min(46vw, 420px); left: 8px; bottom: 8px; padding: 8px; }
  #nav-main { flex-direction: row; align-items: center; gap: 12px; }
  #navbar { --ico: clamp(60px, 28vh, 110px); }
  #navfoot button { padding: 9px 6px; font-size: 14px; }
}
.tady { width: 40px; height: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); pointer-events: none; }
.tady svg { width: 100%; height: 100%; display: block; }
#navfoot button.sq { flex: 0 0 52px; }
#navfoot button.sq svg { margin: 0; }
/* nastavení hlasu */
#hlas { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(5,20,14,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 16px; }
#hlas[hidden] { display: none; }
.sheet { width: min(440px, 100%); max-height: 92vh; overflow: auto; background: linear-gradient(155deg, #0d3b2c 0%, #1d5c47 100%); color: #fff; border-radius: 26px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.1); }
.sheet h3 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.01em; }
.sheet label { display: block; margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: #9be7c6; font-weight: 700; }
.sheet label.chk { text-transform: none; letter-spacing: 0; font-size: 15px; color: #fff; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.sheet select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 14px; border: 0; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 16px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.sheet select option { color: #0d3b2c; }
.sheet input[type=range] { display: block; width: 100%; margin-top: 10px; accent-color: #7ee2b8; }
.sheet input[type=checkbox] { width: 20px; height: 20px; accent-color: #7ee2b8; }
.sheet p { margin: 0 0 14px; font-size: 13px; color: rgba(255,255,255,.7); }
.sheet .b { display: flex; gap: 8px; }
.sheet .b button { flex: 1; padding: 14px; border-radius: 16px; font-weight: 700; font-size: 16px; background: rgba(255,255,255,.14); color: #fff; }
.sheet .b button.ok { background: #7ee2b8; color: #0d3b2c; }
/* hledání místa */
.hledat { margin-bottom: 10px; }
.hledat .f input[type=text] { background: var(--field); height: 46px; padding-left: 44px; }
.hledat .lupa { position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; fill: var(--muted); pointer-events: none; z-index: 2; }
#misto-akce { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
#misto-akce[hidden] { display: none; }
#misto-nazev { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
#misto-akce .b { display: flex; gap: 6px; flex: none; }
#misto-akce button { height: 34px; padding: 0 12px; border-radius: 12px; font-weight: 700; background: var(--bg); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
#misto-akce button.go2 { background: var(--accent); color: var(--accent-fg); box-shadow: none; }
#misto-akce button#misto-x { width: 34px; padding: 0; background: transparent; box-shadow: none; color: var(--muted); font-size: 22px; line-height: 1; }
.inapp { display: grid; gap: 8px; margin-bottom: 10px; padding: 12px; border-radius: 16px; background: #fff4d6; color: #5c4400; font-size: 13.5px; }
.inapp button { padding: 9px; border-radius: 12px; background: #5c4400; color: #fff; font-weight: 700; }
.podpor { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; text-decoration: none; }
.podpor:hover { background: var(--accent); color: var(--accent-fg); }
/* Navigovat je vždy na dosah: přilepené ke spodku panelu; kroky trasy jsou schované, dokud je nerozbalíte */
#nav-start { position: sticky; bottom: 0; z-index: 4; }
#kroky { display: none; }
.panel.steps-open #kroky { display: block; }
#kroky-btn { display: block; width: 100%; margin-top: 4px; }
#kroky-btn[hidden], #firmy-info[hidden], .f[hidden] { display: none; }
/* typ trasy: nejrychlejší / šetrná / nejkratší */
.prof { display: flex; gap: 6px; margin: 8px 0 2px; }
.prof button { flex: 1; padding: 8px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.prof button.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chk { display: flex; align-items: center; gap: 8px; margin: 8px 2px 0; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
/* po ručním posunu mapy v navigaci: vrátit sledování polohy */
#recenter { position: fixed; z-index: 55; right: 12px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 150px); display: none; align-items: center; gap: 8px; padding: 12px 16px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; color: #fff; background: #14a36b; box-shadow: 0 6px 20px rgba(0,0,0,.35); cursor: pointer; }
#recenter svg { width: 18px; height: 18px; }
body.nav #recenter:not([hidden]) { display: inline-flex; }
/* alternativní trasy */
#alts { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; }
#alts:empty { display: none; }
#alts button { padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--fg); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
#alts button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.actions .ghost.on { border-color: var(--accent); color: var(--accent); }
.panel.collapsed #alts { display: none; }
/* noční mapa: obrácení jasu při zachování odstínů (zelená zůstává zelená); značky a ovládání se neobracejí */
body.noc .maplibregl-canvas { filter: invert(1) hue-rotate(180deg) brightness(.88) contrast(.9) saturate(.8); }
body.noc .maplibregl-ctrl-attrib { background: rgba(20,30,26,.8); color: #cfe3d9; }
body.noc .maplibregl-ctrl-attrib a { color: #9fdcc0; }
/* body zájmu */
.poi { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.poi[hidden] { display: none; }
.poi button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.poi button.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.popbtn { margin-top: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: #14a36b; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.panel.collapsed .poi { display: none; }
/* povolená rychlost při navigaci (kruh jako dopravní značka) */
#limit { position: fixed; z-index: 55; left: 12px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 150px); width: 58px; height: 58px; border-radius: 50%; display: none; align-items: center; justify-content: center; background: #fff; color: #111; border: 6px solid #c62828; font: 800 22px/1 system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
body.nav #limit:not([hidden]) { display: flex; }
#limit.over { background: #c62828; color: #fff; }
/* pruhy před křižovatkou */
#nav-lanes { display: flex; gap: 3px; margin-top: 4px; }
#nav-lanes:empty { display: none; }
#nav-lanes b { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 2px 3px; border-radius: 4px; border: 1px solid rgba(255,255,255,.35); font: 700 15px/1.1 system-ui, sans-serif; opacity: .5; }
#nav-lanes b.val { opacity: .8; }
#nav-lanes b.act { opacity: 1; background: #fff; color: #1b5e20; border-color: #fff; }
#nav-lanes i { font-style: normal; opacity: .55; }
#nav-lanes i.on { opacity: 1; }
/* pruhy před křižovatkou */
#nav-lanes { display: flex; gap: 3px; margin-top: 4px; }
#nav-lanes:empty { display: none; }
#nav-lanes b { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 2px 3px; border-radius: 4px; border: 1px solid rgba(255,255,255,.35); font: 700 15px/1.1 system-ui, sans-serif; opacity: .5; }
#nav-lanes b.val { opacity: .8; }
#nav-lanes b.act { opacity: 1; background: #fff; color: #1b5e20; border-color: #fff; }
#nav-lanes i { font-style: normal; opacity: .55; }
#nav-lanes i.on { opacity: 1; }
/* uložená místa */
.mista { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; align-items: center; font-size: 13px; }
.mista[hidden] { display: none; }
.mista span { opacity: .7; }
.mista button { border: 1px solid var(--line); background: var(--field); color: var(--fg); border-radius: 14px; padding: 4px 10px; font: inherit; cursor: pointer; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mista button.smazat { background: transparent; border-style: dashed; opacity: .7; }
/* minimalistický panel: vidět je hledání, trasa, doprava a Navigovat; ostatní je sbalené v „Možnosti a vrstvy“ */
.panel { width: min(360px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 22px; }
.top { margin: -12px -14px 6px; padding: 12px 14px 6px; border-radius: 22px 22px 0 0; }
.top a.brand { font-size: 16px; }
.top .sub { display: none; }
.hledat { margin-bottom: 8px; }
.hledat .f input[type=text], .f input[type=text] { height: 44px; font-size: 15px; }
.route { margin-bottom: 8px; border-radius: 16px; }
.modes { padding: 3px; gap: 3px; border-radius: 14px; margin-bottom: 4px; background: transparent; }
.modes button { padding: 7px 4px; border-radius: 12px; font-size: 13px; background: var(--field); }
.modes button.on { box-shadow: none; }
.modes button svg { width: 18px; height: 18px; }
.actions { gap: 2px; margin-top: 2px; }
.actions .ghost { height: 28px; padding: 0 10px; font-size: 12.5px; font-weight: 500; }
#souhrn { font-size: 18px; padding: 8px 14px; margin-top: 4px; border-radius: 14px; }
#nav-start { padding: 13px; font-size: 16px; border-radius: 14px; box-shadow: 0 4px 12px rgba(29,92,71,.28); }
#alts button { padding: 7px 10px; font-size: 13px; }
details.more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
details.more > summary { cursor: pointer; list-style: none; padding: 8px 2px; color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; user-select: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "▾"; transition: transform .15s; }
details.more[open] > summary::after { transform: rotate(180deg); }
details.more > summary:hover { color: var(--fg); }
details.more .prof { margin-top: 2px; }
details.more .firms { margin-top: 8px; padding: 10px; border-radius: 14px; }
details.more .chk { margin: 6px 2px 0; font-size: 13px; }
.zdroje { margin: 8px 2px 0; font-size: 10.5px; line-height: 1.35; opacity: .8; }
.podpor { margin-top: 8px; padding: 8px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.mista button { padding: 3px 9px; font-size: 12.5px; }
@media (max-width: 640px) { .panel { padding: 10px 12px; border-radius: 18px; } .top { margin: -10px -12px 4px; padding: 10px 12px 4px; } }
/* zastávky na trase */
.dot.via { background: #f9a825; box-shadow: 0 0 0 3px rgba(249,168,37,.25); width: 12px; height: 12px; margin-top: -6px; left: 16px; }
.vf input[type=text] { padding-right: 104px; }
.vctl { position: absolute; right: 4px; top: 7px; display: flex; gap: 0; }
.vctl button { width: 30px; height: 36px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.vctl button:hover:not(:disabled) { background: var(--bg); color: var(--fg); }
.vctl button:disabled { opacity: .25; cursor: default; }
.vm { width: 24px; height: 24px; border-radius: 50%; background: #f9a825; color: #1b1300; font: 800 13px/24px system-ui, sans-serif; text-align: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.swap { top: 11px; margin-top: 0; right: 44px; }
.panel.collapsed #panel-toggle { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--accent); }
/* druhy cest, převýšení, spotřeba a náledí pod souhrnem trasy */
#cesty { margin: 6px 0 0; display: grid; gap: 6px; }
#cesty:empty { display: none; }
.rbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 1px; background: var(--line); }
.rbar i { display: block; min-width: 3px; }
.rrow { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--fg); }
.rrow:empty { display: none; }
.rc { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rc b { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 6px; color: #fff; font: 800 10.5px/1 system-ui, sans-serif; background: #5b6b63; }
.rc.ice { color: var(--fg); font-weight: 600; }
.auto { margin-top: 8px; padding: 10px; border-radius: 14px; background: var(--field); display: grid; gap: 6px; font-size: 13px; }
.auto b { font-weight: 600; }
.auto label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.auto input { width: 64px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; }
.auto small { color: var(--muted); font-size: 11.5px; }
/* nabídka po klepnutí do mapy */
.cm-t { font-size: 12px; color: #62706a; margin-bottom: 6px; }
.cm-b { display: flex; gap: 6px; }
.cm-b button { flex: 1; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: #edf4ef; color: #1d5c47; font: 700 14px system-ui, sans-serif; cursor: pointer; }
.cm-b button.go2 { background: #1d5c47; color: #fff; }
.auto select { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; max-width: 100%; }
/* záložky v Možnostech: ikona s popiskem, jedna sekce naráz */
/* bez viditelného posuvníku (rolování prstem i kolečkem funguje dál) */
.panel, #kroky, .sheet, .f ul, #cil-n { scrollbar-width: none; -ms-overflow-style: none; }
.panel::-webkit-scrollbar, #kroky::-webkit-scrollbar, .sheet::-webkit-scrollbar, .f ul::-webkit-scrollbar, #cil-n::-webkit-scrollbar { display: none; }
/* řádky s druhy cest se zalamují, nepřetékají */
.rrow { min-width: 0; }
.rc { white-space: normal; align-items: flex-start; min-width: 0; }
.rc b { margin-top: 1px; flex: none; }
/* spodní lišta navigace: ikony s krátkým popiskem pod nimi */
#navfoot .nav-b { gap: 6px; }
#navfoot .nav-b button, #navfoot button.sq { flex: 1 1 0; flex-direction: column; gap: 3px; padding: 9px 2px 7px; font-size: 11.5px; font-weight: 600; border-radius: 14px; line-height: 1.1; }
#navfoot .nav-b button svg { width: 24px; height: 24px; }
@media (max-width: 400px) { #navfoot .nav-b button { font-size: 11px; padding: 8px 1px 6px; } }
/* nastavení hlasu: popisek vlevo, volba vpravo (kratší okno) */
.sheet label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.sheet select { width: auto; max-width: 62%; margin-top: 0; }
.sheet input[type=range] { width: 62%; margin-top: 0; }
.sheet label.chk { justify-content: flex-start; }

.pinfo { display: block; margin: 2px 4px 2px; color: var(--muted); font-size: 12px; }
.auto label { flex-wrap: wrap; justify-content: space-between; }
.auto .u { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.top { background: var(--solid); } /* hlavička při rolování nesmí prosvítat */
.chk > span { flex: 1; }
.auto .u input#auto-c { width: 76px; }
.chk a { color: var(--accent); }

/* rolování panelu: svisle prstem, mapa pod ním se nehýbe; průhledné rozmazání (backdrop-filter) WebView zpomaluje, proto v aplikaci pevné pozadí */
.panel { touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.lite .panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--solid); }
