/* Pozor revize - vzhled „Živé karty“: barevná hlavní karta podle situace,
   karty s pruhem linky (barvy PID), výstražná žlutá, Nahlásit uprostřed lišty. */

@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('/static/fonts/BricolageGrotesque-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('/static/fonts/BricolageGrotesque-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/static/fonts/Onest-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/static/fonts/Onest-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface-2: #ECEEF2;
  --text: #12151C;
  --muted: #5E6675;
  --line: #E3E6EC;
  --accent: #FFD23F;
  --accent-ink: #12151C;
  --warn-bg: #FFF4C2;
  --warn-line: #F0C400;
  --ok: #138A4A;
  --ok-bg: #E3F4EA;
  --danger: #E4032E;
  --shadow: 0 1px 2px rgba(18,21,28,.05), 0 8px 24px rgba(18,21,28,.07);
  --radius: 22px;

  /* Hlavní karta podle situace */
  --hero-warn: linear-gradient(140deg, #FF6A3D 0%, #E4032E 55%, #9E0B3B 100%);
  --hero-calm: linear-gradient(140deg, #2BC48A 0%, #0E8F63 60%, #0B6B4E 100%);
  --hero-neutral: linear-gradient(140deg, #3B4457 0%, #1F2430 100%);

  /* Barvy linek (PID) */
  --metro-a: #1AA350; --metro-b: #F5B301; --metro-c: #E4032E;
  --tram: #B3261E; --bus: #0079C1; --trolleybus: #8A1F7A;
  --train: #4453B5; --ferry: #0098BF; --funicular: #7FAF1B;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tab-h: 84px;
  --top-h: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1015; --surface: #181B22; --surface-2: #232730; --text: #F2F3F6; --muted: #9AA1AE; --line: #2A2F39;
    --warn-bg: #2B2410; --warn-line: #7A6212; --ok: #4ADE80; --ok-bg: #12261A; --danger: #FF5A5A;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1015; --surface: #181B22; --surface-2: #232730; --text: #F2F3F6; --muted: #9AA1AE; --line: #2A2F39;
  --warn-bg: #2B2410; --warn-line: #7A6212; --ok: #4ADE80; --ok-bg: #12261A; --danger: #FF5A5A;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 var(--body);
  -webkit-tap-highlight-color: transparent; min-height: 100dvh;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
body.locked { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Hlavička ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.top-text { min-width: 0; }
.geo-line {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0;
  font-size: 13px; color: var(--muted); font-weight: 600; min-height: 24px;
}
.geo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.geo-line.is-on .geo-dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.geo-line.is-wait .geo-dot { background: var(--accent); animation: blink 1s infinite; }
.top-title { margin: 0; font: 800 26px/1.05 var(--display); letter-spacing: -.02em; }
.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 15px; border: 0;
  background: var(--accent-ink); display: grid; place-items: center;
}
.avatar svg { width: 26px; height: 26px; }
:root:not([data-theme="light"]) .avatar { box-shadow: inset 0 0 0 1px var(--line); }

.wrap { max-width: 640px; margin: 0 auto; padding: 8px 16px calc(var(--tab-h) + 40px + env(safe-area-inset-bottom)); }

/* ---------- Hlavní karta (barva podle situace) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 20px; color: #fff; margin-bottom: 12px;
  background: var(--hero-neutral); box-shadow: 0 16px 36px rgba(18,21,28,.18);
}
.hero::after {
  content: ""; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255,255,255,.12); pointer-events: none;
}
.hero--warn { background: var(--hero-warn); box-shadow: 0 18px 40px rgba(228,3,46,.28); }
.hero--warn::after { animation: breathe 3s ease-in-out infinite; }
.hero--calm { background: var(--hero-calm); box-shadow: 0 18px 40px rgba(14,143,99,.25); }
.hero-kicker { position: relative; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .92; display: flex; align-items: center; gap: 8px; }
.hero--warn .hero-kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
.hero-title { position: relative; margin: 8px 0 6px; font: 800 32px/1.02 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.hero-sub { position: relative; margin: 0; font-size: 15px; opacity: .93; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 16px; }
.hero-btn {
  flex: 1; border: 0; border-radius: 15px; min-height: 48px; padding: 0 14px;
  font-weight: 700; font-size: 15px; background: #fff; color: #B8002A;
}
.hero--calm .hero-btn, .hero--neutral .hero-btn { color: #12151C; }
.hero-btn.is-done { background: rgba(255,255,255,.25); color: #fff; }
.hero-btn--ghost { flex: 0 0 auto; background: rgba(255,255,255,.2); color: #fff; }
.hero .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }

/* ---------- Dlaždice ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.stat { background: var(--surface); border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow); min-width: 0; }
.stat b { display: block; font: 800 24px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }
button.stat { border: 0; text-align: left; }

/* ---------- Odjezdy ---------- */
.deps { background: var(--surface); border-radius: var(--radius); padding: 14px 14px 6px; margin-bottom: 16px; box-shadow: var(--shadow); }
.deps-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.deps-title { margin: 0; font: 800 19px var(--display); letter-spacing: -.01em; }
.deps-title span { font: 600 13px var(--body); color: var(--muted); }
.deps-change {
  border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 8px 12px;
  font-weight: 700; font-size: 14px; min-height: 40px; white-space: nowrap;
}
.deps-pick { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 10px; scrollbar-width: none; }
.deps-pick::-webkit-scrollbar { display: none; }
.deps-favs { margin: -4px -14px 4px; padding: 0 14px 10px; }
.deps-search { margin: 4px 0 8px; }
.deps-results { margin-bottom: 12px; }
.deps-star {
  flex: none; width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: transparent;
  font-size: 22px; line-height: 1; color: var(--muted);
}
.deps-star.is-on { color: #E0A800; border-color: var(--warn-line); background: var(--warn-bg); }
.deps-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.deps-list { list-style: none; margin: 0; padding: 0; }
.deps-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); }
.deps-row:first-child { border-top: 0; }
.deps-row.is-rev { background: var(--warn-bg); border-radius: 14px; border-top-color: transparent; padding: 10px 8px; margin: 2px -6px; }
.deps-dir { min-width: 0; display: grid; }
.deps-dir > span:first-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deps-rev { font-size: 13px; font-weight: 700; color: var(--danger); }
.deps-soon { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 5px; max-width: 160px; }
.deps-soon i { display: block; height: 100%; border-radius: 3px; background: var(--text); }
.deps-time { font: 800 19px var(--display); font-variant-numeric: tabular-nums; text-align: right; display: grid; }
.deps-time .late { font: 700 12px var(--body); color: var(--danger); }
.deps-more { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px; font-weight: 700; color: var(--muted); }

/* ---------- Výluky a mimořádnosti ---------- */
.vyl { background: var(--surface); border-radius: var(--radius); padding: 14px 14px 6px; margin-bottom: 16px; box-shadow: var(--shadow); }
.vy-list { list-style: none; margin: 0; padding: 0; }
.vy { border-top: 1px solid var(--line); }
.vy:first-child { border-top: 0; }
.vy-head { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; text-align: left; border: 0; background: none; padding: 10px 0; }
.vy-lines { display: flex; flex-wrap: wrap; gap: 4px; max-width: 96px; padding-top: 2px; }
.vy-more { font-size: 12px; font-weight: 700; color: var(--muted); align-self: center; }
.vy-main { min-width: 0; }
.vy-title { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
.vy-when { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.vy-main .tag { margin-top: 5px; }
.tag--alert { background: var(--danger); color: #fff; }
.vy-chev { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--muted); }
.vy-body { padding: 0 0 12px; font-size: 14px; }
.vy-body p { margin: 0 0 8px; color: var(--text); white-space: normal; }
.vy-body a { color: var(--text); font-weight: 700; }

/* ---------- Filtry ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; min-height: 40px;
}
.chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Karty hlášení (s pruhem linky) ---------- */
.list-title { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 10px; font: 800 19px var(--display); letter-spacing: -.01em; }
.list-title span + span { font: 600 12px var(--body); color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 64px 1fr;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card.is-new { animation: slide .45s ease-out; }
.card.is-old { opacity: .78; }
.card-side { display: grid; place-items: center; font: 800 26px var(--display); color: #fff; letter-spacing: -.02em; cursor: pointer; }
.card-side svg { width: 28px; height: 28px; }
.card-body { padding: 12px 14px 12px; min-width: 0; }
.card-row { cursor: pointer; }
.card-stop { margin: 0; font: 800 18px/1.2 var(--display); letter-spacing: -.01em; }
.card-where { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); margin: 6px 6px 0 0; }
.tag--civil { background: var(--warn-bg); }
.tag--unverified { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.card-ago { flex: 1; font: 800 20px var(--display); font-variant-numeric: tabular-nums; line-height: 1.05; }
.card-ago small { display: block; font: 600 12px var(--body); color: var(--muted); }
.still-btn {
  flex: none; border: 0; border-radius: 13px; min-height: 44px; padding: 0 14px;
  font-weight: 700; font-size: 14px; background: var(--text); color: var(--accent);
}
.still-btn:active { transform: scale(.97); }
.still-btn.is-done { background: var(--ok-bg); color: var(--ok); }
.still-btn[disabled] { cursor: default; }
.undo-btn { flex: none; border: 1px solid var(--line); background: transparent; padding: 0 12px; border-radius: 13px; font-weight: 700; font-size: 14px; min-height: 44px; }
.share-btn { flex: none; width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; }
.share-btn svg { width: 20px; height: 20px; }
.fresh { position: absolute; left: 64px; right: 0; bottom: 0; height: 4px; }
.fresh i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
.card.is-old .fresh i { background: var(--muted); }

/* ---------- Odznaky linek ---------- */
.badge {
  flex: none; display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 12px;
  color: #fff; font: 800 18px var(--display); letter-spacing: -.02em; line-height: 1;
}
.badge--sm { min-width: 30px; height: 26px; border-radius: 8px; font-size: 14px; padding: 0 6px; }
.badge svg { width: 22px; height: 22px; }
.badge--sm svg { width: 16px; height: 16px; }
.t-metro-A { background: var(--metro-a); }
.t-metro-B { background: var(--metro-b); color: #1a1400; }
.t-metro-C { background: var(--metro-c); }
.t-tram { background: var(--tram); }
.t-bus { background: var(--bus); }
.t-trolleybus { background: var(--trolleybus); }
.t-train { background: var(--train); }
.t-ferry { background: var(--ferry); }
.t-funicular { background: var(--funicular); color: #102000; }
.t-stop { background: var(--surface-2); color: var(--text); }
.badges { display: inline-flex; gap: 4px; flex-wrap: wrap; }

.empty { text-align: center; padding: 26px 18px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty b { display: block; color: var(--text); font: 800 18px var(--display); margin-bottom: 4px; }
.updated { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 0; min-height: 1.4em; }

/* ---------- Já ---------- */
.impact {
  display: flex; align-items: center; gap: 14px; margin-bottom: 12px;
  background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.impact-num { flex: none; min-width: 64px; height: 64px; padding: 0 10px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 28px var(--display); font-variant-numeric: tabular-nums; }
.impact-text { display: grid; gap: 2px; }
.impact-text b { font: 800 18px var(--display); }
.impact-text span { color: var(--muted); font-size: 14px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 6px; font: 800 20px var(--display); letter-spacing: -.01em; }
.btn-primary { width: 100%; min-height: 52px; border: 0; border-radius: 15px; background: var(--accent); color: var(--accent-ink); font: 800 17px var(--display); margin-top: 6px; }
.prose { font-size: 15px; }
.prose h3 { font: 800 16px var(--display); margin: 18px 0 6px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0; }
.prose li { margin: 6px 0; }
.steps li::marker { font-weight: 800; }

/* ---------- Spodní lišta ---------- */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 616px; margin: 0 auto; height: 72px;
  display: grid; grid-template-columns: 1fr 1fr 96px 1fr 1fr; align-items: center;
  background: var(--surface); border-radius: 26px; box-shadow: 0 10px 34px rgba(18,21,28,.16);
}
:root:not([data-theme="light"]) .tabbar { box-shadow: 0 10px 34px rgba(0,0,0,.4), inset 0 0 0 1px var(--line); }
.tab { border: 0; background: none; display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 0; min-height: 60px; }
.tab svg { width: 24px; height: 24px; }
.tab.is-on { color: var(--text); }
.tab.is-on svg { color: var(--danger); }
.tab-go { justify-self: center; display: grid; justify-items: center; gap: 4px; border: 0; background: none; margin-top: -38px; font: 800 12px var(--display); color: var(--text); }
.tab-go span {
  width: 74px; height: 74px; border-radius: 50%; background: var(--accent); display: grid; place-items: center;
  border: 5px solid var(--bg); box-shadow: 0 10px 24px rgba(255,190,0,.45);
  transition: transform .12s; animation: pulse 2.6s infinite;
}
.tab-go span svg { width: 34px; height: 34px; }
.tab-go:active span { transform: scale(.94); }

/* ---------- Mapa ---------- */
.map-view { position: fixed; left: 0; right: 0; z-index: 10; top: var(--top-h); bottom: 0; background: var(--surface-2); }
#map { position: absolute; inset: 0; z-index: 0; } /* #map, ne .map: styl MapLibre by přebil position */
.map-view .map-filters { position: absolute; top: 10px; left: 0; right: 0; margin: 0; padding: 0 12px; z-index: 2; }
.map-view .map-filters .chip { box-shadow: var(--shadow); }
.map-status {
  position: absolute; left: 50%; top: 60px; transform: translateX(-50%); z-index: 2;
  background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); white-space: nowrap;
}
.map-status:empty { display: none; }
.map-locate {
  position: absolute; right: 14px; z-index: 2; bottom: calc(var(--tab-h) + 28px + env(safe-area-inset-bottom));
  width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow);
}
.map-locate svg { width: 24px; height: 24px; }
.map-locate.is-on { color: #2a78d6; }
.map-card { position: absolute; left: 12px; right: 12px; z-index: 3; max-width: 520px; margin: 0 auto; bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); animation: rise .2s; }
.map-card .card { box-shadow: 0 12px 34px rgba(0,0,0,.3); }
.map-card .card-body { padding-right: 46px; }
.map-card .card-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; z-index: 1; }
.map-card .card-close svg { width: 16px; height: 16px; }
.map-card .trail-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.map-view .maplibregl-ctrl-bottom-left { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); }
.maplibregl-ctrl-attrib { font-size: 11px; }
.mk { position: relative; cursor: pointer; transition: opacity .3s; }
.mk .badge { min-width: 38px; height: 38px; font-size: 17px; border-radius: 12px; border: 3px solid var(--surface); box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.mk .badge svg { width: 18px; height: 18px; }
.mk::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--surface); border-bottom: 0; }
.mk.is-fresh::before { content: ""; position: absolute; inset: -6px; border-radius: 16px; border: 3px solid var(--danger); animation: ring 1.8s ease-out infinite; }
.mk.is-selected .badge { outline: 3px solid var(--accent); outline-offset: 2px; }
.mk-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); opacity: .8; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2a78d6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(42,120,214,.25), 0 2px 6px rgba(0,0,0,.3); }
.trail-arrow { width: 22px; height: 22px; display: grid; place-items: center; pointer-events: none; }
.trail-arrow svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
body.map-mode .install { display: none !important; }

/* Vložená mapa v mobilní appce - hlavičku, filtry a tlačítka má appka sama. */
body.embed .top, body.embed .tabbar, body.embed .install, body.embed .map-filters,
body.embed .wrap, body.embed .map-locate { display: none !important; }
body.embed .map-view { top: 0 !important; }
body.embed { --tab-h: 72px; } /* místo pro žluté tlačítko Nahlásit mobilní appky */

/* ---------- Instalace na plochu ---------- */
.install {
  position: fixed; left: 16px; right: 16px; z-index: 25; bottom: calc(var(--tab-h) + 26px + env(safe-area-inset-bottom));
  max-width: 608px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg); border-radius: 16px; padding: 10px 10px 10px 14px; font-size: 14px; box-shadow: var(--shadow);
}
.install span { flex: 1; }
.install-go { border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 800; border-radius: 11px; padding: 8px 12px; min-height: 40px; }
.install-x { border: 0; background: none; color: var(--bg); font-size: 18px; min-width: 40px; min-height: 40px; }

/* ---------- Spodní panel (nahlášení) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(8,10,14,.5); animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-width: 640px; margin: 0 auto; max-height: 92dvh;
  display: flex; flex-direction: column; background: var(--bg); border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.3); animation: rise .25s cubic-bezier(.2,.9,.3,1);
}
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; flex: none; }
.sheet-titles { flex: 1; min-width: 0; }
.sheet-step { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sheet-head h2:focus { outline: none; }
.sheet-head h2 { margin: 0; font: 800 24px var(--display); letter-spacing: -.02em; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
.sheet-body { overflow-y: auto; padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.search { position: relative; display: block; margin-bottom: 12px; }
.search input { width: 100%; min-height: 54px; padding: 12px 14px 12px 46px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 17px; }
.search input:focus { outline: none; border-color: var(--text); }
.search svg { position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); }
.sub-title { margin: 16px 2px 8px; font: 800 16px var(--display); }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pick { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); border: 0; border-radius: 16px; padding: 12px 14px; min-height: 62px; box-shadow: var(--shadow); }
.pick:active { background: var(--surface-2); }
.pick-main { flex: 1; min-width: 0; }
.pick-name { display: block; font: 800 17px var(--display); }
.pick-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.pick-dist { flex: none; font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pick-arrow { flex: none; color: var(--muted); }
.dress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 2px 0 14px; }
.dress button { border: 1px solid var(--line); background: var(--surface); border-radius: 13px; min-height: 46px; font-weight: 700; font-size: 14px; }
.dress button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.dress-label { margin: 0 2px 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.big-choice {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 18px;
  padding: 14px 16px; min-height: 74px; font: 800 19px var(--display); box-shadow: 0 8px 20px rgba(255,190,0,.3);
}
.big-choice small { display: block; font: 600 14px var(--body); opacity: .8; }
.big-choice .badge { background: var(--accent-ink); color: var(--accent); }
.line-group h4 { margin: 14px 2px 8px; font-size: 14px; color: var(--muted); font-weight: 700; }
.line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.line-btn { border: 0; border-radius: 14px; min-height: 56px; font: 800 21px var(--display); color: #fff; padding: 0 6px; }
.line-btn:active { transform: scale(.95); }
.chosen { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.chosen b { font: 800 16px var(--display); }
.chosen span { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 14px; margin: 8px 2px; }
.btn-secondary { width: 100%; min-height: 52px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 15px; font-weight: 700; font-size: 16px; margin-top: 10px; }
.loading { padding: 18px; text-align: center; color: var(--muted); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; z-index: 60; bottom: calc(var(--tab-h) + 26px + env(safe-area-inset-bottom));
  max-width: 608px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg); border-radius: 16px; padding: 14px 12px 14px 16px;
  font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: rise .2s;
}
.toast span { flex: 1; }
.toast-act { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 11px; padding: 8px 14px; font-weight: 800; min-height: 40px; }
.toast.is-error { background: var(--danger); color: #fff; }

@keyframes blink { 50% { opacity: .3; } }
@keyframes breathe { 50% { transform: scale(1.15); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 10px 24px rgba(255,190,0,.45), 0 0 0 0 rgba(255,190,0,.5); } 50% { box-shadow: 0 10px 24px rgba(255,190,0,.45), 0 0 0 12px rgba(255,190,0,0); } }
@keyframes rise { from { transform: translateY(24px); opacity: .001; } }
@keyframes slide { from { transform: translateX(16px); opacity: .001; } }
@keyframes fade { from { opacity: 0; } }
@keyframes ring { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
