:root{
  --bg:#f2f4f7; --card:#fff; --fg:#101828; --muted:#667085; --line:#e4e7ec;
  --azul:#2d6ff0; --azul-esc:#1b4fc2; --neve:#0e9fb8; --neve-claro:#e3f6f9;
  --ouro:#e8a600; --prata:#8c97a8; --bronze:#b86b2f; --verde:#12a150;
  --sombra:0 1px 2px rgba(16,24,40,.06),0 6px 20px rgba(16,24,40,.08);
  --f:"Inter",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--fg);font-family:var(--f);font-size:15px;line-height:1.4;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0;text-align:left}
a{color:inherit}
.num{font-variant-numeric:tabular-nums}
h2{margin:0 2px 10px;font-size:17px;font-weight:700;display:flex;align-items:baseline;gap:8px}
h2 small{font-size:13px;font-weight:500;color:var(--muted)}

.topo{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:12px;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px));background:rgba(242,244,247,.9);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.logo{width:36px;height:36px;border-radius:10px}
.tit{display:flex;flex-direction:column}
.tit b{font-size:17px}
.tit span{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:6px}
.dot{width:7px;height:7px;border-radius:50%;background:var(--verde);display:inline-block}
.dot.on{animation:p 1.4s infinite}
@keyframes p{50%{opacity:.3}}

.app{max-width:1080px;margin:0 auto;padding:18px max(16px,env(safe-area-inset-left,0px)) 24px;display:grid;grid-template-columns:1fr 1fr;gap:28px 24px;align-items:start}
.col{display:flex;flex-direction:column;gap:28px;min-width:0}
.largo{grid-column:1/-1}
.cartao{background:var(--card);border-radius:18px;box-shadow:var(--sombra)}

/* destaque */
.dest{background:linear-gradient(145deg,#1b4fc2,#2d6ff0 55%,#5b8ff5);color:#fff;border-radius:22px;padding:22px;box-shadow:0 12px 30px rgba(45,111,240,.35);display:flex;flex-direction:column;gap:6px}
.dest .rot{font-size:13px;font-weight:600;opacity:.85}
.dest .cid{font-size:24px;font-weight:700;margin-top:2px}
.dest .preco{font-size:46px;font-weight:800;letter-spacing:-.03em;line-height:1.05}
.dest .preco small{font-size:15px;font-weight:500;opacity:.85;letter-spacing:0;margin-left:6px}
.dest .linha{font-size:14px;opacity:.92}
.btn{display:flex;align-items:center;justify-content:center;height:50px;border-radius:14px;font-weight:700;font-size:15px;text-decoration:none;margin-top:12px}
.btn.branco{background:#fff;color:var(--azul-esc)}
.btn.azul{background:var(--azul);color:#fff;box-shadow:0 6px 16px rgba(45,111,240,.3)}

/* pódio */
.podio{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.pod{background:var(--card);border-radius:16px;box-shadow:var(--sombra);padding:14px 12px;display:flex;flex-direction:column;gap:4px;min-width:0}
.pod b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pod .p{font-size:17px;font-weight:700}
.med{display:inline-grid;place-items:center;min-width:28px;height:22px;border-radius:99px;color:#fff;font-size:12px;font-weight:700;align-self:flex-start;margin-bottom:4px}
.m1{background:var(--ouro)}.m2{background:var(--prata)}.m3{background:var(--bronze)}

/* neve */
.neve{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.nv{background:var(--card);border-radius:16px;box-shadow:var(--sombra);padding:14px;display:flex;flex-direction:column;gap:2px;border-top:4px solid var(--neve)}
.nv b{font-size:16px}
.nv small{color:var(--muted);font-size:12.5px}
.nv .p{font-size:18px;font-weight:700;margin-top:6px}
.nv .p.fila{font-size:13px;font-weight:500;color:var(--muted)}

/* lista */
.lista{display:flex;flex-direction:column;background:var(--card);border-radius:18px;box-shadow:var(--sombra);overflow:hidden}
.it{display:flex;align-items:center;gap:12px;padding:14px 16px;border-top:1px solid var(--line);width:100%}
.it:first-child{border-top:0}
.it:active,.it:hover{background:#f7f8fa}
.it .nome{flex:1;min-width:0;display:flex;flex-direction:column}
.it .nome b{font-size:15.5px;font-weight:600;display:flex;align-items:center;gap:8px}
.it .nome small{color:var(--muted);font-size:12.5px}
.it .p{font-size:16px;font-weight:700}
.it .p.fila{font-size:13px;font-weight:500;color:var(--muted)}
.it .seta{color:#c0c6d0;font-size:20px;line-height:1}
.tag-neve{font-size:11px;font-weight:600;color:var(--neve);background:var(--neve-claro);padding:2px 7px;border-radius:99px}
.tag-prio{font-size:11px;font-weight:600;color:var(--azul-esc);background:#e7efff;padding:2px 7px;border-radius:99px}
.promo .p{color:var(--verde)}

/* horário */
#horario{padding:16px}
.hor-txt{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:8px}
.hor-txt b{font-size:22px}
.hor-txt span{color:var(--muted);font-size:13px}
#horario svg{width:100%;height:auto;display:block}

/* mapa */
.mapa-c{padding:8px;overflow:hidden}
#mapa svg{width:100%;height:auto;display:block}
.mar{fill:#eef3f9}
.terra{fill:#dde2e9;stroke:#fff;stroke-width:.8}
.terra.tem{cursor:pointer}
.terra.quero{stroke:#0e9fb8;stroke-width:2}
.etq rect{fill:#101828}
.etq text{font-size:12px;font-weight:700;fill:#fff;pointer-events:none}
.etq{cursor:pointer}
.pin path{fill:var(--neve);stroke:#fff;stroke-width:1.5}
.pin circle{fill:#fff}
.pin text{font-size:11.5px;font-weight:700;fill:#0b6f80;paint-order:stroke;stroke:#fff;stroke-width:3.5px}
.pin{cursor:pointer}

footer{text-align:center;color:var(--muted);font-size:12px;padding:0 16px calc(28px + env(safe-area-inset-bottom,0px))}

/* folha de detalhe */
.fundo{position:fixed;inset:0;background:rgba(16,24,40,.45);z-index:20;opacity:0;transition:opacity .25s}
.fundo.aberta{opacity:1}
.folha{position:fixed;left:0;right:0;bottom:0;z-index:21;background:var(--bg);border-radius:24px 24px 0 0;max-height:92vh;max-height:92dvh;display:flex;flex-direction:column;
  transform:translateY(105%);transition:transform .3s cubic-bezier(.2,.8,.2,1);box-shadow:0 -10px 40px rgba(16,24,40,.25)}
.folha.aberta{transform:none}
.alca{width:44px;height:5px;border-radius:5px;background:#c7cdd6;margin:10px auto 2px;flex:none}
.fechar{position:absolute;top:12px;right:14px;width:34px;height:34px;border-radius:50%;background:#fff;box-shadow:var(--sombra);text-align:center;color:var(--muted)}
.folha-corpo{overflow:auto;padding:6px 18px calc(24px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:16px;overscroll-behavior:contain}
.f-top small{color:var(--muted);font-size:13px}
.f-top h3{margin:2px 0 0;font-size:28px;font-weight:800;display:flex;align-items:center;gap:10px}
.f-top .preco{font-size:40px;font-weight:800;letter-spacing:-.03em;margin-top:8px}
.f-top .preco small{font-size:14px;font-weight:500;color:var(--muted);letter-spacing:0;margin-left:6px}
.f-top .linha{font-size:14px;color:var(--muted)}
.f-top .linha b{color:var(--fg)}
.f-card{background:var(--card);border-radius:16px;box-shadow:var(--sombra);padding:14px 16px}
.f-card h4{margin:0 0 8px;font-size:14px;font-weight:700}
.f-card svg{width:100%;height:auto;display:block}
.voo{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.voo:first-of-type{border-top:0}
.voo .p{font-weight:700;font-size:16px;min-width:82px}
.voo .q{flex:1;font-size:13px;color:var(--muted)}
.voo .q b{color:var(--fg);font-weight:500}
.voo a{font-size:13px;font-weight:700;color:var(--azul);text-decoration:none}
.vazio{color:var(--muted);font-size:14px;padding:12px 0;text-align:center}

@media (max-width:820px){
  .app{grid-template-columns:1fr;gap:26px}
  .col{gap:26px}
  .podio{gap:8px}
  .pod{padding:12px 10px}
  .pod .p{font-size:15px}
}
@media (min-width:821px){
  .folha{left:50%;right:auto;bottom:auto;top:50%;width:520px;max-height:86vh;border-radius:24px;transform:translate(-50%,-46%);opacity:0;pointer-events:none;transition:transform .25s,opacity .2s}
  .folha.aberta{transform:translate(-50%,-50%);opacity:1;pointer-events:auto}
  .alca{display:none}
  .folha-corpo{padding-top:22px}
}
@media (prefers-reduced-motion:reduce){.dot.on{animation:none}.folha,.fundo{transition:none}}
.dt{display:flex;align-items:center;gap:10px;padding:7px 0}
.dt>span:first-child{width:92px;font-size:13.5px;color:var(--muted)}
.dt .tr{flex:1;height:10px;border-radius:6px;background:#eef1f5;overflow:hidden}
.dt .tr i{display:block;height:100%;background:#a9c4f7;border-radius:6px}
.dt .tr i.bom{background:var(--verde)}
.dt b{width:84px;text-align:right;font-size:14.5px}
.dt b.bom{color:var(--verde)}

.folha:not(.aberta){visibility:hidden;transition:transform .3s cubic-bezier(.2,.8,.2,1),visibility 0s .3s}
.folha.aberta{visibility:visible}

/* v4: top 10, horário em faixas, legenda do mapa */
.dest .cid small{font-size:15px;font-weight:500;opacity:.8}
.dest .linha b{font-weight:700}
.dest .fraco{opacity:.7;font-size:12.5px}
.lin{text-decoration:none;color:inherit}
.rk{min-width:32px;height:26px;border-radius:99px;display:grid;place-items:center;font-size:12.5px;font-weight:700;background:#eef1f5;color:var(--muted)}
.rk.m1{background:var(--ouro);color:#fff}.rk.m2{background:var(--prata);color:#fff}.rk.m3{background:var(--bronze);color:#fff}
.it .nome b em{font-style:normal;font-weight:500;font-size:12.5px;color:var(--muted)}
.it .nome small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.val{display:flex;flex-direction:column;align-items:flex-end;gap:1px}
.val b{font-size:16px;font-weight:700}
.val small{font-size:11.5px;color:var(--muted)}
#horario{padding:14px 16px}
.hor-vazio{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:12px;background:#fff6e0;margin-bottom:8px}
.hor-vazio b{color:#7a5a00}.hor-vazio span{font-size:13px;color:#7a5a00}
.hf{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.hf:first-of-type{border-top:0}
.hf>span:first-child{width:118px;font-size:14px;font-weight:500;white-space:nowrap}
.hf .tr{flex:1;height:10px;border-radius:6px;background:#eef1f5;overflow:hidden}
.hf .tr i{display:block;height:100%;border-radius:6px}
.hf .tr i.bom{background:var(--verde)}.hf .tr i.ruim{background:#f0a3a3}
.hf b{width:74px;text-align:right;font-size:14px}
.hf b.bom{color:var(--verde)}.hf b.ruim{color:#c43c3c}.hf b.cinza{color:var(--muted);font-weight:500;font-size:12.5px}
.hf.melhor{background:#effaf3;border-radius:10px;padding:8px;margin:0 -8px}
.selo-b{font-style:normal;font-size:10.5px;font-weight:700;color:#fff;background:var(--verde);padding:1px 6px;border-radius:99px;margin-left:4px}
.nota{margin:8px 0 0;font-size:12px;color:var(--muted)}
.legenda{display:flex;flex-wrap:wrap;gap:8px 16px;padding:10px 8px 4px;font-size:12.5px;color:var(--muted)}
.legenda span{display:inline-flex;align-items:center;gap:6px}
.lg{display:inline-block;width:14px;height:14px;border-radius:4px}
.lg.grad{background:linear-gradient(90deg,#1b4fc2,#b3cbf7)}
.lg.contorno{border:2px solid var(--neve);background:#fff}
.lg.pino{background:var(--neve);border-radius:50% 50% 50% 0;transform:rotate(-45deg);width:12px;height:12px}
.etq{pointer-events:none}
