/* Camada móvel isolada. Não altera a experiência web do Rota Trânsito. */
:root {
  --native-safe-top: env(safe-area-inset-top, 0px);
  --native-safe-right: env(safe-area-inset-right, 0px);
  --native-safe-bottom: env(safe-area-inset-bottom, 0px);
  --native-safe-left: env(safe-area-inset-left, 0px);
}
html[data-native-app="true"] {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
html[data-native-app="true"] body {
  min-height: 100dvh;
}

/* Proporção Android v0.2 — compactação moderada para telas altas e estreitas. */
@media (max-width: 560px) {
  html[data-native-app="true"] .topbar {
    min-height: 62px !important;
    padding: 7px 9px !important;
  }
  html[data-native-app="true"] .logo-menu-btn {
    width: 43px !important;
    height: 43px !important;
    border-radius: 12px !important;
  }
  html[data-native-app="true"] .brand-title {
    font-size: 15px !important;
    letter-spacing: .03em !important;
  }
  html[data-native-app="true"] .brand-sub {
    font-size: 9px !important;
  }
  html[data-native-app="true"] .update-notification,
  html[data-native-app="true"] .theme-toggle,
  html[data-native-app="true"] .profile-pill {
    width: 33px !important;
    height: 33px !important;
  }
  html[data-native-app="true"] main {
    padding: 10px 10px 14px !important;
    padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
  }
  html[data-native-app="true"] .hero {
    padding: 7px 0 12px !important;
  }
  html[data-native-app="true"] .hero h1,
  html[data-native-app="true"] .admin-head h1 {
    margin: 6px 0 8px !important;
    font-size: 26px !important;
    line-height: 1.07 !important;
  }
  html[data-native-app="true"] .hero p {
    margin: 0 !important;
    font-size: 12.5px !important;
    line-height: 1.48 !important;
  }
  html[data-native-app="true"] .search-wrap {
    margin: 12px 0 10px !important;
  }
  html[data-native-app="true"] .search {
    min-height: 52px !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    font-size: 14px !important;
  }
  html[data-native-app="true"] .colloquial-search-help {
    gap: 7px !important;
    margin: 8px 0 11px !important;
    padding: 10px !important;
    border-radius: 14px !important;
  }
  html[data-native-app="true"] .colloquial-search-help strong {
    font-size: 11px !important;
  }
  html[data-native-app="true"] .colloquial-search-help small {
    font-size: 9px !important;
  }
  html[data-native-app="true"] .colloquial-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 3px !important;
    scrollbar-width: none;
  }
  html[data-native-app="true"] .colloquial-chips::-webkit-scrollbar {
    display: none;
  }
  html[data-native-app="true"] .colloquial-chips .chip {
    flex: 0 0 auto !important;
    padding: 8px 12px !important;
    font-size: 10.5px !important;
  }
  html[data-native-app="true"] .filter-panel {
    margin: 8px 0 !important;
    padding: 11px !important;
    border-radius: 14px !important;
  }
  html[data-native-app="true"] .filter-toggle {
    min-height: 34px !important;
    font-size: 14px !important;
  }
  html[data-native-app="true"] .section-head {
    margin: 14px 0 8px !important;
  }
  html[data-native-app="true"] .section-head h2 {
    font-size: 14px !important;
  }
  html[data-native-app="true"] .section-head small {
    font-size: 9.5px !important;
  }
  html[data-native-app="true"] .list {
    gap: 8px !important;
  }
  html[data-native-app="true"] .card {
    padding: 12px !important;
    border-radius: 15px !important;
  }
  html[data-native-app="true"] .card h3 {
    margin: 7px 0 5px !important;
    font-size: 14.5px !important;
    line-height: 1.34 !important;
  }
  html[data-native-app="true"] .meta {
    gap: 6px !important;
    font-size: 10.5px !important;
  }
  html[data-native-app="true"] .card-actions-open-only .card-action {
    min-height: 42px !important;
    padding: 9px 11px !important;
    font-size: 10.5px !important;
  }
  html[data-native-app="true"] .bottom-nav {
    padding: 5px 4px calc(6px + env(safe-area-inset-bottom)) !important;
  }
  html[data-native-app="true"] .nav-btn {
    min-height: 48px !important;
    gap: 4px !important;
  }
  html[data-native-app="true"] .nav-btn b {
    font-size: 21px !important;
    margin-bottom: 1px !important;
  }
  html[data-native-app="true"] .nav-btn span {
    min-height: 18px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 1px;
    white-space: normal !important;
    font-size: 8.2px !important;
    line-height: 1.05 !important;
    text-align: center;
  }
  html[data-native-app="true"] .nav-btn.nav-primary {
    min-height: 62px !important;
    margin-top: -15px !important;
  }
  html[data-native-app="true"] .nav-btn.nav-primary b {
    width: 47px !important;
    height: 47px !important;
    font-size: 23px !important;
  }
  html[data-native-app="true"] .quick-report-button {
    bottom: calc(74px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 380px) {
  html[data-native-app="true"] .brand-title {
    font-size: 14px !important;
  }
  html[data-native-app="true"] .hero h1,
  html[data-native-app="true"] .admin-head h1 {
    font-size: 24px !important;
  }
  html[data-native-app="true"] .hero p {
    font-size: 12px !important;
  }
}


/* v1.12.13 convite Play Store (Android web) */
#rota-play-invite{position:fixed;left:12px;right:12px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:9999;max-width:520px;margin:0 auto;padding:14px;border:1px solid rgba(28,211,197,.38);border-radius:18px;background:rgba(6,17,20,.97);box-shadow:0 14px 34px rgba(0,0,0,.35);backdrop-filter:blur(12px);color:#f3f6f8;box-sizing:border-box}
#rota-play-invite .rpi-row{display:grid;grid-template-columns:44px 1fr;gap:11px;align-items:center}
#rota-play-invite img{width:44px;height:44px;border-radius:12px;display:block}
#rota-play-invite strong{display:block;font-size:16px;line-height:1.25}
#rota-play-invite p{margin:4px 0 0;font-size:14px;line-height:1.4;color:#b8c5cb}
#rota-play-invite .rpi-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}
#rota-play-invite .rpi-install,#rota-play-invite .rpi-later{min-height:44px;border-radius:12px;font-weight:850;font-size:14px;padding:0 14px}
#rota-play-invite .rpi-install{border:0;background:#22d3c5;color:#04231f}
#rota-play-invite .rpi-later{border:1px solid rgba(255,255,255,.14);background:transparent;color:#d9e2e6}
@media(min-width:700px){#rota-play-invite{left:auto;right:18px;width:420px}}


/* v1.12.15 — desativa PWA/atalho antigo e migra para Play Store */
#rota-legacy-shortcut-block{position:fixed;inset:0;z-index:2147483647;background:rgba(3,10,12,.97);display:grid;place-items:center;padding:22px;box-sizing:border-box;color:#f3f6f8}
#rota-legacy-shortcut-block .rls-card{width:min(100%,430px);border:1px solid rgba(28,211,197,.35);border-radius:24px;background:#071417;padding:24px;text-align:center;box-shadow:0 22px 60px rgba(0,0,0,.45);box-sizing:border-box}
#rota-legacy-shortcut-block img{width:76px;height:76px;border-radius:20px;display:block;margin:0 auto 14px}
#rota-legacy-shortcut-block .rls-tag{display:inline-block;font-size:11px;font-weight:900;letter-spacing:.09em;color:#f6c344;margin-bottom:7px}
#rota-legacy-shortcut-block h2{font-size:24px;line-height:1.15;margin:3px 0 8px}
#rota-legacy-shortcut-block p{font-size:16px;line-height:1.5;color:#c1ccd1;margin:0 0 18px}
#rota-legacy-shortcut-block a{display:flex;align-items:center;justify-content:center;min-height:52px;border-radius:14px;text-decoration:none;font-size:16px;font-weight:900;margin-top:9px;padding:0 14px;box-sizing:border-box}
#rota-legacy-shortcut-block .rls-play{background:#22d3c5;color:#04231f}
#rota-legacy-shortcut-block .rls-web{border:1px solid rgba(255,255,255,.17);color:#e7eef1;background:transparent}
#rota-legacy-shortcut-block small{display:block;margin-top:16px;color:#84969e;font-size:12px;line-height:1.45}
