  /* ---- Design tokens (brand guide). Use these instead of hard-coded colours. ---- */
  @font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url(vendor/inter/inter-latin-wght-normal.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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url(vendor/inter/inter-latin-ext-wght-normal.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; }
  :root {
    color-scheme: only light; /* the app is light only: stops the phone's browser from forcing a dark version */
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --color-brand: #4CAF50; --color-brand-dark: #1B5E20; --color-brand-light: #81C784; --color-brand-tint: #E8F5E9;
    --color-clean: #4CAF50; --color-moderate: #FFC107; --color-dirty: #FF9800; --color-very-dirty: #F44336; --color-critical: #B71C1C;
    --color-background: #F8FAF7; --color-surface: #FFFFFF; --color-border: #E5E7EB;
    --color-text: #1F2937; --color-text-secondary: #6B7280;
    --radius-card: 16px; --radius-button: 12px; --space-unit: 8px;
    --shadow-soft: 0 1px 3px rgba(31,41,55,.10), 0 4px 12px rgba(31,41,55,.06);
    /* older names, kept so every rule uses the tokens */
    --green: var(--color-brand); --green-dark: var(--color-brand-dark); --ink: var(--color-text); --muted: var(--color-text-secondary); --line: var(--color-border);
  }
  html, body { margin: 0; height: 100%; font-family: var(--font); }
  body { overflow: hidden; }
  html, body { overscroll-behavior: none; } /* no pull-to-refresh or edge-swipe navigation at the page level */
  #map { position: absolute; inset: 0; }
  .box { position: absolute; background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.3); padding: 10px 12px; font-size: 13px; }
  .demo-tag { align-self: center; background: #fff3cd; color: #7a5b00; font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 2px 7px; border-radius: 999px; }
  .muted { color: #666; }
  .card { z-index: 10; position: absolute; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.22); font-size: 14px; }
  .card h2 { margin: 0; font-size: 17px; }
  .card .hint { margin: 4px 0 0; color: var(--muted); line-height: 1.4; }
  .card button { font: inherit; cursor: pointer; }
  .card button:disabled { opacity: .5; cursor: default; }
  .card .actions { display: flex; gap: 8px; margin-top: 14px; }
  .card .actions button { flex: 1; padding: 12px; font-size: 15px; font-weight: 600; border: 0; border-radius: 12px; }
  .primary { background: var(--green); color: #fff; }
  .primary:not(:disabled):hover { background: var(--green-dark); }
  .secondary { background: var(--color-background); color: var(--ink); }
  .ghost { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--ink); margin-top: 10px; }
  .link { background: none; border: 0; color: var(--green); font-weight: 600; padding: 4px; }
  #pin { position: absolute; left: 50%; top: 50%; width: 0; height: 0; display: none; pointer-events: none; }
  #pin::before { content: "📍"; position: absolute; font-size: 36px; line-height: 1; transform: translate(-50%, -100%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
  #pin::after { content: ""; position: absolute; width: 10px; height: 4px; margin: -2px 0 0 -5px; border-radius: 50%; background: rgba(0,0,0,.3); }
  .placed-pin { font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
  #place { top: 12px; left: 50%; transform: translateX(-50%); width: min(380px, calc(100% - 24px)); padding: 16px; display: none; }
  #place .coords { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; margin-top: 8px; }
  #report { left: 50%; bottom: 0; transform: translateX(-50%); width: min(460px, 100%); max-height: 85%; overflow: auto; box-sizing: border-box; border-radius: 20px 20px 0 0; padding: 8px 16px 20px; display: none; }
  #report .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--color-border); margin: 0 auto 10px; }
  #report .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  /* Camera screen ("Registrar local") */
  .screen { position: fixed; inset: 0; z-index: 20; background: #fff; display: none; flex-direction: column; }
  .screen .cam { display: flex; flex-direction: column; width: 100%; height: 100%; background: #fff; box-sizing: border-box; padding: 0 16px 12px; }
  .screen .cam-head { display: flex; align-items: center; justify-content: space-between; height: 56px; flex: none; }
  .screen .cam-head h2 { font-size: 17px; }
  .screen .icon-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 50%; color: var(--ink); padding: 0; }
  .screen .icon-btn:hover { background: var(--color-background); }
  .screen .viewfinder { position: relative; flex: 1; min-height: 0; border-radius: 20px; overflow: hidden; background: #101612; }
  .screen .viewfinder video, .screen .viewfinder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .screen .corner { position: absolute; width: 34px; height: 34px; border: 0 solid var(--color-brand); pointer-events: none; }
  .screen .tl { top: 10px; left: 10px; border-top-width: 5px; border-left-width: 5px; border-top-left-radius: 14px; }
  .screen .tr { top: 10px; right: 10px; border-top-width: 5px; border-right-width: 5px; border-top-right-radius: 14px; }
  .screen .bl { bottom: 10px; left: 10px; border-bottom-width: 5px; border-left-width: 5px; border-bottom-left-radius: 14px; }
  .screen .br { bottom: 10px; right: 10px; border-bottom-width: 5px; border-right-width: 5px; border-bottom-right-radius: 14px; }
  .screen .caption { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 64px); text-align: center; background: rgba(30,30,30,.62); color: #fff; padding: 10px 20px; border-radius: 12px; font-size: 15px; line-height: 1.35; }
  .screen .cam-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 24px 24px 90px; color: var(--color-border); line-height: 1.45; }
  .screen .cam-controls { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 6px; flex: none; }
  .screen .side-btn { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ink); border-radius: 14px; padding: 0; }
  .screen .side-btn:hover { background: var(--color-background); }
  .screen .shutter { width: 78px; height: 78px; border-radius: 50%; background: var(--color-brand); border: 5px solid #fff; box-shadow: 0 0 0 3px var(--ink); padding: 0; transition: transform .08s; }
  .screen .shutter:active { transform: scale(.93); }
  .screen .shutter:disabled { opacity: .55; }
  .screen .cam-tabs { display: flex; justify-content: space-around; border-top: 1px solid var(--line); margin: 6px -16px 0; padding: 0 16px; flex: none; }
  .screen .cam-tabs button { background: none; border: 0; padding: 12px 18px 10px; font-size: 16px; color: var(--muted); border-bottom: 3px solid transparent; }
  .screen .cam-tabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--color-brand); }
  .screen .cam-review { display: none; gap: 8px; padding-top: 12px; flex: none; }
  .screen .cam-review button { flex: 1; padding: 14px; font-size: 16px; font-weight: 600; border: 0; border-radius: 12px; }
  .screen .error { text-align: center; flex: none; }
  @media (min-width: 700px) {
    .screen { background: rgba(0,0,0,.45); align-items: center; justify-content: center; }
    .screen .cam { width: 440px; height: min(820px, calc(100dvh - 32px)); border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
  }
  #report .status { font-size: 15px; margin: 10px 0; }
  #report .score { font-size: 34px; font-weight: 700; }
  #report .score small { font-size: 14px; font-weight: 400; color: var(--muted); }
  #report .meter { height: 10px; background: #eee; border-radius: 5px; overflow: hidden; margin: 6px 0 8px; }
  #report .meter > div { height: 100%; }
  .error { color: var(--color-critical); margin-top: 8px; }
  .error:empty { display: none; }
  .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #ccc; border-top-color: var(--color-brand-dark); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ---- Map screen chrome: brand bar, search, level chips, bottom navigation ---- */
  #topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 6; background: #fff; border-radius: 0 0 22px 22px; box-shadow: 0 4px 18px rgba(0,0,0,.18); padding: 10px 14px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
  #topbar .brand-row { display: flex; align-items: center; justify-content: center; position: relative; height: 40px; }
  #topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--green); letter-spacing: -.2px; }
  #topbar .bell { position: absolute; right: 0; top: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 50%; color: var(--ink); padding: 0; cursor: pointer; }
  #topbar .bell:hover { background: var(--color-background); }
  #search-form { display: flex; align-items: center; gap: 8px; background: var(--color-background); border-radius: 14px; padding: 0 12px; margin-top: 6px; }
  #search-form svg { flex: none; color: var(--muted); }
  #search { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 15px; padding: 12px 0; outline: none; color: var(--ink); }
  #search-clear { background: none; border: 0; font-size: 20px; line-height: 1; color: var(--muted); padding: 4px; cursor: pointer; display: none; }
  #results { list-style: none; margin: 8px 0 0; padding: 0; display: none; border-top: 1px solid var(--line); max-height: 240px; overflow: auto; }
  #results li { padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; line-height: 1.35; }
  #results li:hover { background: var(--color-background); }
  #results li.empty { color: var(--muted); cursor: default; }
  #chips { position: absolute; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 4px 12px 8px; scrollbar-width: none; }
  #chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; display: flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid transparent; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.2); padding: 8px 14px; font: 600 14px var(--font); color: var(--ink); cursor: pointer; }
  .chip .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--color-text-secondary)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
  .chip[aria-pressed="true"] { border-color: var(--green); background: #E8F5E9; }
  #nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; display: flex; align-items: flex-end; justify-content: space-around; background: #fff; box-shadow: 0 -4px 18px rgba(0,0,0,.16); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  #nav .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 4px 0; font: 500 11px var(--font); color: var(--muted); cursor: pointer; }
  #nav .nav-item.on { color: var(--green); font-weight: 700; }
  #nav .nav-add { flex: none; width: 56px; height: 56px; margin: -22px 6px 0; border-radius: 50%; background: var(--green); color: #fff; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(27,127,59,.45); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
  #nav .nav-add:hover { background: var(--green-dark); }
  #toast { position: absolute; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9; background: rgba(29,42,34,.92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; display: none; }
  .maplibregl-ctrl-bottom-right { bottom: calc(128px + env(safe-area-inset-bottom)); }
  .maplibregl-ctrl-bottom-left { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* ---- Analysis screen ("Análise da imagem") ---- */
  .screen .an-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 6px; }
  .screen .an-photo { display: block; width: 100%; height: 200px; object-fit: cover; border-radius: 16px; background: var(--color-border); }
  .screen .an-score { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--lvl, var(--color-very-dirty)) 12%, #fff); }
  .screen .an-badge { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--lvl, var(--color-very-dirty)); display: flex; align-items: center; justify-content: center; }
  .screen .an-level { font-size: 20px; font-weight: 700; color: var(--lvl, var(--color-very-dirty)); }
  .screen .an-num { font-size: 22px; font-weight: 700; color: var(--lvl, var(--color-very-dirty)); }
  .screen .an-num small { font-size: 14px; font-weight: 500; }
  .screen h3 { margin: 18px 0 8px; font-size: 15px; }
  .screen .an-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .screen .an-item { display: flex; align-items: center; gap: 8px; background: var(--color-background); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
  .screen .an-item .ico { font-size: 18px; line-height: 1; }
  .screen .an-none { color: var(--muted); font-size: 14px; grid-column: 1 / -1; }
  .screen .an-place { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
  .screen .an-place .pin { font-size: 26px; }
  .screen .an-place small { display: block; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
  .screen .an-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; flex: none; }
  .screen .an-actions button { padding: 15px; font-size: 16px; font-weight: 600; border-radius: 12px; border: 0; cursor: pointer; }
  .screen .an-actions .outline { background: #fff; color: var(--green); border: 2px solid var(--green); }
  .screen .an-actions button:disabled { opacity: .55; cursor: default; }

  /* ---- Place screen ("Detalhes do local") ---- */
  .screen .dt-hero { position: relative; }
  .screen .dt-badge { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; background: var(--lvl, var(--color-very-dirty)); color: #fff; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; }
  .screen .dt-date { position: absolute; right: 10px; bottom: 10px; background: rgba(30,30,30,.6); color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 8px; }
  .screen .dt-title { font-size: 19px; font-weight: 700; margin-top: 14px; }
  .screen .dt-sub { color: var(--muted); margin-top: 2px; }
  .screen .dt-desc { margin: 10px 0 0; line-height: 1.45; color: var(--ink); }
  .screen .dt-chart { border-top: 1px solid var(--line); padding-top: 4px; }
  .screen .dt-chart svg { display: block; width: 100%; height: auto; }
  .screen .dt-chart .none { color: var(--muted); font-size: 14px; padding: 14px 0; }
  .screen .dt-photos-head { display: flex; align-items: center; justify-content: space-between; }
  .screen .dt-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .screen .dt-photos.all { flex-wrap: wrap; overflow: visible; }
  .screen .dt-photos img { flex: none; width: 76px; height: 76px; object-fit: cover; border-radius: 12px; border: 3px solid transparent; cursor: pointer; background: var(--color-border); }
  .screen .dt-photos img.on { border-color: var(--green); }

  /* ---- Swipe pages: Explorar | Mapa | Perfil ---- */
  #pager { position: fixed; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  #pager::-webkit-scrollbar { display: none; }
  .page { flex: 0 0 100%; width: 100%; height: 100%; position: relative; box-sizing: border-box; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; }
  #page-map { overflow: hidden; }
  /* the map eats horizontal drags, so a thin strip on each edge hands them to the pager */
  .edge { position: absolute; top: 0; bottom: 0; width: 14px; z-index: 4; touch-action: pan-x; }
  .edge-l { left: 0; }
  .edge-r { right: 0; }
  body:not([data-page="map"]) #topbar, body:not([data-page="map"]) #chips, body:not([data-page="map"]) #chips2, body:not([data-page="map"]) #filter-root { display: none; }
  .tab-page { background: var(--color-background); padding: calc(12px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom)); color: var(--ink); }
  .tab-page > * { max-width: 560px; margin-left: auto; margin-right: auto; }
  .page-head h1 { font-size: 24px; margin: 8px 0 16px; }
  .empty-state { text-align: center; background: #fff; border-radius: 20px; padding: 32px 22px; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
  .empty-state .emoji { font-size: 44px; }
  .empty-state h2 { margin: 8px 0 6px; font-size: 19px; }
  .empty-state p, .pf-card p { color: var(--muted); line-height: 1.5; margin: 0 0 16px; }
  .pf-card { background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
  .pf-card h2 { margin: 0 0 6px; font-size: 19px; }
  .pf-who { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
  .pf-who b { display: block; font-size: 18px; }
  .pf-who small { display: block; color: var(--muted); margin-top: 2px; word-break: break-all; }
  .avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
  .role-badge { display: inline-block; margin-top: 6px; background: #E8F5E9; color: var(--green-dark); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
  .pf-info { color: var(--muted); font-size: 13px; margin: 8px 2px 4px; min-height: 1em; }
  .btn { display: block; width: 100%; font: inherit; font-size: 16px; font-weight: 600; padding: 14px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; margin-top: 10px; box-sizing: border-box; }
  .btn:disabled { opacity: .55; cursor: default; }
  .btn.primary { background: var(--green); color: #fff; }
  .btn.outline { background: #fff; color: var(--green); border-color: var(--green); }
  .btn.plain { background: var(--color-background); color: var(--ink); }
  /* account button in the top bar */
  #topbar .acct { left: 0; right: auto; }
  .acct-initial { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
  /* login screen */
  .screen .au-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px 16px; }
  .au-why { color: var(--muted); margin: 4px 0 12px; line-height: 1.4; }
  .au-why:empty { display: none; }
  .au-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
  .au-tabs button { flex: 1; background: none; border: 0; padding: 12px; font: inherit; font-size: 16px; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
  .au-tabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--green); }
  #au-form label, #ep-form label { display: block; font-size: 13px; color: var(--muted); margin-top: 12px; }
  #au-form input, #ep-form input { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--ink); background: var(--color-background); border: 1.5px solid transparent; border-radius: 12px; padding: 13px 14px; margin-top: 5px; }
  #au-form input:focus, #ep-form input:focus, #ep-form textarea:focus, #ep-form select:focus { outline: none; border-color: var(--green); background: #fff; }
  #au-form .error, #ep-form .error { margin-top: 12px; min-height: 1em; }
  .au-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0 6px; }
  .au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .au-google { display: flex; justify-content: center; margin-top: 12px; min-height: 0; }

  /* ---- Moderation screen ---- */
  .count-badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: #fff; color: var(--green-dark); font-size: 13px; font-weight: 700; }
  .count-badge:empty { display: none; }
  .screen .rv-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 2px 16px; }
  .rv-body h3 { font-size: 15px; margin: 18px 0 8px; }
  .rv-empty { text-align: center; color: var(--muted); padding: 40px 12px; line-height: 1.5; }
  .rv-card { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 14px; background: #fff; }
  .rv-photo { position: relative; }
  .rv-photo img, .rv-nophoto { display: block; width: 100%; height: 190px; object-fit: cover; border-radius: 12px; background: var(--color-border); }
  .rv-nophoto { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); padding: 12px; box-sizing: border-box; font-size: 14px; line-height: 1.4; }
  .rv-tag { position: absolute; left: 8px; top: 8px; background: rgba(30,30,30,.7); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; }
  .rv-reason { margin: 10px 0 4px; font-weight: 600; line-height: 1.35; }
  .rv-meta { color: var(--muted); font-size: 13px; line-height: 1.4; }
  .rv-meta .link { padding: 0; font-size: 13px; }
  .rv-sev { margin: 12px 0 2px; }
  .rv-sev label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
  .rv-sev b { color: var(--lvl, var(--ink)); }
  .rv-sev input[type=range] { width: 100%; margin: 6px 0 0; accent-color: var(--lvl, var(--green)); }
  .rv-actions { display: flex; gap: 8px; margin-top: 10px; }
  .rv-actions .btn { margin-top: 0; padding: 11px; font-size: 15px; }
  .rv-actions .btn.danger { background: #fff; color: var(--color-critical); border-color: var(--color-critical); }
  .rv-actions .btn.danger.armed { background: var(--color-critical); color: #fff; }
  .rv-card .error { text-align: left; margin-top: 8px; }

  /* ---- Profile grid ("Minhas fotos") ---- */
  .pf-feed { margin-top: 20px; }
  .pf-feed h3 { font-size: 15px; margin: 18px 2px 8px; }
  .pf-stats { display: flex; justify-content: space-around; text-align: center; background: #fff; border-radius: 16px; padding: 14px 6px; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
  .pf-stats b { display: block; font-size: 20px; }
  .pf-stats span { color: var(--muted); font-size: 13px; }
  .feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 12px; overflow: hidden; }
  .feed-cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--color-border); overflow: hidden; cursor: pointer; display: block; }
  .feed-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .feed-cell .wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--muted); }
  .feed-dot { position: absolute; left: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
  .feed-state { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(20,28,23,.72); color: #fff; font-size: 11px; font-weight: 600; text-align: center; padding: 3px 2px; }
  .mp-status { margin: 12px 2px 0; padding: 10px 12px; border-radius: 12px; background: var(--color-background); line-height: 1.4; }
  .screen .an-actions .outline.armed { background: var(--color-critical); border-color: var(--color-critical); color: #fff; }

  /* ---- profile: impact, tabs, places ---- */
  .pf-impact { display: flex; gap: 8px; margin-top: 12px; }
  .pf-impact > div { flex: 1; background: linear-gradient(135deg, var(--color-brand-dark), var(--color-brand)); color: #fff; border-radius: 14px; padding: 10px 6px; text-align: center; }
  .pf-impact b { display: block; font-size: 19px; }
  .pf-impact span { font-size: 11.5px; opacity: .92; }
  .pf-tabs { display: flex; gap: 4px; margin: 14px 0 8px; background: var(--color-border); border-radius: 12px; padding: 3px; }
  .pf-tabs button { flex: 1; border: 0; background: transparent; padding: 8px 2px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
  .pf-tabs button.on { background: #fff; color: var(--green); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
  .pf-sort { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
  .pf-sort select { border: 1px solid var(--color-border); border-radius: 8px; padding: 5px 6px; background: #fff; font-size: 13px; }
  .chip-mini { border: 1px solid var(--color-border); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }
  .chip-mini.on { background: var(--green); color: #fff; border-color: var(--green); }
  .feed-score { position: absolute; left: 5px; top: 5px; min-width: 24px; padding: 1px 6px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; text-align: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
  .places-list { display: flex; flex-direction: column; gap: 8px; }
  .place-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 0; border-radius: 14px; padding: 8px; text-align: left; cursor: pointer; box-shadow: 0 1px 6px rgba(0,0,0,.08); width: 100%; }
  .place-row img, .place-row .ph { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--color-border); flex: none; }
  .place-row b { display: block; font-size: 14.5px; }
  .place-row small { color: var(--muted); font-size: 12.5px; }
  .place-row .lvl { margin-left: auto; font-weight: 700; font-size: 13px; padding-right: 6px; }

  /* ---- map filters (period, type), explore rankings, trend ---- */
  #chips2 { position: absolute; left: 0; right: 0; bottom: calc(126px + env(safe-area-inset-bottom)); z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 2px 12px; scrollbar-width: none; align-items: center; }
  #chips2::-webkit-scrollbar { display: none; }
  .chip.mini { padding: 5px 11px; font-size: 12.5px; box-shadow: 0 1px 6px rgba(0,0,0,.2); }
  #type-filter { flex: none; border: 1.5px solid transparent; border-radius: 999px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.2); padding: 5px 8px; font: 600 12.5px var(--font); color: var(--ink); }
  #type-filter.on { border-color: var(--green); background: #E8F5E9; }

  /* ---- Novo painel de filtros unificado ---- */
  #filter-panel { position: absolute; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
  #filter-pill { pointer-events: all; display: flex; align-items: center; gap: 6px; background: #fff; border: none; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.22); padding: 7px 14px 7px 10px; font: 600 13px var(--font); cursor: pointer; color: var(--ink); }
  .fp-chip { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--color-background); }
  .fp-chip--dirt[data-level="todos"]     { background: #ECEFF1; color: #546E7A; }
  .fp-chip--dirt[data-level="limpo"]     { background: #E8F5E9; color: #2E7D32; }
  .fp-chip--dirt[data-level="moderado"]  { background: #FFF8E1; color: #F57F17; }
  .fp-chip--dirt[data-level="sujo"]      { background: #FFF3E0; color: #E65100; }
  .fp-chip--dirt[data-level="muito-sujo"]{ background: #FFEBEE; color: #C62828; }
  .fp-chip--dirt[data-level="critico"]   { background: #880E4F; color: #fff; }
  .fp-hint { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .2px; }

  #filter-expanded { pointer-events: all; position: absolute; bottom: calc(100% + 8px); left: 12px; right: 12px; background: #fff; border-radius: 20px; box-shadow: 0 8px 32px rgba(0,0,0,.2); padding: 0 0 8px; overflow: hidden; max-height: calc(100dvh - 180px); overflow-y: auto; }
  .fp-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
  .fp-title { font-size: 15px; font-weight: 700; color: var(--ink); }
  .fp-close { background: none; border: none; font-size: 16px; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
  .fp-close:hover { background: var(--color-background); }
  .fp-section { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
  .fp-section:last-of-type { border-bottom: none; }
  .fp-label { margin: 0 0 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }

  /* Slider de período */
  .fp-slider { display: flex; align-items: center; padding: 4px 8px; }
  .fp-node { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0; border-radius: 50%; position: relative; }
  .fp-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--color-border); background: #fff; transition: all .15s; }
  .fp-node[aria-checked="true"] .fp-dot { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px rgba(76,175,80,.2); }
  .fp-node:hover .fp-dot { border-color: var(--green); }
  .fp-track { flex: 1; height: 3px; background: var(--color-border); border-radius: 2px; transition: background .15s; }
  .fp-track.fp-filled { background: var(--green); }
  .fp-slider-legend { display: flex; justify-content: space-between; padding: 4px 10px 0; }
  .fp-slider-legend span { font-size: 11px; color: var(--muted); font-weight: 500; width: 32px; text-align: center; }

  /* Tipo de lixo */
  #type-filter { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 12px; font: 500 14px var(--font); color: var(--ink); box-shadow: none; }

  /* Cards de sujeira */
  .fp-dirt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .fp-dirt-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; border: 2px solid transparent; background: var(--color-background); cursor: pointer; font: 600 11.5px var(--font); color: var(--ink); transition: all .15s; }
  .fp-dirt-card:hover { border-color: var(--green); }
  .fp-dirt-card[aria-checked="true"] { border-color: var(--green); background: #E8F5E9; transform: scale(1.04); }
  .fp-dirt-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); }
  .fp-dirt-card[data-level="todos"]     .fp-dirt-dot { background: #90A4AE; }
  .fp-dirt-card[data-level="limpo"]     .fp-dirt-dot { background: var(--color-clean); }
  .fp-dirt-card[data-level="moderado"]  .fp-dirt-dot { background: var(--color-moderate); }
  .fp-dirt-card[data-level="sujo"]      .fp-dirt-dot { background: var(--color-dirty); }
  .fp-dirt-card[data-level="muito-sujo"].fp-dirt-dot { background: var(--color-very-dirty); }
  .fp-dirt-card[data-level="critico"]   .fp-dirt-dot { background: var(--color-critical); }

  .fp-apply { display: block; width: calc(100% - 32px); margin: 8px 16px 4px; padding: 14px; background: var(--green); color: #fff; border: none; border-radius: 12px; font: 700 15px var(--font); cursor: pointer; }
  .fp-apply:hover { background: var(--green-dark); }
  .ex-bar { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 0; color: var(--muted); font-size: 13px; }
  .ex-h { font-size: 15px; margin: 16px 2px 8px; }
  .ex-note { color: var(--muted); font-size: 13px; margin: 18px 2px 8px; }
  .trend { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
  .trend.worse { background: #fde7e4; color: var(--color-critical); }
  .trend.better { background: #e3f4e8; color: var(--color-brand-dark); }
  .trend.stable { background: #eceff0; color: var(--color-text-secondary); }
  .place-row .rank { width: 28px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
  .dt-trend { margin: 2px 0 8px; }
  .place-row .meta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

  /* ---- notifications ---- */
  .bell { position: relative; }
  .bell-count { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--color-very-dirty); color: #fff; font: 700 11px/17px var(--font); text-align: center; box-sizing: border-box; }
  .nav-item { position: relative; }
  .nav-item .bell-count { top: 0; right: calc(50% - 22px); }
  .al-item { display: flex; gap: 12px; align-items: center; background: #fff; border: 0; border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; width: 100%; box-shadow: 0 1px 6px rgba(0,0,0,.08); margin-bottom: 8px; }
  .al-item.unread { box-shadow: inset 4px 0 0 var(--green), 0 1px 6px rgba(0,0,0,.08); }
  .al-item .ico { font-size: 26px; flex: none; }
  .al-item b { display: block; font-size: 14.5px; }
  .al-item small { color: var(--muted); font-size: 12.5px; }
  #dt-follow.on { background: var(--green); color: #fff; }

  /* ---- consent, terms and privacy ---- */
  .au-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; margin: 6px 0 4px; color: var(--ink); }
  .au-consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--green); }
  .au-consent .link, .pf-legal .link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }
  .lg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 4px 16px; }
  .lg-body h3 { font-size: 15px; margin: 18px 0 4px; }
  .lg-body p { margin: 0; color: var(--color-text); line-height: 1.55; font-size: 14.5px; }
  .lg-body .lg-version { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
  .pf-legal { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 2px; }
  .btn.danger { color: var(--color-critical); }
  .btn.danger.armed { background: var(--color-critical); color: #fff; }

  /* ---- Instagram-like profile ---- */
  .tab-page .ig-profile, .tab-page .pf-feed { max-width: 560px; }
  .ig-top { display: flex; align-items: center; justify-content: space-between; margin: 0 -6px 6px; }
  .ig-top .icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0; }
  .ig-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .ig-name b { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
  .ig-name .role-badge { margin: 0; }
  .ig-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-very-dirty); flex: none; }
  .ig-head { display: flex; align-items: center; gap: 22px; margin: 8px 0 12px; }
  .ig-ring { flex: none; width: 92px; height: 92px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--color-brand), var(--color-moderate), var(--color-brand)); display: flex; }
  .ig-ring .avatar { width: 100%; height: 100%; font-size: 36px; border: 3px solid var(--color-background); box-sizing: border-box; }
  .ig-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
  .ig-stats b { display: block; font-size: 19px; }
  .ig-stats span { font-size: 13.5px; color: var(--ink); }
  .ig-bio { font-size: 14.5px; line-height: 1.4; }
  .ig-bio b { display: block; font-size: 15px; }
  .ig-bio div:empty { display: none; }
  .ig-bio #pf-about { white-space: pre-line; overflow-wrap: anywhere; }
  .ig-bio #pf-site { color: var(--color-brand-dark); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
  .avatar img, .acct-initial img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
  .avatar, .acct-initial { overflow: hidden; }
  .ep-photo { display: flex; align-items: center; gap: 14px; padding: 6px 0 4px; }
  .ep-photo .btn { margin-right: 6px; }
  .ep-count { float: right; }
  #ep-form textarea, #ep-form select { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--ink); background: var(--color-background); border: 1.5px solid transparent; border-radius: 12px; padding: 13px 14px; margin-top: 5px; resize: vertical; }
  #ep-form input:disabled { opacity: .6; }
  #ep-form input[type=file] { display: none; }
  #ep-form .btn.primary { width: 100%; margin-top: 16px; }
  .ig-actions { display: flex; gap: 8px; margin: 12px 0 14px; }
  .ig-actions .btn { margin: 0; padding: 9px 6px; font-size: 14.5px; border-radius: 10px; }
  .ig-high { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
  .ig-high::-webkit-scrollbar { display: none; }
  .hl { flex: none; width: 70px; background: none; border: 0; padding: 0; text-align: center; cursor: pointer; color: var(--ink); font: inherit; }
  .hl .circle { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: var(--ring, var(--color-border)); display: flex; margin: 0 auto 4px; box-sizing: border-box; }
  .hl .circle > * { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-background); box-sizing: border-box; background: var(--color-border); display: flex; align-items: center; justify-content: center; }
  .hl.new .circle { background: none; border: 1.5px solid var(--color-text-secondary); }
  .hl.new .circle > * { border: 0; background: none; font-size: 30px; color: var(--ink); }
  .hl span.t { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pf-tabs.ig-tabs { background: none; border-radius: 0; padding: 0; margin: 4px -16px 6px; gap: 0; border-top: 1px solid var(--line); }
  .ig-tabs button { padding: 11px 0 9px; border-radius: 0; border-bottom: 2px solid transparent; display: flex; justify-content: center; color: var(--muted); }
  .ig-tabs button.on { background: none; box-shadow: none; color: var(--ink); border-bottom-color: var(--ink); }
  .pf-feed { margin-top: 4px; }
  .pf-feed .feed-grid { margin: 0 -16px; gap: 2px; border-radius: 0; }
  .pf-sort { justify-content: flex-end; }

  /* settings */
  .set-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px 20px; }
  .set-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 20px 4px 6px; }
  .set-who { display: flex; align-items: center; gap: 14px; padding: 6px 4px 4px; }
  .set-who b { display: block; font-size: 18px; }
  .set-who small { display: block; color: var(--muted); word-break: break-all; margin-top: 2px; }
  .set-row { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 15px 6px; font: inherit; font-size: 16px; color: var(--ink); text-align: left; cursor: pointer; }
  .set-row .ico { width: 26px; text-align: center; font-size: 20px; flex: none; }
  .set-row.danger { color: var(--color-critical); }
  .set-row.danger.armed { background: var(--color-critical); color: #fff; border-radius: 10px; }
  .set-row .count-badge { margin-left: auto; background: var(--green); color: #fff; }
  .ig-actions .btn.on { background: var(--green); color: #fff; }

  /* ---- password reset, email confirmation, two-factor ---- */
  .au-forgot { display: block; margin: -4px 0 8px auto; font-size: 14px; }
  .au-info { color: var(--green-dark); font-size: 14px; line-height: 1.4; margin: 4px 0; }
  .au-info:empty { display: none; }
  .pf-verify { display: flex; flex-direction: column; gap: 4px; background: #fff7e0; color: #5b4300; border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; font-size: 14px; line-height: 1.35; }
  .pf-verify .btn { margin: 6px 0 0; padding: 8px; font-size: 14px; border-radius: 10px; }
  .set-state { margin-left: auto; color: var(--muted); font-size: 14px; }
  .tf-p { line-height: 1.5; margin: 12px 4px; font-size: 15px; }
  .tf-secret { display: block; background: var(--color-background); border-radius: 10px; padding: 12px; margin: 8px 4px; font: 600 15px/1.6 ui-monospace, monospace; word-break: break-all; white-space: pre-wrap; user-select: all; }
  .tf-input { display: block; width: calc(100% - 8px); margin: 6px 4px 8px; box-sizing: border-box; font: 600 22px ui-monospace, monospace; letter-spacing: 4px; text-align: center; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
  .tf-link { text-align: center; text-decoration: none; margin: 8px 4px; width: calc(100% - 8px); }
  #twofa .btn { width: calc(100% - 8px); margin-left: 4px; margin-right: 4px; }

  /* Notificações keeps the bottom bar on screen */
  body:has(#alerts[style*="flex"]) #nav { z-index: 25; position: fixed; }
  #alerts .cam { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* Full-size photo: the whole picture, never cropped, on black. Above every screen. */
  #viewer { position: fixed; inset: 0; z-index: 1000; background: #000; display: none; align-items: center; justify-content: center; }
  #viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
  #vw-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; line-height: 1; }
  .screen .an-photo { cursor: zoom-in; }


  /* ==== Brand guide: components (these come last, so they win) ==== */
  html, body, button, input, select, textarea { font-family: var(--font); }
  body { color: var(--color-text); font-size: 16px; line-height: 24px; background: var(--color-background); -webkit-font-smoothing: antialiased; }
  h1, .page-head h1 { font-size: 24px; line-height: 32px; font-weight: 700; }
  .card h2, .empty-state h2, .pf-card h2, .screen .dt-title { font-size: 20px; line-height: 28px; font-weight: 600; }
  .muted, .hint, small { color: var(--color-text-secondary); }

  /* buttons: primary green with white text, secondary white with green border and text */
  .primary, .btn.primary { background: var(--color-brand); color: #fff; border-radius: var(--radius-button); font-size: 16px; font-weight: 600; }
  .primary:not(:disabled):hover, .btn.primary:not(:disabled):hover { background: #43A047; }
  .btn.outline, .screen .an-actions .outline { background: var(--color-surface); color: var(--color-brand-dark); border: 2px solid var(--color-brand); border-radius: var(--radius-button); }
  .secondary, .btn.plain { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); }
  .link, .au-consent .link, .pf-legal .link { color: var(--color-brand-dark); }
  :focus-visible { outline: 3px solid var(--color-brand-light); outline-offset: 2px; }

  /* cards: white, 16 px radius, subtle border */
  .card, .pf-card, .empty-state, .pf-stats, .place-row, .al-item, .rv-card, .screen .an-place {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: none;
  }
  .card { box-shadow: var(--shadow-soft); }
  .al-item.unread { box-shadow: inset 4px 0 0 var(--color-brand); }
  .tab-page { background: var(--color-background); }

  /* inputs: white, light-grey border, clear focus */
  #au-form input, #ep-form input, #ep-form textarea, #ep-form select, .tf-input, .pf-sort select {
    background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-button);
  }
  #au-form input:focus, #ep-form input:focus, #ep-form textarea:focus, #ep-form select:focus, .tf-input:focus {
    border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-tint); outline: none;
  }

  /* top bar and search: white surface, subtle shadow, search field 14 px radius with a border */
  #topbar { background: var(--color-surface); box-shadow: 0 1px 0 var(--color-border), 0 4px 12px rgba(31,41,55,.06); border-radius: 0 0 var(--radius-card) var(--radius-card); }
  #topbar .brand { color: var(--color-brand-dark); font-size: 20px; line-height: 28px; font-weight: 700; }
  #topbar .bell { color: var(--color-text); }
  #search-form { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: 14px; margin-top: 8px; }
  #search-form:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-tint); }
  #search { font-size: 16px; }
  .acct-initial, .avatar { background: var(--color-brand); }

  /* severity legend / filter chips, fixed at the bottom with labels */
  .chip { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); box-shadow: 0 1px 3px rgba(31,41,55,.12); font: 600 14px/20px var(--font); }
  .chip .dot { box-shadow: none; border: 2px solid #fff; outline: 1px solid rgba(31,41,55,.15); }
  .chip[aria-pressed="true"] { border-color: var(--color-brand); background: var(--color-brand-tint); color: var(--color-brand-dark); }
  .chip.mini { font-size: 13px; padding: 6px 12px; }
  #type-filter { background: var(--color-surface); border: 1.5px solid var(--color-border); box-shadow: 0 1px 3px rgba(31,41,55,.12); font: 600 13px var(--font); color: var(--color-text); }
  #type-filter.on { border-color: var(--color-brand); background: var(--color-brand-tint); }

  /* bottom navigation: white, green active item */
  #nav { background: var(--color-surface); box-shadow: 0 -1px 0 var(--color-border), 0 -4px 12px rgba(31,41,55,.05); }
  #nav .nav-item { font: 500 12px/16px var(--font); color: var(--color-text-secondary); }
  #nav .nav-item.on { color: var(--color-brand-dark); font-weight: 700; }
  #nav .nav-add { background: var(--color-brand); box-shadow: 0 4px 12px rgba(76,175,80,.4); }
  #nav .nav-add:hover { background: #43A047; }

  /* map controls: white circular buttons with a subtle shadow */
  .maplibregl-ctrl-group { background: none !important; box-shadow: none !important; display: flex; flex-direction: column; gap: 8px; }
  .maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; border-radius: 50% !important; background-color: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important; box-shadow: 0 1px 3px rgba(31,41,55,.15), 0 2px 8px rgba(31,41,55,.08); }
  .maplibregl-ctrl-group button + button { border-top: 1px solid var(--color-border) !important; }
  .maplibregl-ctrl-group button:hover { background-color: var(--color-background) !important; }

  /* where the report goes: the brand pin instead of an emoji */
  #pin::before, .placed-pin { content: ""; display: block; width: 36px; height: 46px; font-size: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 92'%3E%3Cpath d='M36 88 10 52A30 30 0 1 1 62 52z' fill='%234CAF50' stroke='%23fff' stroke-width='3'/%3E%3Ccircle cx='36' cy='34' r='19' fill='%23fff'/%3E%3Cpath d='M25 23h22v3.5H25zM32 19.5h8v4h-8zM27 28.5h18l-2 17.5H29z' fill='%231B5E20'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 2px 2px rgba(31,41,55,.35)); }
  #pin::before { position: absolute; transform: translate(-50%, -100%); }

  /* severity badges and scores: the fill colour with readable text (dark on yellow and orange) */
  .screen .dt-badge { background: var(--lvl); color: var(--lvl-on, #fff); font-size: 14px; }
  .screen .an-badge { background: var(--lvl); }
  .screen .an-badge svg { color: var(--lvl-on, #fff); }
  .screen .an-level, .screen .an-num, .rv-sev b { color: var(--lvl-ink, var(--lvl)); }
  .screen .an-score { background: color-mix(in srgb, var(--lvl) 14%, #fff); border: 1px solid color-mix(in srgb, var(--lvl) 35%, #fff); }
  .feed-state { font-size: 12px; }
  .bell-count { background: var(--color-very-dirty); }
  .trend.better { color: var(--color-brand-dark); background: var(--color-brand-tint); }
  .pf-impact > div { background: linear-gradient(135deg, var(--color-brand-dark), var(--color-brand)); }
  .ig-ring { background: conic-gradient(var(--color-brand), var(--color-brand-light), var(--color-brand)); }
  .ig-ring .avatar, .hl .circle > * { border-color: var(--color-background); }
  .ig-name b { font-size: 24px; line-height: 32px; }
  .pf-tabs button.on { color: var(--color-brand-dark); }
  .maplibregl-ctrl-attrib { font-size: 11px; }

/* Popup of a papa-lixo / papa-reciclável dot (map.js showEquipamentos). */
.eq-popup { font: 13px/1.4 system-ui, sans-serif; color: #1F2937; }
.eq-popup strong { display: block; margin-bottom: 2px; }
.eq-popup div { color: #4B5563; }

/* SLU routes (rotas.js): truck button with the map controls, bar under the search box, popup. */
.maplibregl-ctrl-group .rotas-btn { display: flex; align-items: center; justify-content: center; color: #374151; }
/* !important: the map buttons above are forced white */
.maplibregl-ctrl-group .rotas-btn--on { background-color: #1565C0 !important; border-color: #1565C0 !important; color: #fff; }
.maplibregl-ctrl-group .rotas-btn--on:hover { background-color: #0D47A1 !important; }
#rotas-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
#rotas-bar[hidden] { display: none; }
#rotas-bar::-webkit-scrollbar { display: none; }
.rotas-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 17px; border: 1.5px solid var(--rota); background: #fff; color: #374151;
  font: 600 14px/1 system-ui, -apple-system, Roboto, sans-serif; cursor: pointer;
}
.rotas-chip--on { background: var(--rota); color: #fff; }
.rotas-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rota); box-shadow: 0 0 0 2px #fff; }
.rotas-chip--on .rotas-dot { background: #fff; box-shadow: none; }
.rotas-close {
  flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: #F3F4F6; color: #374151; font-size: 22px; line-height: 1; cursor: pointer;
}
.rota-popup-wrap .maplibregl-popup-content { padding: 14px 16px 12px; border-radius: 14px; }
.rota-popup-wrap .maplibregl-popup-close-button {
  width: 36px; height: 36px; font-size: 24px; line-height: 1; color: #6B7280; border-radius: 0 14px 0 14px;
}
.rota-popup { font: 13px/1.45 system-ui, -apple-system, Roboto, sans-serif; color: #374151; padding-right: 18px; }
.rota-popup section { border-left: 4px solid var(--rota); padding-left: 10px; }
.rota-popup section + section { margin-top: 12px; }
.rota-popup h4 { margin: 0 0 3px; font-size: 14px; color: #111827; display: flex; align-items: center; gap: 6px; }
.rota-hoje { background: #4CAF50; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; }
