/* Entregation — layout map-first (estilo Google Maps): mapa em tela cheia, busca flutuante,
   bottom sheet, cartão da parada, painel, menu lateral, pinos e snackbar.
   --ov-h = altura do que cobre o mapa embaixo (sheet ou cartão); definida pelo app.js. */

:root { --ov-h: 120px; --gap: 12px; }

.app { position: fixed; inset: 0; overflow: hidden; }
.map { position: absolute; inset: 0; background: var(--surface-3); z-index: 0; }
.map > .hint { padding: 120px 24px; text-align: center; }

/* ---------- Leaflet ---------- */
body.dark-tiles .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.6) brightness(.95) contrast(.95); }
.leaflet-container { font-family: var(--font); background: var(--surface-3); }
.leaflet-bottom.leaflet-right { bottom: calc(var(--ov-h) + 2px); transition: bottom .3s var(--ease); }
.leaflet-control-attribution { font-size: 10px; line-height: 1.5; padding: 0 6px; background: rgba(255, 255, 255, .8) !important; color: #3c4043; border-radius: 6px 0 0 0; }
:root[data-theme="dark"] .leaflet-control-attribution, body.dark-tiles .leaflet-control-attribution { background: rgba(31, 31, 31, .8) !important; color: #bdc1c6; }
.leaflet-control-attribution a { color: inherit; }
.leaflet-control-attribution svg { display: none !important; }
body.picking .leaflet-container { cursor: crosshair; }

/* ---------- busca flutuante ---------- */
.searchbar {
  position: absolute; z-index: 30;
  top: calc(var(--safe-t) + var(--gap)); left: var(--gap); right: var(--gap);
}
.search {
  display: flex; align-items: center; gap: 2px;
  height: 52px; padding: 0 4px;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  transition: border-radius .15s var(--ease), box-shadow .2s;
}
.search input {
  flex: 1; min-width: 0; height: 100%; min-height: 0;
  padding: 0 4px; border: 0; background: transparent; box-shadow: none !important;
  font-size: 1rem; color: var(--text);
}
/* o foco aparece no contorno da p�lula, n�o no campo */
.search input:focus-visible { outline: none; }
.search:focus-within { box-shadow: var(--shadow-3), 0 0 0 2px var(--focus); }
body.searching .search:focus-within { box-shadow: var(--shadow-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search .icon-btn { width: 44px; height: 44px; }
body.searching .search { border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-3); }

.spin {
  width: 20px; height: 20px; margin: 0 12px; flex: 0 0 auto;
  border: 2.5px solid var(--surface-3); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.search-results {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  box-shadow: var(--shadow-3);
  overflow: hidden auto; max-height: 60vh;
  clip-path: inset(0 -20px -20px -20px);
}
.search-results:empty { display: none; }
.search-results li:first-child { border-top: 1px solid var(--line); }
.search-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 60px; padding: 8px 16px;
  font: inherit; text-align: left; color: var(--text);
  background: transparent; border: 0; cursor: pointer;
}
.search-item:hover, .search-item:focus-visible { background: var(--surface-2); outline-offset: -3px; }
.si-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); flex: 0 0 auto; }
.si-ico svg { width: 18px; height: 18px; }
.si-txt { display: flex; flex-direction: column; min-width: 0; }
.si-txt b { font-weight: 500; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-txt small { font-size: .8125rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty, .search-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; font-size: .875rem; color: var(--text-2);
}
.search-empty.error { color: var(--bad); }
.search-note { padding: 8px 16px 12px; font-size: .75rem; }

/* ---------- avisos ---------- */
.notices {
  position: absolute; z-index: 20; left: 0; right: 0;
  top: calc(var(--safe-t) + var(--gap) + 60px);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
}
.pill {
  pointer-events: auto;
  padding: 6px 14px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600;
  box-shadow: var(--shadow-1);
}
.pill.warn { background: var(--warn-tonal); color: var(--on-warn); }
.map-hint:empty { display: none; }
.map-hint {
  pointer-events: auto; cursor: pointer;
  padding: 10px 18px; border-radius: 999px;
  background: var(--text); color: var(--surface);
  font-size: .875rem; font-weight: 600;
  box-shadow: var(--shadow-2);
  animation: pop .2s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.96); } }

/* ---------- FAB ---------- */
.fab {
  position: absolute; z-index: 15;
  right: var(--gap); bottom: calc(var(--ov-h) + 16px);
  display: grid; place-items: center;
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--primary);
  box-shadow: var(--shadow-2); cursor: pointer;
  transition: bottom .3s var(--ease), opacity .2s, transform .1s;
}
.fab:active { transform: scale(.94); }
.fab svg { width: 24px; height: 24px; }
body.sheet-open .fab, body.searching .fab { opacity: 0; pointer-events: none; }

/* ---------- snackbar ---------- */
.snackbar {
  position: absolute; z-index: 60;
  left: 50%; bottom: calc(var(--ov-h) + 16px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  width: max-content; max-width: calc(100% - 24px); min-height: 48px;
  padding: 6px 8px 6px 16px;
  background: #303134; color: #f1f3f4;
  border-radius: var(--r-sm); box-shadow: var(--shadow-3);
  font-size: .875rem; font-weight: 500;
  animation: snack-in .25s var(--ease-out);
}
.snackbar.error { background: #8c1d18; color: #fff; }
.snackbar #appMsgText { padding: 6px 8px 6px 0; }
.snack-action {
  min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px;
  font: inherit; font-weight: 600; color: #a8c7fa; background: transparent; cursor: pointer;
}
.snack-action:hover { background: rgba(255, 255, 255, .08); }
.snackbar.error .snack-action { color: #fff; }
@keyframes snack-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- bottom sheet ---------- */
.sheet {
  position: absolute; z-index: 25; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  max-height: calc(100% - var(--safe-t) - 76px);
  padding: 0 16px calc(var(--safe-b) + 12px);
  background: var(--surface); color: var(--text);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .12), var(--shadow-1);
  transition: transform .3s var(--ease-out);
}
body.card-open .sheet, body.panel-open .sheet, body.picking .sheet, body.searching .sheet { transform: translateY(calc(100% + 8px)); }
.sheet-handle {
  display: grid; place-items: center;
  height: 22px; margin: 0 -16px; cursor: grab; touch-action: none;
}
.sheet-handle span { width: 36px; height: 4px; border-radius: 2px; background: var(--line); transition: background .15s, width .2s; }
.sheet-handle:hover span { background: var(--text-2); width: 44px; }
.sheet.is-empty .sheet-handle { visibility: hidden; height: 14px; }
.sheet-head { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.sheet-titles { flex: 1; min-width: 0; }
.sheet-title { font-size: 1.375rem; font-weight: 500; letter-spacing: -.01em; color: var(--ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet.is-empty .sheet-title { color: var(--text); }
.sheet-sub { font-size: .875rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .btn { min-width: 112px; }
.sheet.is-empty .sheet-head { display: none; }
.sheet.is-empty .empty { padding-top: 8px; }
.sheet.is-finished .sheet-head { display: none; }
.finish-card {
  display: flex; flex-direction: column; gap: 10px;
  margin: 4px 0 10px; padding: 14px;
  background: var(--ok-tonal);
  border: 1.5px solid rgba(19, 115, 51, .28);
  border-radius: var(--r-md);
}
.finish-top { display: flex; align-items: center; gap: 12px; }
.finish-art {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ok); color: #fff;
}
.finish-art svg { width: 22px; height: 22px; stroke-width: 2.6; }
.finish-txt { flex: 1; min-width: 0; }
.finish-title { font-size: 1.0625rem; font-weight: 700; color: var(--ok); line-height: 1.2; }
.finish-sub { font-size: .875rem; color: var(--text); margin-top: 2px; }
.finish-card .btn.big { width: 100%; min-height: 50px; font-size: 1rem; font-weight: 700; }
.finish-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.finish-actions .btn { flex: 1; }
.btn.busy::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
.sheet .progress { margin: 4px 0 6px; }

.sheet-body {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 0fr 0fr;
  margin: 0 -16px;
  transition: grid-template-rows .32s var(--ease-out);
}
.sheet-body > * { min-height: 0; min-width: 0; }
.sheet.expanded .sheet-body { flex: 1 1 auto; min-height: 0; }
.sheet.expanded .sheet-body { grid-template-rows: 1fr auto; }
.sheet-body { overflow: hidden; }
.sheet.expanded .sheet-body { overflow-y: auto; overscroll-behavior: contain; }
.sheet-body::before { content: none; }
.sheet-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 4px; }
.sheet:not(.expanded) .sheet-tools, .sheet:not(.expanded) .stop-list { visibility: hidden; }

/* estado vazio */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 4px 0 8px; }
.empty-art { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--tonal); color: var(--on-tonal); }
.empty-art svg { width: 28px; height: 28px; }
.empty-title { font-size: 1.125rem; font-weight: 600; }
.empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* lista */
.stop-list { list-style: none; margin: 0; padding: 0; }
.stop { position: relative; border-top: 1px solid var(--line); }
.stop:first-child { border-top: 0; }
.stop-head { display: flex; align-items: center; width: 100%; min-width: 0; padding-right: 4px; }
.stop-row {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  min-height: 64px; padding: 10px 6px 10px 14px;
  font: inherit; text-align: left; color: var(--text);
  background: transparent; border: 0; cursor: pointer;
}
.stop-row:hover { background: var(--surface-2); }
.stop-row:focus-visible { outline-offset: -3px; }
.num {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  font-size: .8125rem; font-weight: 700;
}
.num svg { width: 16px; height: 16px; stroke-width: 3; }
.stop.s-delivered .num { background: var(--ok-tonal); color: var(--ok); }
.stop.s-failed .num { background: var(--bad-tonal); color: var(--bad); }
.stop.is-next .num { box-shadow: 0 0 0 4px var(--tonal); }
.stop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stop-info strong { font-size: .9375rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-info small { font-size: .8125rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop.s-delivered .stop-info strong, .stop.s-failed .stop-info strong { color: var(--text-2); }
.eta { display: flex; flex-direction: column; align-items: flex-end; font-size: .75rem; color: var(--primary); font-weight: 600; flex: 0 0 auto; }
.eta b { font-size: .9375rem; font-weight: 500; color: var(--text); }
.stop-state { font-size: .8125rem; font-weight: 600; flex: 0 0 auto; }
.stop-state.ok { color: var(--ok); }
.stop-state.bad { color: var(--bad); }
.toggle { width: 34px; height: 40px; flex: 0 0 auto; }
.stop-more { padding: 0 16px 14px 60px; animation: pop .18s var(--ease-out); }
.stop-more .note { min-height: 44px; margin-bottom: 8px; }
.stop-more .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- cartão da parada ---------- */
.stop-card, .panel {
  position: absolute; z-index: 35; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - var(--safe-t) - 76px); overflow-y: auto;
  padding: 20px 16px calc(var(--safe-b) + 16px);
  background: var(--surface); color: var(--text);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .12), var(--shadow-1);
  animation: sheet-up .3s var(--ease-out);
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } }
.card-top { display: flex; align-items: flex-start; gap: 14px; }
.card-num {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 40px; height: 40px; margin-top: 2px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  font-size: 1rem; font-weight: 700;
}
.card-num.s-delivered { background: var(--ok-tonal); color: var(--ok); }
.card-num.s-failed { background: var(--bad-tonal); color: var(--bad); }
.card-num svg { width: 20px; height: 20px; stroke-width: 3; }
.card-info { flex: 1; min-width: 0; }
.card-kicker { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.card-name { font-size: 1.375rem; font-weight: 500; line-height: 1.25; margin: 2px 0; overflow-wrap: anywhere; }
.card-addr { font-size: .875rem; color: var(--text-2); }
.card-meta { font-size: .875rem; font-weight: 600; color: var(--ok); margin-top: 4px; }
.card-top .icon-btn { margin: -8px -8px 0 0; }
.card-nav { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 16px; }
.card-nav .btn { min-height: 52px; font-size: 1rem; }
.card-nav .btn.tonal { padding: 0 22px; }
.card-status { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.card-status .btn { min-height: 52px; font-size: 1rem; }
.card-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- painel nova parada ---------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; margin: -8px -8px 12px 0; }
details.adv { margin: 4px 0; }
details.adv summary, details.sec summary {
  display: flex; align-items: center; min-height: 48px;
  font-weight: 600; cursor: pointer; list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details.adv summary { font-size: .875rem; color: var(--primary); }
details.adv summary::after, details.sec summary::after {
  content: ""; width: 8px; height: 8px; margin-left: auto;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease);
}
details.adv summary::after { margin-left: 10px; }
details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.geo-results { list-style: none; margin: 0 0 8px; padding: 0; }
.geo-results li { margin-bottom: 6px; }
.geo-results .btn { width: 100%; justify-content: flex-start; white-space: normal; text-align: left; padding: 10px 16px; border-radius: var(--r-md); font-weight: 500; line-height: 1.3; }
.manual-box { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 12px; margin: 8px 0; }

/* ---------- menu lateral ---------- */
.scrim { position: absolute; inset: 0; z-index: 40; background: var(--scrim); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: absolute; z-index: 45; top: 0; bottom: 0; left: 0;
  width: min(380px, 88vw); overflow-y: auto;
  padding: calc(var(--safe-t) + 8px) 20px calc(var(--safe-b) + 24px);
  background: var(--surface); color: var(--text);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  box-shadow: var(--shadow-3);
  animation: drawer-in .28s var(--ease-out);
}
@keyframes drawer-in { from { transform: translateX(-100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin-bottom: 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 600; }
details.sec { border-top: 1px solid var(--line); padding-bottom: 4px; }
details.sec[open] { padding-bottom: 12px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.stat { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; }
.stat-val { display: block; font-size: 1.25rem; font-weight: 600; }
.stat-lbl { display: block; font-size: .6875rem; color: var(--text-2); line-height: 1.3; }
.next-box { background: var(--surface-2); border-radius: var(--r-md); padding: 12px; margin: 8px 0 12px; }
.next-title { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 4px 0; }
.next-text { font-size: 1rem; font-weight: 500; margin-bottom: 8px; }
.next-text small { font-weight: 400; color: var(--text-2); }
.limits { margin: 0; padding-left: 18px; color: var(--text-2); font-size: .8125rem; line-height: 1.6; }
#googleLinks .btn { flex: 1 1 100%; }

/* ---------- pinos ---------- */
.gpin-wrap { background: none !important; border: 0 !important; }
.gpin { position: relative; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); transition: transform .15s var(--ease); transform-origin: 50% 100%; }
.gpin:hover { transform: scale(1.08); }
.gpin svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; stroke: none; }
.gp-body { fill: #1a73e8; stroke: #fff; stroke-width: 2; }
.gpin.sel .gp-body { fill: #ea4335; }
.gpin.big { animation: pin-drop .35s var(--ease-out); }
@keyframes pin-drop { from { transform: translateY(-10px) scale(.8); opacity: .3; } }
.gpin span {
  position: absolute; left: 0; right: 0; top: 0; height: 80%;
  display: grid; place-items: center; z-index: 1;
  color: #fff; font: 700 13px/1 var(--font);
}
.gpin.big span { font-size: 16px; }
.gdot {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #fff; color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.gdot svg { width: 13px; height: 13px; stroke-width: 3.2; }
.gdot-delivered { background: #188038; }
.gdot-failed { background: #d93025; }
.gdot-depot { width: 28px; height: 28px; background: #3c4043; }
.gdot-depot svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* ---------- desktop: painel à esquerda, como o Google Maps ---------- */
@media (min-width: 900px) {
  :root { --gap: 16px; }
  .searchbar { right: auto; width: 392px; }
  .notices { left: 424px; top: calc(var(--gap) + 4px); align-items: flex-start; }
  .sheet, .stop-card, .panel {
    left: var(--gap); right: auto; top: calc(var(--gap) + 64px); bottom: auto;
    width: 392px; max-height: calc(100% - 64px - var(--gap) * 2);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding-bottom: 12px;
  }
  .sheet { overflow: hidden; }
  .sheet-handle { display: none; }
  .sheet-body { grid-template-rows: 1fr auto; overflow-y: auto; }
  .sheet:not(.expanded) .sheet-tools, .sheet:not(.expanded) .stop-list { visibility: visible; }
  body.card-open .sheet, body.panel-open .sheet, body.searching .sheet { display: none; }
  body.picking .sheet { transform: none; }
  .stop-card, .panel { animation: pop .2s var(--ease-out); }
  .snackbar { left: var(--gap); transform: none; bottom: 24px; max-width: 392px; }
  .fab { bottom: 32px; right: 16px; }
  body.sheet-open .fab { opacity: 1; pointer-events: auto; }
  .leaflet-bottom.leaflet-right { bottom: 0; }
}

/* ---------- mapa vetorial (MapLibre dentro do Leaflet) ---------- */
.leaflet-gl-layer.maplibregl-map { position: absolute; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-control-attribution { background: rgba(31, 31, 31, .8) !important; color: #bdc1c6; }
}

/* ---------- busca: recentes, comércios e voz ---------- */
.search-head { padding: 10px 16px 4px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--text-2); }
.search-item.recent .si-ico { background: transparent; }
#btnVoice.listening { color: var(--bad); background: var(--bad-tonal); animation: mic-pulse 1.2s var(--ease) infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px var(--bad-tonal); } }
@media (prefers-reduced-motion: reduce) { #btnVoice.listening { animation: none; } }

/* ---------- navegação curva-a-curva: faixa da próxima manobra (estilo Google Maps) ---------- */
:root { --nb-h: 0px; }
.nav-banner {
  position: absolute; z-index: 31;
  top: calc(var(--safe-t) + var(--gap)); left: var(--gap); right: var(--gap);
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden;
  background: #0b57d0; color: #fff;
  animation: pop .2s var(--ease-out);
}
.nb-main { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 10px 4px 10px 12px; }
.nb-ico { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto; }
.mv-ico { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nb-txt b { font-size: 1.75rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.nb-txt span { font-size: 1.0625rem; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nb-btns { display: flex; flex-direction: column; gap: 2px; align-self: stretch; justify-content: center; }
.nav-banner .icon-btn { color: #fff; width: 44px; height: 44px; }
.nav-banner .icon-btn:hover { background: rgba(255, 255, 255, .14); }
#btnNavVoice[aria-pressed="false"] { color: #ffd7d4; }
.nb-sub {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 6px 14px 8px; background: #0842a0; font-size: .875rem; min-height: 34px;
}
.nb-sub:has(.nb-then[hidden]) .nb-eta { margin-left: 0; }
.nb-then { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.nb-then[hidden] { display: none; }
.nb-then-lbl { font-weight: 700; opacity: .85; }
.nb-then-ico { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; }
.nb-then-ico .mv-ico { width: 20px; height: 20px; stroke-width: 2.6; }
.nb-then-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* "950 m até R. Acácio Mendes, Américo Silva · 13:04": o endereço ganha reticências, o horário nunca corta. */
.nb-eta { margin-left: auto; opacity: .92; display: flex; align-items: baseline; gap: 4px; min-width: 0; max-width: 100%; flex: 1 1 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nb-eta-main { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-eta-time { flex-shrink: 0; white-space: nowrap; }
.nb-eta-time[hidden] { display: none; }
.nb-sub:has(.nb-then:not([hidden])) .nb-then { flex-basis: 100%; }
.nb-prev { flex-shrink: 0; }
body.following .searchbar { visibility: hidden; }
.nav-arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #1a73e8; border: 3px solid #fff; box-shadow: var(--shadow-2); }
.nav-arrow svg { width: 18px; height: 18px; fill: #fff; stroke: none; transition: transform .4s var(--ease); }
.recenter-btn {
  position: absolute; z-index: 16; left: var(--gap); bottom: calc(var(--ov-h) + 16px);
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--primary);
  font: inherit; font-size: .9375rem; font-weight: 600; box-shadow: var(--shadow-2); cursor: pointer;
  transition: bottom .3s var(--ease);
}
.recenter-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.recenter-btn .rc-ico { font-size: 1.125rem; line-height: 1; }
.recenter-btn[hidden] { display: none; }
/* Navegando: ALPHA e Reportar ficam logo abaixo da faixa (nunca por cima), compactos. */
body.following .topbar-row { display: flex; top: calc(var(--safe-t) + var(--gap) + var(--nb-h) + 8px); }
body.following .report-btn { min-height: 40px; padding: 0 12px; font-size: .8125rem; }
body.following .notices { top: calc(var(--safe-t) + var(--gap) + var(--nb-h) + 60px); }
body.following .dev-bar, body.following .alpha-note { top: calc(var(--safe-t) + var(--gap) + var(--nb-h) + 60px); }
@media (prefers-reduced-motion: reduce) { .nav-banner { animation: none; } .nav-arrow svg { transition: none; } }
@media (min-width: 900px) {
  .nav-banner { right: auto; width: 392px; }
  body.following .stop-card, body.following .sheet { top: calc(var(--gap) + var(--nb-h) + 12px); max-height: calc(100% - var(--nb-h) - var(--gap) * 2 - 12px); }
  body.following .topbar-row { top: var(--gap); }
  body.following .notices { top: calc(var(--gap) + 4px); }
  body.following .dev-bar, body.following .alpha-note { top: calc(var(--gap) + 54px); }
  .recenter-btn { left: auto; right: 80px; bottom: 34px; }
}

/* ---------- resumo final da corrida ---------- */
.finish-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fs-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: var(--r-sm); background: var(--surface); text-align: center; min-width: 0; }
.fs-item b { font-size: 1.125rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fs-item span { font-size: .75rem; color: var(--text-2); line-height: 1.2; }

/* ---------- ALPHA, reportar problema e aviso ---------- */
.notices { top: calc(var(--safe-t) + var(--gap) + 112px); }
.topbar-row {
  position: absolute; z-index: 24;
  top: calc(var(--safe-t) + var(--gap) + 60px);
  left: var(--gap); right: var(--gap);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
body.searching .topbar-row,
body.sheet-open .topbar-row,
body.card-open .topbar-row,
body.panel-open .topbar-row { display: none; }
.alpha-badge {
  pointer-events: auto; padding: 4px 10px; border-radius: 999px;
  background: #f9ab00; color: #202124; font-size: .75rem; font-weight: 800; letter-spacing: .08em;
  box-shadow: var(--shadow-1);
}
.report-btn {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--surface); color: var(--bad); font: inherit; font-size: .875rem; font-weight: 600;
  box-shadow: var(--shadow-2); cursor: pointer;
}
.report-btn svg { width: 20px; height: 20px; }
.alpha-note {
  position: absolute; z-index: 45; left: var(--gap); right: var(--gap);
  top: calc(var(--safe-t) + var(--gap) + 116px);
  padding: 14px 16px 8px; border-radius: var(--r-lg);
  background: #fef7e0; color: #3c2a00; box-shadow: var(--shadow-2); font-size: .9375rem;
}
.alpha-note .btn.text { color: #3c2a00; }
.diag-view { white-space: pre-wrap; font-size: 11px; max-height: 160px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: 6px; }
#fbChips .chip[aria-pressed="true"], .quick-chips .chip:active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
#fbDialog textarea { width: 100%; }
.fb-shot-box { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.fb-shot-preview { display: block; width: 100%; max-height: 155px; object-fit: contain; border-radius: 6px; background: var(--surface-3); }
.fb-shot-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fb-shot-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.fb-shot-actions .btn { min-height: 36px; padding: 0 10px; font-size: .8125rem; }

/* ---------- desvio da rota ---------- */
.dev-bar {
  position: absolute; z-index: 46; left: var(--gap); right: var(--gap);
  top: calc(var(--safe-t) + var(--gap) + 132px);
  padding: 14px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-2); border-left: 6px solid #f9ab00;
}
.dev-text { font-weight: 700; font-size: 1.0625rem; margin-bottom: 8px; }
.dev-actions { display: flex; flex-direction: column; gap: 8px; }
.dev-actions .btn { min-height: 48px; width: 100%; }

/* ---------- modo "Adicionar no mapa" ---------- */
.fab-tap {
  position: absolute; z-index: 16;
  right: var(--gap); bottom: calc(var(--ov-h) + 80px);
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 18px;
  background: var(--primary); color: var(--on-primary);
  font: inherit; font-size: 1rem; font-weight: 600;
  box-shadow: var(--shadow-2); cursor: pointer;
  transition: bottom .3s var(--ease), opacity .2s, transform .1s;
}
.fab-tap svg { width: 26px; height: 26px; stroke-width: 2.6; }
.fab-tap:active { transform: scale(.96); }
body.tapping .fab-tap, body.sheet-open .fab-tap, body.searching .fab-tap, body.card-open .fab-tap, body.panel-open .fab-tap, body.following .fab-tap { opacity: 0; pointer-events: none; }
body.tapping .leaflet-container { cursor: copy; }
body.tapping .sheet, body.quick-open .sheet { transform: translateY(calc(100% + 8px)); }
body.tapping .fab, body.quick-open .fab { bottom: calc(var(--ov-h) + 16px); }

.tap-bar, .quick-card {
  position: absolute; z-index: 36; left: 0; right: 0; bottom: 0;
  padding: 14px 16px calc(var(--safe-b) + 14px);
  background: var(--surface); color: var(--text);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .12), var(--shadow-1);
  animation: sheet-up .25s var(--ease-out);
}
.quick-card { z-index: 37; }
.tap-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tap-txt { flex: 1; min-width: 0; }
.tap-bar .btn { min-height: 48px; }
.btn.big { width: 100%; min-height: 56px; font-size: 1.0625rem; }
.btn.big svg { width: 22px; height: 22px; }
.quick-head { display: flex; align-items: center; gap: 8px; }
#quickName {
  flex: 1; min-width: 0; height: 48px; padding: 0 12px;
  font: inherit; font-size: 1.0625rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.quick-card .card-addr { margin: 8px 0 10px 48px; }
.quick-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.quick-chips .chip { min-height: 44px; }
.quick-card .btn-row .btn { flex: 1; min-height: 48px; }
.quick-card .icon-btn, .tap-bar .icon-btn { width: 44px; height: 44px; }
.gpin.moving { animation: bob .8s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-6px); } }
body.moving .leaflet-container { cursor: grab; }

@media (min-width: 900px) {
  .topbar-row {
    top: var(--gap); right: var(--gap); left: auto;
    width: auto; z-index: 30;
    justify-content: flex-end; gap: 10px;
    display: flex;
  }
  body.searching .topbar-row,
  body.sheet-open .topbar-row,
  body.card-open .topbar-row,
  body.panel-open .topbar-row { display: flex; }
  .notices { top: calc(var(--gap) + 4px); left: 424px; right: 290px; align-items: flex-start; }
  .alpha-note, .dev-bar { left: auto; right: 16px; width: 360px; top: calc(var(--gap) + 54px); }
  .tap-bar, .quick-card { left: 16px; right: auto; top: 80px; bottom: auto; width: 392px; border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
  .fab-tap { bottom: 96px; right: 16px; }
  body.tapping .sheet, body.quick-open .sheet { display: none; }
}

.tap-txt .sheet-title { font-size: 20px; white-space: nowrap; }
.tap-head #btnTapUndo { padding-inline: 14px; }
.tap-head #btnTapUndo.undo-ico { width: 52px; min-width: 52px; padding: 0; justify-content: center; }
.tap-head #btnTapUndo.undo-ico svg { margin: 0; width: 24px; height: 24px; }

/* Navegando (vem por último para valer sobre as regras gerais): ALPHA e Reportar ficam visíveis
   logo abaixo da faixa de manobra, mesmo com o cartão da parada aberto. */
body.following:not(.panel-open) .topbar-row { display: flex; top: calc(var(--safe-t) + var(--gap) + var(--nb-h) + 8px); justify-content: flex-end; gap: 6px; }
body.following .alpha-badge { padding: 2px 8px; font-size: .6875rem; opacity: .9; }
body.following .report-btn { box-shadow: var(--shadow-1); }
body.following .notices,
body.following .dev-bar,
body.following .alpha-note { top: calc(var(--safe-t) + var(--gap) + var(--nb-h) + 60px); }
@media (min-width: 900px) {
  body.following:not(.panel-open) .topbar-row { top: var(--gap); }
  body.following .notices { top: calc(var(--gap) + 4px); }
  body.following .dev-bar, body.following .alpha-note { top: calc(var(--gap) + 54px); }
}

/* ---------- Modo Campo: reordenação manual rápida ---------- */
.stop-reorder {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
}
.stop-mv {
  width: 32px;
  height: 40px;
  min-width: 32px;
  color: var(--text-2);
  touch-action: manipulation;
}
.stop-mv svg { width: 18px; height: 18px; }
.stop-mv:disabled { opacity: .22; cursor: default; }
.stop-mv:not(:disabled):active { background: var(--tonal); color: var(--primary); }

/* Pill offline/sem sinal discreto sem estouro no mobile */
.notices .pill {
  max-width: calc(100vw - 32px);
  text-align: center;
  white-space: normal;
  line-height: 1.3;
}

/* ---------- Modo Campo: histórico enxuto de corridas ---------- */
.hist-modal { max-height: 82vh; overflow-y: auto; }
.hist-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px;
  border-radius: 999px; background: var(--tonal); color: var(--on-tonal);
  font-size: .75rem; font-weight: 700; vertical-align: middle;
}
.hist-empty { text-align: center; padding: 20px 8px; }
.hist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hist-item {
  width: 100%; display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); color: var(--text); text-align: left;
  font: inherit; cursor: pointer; touch-action: manipulation;
}
.hist-item:hover { border-color: var(--primary); }
.hist-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hist-item-date { font-size: .875rem; font-weight: 600; color: var(--text); }
.hist-item-badge {
  font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--ok-tonal); color: var(--ok); flex: 0 0 auto;
}
.hist-item-badge.has-skip { background: var(--tonal); color: var(--on-tonal); }
.hist-item-meta { font-size: .8125rem; color: var(--text-2); }
.hist-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.hist-detail-title { font-size: 1rem; font-weight: 600; margin-bottom: 10px; }
.hist-stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; }
.hist-stops {
  list-style: none; margin: 0 0 12px; padding: 0;
  max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm);
}
.hist-stop {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; font-size: .875rem; border-top: 1px solid var(--line);
}
.hist-stop:first-child { border-top: 0; }
.hist-stop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-stop-st { font-size: .75rem; font-weight: 600; flex: 0 0 auto; }
.hist-stop-st.ok { color: var(--ok); }
.hist-stop-st.bad { color: var(--bad); }
.hist-foot { margin-top: 12px; }
.btn.text.danger { color: var(--bad); }

/* ---------- Navegação dentro do app (padrão): cartão sem Maps/Waze competindo ---------- */
.card-nav { grid-template-columns: 1fr; }
.card-nav .btn.primary { min-height: 56px; font-size: 1.0625rem; font-weight: 700; }
.ext-nav { width: 100%; margin-top: 4px; font-size: .8125rem; color: var(--text-2); }
.ext-nav > summary { cursor: pointer; padding: 6px 2px; list-style: none; text-decoration: underline; text-underline-offset: 3px; width: max-content; }
.ext-nav > summary::-webkit-details-marker { display: none; }
.ext-nav .btn-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.ext-nav .btn-row .btn { min-height: 40px; font-size: .875rem; }

/* Faixa: pré-visualizar manobras (← →) e aviso discreto de GPS */
.nb-prev { display: inline-flex; gap: 0; margin: -6px -8px -6px 0; }
.nb-prev .icon-btn { width: 36px; height: 36px; }
.nb-prev .icon-btn:disabled { opacity: .4; }
.nb-txt { cursor: pointer; }
.nb-wait { margin: 0; padding: 5px 14px 7px; background: #062e6f; color: #d3e3fd; font-size: .8125rem; line-height: 1.3; }

/* Barra compacta da corrida ativa (embaixo) */
.nav-bar {
  position: absolute; z-index: 30; left: var(--gap); right: var(--gap);
  bottom: calc(var(--safe-b) + var(--gap));
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 12px 12px 16px; border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-3);
  animation: pop .2s var(--ease-out);
}
.nvb-top { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.nvb-info { flex: 1; min-width: 0; }
.nvb-line { margin: 0; display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.nvb-step { flex: 0 0 auto; font-size: .9375rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.nvb-step:empty { display: none; }
.nvb-step:not(:empty)::after { content: ' ·'; color: var(--text-2); }
.nvb-name { font-size: 1.0625rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nvb-eta { margin: 2px 0 0; font-size: .875rem; color: var(--ok); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.nvb-exit { flex: 0 0 auto; min-height: 40px; padding: 0 10px; margin: -6px -4px 0 0; }
.nvb-acts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.nvb-acts .btn { min-height: 52px; font-size: 1rem; font-weight: 700; }
.nvb-acts .btn[hidden] { display: none; }
.nvb-acts:has(#btnNavDone[hidden]) { grid-template-columns: 1fr; }

/* Navegando: mapa quase em tela cheia (sheet e botões de montagem somem) */
body.following .sheet,
body.following .fab,
body.following .fab-tap { display: none !important; }
body.following.card-open .nav-bar { display: none; }
body.following .recenter-btn { bottom: calc(var(--ov-h) + 12px); }

/* Câmera inclinada estilo Google Maps: contêiner maior que a tela, transform 3D a partir do ponto do carro */
.map.nav-tilt {
  inset: auto; right: auto; bottom: auto;
  transform: perspective(900px) rotateX(45deg) rotate(var(--nav-rot, 0deg));
  transition: transform .5s var(--ease);
  will-change: transform;
}
.map.nav-tilt .leaflet-control-container { display: none; }
@media (prefers-reduced-motion: reduce) { .map.nav-tilt { transition: none; } .nav-bar { animation: none; } }

@media (min-width: 900px) {
  .nav-bar { right: auto; width: 392px; bottom: var(--gap); }
  body.following.card-open .nav-bar { display: flex; }
  body.following .recenter-btn { bottom: 34px; }
}

/* ---------- Carteira de clientes (salvar local atual / parada como cliente) ---------- */
.drawer-quick { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.drawer-quick .btn { width: 100%; justify-content: flex-start; white-space: normal; text-align: left; line-height: 1.2; min-height: 48px; }
.drawer-quick .hist-count { margin-left: auto; }
.quick-client { margin-top: 2px; }
.search-item.client .si-ico { background: var(--tonal); color: var(--on-tonal); }
.cl-modal { max-height: 82vh; overflow-y: auto; }
.cl-form .field { margin-bottom: 10px; }
.cl-coords { display: flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--on-tonal); background: var(--tonal); padding: 8px 12px; border-radius: var(--r-sm); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.cl-coords svg { width: 18px; height: 18px; }
.cl-addr { margin: 0 0 10px; overflow-wrap: anywhere; }
.cl-err { color: var(--bad); min-height: 1em; margin: 0; }
.cl-err:empty { display: none; }
.cl-gps { width: 100%; margin: 0 0 10px; }
.cl-search { margin: 0 0 10px; }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.cl-ico { background: var(--tonal); color: var(--on-tonal); }
.cl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cl-txt b { font-size: .9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-txt small { font-size: .8125rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-txt .cl-uso { font-size: .75rem; }
.cl-acts { display: flex; align-items: center; gap: 0; flex: 0 0 auto; }
.cl-acts .cl-add { min-height: 40px; padding: 0 12px; font-size: .875rem; }
.cl-acts .icon-btn { width: 40px; height: 40px; }
.cl-acts .icon-btn svg { width: 20px; height: 20px; }
.cl-acts .cl-del { color: var(--bad); }
.cl-foot { display: flex; justify-content: flex-end; gap: 4px; margin-top: 12px; }
.cl-foot .btn { min-height: 40px; font-size: .875rem; }
@media (max-width: 520px) {
  .cl-item { flex-wrap: wrap; row-gap: 6px; padding: 10px 6px 6px 10px; }
  .cl-txt { flex: 1 1 calc(100% - 46px); }
  .cl-txt b, .cl-txt small { white-space: normal; overflow-wrap: anywhere; }
  .cl-acts { flex: 1 1 100%; justify-content: flex-end; }
  .cl-acts .cl-add { margin-right: auto; }
}

/* ---------- Reportar problema sempre por cima de pop-ups (js/toplayer.js) ----------
   Host na Top Layer (popover="manual") com z-index máximo; portado para dentro do <dialog> modal
   aberto. Posição (left/top) calculada para não cobrir o X nem as ações principais. */
.bug-float {
  position: fixed; inset: auto; z-index: 2147483647;
  margin: 0; padding: 0; border: 0; overflow: visible;
  width: max-content; height: max-content;
  background: transparent; color: inherit;
  pointer-events: none;
}
.bug-float[hidden] { display: none; }
.bug-float:not([hidden]), .bug-float:popover-open { display: flex; gap: 4px; }
.bug-float .report-btn { pointer-events: auto; box-shadow: var(--shadow-3); }
.bug-float .report-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* Com o botão flutuante ativo, o da barra superior some (evita dois botões iguais). */
body.bug-float-on .topbar-row .report-btn { visibility: hidden; }
@media (max-width: 899px) {
  .bug-float .report-btn { min-height: 40px; padding: 0 12px; font-size: .8125rem; }
}

/* Miniatura do print clicável → lightbox em tamanho real */
.fb-shot-zoom { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; background: none; cursor: zoom-in; }
.fb-shot-zoom:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.fb-lightbox {
  border: 0; padding: 0; margin: auto; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  overflow: auto; display: none;
}
.fb-lightbox[open] { display: grid; place-items: center; }
.fb-lightbox::backdrop { background: rgba(0, 0, 0, .86); }
.fb-lightbox-img { display: block; max-width: none; width: auto; height: auto; margin: auto; box-shadow: var(--shadow-3); cursor: zoom-out; }
.fb-lightbox-close {
  position: fixed; top: calc(var(--safe-t) + 10px); right: 10px; z-index: 1;
  background: rgba(32, 33, 36, .85); color: #fff;
}
/* O campo-isca (#fbHp) herdava width:100% + padding de input[type="text"] e vazava ~23 px para a direita,
   rolando o relato para o lado no celular. */
input.sr-only { width: 1px; min-height: 0; padding: 0; }
#fbDialog { overflow-x: hidden; }

/* Os dois controles compartilham a posição protegida da camada de feedback. */
.report-actions { display: inline-flex; gap: 4px; margin-inline-start: auto; }
#btnCaptureMore, #btnCaptureMoreFloat { white-space: nowrap; min-width: 44px; padding-inline: 8px; }
