:root {
  color-scheme: light;
  --blue-950: #042d52;
  --blue-900: #073968;
  --blue-800: #084a86;
  --blue-700: #0b5cab;
  --blue-600: #1473cf;
  --blue-100: #e9f3ff;
  --blue-50: #f3f8fe;
  --sky: #43b6e9;
  --orange: #f58a26;
  --orange-100: #fff0e1;
  --green: #138a5b;
  --green-100: #e9f7f1;
  --red: #c93b3b;
  --red-100: #fff0f0;
  --ink: #152033;
  --muted: #667085;
  --muted-2: #8b98aa;
  --line: #d8e0ea;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --shadow: 0 16px 40px rgba(13, 36, 64, .16);
  --shadow-soft: 0 8px 24px rgba(13, 36, 64, .09);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--surface-soft); color: var(--ink); }
body { overscroll-behavior: none; }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { display: block; width: 1em; height: 1em; fill: currentColor; }

.app-shell {
  width: 100%; height: 100dvh; min-height: 100vh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface-soft);
}

.appbar {
  min-height: calc(64px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 10px 8px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(216,224,234,.92);
  z-index: 1200; box-shadow: 0 3px 16px rgba(13,36,64,.06);
}
.brand { min-width: 0; border: 0; background: transparent; padding: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); text-align: left; cursor: pointer; }
.brand-icon {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--blue-700), var(--sky)); color: white; font-size: 24px; box-shadow: 0 7px 16px rgba(11,92,171,.22);
}
.brand-copy { min-width: 0; display: block; }
.brand strong { display: block; font-size: 1.02rem; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(48vw, 360px); }
.appbar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.icon-btn { width: 40px; height: 40px; border: 1px solid #dce5ef; border-radius: 13px; background: white; color: var(--blue-700); display: grid; place-items: center; cursor: pointer; font-size: 1.25rem; box-shadow: 0 3px 10px rgba(13,36,64,.04); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.96); }
.icon-btn.active { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }
.icon-btn-light { background: var(--surface-soft); color: var(--ink); }
.install-btn { background: var(--orange-100); border-color: #ffd7b2; color: #a84f00; }

.app-content { position: relative; min-height: 0; overflow: hidden; }
.page { position: absolute; inset: 0; min-width: 0; min-height: 0; background: var(--surface-soft); }
.page-map { overflow: hidden; }
.page-list, .page-settings { overflow: hidden; }
.page-scroll { height: 100%; overflow: auto; padding: 18px 14px 28px; overscroll-behavior: contain; scrollbar-gutter: stable; }

#map { width: 100%; height: 100%; background: #dde8f3; z-index: 1; }
.map-unavailable { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 30%, #e9f3ff, #dbe8f4); }
.map-unavailable-card { width: min(420px, 100%); background: white; border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); text-align: center; }
.map-unavailable-card p { margin-bottom: 0; color: var(--muted); line-height: 1.5; }

.status-strip { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 500; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.status-pill { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: rgba(19,138,91,.94); color: white; font-size: .68rem; font-weight: 850; box-shadow: 0 4px 12px rgba(15,45,66,.15); }
.status-pill.offline { background: rgba(91,99,114,.94); }
.status-copy { min-width: 0; max-width: min(74vw, 520px); padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.94); color: #344054; font-size: .72rem; font-weight: 700; box-shadow: 0 4px 12px rgba(15,45,66,.12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.map-locate { position: absolute; right: 14px; bottom: 74px; z-index: 650; width: 50px; height: 50px; border: 0; border-radius: 16px; background: white; color: var(--blue-700); box-shadow: 0 12px 28px rgba(13,36,64,.22); cursor: pointer; display: grid; place-items: center; font-size: 1.45rem; }
.map-locate:active { transform: scale(.97); }
.legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 82px); }
.legend span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.93); box-shadow: 0 3px 10px rgba(13,36,64,.10); color: #475467; font-size: .64rem; font-weight: 760; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend-current { background: var(--sky); box-shadow: 0 0 0 3px rgba(67,182,233,.2); }
.legend-osm { background: var(--blue-700); }
.legend-user { background: var(--orange); }

.selection-card { position: absolute; left: 12px; right: 12px; bottom: 82px; z-index: 700; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 10px 13px; box-shadow: var(--shadow); }
.selection-card strong { display: block; font-size: .84rem; }
.selection-card small { display: block; color: var(--muted); font-size: .67rem; margin-top: 2px; }
.mini-primary, .mini-ghost { border: 0; border-radius: 12px; cursor: pointer; font-weight: 850; }
.mini-primary { background: var(--orange); color: white; padding: 9px 11px; font-size: .74rem; }
.mini-ghost { width: 35px; height: 35px; background: var(--surface-soft); color: #667085; font-size: 1.3rem; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.page-heading h1 { margin: 3px 0 5px; font-size: 1.38rem; line-height: 1.12; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.eyebrow { color: var(--blue-700); font-size: .66rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.eyebrow.orange { color: #a84f00; }
.round-action { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid #dce5ef; border-radius: 14px; background: white; color: var(--blue-700); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-soft); font-size: 1.2rem; }
.round-action svg { width: 20px; height: 20px; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.save-all-action { color: #0b7d61; }
.save-all-action.is-complete { background: var(--green-100); border-color: #bfe6d7; color: #087454; }
.save-all-action:disabled { opacity: .45; cursor: default; }
.count-bubble { min-width: 42px; height: 42px; padding: 0 10px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: var(--orange-100); color: #994a05; font-size: .92rem; font-weight: 900; }

.summary-row { display: flex; flex-wrap: wrap; gap: 7px; margin: -2px 0 12px; }
.summary-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; background: var(--blue-100); color: var(--blue-900); font-size: .68rem; font-weight: 850; }
.summary-pill.subtle { background: #edf1f5; color: #5f6c7d; }
.summary-pill.saved { background: var(--green-100); color: #0b754c; }
.summary-pill.user { background: var(--orange-100); color: #8c4300; }
.saved-summary-row { margin-top: -5px; }

.search-box { min-height: 46px; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding: 0 12px; border: 1px solid #d7e0ea; border-radius: 15px; background: white; color: #7b8797; box-shadow: 0 4px 14px rgba(13,36,64,.04); }
.search-box svg { width: 19px; height: 19px; flex: 0 0 auto; }
.search-box input { width: 100%; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .8rem; }
.search-box input::placeholder { color: #98a3b2; }

.place-list { display: grid; gap: 10px; }
.place-card { background: white; border: 1px solid #dde5ef; border-radius: 18px; padding: 13px; box-shadow: 0 6px 18px rgba(13,36,64,.055); }
.place-card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; }
.place-card-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.save-place-icon { width: 31px; height: 31px; border: 1px solid #dce5ef; border-radius: 10px; background: #fff; color: #708096; display: grid; place-items: center; cursor: pointer; transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease; }
.save-place-icon svg { width: 17px; height: 17px; }
.save-place-icon:hover { background: #f3f8fc; color: var(--blue-700); }
.save-place-icon:active { transform: scale(.94); }
.save-place-icon.saved { background: var(--green-100); border-color: #bfe6d7; color: #087454; }
.save-place-icon.saved svg { fill: currentColor; }
.place-avatar.saved-osm { background: var(--green-100); color: #087454; }
.place-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--blue-100); color: var(--blue-700); font-size: 1.25rem; }
.place-avatar.user { background: var(--orange-100); color: #a84f00; }
.place-avatar svg { width: 23px; height: 23px; }
.place-title { min-width: 0; }
.place-title h3 { margin: 1px 0 4px; font-size: .92rem; letter-spacing: -.015em; overflow-wrap: anywhere; }
.place-title p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.4; overflow-wrap: anywhere; }
.distance-pill { white-space: nowrap; padding: 5px 7px; border-radius: 999px; background: #f0f5fa; color: #4d6075; font-size: .62rem; font-weight: 850; }
.place-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.place-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 7px; border-radius: 999px; background: #f3f6f9; color: #536274; font-size: .61rem; font-weight: 780; }
.place-badge.open { background: var(--green-100); color: #0c754c; }
.place-badge.source { background: var(--blue-100); color: var(--blue-900); }
.place-badge.source.user { background: var(--orange-100); color: #8c4300; }
.place-badge.source.saved-osm { background: var(--green-100); color: #087454; }
.place-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-top: 11px; }
.card-btn { min-height: 39px; border: 0; border-radius: 12px; cursor: pointer; font-size: .7rem; font-weight: 850; }
.card-btn.route { background: var(--blue-700); color: #fff; }
.card-btn.map { background: #eef4fb; color: var(--blue-800); }
.card-btn.contact { background: var(--green-100); color: #0b754c; }
.card-btn.edit { background: #fff4df; color: #9a5b00; }
.card-btn.delete { background: var(--red-100); color: var(--red); }
.card-btn.unsave { background: #eef7f3; color: #087454; }

.empty-state { margin-top: 18px; padding: 28px 20px; border: 1px dashed #cfd9e5; border-radius: 20px; background: rgba(255,255,255,.7); text-align: center; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 16px; background: var(--blue-100); color: var(--blue-700); font-size: 1.6rem; font-weight: 900; }
.empty-icon.orange { background: var(--orange-100); color: #a84f00; }
.empty-state strong { display: block; font-size: .9rem; }
.empty-state p { margin: 6px auto 0; max-width: 440px; color: var(--muted); font-size: .75rem; line-height: 1.5; }

.settings-scroll { padding-top: 16px; }
.author-pill { width: fit-content; max-width: 100%; min-height: 42px; margin: 0 auto 16px; padding: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #dedede; border-radius: 999px; background: #fffdf9; box-shadow: 0 3px 10px rgba(13,36,64,.05); color: #2e2f35; font-size: .72rem; }
.author-pill strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-icon { width: 20px; height: 20px; flex: 0 0 20px; color: #183f91; }
.author-icon svg { width: 20px; height: 20px; }
.author-divider { width: 1px; height: 18px; flex: 0 0 1px; background: #dfd8d0; }
.version-text { flex: 0 0 auto; color: #d34a59; font-size: .67rem; font-weight: 850; white-space: nowrap; }

.settings-card { margin: 0 auto 12px; max-width: 760px; padding: 16px; border: 1px solid #dce4ed; border-radius: 19px; background: white; box-shadow: 0 7px 22px rgba(13,36,64,.055); }
.settings-card h2 { margin: 4px 0 7px; font-size: 1rem; letter-spacing: -.02em; }
.settings-card p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.motivation-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; }
.settings-card-icon { width: 46px; height: 46px; border-radius: 15px; background: var(--blue-100); color: var(--blue-700); display: grid; place-items: center; font-size: 1.35rem; }
.signature { margin-top: 12px !important; padding-top: 10px; border-top: 1px dashed #dbe3ec; color: #445265 !important; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.settings-action { min-width: 86px; min-height: 40px; border: 0; border-radius: 12px; background: var(--blue-700); color: #fff; font-size: .72rem; font-weight: 850; cursor: pointer; }
.danger-link { margin-top: 13px; padding: 0; border: 0; background: transparent; color: #657489; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: .73rem; font-weight: 800; }
.danger-link svg { width: 17px; height: 17px; }
.backup-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 13px; }
.backup-action { min-height: 44px; border: 1px solid #d9e3ed; border-radius: 13px; background: #f7fafc; color: var(--blue-800); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-size: .72rem; font-weight: 850; }
.backup-action svg { width: 18px; height: 18px; fill: currentColor; }
.backup-action.export { background: #edf5ff; border-color: #d2e4f8; }
.backup-action.import { background: #eef8f3; border-color: #d1eadf; color: #087454; }
.backup-note { display: block; margin-top: 9px; color: #7d8998; font-size: .65rem; line-height: 1.45; }
.settings-footer { max-width: 760px; margin: 24px auto 8px; padding: 0 4px; color: #91a0b2; font-size: .67rem; line-height: 1.45; }
.settings-footer strong, .settings-footer span { display: block; }

.nav-slot { position: relative; z-index: 1250; min-height: calc(72px + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: white; border-top: 1px solid #dce4ed; box-shadow: 0 -6px 24px rgba(13,36,64,.07); overflow: visible; }
.bottom-nav { position: relative; height: 72px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; max-width: 720px; margin: 0 auto; padding: 0 4px; background: white; overflow: visible; }
.nav-item, .nav-add { --nav-lift: 0px; position: relative; min-width: 0; border: 0; background: transparent; color: #748196; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: .62rem; font-weight: 760; isolation: isolate; overflow: visible; }
.nav-item svg { position: relative; z-index: 2; width: 22px; height: 22px; transform-origin: 50% 50%; transition: transform 260ms cubic-bezier(.2,.9,.2,1.18), filter 260ms ease; }
.nav-item > span, .nav-add > span:last-child { position: relative; z-index: 2; transition: color 220ms ease, font-weight 220ms ease; }
.nav-item::before, .nav-add::before { content: ""; position: absolute; z-index: 1; top: 12px; left: 50%; width: 40px; height: 40px; border-radius: 14px; transform: translateX(-50%) translateY(0) scale(.92); background: transparent; box-shadow: none; opacity: 0; pointer-events: none; transition: transform 280ms cubic-bezier(.2,.9,.2,1.18), opacity 180ms ease, background 220ms ease, box-shadow 220ms ease; }
.nav-item.active { --nav-lift: -13px; color: var(--blue-700); font-weight: 850; }
.nav-item.active::before { transform: translateX(-50%) translateY(var(--nav-lift)) scale(1); background: color-mix(in srgb, var(--blue-100) 88%, white); box-shadow: 0 9px 20px rgba(11,92,171,.18), 0 0 0 4px white, inset 0 0 0 1px rgba(20,115,207,.12); opacity: 1; }
.nav-item.active svg { transform: translateY(var(--nav-lift)) scale(1.12); filter: drop-shadow(0 5px 9px rgba(11,92,171,.22)); }
.nav-add { color: #748196; font-weight: 760; }
.nav-add-icon { position: relative; z-index: 2; width: 22px; height: 22px; border-radius: 0; background: transparent; color: currentColor; display: grid; place-items: center; box-shadow: none; transform-origin: 50% 50%; transition: transform 280ms cubic-bezier(.2,.9,.2,1.18), color 220ms ease, filter 220ms ease; }
.nav-add-icon svg { width: 22px; height: 22px; fill: currentColor; }
.nav-add.active { --nav-lift: -13px; color: #087d61; font-weight: 850; }
.nav-add.active::before { width: 40px; height: 40px; transform: translateX(-50%) translateY(var(--nav-lift)) scale(1); background: var(--green-100); box-shadow: 0 9px 20px rgba(10,135,100,.16), 0 0 0 4px white, inset 0 0 0 1px rgba(8,125,97,.10); opacity: 1; }
.nav-add.active .nav-add-icon { transform: translateY(var(--nav-lift)) scale(1.12); filter: drop-shadow(0 5px 9px rgba(8,125,97,.20)); }
.nav-add:active .nav-add-icon { filter: brightness(.97); }

/* Navbar effect 41 — Radial Burst. Isolado à navbar principal. */
.navbar-radial-burst .radial-burst {
  --burst-color: var(--blue-600);
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 26px;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.navbar-radial-burst .nav-add .radial-burst {
  --burst-color: #0a9871;
  top: 26px;
}
.navbar-radial-burst .radial-burst > i {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 9px;
  margin-left: -1px;
  margin-top: -4px;
  border-radius: 999px;
  background: linear-gradient(to top, transparent 5%, var(--burst-color) 48%, transparent 100%);
  opacity: 0;
  transform-origin: 50% 4px;
  transform: rotate(calc(var(--i) * 45deg)) translateY(-10px) scaleY(.25);
  animation: navbar-radial-ray 430ms cubic-bezier(.2,.78,.2,1) forwards;
}
.navbar-radial-burst .radial-burst > i:nth-child(2n) { height: 7px; animation-delay: 18ms; }
.navbar-radial-burst .nav-item.is-bursting > svg,
.navbar-radial-burst .nav-add.is-bursting .nav-add-icon {
  animation: navbar-radial-icon-pop 360ms cubic-bezier(.2,.9,.2,1.18);
}
.navbar-radial-burst .nav-add.is-bursting .nav-add-icon {
  box-shadow: 0 8px 18px rgba(10,135,100,.24), 0 0 0 6px rgba(10,152,113,.08);
}
.navbar-radial-burst .nav-item.active .radial-burst,
.navbar-radial-burst .nav-add.active .radial-burst {
  transform: translateY(var(--nav-lift));
}
@keyframes navbar-radial-ray {
  0% { opacity: 0; transform: rotate(calc(var(--i) * 45deg)) translateY(-8px) scaleY(.2); }
  30% { opacity: .72; }
  100% { opacity: 0; transform: rotate(calc(var(--i) * 45deg)) translateY(-23px) scaleY(1); }
}
@keyframes navbar-radial-icon-pop {
  0% { transform: translateY(var(--nav-lift)) scale(1); }
  44% { transform: translateY(calc(var(--nav-lift) - 1px)) scale(1.16); }
  100% { transform: translateY(var(--nav-lift)) scale(1); }
}
.navbar-radial-burst .nav-item:focus-visible,
.navbar-radial-burst .nav-add:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: -4px;
  border-radius: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .navbar-radial-burst .radial-burst { display: none !important; }
  .navbar-radial-burst .nav-item svg,
  .navbar-radial-burst .nav-add-icon,
  .navbar-radial-burst .nav-item::before,
  .navbar-radial-burst .nav-add::before { transition: none; animation: none !important; }
}


.modal-backdrop { position: fixed; inset: 0; z-index: 1500; background: rgba(7,20,37,.48); backdrop-filter: blur(3px); }
.bottom-sheet { position: fixed; z-index: 1600; left: 0; right: 0; bottom: 0; max-height: min(88dvh, 780px); overflow: auto; padding: 8px 16px calc(18px + var(--safe-bottom)); background: white; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(7,20,37,.25); }
.sheet-handle { width: 42px; height: 5px; border-radius: 999px; margin: 0 auto 10px; background: #cbd5e1; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-header h2 { margin: 2px 0 0; font-size: 1.25rem; letter-spacing: -.03em; }
.field { display: block; margin: 13px 0; }
.field > span, .fieldset-clean legend { display: block; margin-bottom: 7px; color: #344054; font-size: .78rem; font-weight: 800; }
.field input[type="text"], .field input[type="tel"], .field textarea { width: 100%; border: 1px solid #cfd8e4; border-radius: 14px; background: white; padding: 12px 13px; color: var(--ink); outline: none; transition: .16s border-color, .16s box-shadow; }
.field input:focus, .field textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(20,115,207,.12); }
.field textarea { resize: vertical; min-height: 82px; }
.fieldset-clean { border: 0; padding: 0; margin-inline: 0; }
.chip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check-chip { position: relative; display: flex; align-items: center; min-height: 44px; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); color: #344054; font-size: .78rem; font-weight: 750; cursor: pointer; }
.check-chip input { accent-color: var(--blue-700); }
.coord-card { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 11px 12px; border-radius: 15px; background: var(--blue-100); color: var(--blue-900); }
.coord-card > span { font-size: 1.4rem; }
.coord-card strong { display: block; font-size: .75rem; }
.coord-card small { display: block; margin-top: 2px; font-size: .67rem; opacity: .78; }
.form-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; margin-top: 16px; }
.btn { min-height: 48px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 850; }
.btn-primary { background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); color: white; }
.btn-ghost { background: #eef2f6; color: #475467; }

.toast { position: fixed; z-index: 2200; left: 50%; bottom: calc(88px + var(--safe-bottom)); transform: translateX(-50%); width: min(92vw, 420px); padding: 11px 13px; border-radius: 13px; background: #142438; color: white; box-shadow: var(--shadow); font-size: .77rem; font-weight: 700; text-align: center; }

/* Leaflet custom UI */
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 7px 20px rgba(13,36,64,.16) !important; }
.leaflet-control-zoom a { color: var(--blue-700) !important; border-bottom-color: #edf1f5 !important; }
.leaflet-popup-content-wrapper { border-radius: 17px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 13px 14px; min-width: 210px; max-width: 280px; }
.map-marker-wrap { background: transparent; border: 0; }
.map-pin { position: relative; width: 34px; height: 34px; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); display: grid; place-items: center; border: 3px solid white; box-shadow: 0 4px 12px rgba(8,31,56,.28); }
.map-pin::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: white; opacity: .95; }
.map-pin-osm { background: var(--blue-700); }
.map-pin-user { background: var(--orange); }
.current-marker-wrap { background: transparent; border: 0; }
.current-marker { width: 20px; height: 20px; border: 4px solid white; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 3px rgba(67,182,233,.35), 0 3px 12px rgba(8,31,56,.25); position: relative; }
.current-marker::after { content: ''; position: absolute; inset: -10px; border: 2px solid rgba(67,182,233,.6); border-radius: 50%; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { transform: scale(.65); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
.popup-card h3 { margin: 0 0 4px; font-size: .98rem; }
.popup-source { display: inline-flex; margin-bottom: 8px; padding: 4px 7px; border-radius: 999px; font-size: .62rem; font-weight: 850; }
.popup-source.osm { color: var(--blue-900); background: var(--blue-100); }
.popup-source.user { color: #8a4300; background: var(--orange-100); }
.popup-meta { display: grid; gap: 5px; color: #475467; font-size: .72rem; line-height: 1.35; }
.popup-actions { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 11px; }
.popup-btn { border: 0; border-radius: 11px; min-height: 38px; padding: 7px 10px; cursor: pointer; font-size: .72rem; font-weight: 850; }
.popup-route { background: var(--blue-700); color: white; }
.popup-delete { background: #fff0f0; color: var(--red); }
.popup-contact { grid-column: 1 / -1; background: #ebf8f2; color: #08744b; }

@media (min-width: 720px) {
  .appbar { padding-left: 20px; padding-right: 20px; }
  .brand small { max-width: 420px; }
  .page-scroll { padding: 24px 24px 38px; }
  .page-heading, .summary-row, .search-box, .place-list, .empty-state { max-width: 980px; margin-left: auto; margin-right: auto; }
  .summary-row { margin-top: -4px; margin-bottom: 14px; }
  .status-strip { left: 20px; right: auto; }
  .map-locate { right: 22px; bottom: 24px; }
  .legend { left: 20px; bottom: 20px; max-width: none; }
  .selection-card { left: 50%; right: auto; bottom: 24px; width: min(520px, calc(100% - 220px)); transform: translateX(-50%); }
  .place-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-sheet { left: auto; right: 18px; bottom: 18px; width: min(460px, calc(100vw - 36px)); max-height: calc(100dvh - 100px); border-radius: 24px; padding-bottom: 20px; }
  .nav-slot { background: #eef3f8; border-top: 0; box-shadow: none; padding: 8px 0 calc(8px + var(--safe-bottom)); }
  .bottom-nav { border: 1px solid #d7e0ea; border-radius: 22px; box-shadow: 0 8px 22px rgba(13,36,64,.09); }
  .toast { bottom: calc(102px + var(--safe-bottom)); }
}

@media (min-width: 1100px) {
  .place-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 370px) {
  .brand strong { font-size: .92rem; }
  .brand small { max-width: 40vw; }
  .icon-btn { width: 37px; height: 37px; }
  .nav-item { font-size: .57rem; }
  .author-pill { gap: 6px; padding-inline: 9px; font-size: .66rem; }
  .version-text { font-size: .6rem; }
}

[hidden] { display: none !important; }

@media (max-width: 420px) {
  .backup-actions { grid-template-columns: 1fr; }
  .heading-actions { gap: 6px; }
}

/* Edição de locais salvos */
.popup-btn.popup-edit { background: #fff4df; color: #8a5200; }

/* ========================================================================== 
   Atualização do PWA — v1.3.0 REV06
   ========================================================================== */
.update-settings-card { border-color: #cfe1f5; background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%); }

.update-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: rgba(5, 20, 38, .58);
  backdrop-filter: blur(5px);
}

.update-modal {
  position: fixed;
  z-index: 2500;
  left: 50%;
  bottom: max(14px, var(--safe-bottom));
  width: min(92vw, 520px);
  max-height: calc(100dvh - 28px - var(--safe-top) - var(--safe-bottom));
  overflow: auto;
  transform: translateX(-50%);
  padding: 22px 18px 18px;
  border: 1px solid rgba(207, 225, 245, .92);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(5, 20, 38, .34);
}

.update-modal-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 13px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--blue-700), var(--sky));
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 92, 171, .22);
}
.update-modal-icon svg { width: 27px; height: 27px; }
.update-kicker { display: block; color: var(--blue-700); font-size: .67rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.update-modal h2 { margin: 4px 0 6px; font-size: 1.28rem; letter-spacing: -.035em; }
.update-description { margin: 0 0 15px; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.update-version-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin-bottom: 15px;
}
.update-version-card { padding: 11px 12px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface-soft); }
.update-version-card span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.update-version-card strong { display: block; font-size: .78rem; line-height: 1.3; }
.update-version-card.new { border-color: #b9d8fa; background: var(--blue-100); color: var(--blue-900); }
.update-version-arrow { align-self: center; color: var(--blue-600); font-size: 1.15rem; font-weight: 900; }

.update-changes { padding: 13px 14px; border: 1px solid #dce6f1; border-radius: 16px; background: #fbfdff; }
.update-changes > strong { display: block; margin-bottom: 7px; font-size: .77rem; }
.update-changes ul { margin: 0; padding-left: 18px; color: #475467; }
.update-changes li { margin: 5px 0; font-size: .74rem; line-height: 1.45; }
.update-changes li::marker { color: var(--blue-600); }

.update-preserve-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 11px; border-radius: 13px; background: var(--green-100); color: #0c6c4a; }
.update-preserve-note svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.update-preserve-note span { font-size: .69rem; font-weight: 760; line-height: 1.42; }

.update-actions { display: grid; grid-template-columns: .9fr 1.35fr; gap: 9px; margin-top: 15px; }
.btn-update { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); color: #fff; }
.btn-update svg { width: 18px; height: 18px; }
.btn-update:disabled { opacity: .7; cursor: wait; }
.update-footnote { display: block; margin-top: 9px; color: var(--muted-2); font-size: .62rem; line-height: 1.35; text-align: center; }

@media (min-width: 720px) {
  .update-modal { bottom: 24px; padding: 24px 22px 20px; }
}

@media (max-width: 370px) {
  .update-modal { width: calc(100vw - 20px); padding: 18px 14px 14px; border-radius: 20px; }
  .update-version-grid { gap: 5px; }
  .update-version-card { padding: 9px 8px; }
  .update-version-card strong { font-size: .69rem; }
  .update-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .update-modal, .update-backdrop { scroll-behavior: auto; }
}

.toast { z-index: 2800; }
