/* Subiendo — botón atrás del sistema + botones más cómodos en móvil */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --touch-min: 44px;
}

/* Cartel salir */
.subite-exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 16, 24, 0.55);
  backdrop-filter: blur(3px);
  padding: 0;
}
.subite-exit-overlay.open { display: flex; }
.subite-exit-sheet {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 22px 22px 0 0;
  padding: 0.45rem 1.25rem calc(1.15rem + var(--safe-bottom));
  box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.2);
  animation: subite-exit-up 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes subite-exit-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.subite-exit-handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: #cbd5e1;
  margin: 0.45rem auto 0.85rem;
}
.subite-exit-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.subite-exit-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
}
.subite-exit-text {
  margin: 0.45rem 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #64748b;
}
.subite-exit-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.subite-exit-btn {
  min-height: var(--touch-min);
  border: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.85rem 1rem;
}
.subite-exit-btn.ghost {
  background: var(--surface);
  color: var(--text);
}
.subite-exit-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}
.subite-exit-btn:active { transform: scale(0.98); }

/* Safe areas + touch targets — pasajero */
.screen-back-btn,
.map-back,
.section-back,
.back-btn {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
}
.map-back {
  top: calc(12px + var(--safe-top));
  left: calc(12px + var(--safe-left));
}
.section-back {
  top: calc(12px + var(--safe-top));
  left: calc(12px + var(--safe-left));
}
.bottom-nav {
  padding: 0.55rem 0 calc(0.85rem + var(--safe-bottom));
}
.nav-tab {
  min-height: var(--touch-min);
  justify-content: center;
  padding: 0.45rem 0.25rem;
}
.nav-tab .n-lbl { font-size: 0.68rem; }
.confirm-btn {
  min-height: 52px;
  margin-bottom: calc(0.35rem + var(--safe-bottom));
  border-radius: 16px;
  letter-spacing: 0.01em;
}
.where-to-btn,
.reservas-home-btn,
.location-refresh-btn {
  min-height: var(--touch-min);
}
.btn-blue,
.btn-secondary,
.social-btn {
  min-height: var(--touch-min);
}

/* Safe areas — conductor (clases propias del HTML) */
.driver-bottom-nav {
  padding: 0.45rem 0 calc(0.85rem + var(--safe-bottom)) !important;
}
.dnav-tab {
  min-height: var(--touch-min);
  justify-content: center;
}
.main-action-btn {
  min-height: 52px;
  border-radius: 16px;
}
.toggle-btn {
  min-width: 56px;
  min-height: 32px;
}
.reservas-entry-btn {
  min-height: var(--touch-min);
}
