/* Mapa 3D + linha do tempo. Usa os tokens de estilo.css (cores, fontes, raio). */
:root { --tl-noite: rgba(0, 0, 0, .22); --tl-area: color-mix(in srgb, var(--tinta-3) 26%, transparent); --tl-alt: 68px; }
:root[data-tema="claro"] { --tl-noite: rgba(0, 36, 63, .07); }
@media (prefers-color-scheme: light) { :root:not([data-tema]) { --tl-noite: rgba(0, 36, 63, .07); } }

/* ---------- MapLibre: tema ---------- */
#mapa .maplibregl-canvas { outline: none; }
.maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--painel) 80%, transparent) !important; color: var(--tinta-3) !important; font: 11px var(--t); }
.maplibregl-ctrl-attrib a { color: var(--tinta-2) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(var(--inv, 0)); }
.maplibregl-ctrl-bottom-right { bottom: calc(var(--tl-alt) + 18px); }
.m3-noite { background: #0d1524; }

/* ---------- aviso de revisão no topo do feed ---------- */
.revendo { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; color: var(--tinta); background: color-mix(in srgb, var(--ciano) 16%, var(--painel)); border-bottom: 1px solid color-mix(in srgb, var(--ciano) 40%, transparent); }
.revendo[hidden] { display: none; }
.revendo .ph { font-size: 18px; color: var(--ciano); }
.revendo span { flex: 1; }
.revendo b { font-family: var(--m); }
.revendo button { font: 700 12px var(--t); color: var(--ciano); padding: 4px 8px; border: 1px solid currentColor; border-radius: var(--raio); }

/* ---------- lista de rodovias sobre o mapa ---------- */
.m3-rodovias {
  position: absolute; top: 12px; left: 12px; z-index: 5; width: 212px; max-height: calc(100% - var(--tl-alt) - 90px);
  display: flex; flex-direction: column; overflow: hidden;
  background: color-mix(in srgb, var(--painel) 90%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.m3-rodovias header { display: flex; align-items: center; gap: 7px; padding: 9px 10px 8px 12px; border-bottom: 1px solid var(--linha); }
.m3-rodovias header .ph-road-horizon { font-size: 17px; color: var(--sinal-texto); }
.m3-rodovias header b { font: 700 13px var(--cond); letter-spacing: .12em; text-transform: uppercase; }
.m3-rodovias header em { font: 700 11px var(--m); font-style: normal; color: var(--tinta-3); }
.m3-rodovias header button { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; color: var(--tinta-2); border-radius: var(--raio); }
.m3-rodovias header button:hover { background: var(--painel-2); }
.m3-rodovias.recolhido .m3-rod-lista { display: none; }
.m3-rod-lista { overflow-y: auto; padding: 4px; }
.m3-rod {
  position: relative; width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  padding: 6px 8px 6px 10px; border-radius: var(--raio); text-align: left; color: var(--tinta);
  transition: background .15s, opacity .2s;
}
.m3-rod::before { content: ''; position: absolute; left: 2px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--c); }
.m3-rod:hover, .m3-rod.on { background: color-mix(in srgb, var(--c) 14%, var(--painel-2)); }
.m3-rod[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--c); }
.m3-rodovias:has(.m3-rod.on) .m3-rod:not(.on) { opacity: .45; }
.m3-rod-via { display: flex; justify-content: center; }
.m3-rod-via .escudo { transform: scale(.9); }
.m3-rod-txt b { display: block; font: 600 14px/1.15 var(--cond); white-space: nowrap; }
.m3-rod-txt small { font: 11px var(--m); color: var(--tinta-3); }
.m3-rod-st { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; max-width: 76px; }
.m3-rod-st i { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; font: 700 10.5px var(--m); font-style: normal; border-radius: 9px; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.m3-rod-vazio { padding: 14px 12px; font-size: 12.5px; color: var(--tinta-3); }

/* ---------- controles ---------- */
.m3-ctl {
  position: absolute; top: 12px; right: 12px; z-index: 5; display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--painel) 92%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--linha-2); border-radius: var(--raio); box-shadow: 0 6px 18px rgba(0,0,0,.22); overflow: hidden;
  transition: right .35s var(--ease);
}
/* os controles só se afastam quando o detalhe está completo (o compacto fica embaixo e não os cobre) */
.mapa-area:has(.detalhe:not([hidden]):not(.compacto)) .m3-ctl { right: 434px; }
.m3-ctl button { width: 36px; height: 34px; display: grid; place-items: center; color: var(--tinta); font-size: 17px; }
.m3-ctl button b { font: 800 12.5px var(--cond); letter-spacing: .06em; }
.m3-ctl button:hover { background: var(--painel-2); }
.m3-ctl button[aria-pressed="true"] { color: var(--sinal-texto); background: color-mix(in srgb, var(--sinal) 14%, transparent); }
.m3-ctl hr { border: 0; border-top: 1px solid var(--linha); margin: 0; }
#m3Bussola { transition: transform .1s linear; }

/* ---------- escudos sobre o mapa ---------- */
.m3-ancora { pointer-events: none; }
.m3-escudo { pointer-events: auto; position: relative; display: flex; align-items: flex-start; cursor: pointer; transition: opacity .2s, transform .2s var(--ease); filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.m3-escudo:hover { transform: translateY(-2px) scale(1.08); z-index: 3; }
.m3-escudo.apagado { opacity: .12; pointer-events: none; }
.m3-escudo.coberto { opacity: 0; pointer-events: none; }
.m3-placa { display: grid; justify-items: center; line-height: 1; padding: 3px 5px 3px; border-radius: 3px; background: var(--placa); color: var(--placa-tinta); box-shadow: inset 0 0 0 1.5px var(--placa-tinta); }
.m3-placa.br { border-radius: 3px 3px 9px 9px; }
.m3-placa small { font: 800 7px var(--t); letter-spacing: .08em; }
.m3-placa b { font: 800 11.5px var(--t); letter-spacing: -.02em; }
.m3-escudo em { position: absolute; top: -6px; right: -9px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 3px; font: 800 10px var(--m); font-style: normal; color: #fff; border-radius: 8px; background: var(--tinta-3); border: 1.5px solid var(--placa); }
.m3-escudo[data-st="total"] em { background: var(--vermelho); }
.m3-escudo[data-st="parcial"] em { background: var(--laranja); }
.m3-escudo[data-st="ocorrencia"] em { background: var(--sinal); color: var(--sinal-tinta); }
.m3-escudo::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 2px; height: 8px; margin-left: -1px; background: var(--placa); opacity: .7; }
/* de longe: só os graves; muito longe: só interdição total */
.m3-z-longe .m3-escudo:not([data-st="total"]):not([data-st="parcial"]) { opacity: 0; pointer-events: none; }
.m3-z-muito-longe .m3-escudo:not([data-st="total"]) { opacity: 0; pointer-events: none; }
.m3-com-foco .m3-escudo:not(.apagado):not(.coberto) { opacity: 1 !important; pointer-events: auto !important; }

/* ---------- cartão ao passar o mouse ---------- */
.m3-pop .maplibregl-popup-content { padding: 0; background: var(--painel); border: 1px solid var(--linha-2); border-radius: var(--raio); box-shadow: 0 14px 34px rgba(0,0,0,.35); overflow: hidden; }
.m3-pop .maplibregl-popup-tip { border-top-color: var(--linha-2) !important; border-bottom-color: var(--linha-2) !important; }
.m3-card { width: 270px; font-family: var(--t); color: var(--tinta); border-top: 3px solid var(--c); }
.m3-card header { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px 5px; background: color-mix(in srgb, var(--c) 14%, var(--painel)); }
.m3-card header span { font: 700 11.5px var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.m3-card header em { font: 700 10.5px var(--t); font-style: normal; color: var(--c); }
.m3-card-via { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; }
.m3-card-via .escudo { transform: scale(.85); }
.m3-card-via b { font: 700 12px var(--m); color: var(--tinta-2); }
.m3-card p { padding: 6px 10px 0; font: 600 15px/1.2 var(--cond); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m3-card footer { padding: 6px 10px 8px; font-size: 11.5px; color: var(--tinta-3); }

/* ---------- legenda sobe para dar lugar à linha do tempo ---------- */
.mapa-area .legenda { bottom: calc(var(--tl-alt) + 22px); z-index: 4; }

/* ---------- linha do tempo ---------- */
.tl {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6; height: var(--tl-alt);
  display: grid; grid-template-columns: auto auto 1fr auto auto auto; align-items: center; gap: 12px; padding: 6px 12px;
  background: color-mix(in srgb, var(--painel) 94%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--linha-2); border-radius: var(--raio); box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.tl.revendo { box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 0 0 1px color-mix(in srgb, var(--ciano) 55%, transparent); }
.tl-relogio { display: grid; min-width: 78px; line-height: 1; }
.tl-relogio small { font: 700 10.5px var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--verde); display: flex; align-items: center; gap: 5px; }
.tl.revendo .tl-relogio small { color: var(--ciano); }
.tl-relogio b { font: 700 27px/1 var(--cond); letter-spacing: .01em; font-variant-numeric: tabular-nums; margin: 2px 0 1px; }
.tl-relogio span { font: 11px var(--m); color: var(--tinta-3); text-transform: capitalize; }
.tl-relogio.noite b::after { content: '\263E'; font-size: 16px; margin-left: 6px; vertical-align: 10px; color: var(--tinta-3); }
.tl-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--tinta); color: var(--painel); transition: transform .15s; }
.tl-play:hover { transform: scale(1.06); }
.tl-trilho { position: relative; height: 100%; min-width: 0; }
.tl-trilho canvas { position: absolute; left: 0; right: 0; top: 2px; bottom: 22px; width: 100%; height: calc(100% - 24px); border-radius: 2px; }
.tl-marcas { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; pointer-events: none; }
.tl-marcas span { position: absolute; transform: translateX(-50%); font: 10.5px var(--m); color: var(--tinta-3); white-space: nowrap; }
.tl-marcas span::before { content: ''; position: absolute; left: 50%; top: -8px; height: 5px; border-left: 1px solid var(--linha-2); }
.tl-marcas span.dia { color: var(--tinta); font-weight: 700; text-transform: capitalize; }
.tl-trilho input[type=range] { position: absolute; inset: 0 0 14px; width: 100%; height: calc(100% - 14px); margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.tl-trilho input[type=range]:focus-visible { outline: 2px solid var(--ciano); outline-offset: 2px; }
.tl-trilho input[type=range]::-webkit-slider-runnable-track { height: 100%; background: none; }
.tl-trilho input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 3px; height: 100%; background: var(--sinal); border-radius: 2px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sinal) 30%, transparent), 0 0 14px var(--sinal); }
.tl-trilho input[type=range]::-moz-range-thumb { width: 3px; height: 100%; border: 0; background: var(--sinal); border-radius: 2px; }
.tl-trilho::after { content: ''; position: absolute; left: 0; right: 0; bottom: 20px; border-top: 1px solid var(--linha-2); pointer-events: none; }
.tl-dica { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 5px 8px; font: 11.5px var(--t); color: var(--tinta-2); white-space: nowrap; background: var(--painel); border: 1px solid var(--linha-2); border-radius: var(--raio); box-shadow: 0 6px 16px rgba(0,0,0,.25); pointer-events: none; }
.tl-dica b { font-family: var(--m); color: var(--tinta); margin-right: 8px; text-transform: capitalize; }
.tl-vel { display: flex; border: 1px solid var(--linha-2); border-radius: var(--raio); overflow: hidden; }
.tl-vel button { padding: 6px 8px; font: 700 11.5px var(--m); color: var(--tinta-2); }
.tl-vel button + button { border-left: 1px solid var(--linha); }
.tl-vel button[aria-pressed="true"] { background: var(--painel-2); color: var(--tinta); }
.tl-vivo { display: flex; align-items: center; gap: 7px; padding: 8px 12px; font: 700 12.5px var(--t); color: var(--tinta-2); border: 1px solid var(--linha-2); border-radius: 18px; }
.tl-vivo span { width: 8px; height: 8px; border-radius: 50%; background: var(--tinta-3); }
.tl:not(.revendo) .tl-vivo { color: var(--verde); border-color: color-mix(in srgb, var(--verde) 50%, transparent); }
.tl:not(.revendo) .tl-vivo span { background: var(--verde); box-shadow: 0 0 0 0 var(--verde); animation: vivo 1.8s infinite; }
@keyframes vivo { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--verde) 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }

/* ---------- visão noturna: painéis mais escuros sobre o mapa ---------- */
.m3-noite ~ .m3-rodovias, .m3-noite ~ .m3-ctl, .m3-noite ~ .tl, .m3-noite ~ .legenda { --painel: #0f1828; --painel-2: #16223a; --linha: #22304a; --linha-2: #2e4060; --tinta: #e6f1f9; --tinta-2: #a9c1d6; --tinta-3: #7390ab; --placa: #f4f8fb; --placa-tinta: #00243f; }

@media (max-width: 1180px) { .tl-vel { display: none; } .tl { grid-template-columns: auto auto 1fr auto auto; } }
@media (max-width: 820px) {
  :root { --tl-alt: 70px; }
  .m3-rodovias { width: 200px; }
  .m3-rodovias:not(.recolhido) .m3-rod-lista { max-height: 30vh; }
  .tl { gap: 8px; padding: 6px 8px; }
  .tl-relogio { min-width: 70px; }
  .tl-relogio b { font-size: 26px; }
  .tl-vivo { padding: 6px 8px; }
  .mapa-area .legenda { display: none; }
  .mapa-area:has(.detalhe:not([hidden])) .m3-ctl { right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .tl-vivo span { animation: none !important; } }

/* tela cheia: o mapa ocupa o monitor inteiro */
.mapa-area:fullscreen { background: var(--fundo); }
.mapa-area:fullscreen .tl { --tl-alt: 96px; }

/* ---------- câmeras de rodovia (cameras.js): quadro com vídeo ou foto e "Câmeras perto" no detalhe ---------- */
.cam-quadro {
  position: absolute; left: 12px; bottom: calc(var(--tl-alt) + 26px); z-index: 8; width: min(380px, calc(100% - 24px));
  background: var(--painel); border: 1px solid var(--linha-2); border-radius: var(--raio); overflow: hidden; box-shadow: 0 18px 44px rgba(0,0,0,.4);
}
.cam-quadro header { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; background: linear-gradient(168deg, var(--marinho-1), var(--marinho-3)); color: #fff; }
.cam-quadro header > .ph { font-size: 20px; color: var(--sinal); }
.cam-quadro header div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cam-quadro header b { font: 700 14px/1.2 var(--cond); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-quadro header small { font: 11.5px var(--m); color: rgba(255,255,255,.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-quadro .x { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; border-radius: var(--raio); }
.cam-quadro .x:hover { background: rgba(255,255,255,.12); }
.cam-midia { position: relative; background: #000; aspect-ratio: 16 / 9; }
.cam-midia video, .cam-midia img, .cam-midia iframe { border: 0;  display: block; width: 100%; height: 100%; object-fit: contain; }
.cam-aviso { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #fff; font-size: 13px; background: rgba(0,0,0,.7); }
.cam-quadro footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 12px; color: var(--tinta-2); }
.cam-quadro footer span { display: inline-flex; align-items: center; gap: 5px; }
.cam-quadro footer a { color: var(--ciano); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cam-vivo { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229,72,77,.6); animation: cam-vivo 1.8s infinite; flex-shrink: 0; }
@keyframes cam-vivo { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.65); } 100% { box-shadow: 0 0 0 8px rgba(229,72,77,0); } }
@media (prefers-reduced-motion: reduce) { .cam-vivo { animation: none; } }
.det-cameras { margin-top: 14px; border-top: 1px solid var(--linha); padding-top: 10px; display: grid; gap: 6px; }
.det-cameras h3 { display: flex; align-items: center; gap: 6px; font: 700 12.5px var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--sinal-texto); }
.det-cameras button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-align: left; border: 1px solid var(--linha-2); border-radius: var(--raio); background: var(--painel-2); color: var(--tinta); }
.det-cameras button:hover { border-color: var(--ciano); }
.det-cameras button .ph { font-size: 18px; color: var(--ciano); flex-shrink: 0; }
.det-cameras button span { display: flex; flex-direction: column; min-width: 0; }
.det-cameras button b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det-cameras button small { font-size: 11.5px; color: var(--tinta-3); }
@media (max-width: 820px) {
  .cam-quadro { left: 8px; right: 8px; width: auto; bottom: calc(var(--tl-alt) + 16px); }
  .cam-quadro .x { width: 40px; height: 40px; }
}

/* lista de todas as câmeras (botão nos controles do mapa) */
.dlg-cameras { width: min(620px, 94vw); }
.cam-busca { display: flex; align-items: center; gap: 8px; margin: 10px 16px 6px; height: 38px; padding: 0 11px; border: 1px solid var(--linha-2); border-radius: var(--raio); background: var(--fundo); }
.cam-busca .ph { color: var(--tinta-3); }
.cam-busca input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--tinta); font: inherit; }
.lista-cameras { overflow-y: auto; padding: 4px 16px 16px; display: grid; gap: 6px; }
.lista-cameras h3 { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font: 700 12.5px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--sinal-texto); }
.lista-cameras h3 em { font: 600 11px var(--m); font-style: normal; background: var(--painel-2); color: var(--tinta-2); padding: 2px 7px; border-radius: 99px; }
.lista-cameras button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-align: left; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--painel); color: var(--tinta); }
.lista-cameras button:hover { border-color: var(--ciano); background: var(--painel-2); }
.lista-cameras button .ph { font-size: 18px; color: var(--ciano); flex-shrink: 0; }
.lista-cameras button span { display: flex; flex-direction: column; min-width: 0; }
.lista-cameras button span > b { font-size: 13.5px; }
.lista-cameras button small { font-size: 11.5px; color: var(--tinta-3); }
.cam-sem-ponto { color: var(--laranja); font-weight: 700; }

/* ---------- câmeras em evidência: botão sobre o mapa, aviso de novidade, etiqueta nos cards, destaque no detalhe ---------- */
.cam-botao {
  position: absolute; top: 12px; left: 316px; z-index: 6; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px;
  border: 0; border-radius: 20px; background: linear-gradient(168deg, var(--marinho-1), var(--marinho-3)); color: #fff;
  font: 700 13.5px var(--t); box-shadow: 0 8px 22px rgba(0, 36, 63, .35), 0 0 0 2px rgba(255,255,255,.85); cursor: pointer; transition: transform .15s;
}
.cam-botao:hover { transform: translateY(-1px); }
.cam-botao .ph { font-size: 19px; color: #2dc3e8; }
.cam-botao em { font: 800 12px var(--m); font-style: normal; background: #FAE200; color: #00243f; padding: 2px 8px; border-radius: 10px; }
.cam-botao .cam-vivo, .det-cam-principal .cam-vivo { width: 9px; height: 9px; }
.cam-novidade {
  position: absolute; top: 60px; left: 316px; z-index: 7; width: min(300px, calc(100% - 340px)); padding: 12px 14px; display: grid; gap: 6px;
  background: #FAE200; color: #00243f; border-radius: var(--raio); box-shadow: 0 14px 34px rgba(0,0,0,.3); font-size: 13px; line-height: 1.45;
}
.cam-novidade::before { content: ''; position: absolute; top: -7px; left: 26px; border: 7px solid transparent; border-top: 0; border-bottom-color: #FAE200; }
.cam-novidade b { font: 800 14px var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.cam-novidade .ph { font-size: 14px; vertical-align: -2px; }
.cam-novidade button { justify-self: end; padding: 5px 12px; border-radius: 14px; background: #00243f; color: #fff; font: 700 12.5px var(--t); }
.tag-camera { display: inline-flex; align-items: center; gap: 3px; font: 700 10.5px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #01426A; padding: 3px 6px 2px; border-radius: 3px; }
.tag-camera .ph { font-size: 11.5px; color: #2dc3e8 !important; margin: 0 !important; }
.det-cameras { margin: 12px 0 2px; border-top: 0; padding-top: 0; }
.det-cameras h3 { display: none; }
.det-cam-principal { display: flex !important; align-items: center; gap: 10px; padding: 11px 12px !important; border: 0 !important; color: #fff !important; background: linear-gradient(168deg, var(--marinho-1), var(--marinho-3)) !important; box-shadow: 0 6px 16px rgba(0, 36, 63, .25); }
.det-cam-principal:hover { filter: brightness(1.08); }
.det-cam-principal > .ph-video-camera { font-size: 22px !important; color: #2dc3e8 !important; }
.det-cam-principal b { font-size: 14.5px !important; color: #fff; }
.det-cam-principal small { color: rgba(255,255,255,.8) !important; }
.det-cam-principal .ph-caret-right { margin-left: auto; color: #FAE200 !important; font-size: 18px !important; }
@media (max-width: 1100px) { .cam-novidade { width: 260px; } }
@media (max-width: 820px) {
  /* celular: embaixo à esquerda, acima da linha do tempo (o painel de rodovias fica em cima e muda de altura) */
  .cam-botao { top: auto; bottom: calc(var(--tl-alt) + 16px); left: 8px; height: 42px; }
  .mapa-area.cam-aberta .cam-botao, .mapa-area.cam-aberta .cam-novidade { display: none; }
  .cam-novidade { top: auto; bottom: calc(var(--tl-alt) + 70px); left: 8px; width: calc(100% - 16px); max-width: 360px; }
  .cam-novidade::before { top: auto; bottom: -7px; border-top: 7px solid #FAE200; border-bottom: 0; }
}

/* ---------- computador: linha do tempo recolhida, legenda e detalhe embaixo ---------- */
.tl-abrir { width: 32px; height: 32px; display: grid; place-items: center; font-size: 16px; color: var(--tinta-2); border: 1px solid var(--linha-2); border-radius: 50%; }
.tl-abrir:hover { color: var(--tinta); background: var(--painel-2); }
@media (min-width: 821px) {
  /* recolhida: só o relógio, o play e o botão de abrir; clicar nela abre */
  .tl.recolhida { right: auto; grid-template-columns: auto auto auto; cursor: pointer; }
  .tl.recolhida :is(.tl-trilho, .tl-vel, .tl-vivo) { display: none; }
  /* legenda compacta, numa linha; com a linha do tempo recolhida fica ao lado dela, embaixo */
  .mapa-area .legenda { font-size: 11px; gap: 4px 12px; padding: 7px 10px; }
  .mapa-area:has(.tl.recolhida) .legenda { bottom: 12px; left: calc(var(--tl-larg, 220px) + 22px); max-width: calc(100% - var(--tl-larg, 220px) - 34px); }
  .mapa-area:has(.tl.recolhida):has(.detalhe:not([hidden])) .legenda { max-width: calc(100% - var(--tl-larg, 220px) - 456px); }
  /* detalhe: preso embaixo, à direita; ao abrir os detalhes ele cresce para cima */
  .mapa-area .detalhe { top: auto; bottom: 12px; max-height: calc(100% - 24px); }
  .mapa-area:has(.tl:not(.recolhida)) .detalhe { bottom: calc(var(--tl-alt) + 22px); max-height: calc(100% - var(--tl-alt) - 34px); }
}
@media (max-width: 820px) { .tl-abrir { display: none; } }
