/* Cidade da rede. Cidade de brinquedo isométrica com contorno de adesivo; o céu é o relógio do turno.
   Animações só com transform (o navegador anima sozinho). */
@font-face { font-family: 'DynaPuff'; font-weight: 700; font-display: swap; src: url('../assets/fonts/dynapuff-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('../assets/fonts/nunito-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('../assets/fonts/nunito-800.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url('../assets/fonts/nunito-900.woff2') format('woff2'); }

:root {
  --tinta: #1c1a1f;
  --papel: #fffaf0;
  --placa: #1f6f4a;
  --amarelo: #ffcc00;
  --vermelho: #f0453a;
  --laranja: #ff8a2a;
  --cinza: #6b6570;
  --titulo: 'DynaPuff', 'Nunito', system-ui, sans-serif;
  --texto: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --adesivo: 0 0 0 5px #fff, 3px 7px 0 5px var(--tinta);
  --topo: env(safe-area-inset-top, 0px);
  --base: env(safe-area-inset-bottom, 0px);
  --ceu-a: #ffd9a8;
  --ceu-b: #ffeccc;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8fd8ee; }
body[data-hora='noite'] { background: #23406a; }
body { font-family: var(--texto); font-weight: 800; color: var(--tinta); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; }
:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 3px; }

/* Céu: muda de cor com a hora do turno (manhã, meio-dia, tarde, pôr do sol, noite). */
#ceu { position: fixed; inset: 0; z-index: 5; pointer-events: none; transition: background-color 1.2s; }
body[data-hora='manha'] #ceu { background-color: rgba(255, 170, 90, 0.1); }
body[data-hora='tarde'] #ceu { background-color: rgba(255, 120, 40, 0.14); }
body[data-hora='noite'] #ceu { background-color: rgba(10, 10, 60, 0.12); }
body[data-hora='manha'] { --ceu-a: #ffd9a8; --ceu-b: #fff1d6; }
body[data-hora='dia'] { --ceu-a: #8fd3ff; --ceu-b: #dff4ff; }
body[data-hora='tarde'] { --ceu-a: #ffc27a; --ceu-b: #ffe6c4; }
body[data-hora='noite'] { --ceu-a: #1b1f4b; --ceu-b: #3a2f6e; }
.nuvem { position: absolute; width: 120px; height: 40px; border-radius: 40px; background: #fff; border: 3px solid var(--tinta); box-shadow: 3px 5px 0 rgba(28, 26, 31, 0.15); }
.nuvem::before, .nuvem::after { content: ''; position: absolute; background: #fff; border: 3px solid var(--tinta); border-bottom: 0; border-radius: 40px 40px 0 0; }
.nuvem::before { width: 50px; height: 30px; left: 18px; top: -20px; }
.nuvem::after { width: 40px; height: 24px; left: 58px; top: -14px; }
.n1 { top: 14%; left: -140px; animation: nuvem 60s linear infinite; }
.n2 { top: 24%; left: -140px; animation: nuvem 85s linear -30s infinite; transform: scale(0.7); }
.n3 { top: 8%; left: -140px; animation: nuvem 70s linear -50s infinite; }
@keyframes nuvem { to { translate: calc(100vw + 300px) 0; } }
body[data-hora='noite'] .nuvem { display: none; }
#estrelas { position: absolute; inset: 0; display: none; }

.estrela { position: absolute; width: 10px; height: 10px; background: #ffe680; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: brilha 2.4s steps(2) infinite; }
@keyframes brilha { 50% { scale: 0.5; } }

/* Mundo (a cidade) e a câmera. */
#vista { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
#vista.arrastando { cursor: grabbing; }
#mundo { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cidade-svg { display: block; }
.cidade-svg .janela { fill: #bfe3ff; transition: fill 0.3s; }
.cidade-svg .acesa .janela, body[data-hora='noite'] .cidade-svg .loja:not(.caida) .janela { fill: #ffd75e; }
.cidade-svg .caida .janela { fill: #5a5560; }
.fumaca { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #b9b4ab; border: 2px solid var(--tinta); transform: scale(0); animation: fumaca 2.4s ease-out infinite; pointer-events: none; }
@keyframes fumaca { 0% { transform: translate(0, 0) scale(0.2); } 70% { transform: translate(8px, -34px) scale(1.4); } 100% { transform: translate(12px, -44px) scale(0); } }
.loja:hover .nome-loja { transform: translateY(-3px); }
.nome-loja { transition: transform 0.15s; }
#atores { position: absolute; left: 0; top: 0; }

/* Bobo de crachá correndo pela cidade. */
.bobo { position: absolute; left: 0; top: 0; width: 70px; height: 66px; margin: -60px 0 0 -35px; pointer-events: none; }
.bobo-corpo { position: relative; width: 100%; height: 100%; transform-origin: 50% 100%; }
.bobo img { width: 100%; height: 100%; object-fit: contain; }
.bobo .cracha { position: absolute; left: 40%; top: 30%; width: 26%; transform-origin: 50% 0; animation: balanca 1.6s ease-in-out infinite; }
@keyframes balanca { 50% { transform: rotate(8deg); } }
.bobo.parado .bobo-corpo { animation: respira 1.4s ease-in-out infinite; }
@keyframes respira { 50% { transform: scale(1.04, 0.96); } }
.sombra-bobo { position: absolute; left: 14px; right: 14px; bottom: -4px; height: 10px; border-radius: 50%; background: rgba(28, 26, 31, 0.35); }

/* Balões "!" dos franqueados em cima das lojas. */
.balao-loja {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -54px 0 0 -22px; display: grid; place-items: center;
  border-radius: 50%; border: 3px solid var(--tinta); box-shadow: 0 0 0 4px #fff, 2px 5px 0 4px var(--tinta);
  font-family: var(--titulo); font-size: 24px; color: #fff; -webkit-text-stroke: 3px var(--tinta); paint-order: stroke fill;
  animation: flutua 1.8s ease-in-out infinite;
}
.balao-loja::after {
  content: ''; position: absolute; bottom: -12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; background: inherit;
  border-right: 3px solid var(--tinta); border-bottom: 3px solid var(--tinta); transform: rotate(45deg); z-index: -1;
}
.balao-loja.P1 { background: var(--vermelho); }
.balao-loja.P2 { background: var(--laranja); }
.balao-loja.P3 { background: #fff; color: var(--tinta); -webkit-text-stroke: 0; }
@keyframes flutua { 50% { translate: 0 -8px; } }
.balao-loja.some { animation: some-balao 0.3s cubic-bezier(0.5, 0, 0.9, 0.6) forwards; }
@keyframes some-balao { 30% { scale: 1.3; } to { scale: 0; } }
.alvo-missao {
  position: absolute; left: 0; top: 0; width: 64px; height: 32px; margin: -16px 0 0 -32px; border-radius: 50%;
  border: 4px dashed var(--amarelo); animation: alvo 1.2s linear infinite; pointer-events: none;
}
@keyframes alvo { to { rotate: 360deg; } }
.estrelinha { position: fixed; z-index: 70; width: 30px; height: 30px; pointer-events: none; }
.mais-pts {
  position: fixed; z-index: 71; padding: 4px 14px; border-radius: 999px; background: var(--amarelo); border: 3px solid var(--tinta);
  box-shadow: 0 0 0 4px #fff, 3px 5px 0 4px var(--tinta); font-family: var(--titulo); font-size: 24px; pointer-events: none;
}

/* HUD de cima. */
.hud-topo {
  position: fixed; z-index: 20; left: 0; right: 0; top: 0; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  padding: calc(var(--topo) + 12px) 14px 0; pointer-events: none;
}
.hud-topo > * { pointer-events: auto; }
.cracha-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 16px; background: var(--papel);
  border: 3px solid var(--tinta); box-shadow: var(--adesivo); transform: rotate(-2deg);
}
.cracha-chip b { display: block; font-family: var(--titulo); font-size: 14px; line-height: 1.1; }
.cracha-chip small { display: block; font-size: 11.5px; color: var(--cinza); }
.cc-letra {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #3563e9; border: 2.5px solid var(--tinta);
  font-family: var(--titulo); font-size: 19px; color: #fff; -webkit-text-stroke: 3px var(--tinta); paint-order: stroke fill;
}
.relogio { position: relative; height: 54px; margin: 6px 10px 0; }
.rel-trilho { position: absolute; left: 0; right: 0; top: 22px; height: 10px; border-radius: 999px; background: var(--papel); border: 3px solid var(--tinta); box-shadow: 2px 4px 0 var(--tinta); }
.rel-feito { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--amarelo); transform-origin: 0 50%; }
.rel-hora { position: absolute; top: 38px; font-size: 11px; color: var(--tinta); translate: -50% 0; }
.rel-bandeira { position: absolute; top: 0; translate: -3px 0; display: grid; justify-items: start; background: none; border: 0; padding: 0; }
.rel-bandeira i { display: block; width: 3px; height: 26px; background: var(--tinta); border-radius: 2px; }
.rel-bandeira span {
  position: absolute; left: 3px; top: 0; padding: 1px 6px; border: 2px solid var(--tinta); border-radius: 0 6px 6px 0; background: #fff;
  font-size: 10.5px; white-space: nowrap;
}
.rel-bandeira.feita span { background: #c9ec8a; }
.rel-bandeira.agora span { background: var(--amarelo); }
.rel-sol { position: absolute; top: -2px; width: 46px; height: 46px; translate: -50% 0; transition: left 1.1s cubic-bezier(0.3, 1.2, 0.5, 1); pointer-events: none; }
.placar { display: grid; gap: 8px; justify-items: end; }
.placar-pts, .placar-rede {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--papel);
  border: 3px solid var(--tinta); box-shadow: var(--adesivo); font-family: var(--titulo); font-size: 18px; font-variant-numeric: tabular-nums;
}
.placar-pts img { width: 30px; height: 30px; }
.placar-rede small { font-family: var(--texto); font-size: 11.5px; color: var(--cinza); }
.ponto-ar { width: 12px; height: 12px; border-radius: 50%; background: #2fd16f; border: 2.5px solid var(--tinta); }
.placar-rede.alerta .ponto-ar { background: var(--vermelho); animation: brilha 1s steps(2) infinite; }

/* Placa da missão (placa de estrada verde). */
.missao {
  position: fixed; z-index: 20; left: 14px; bottom: calc(var(--base) + 16px); width: min(420px, calc(100vw - 104px)); padding: 16px 16px 14px;
  border-radius: 18px; background: var(--placa); color: #fff; border: 3px solid var(--tinta);
  box-shadow: inset 0 0 0 4px var(--placa), inset 0 0 0 6.5px #fff, 0 0 0 5px #fff, 4px 9px 0 5px var(--tinta);
}
.m-fita {
  position: absolute; top: -16px; left: 16px; padding: 4px 12px; border-radius: 8px; background: var(--amarelo); color: var(--tinta);
  border: 2.5px solid var(--tinta); box-shadow: 2px 3px 0 var(--tinta); font-family: var(--titulo); font-size: 13px; text-transform: uppercase; transform: rotate(-3deg);
}
.m-titulo { margin: 4px 0 0; font-family: var(--titulo); font-size: 24px; line-height: 1.05; }
.m-sub { margin: 6px 0 0; font-size: 14px; color: #d9f2e4; font-weight: 700; }
.m-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.m-chip { padding: 2px 9px; border-radius: 999px; background: #fff; color: var(--tinta); border: 2px solid var(--tinta); font-size: 12px; }
.m-chip.pts { background: var(--amarelo); }
.segurar {
  position: relative; color: var(--tinta); display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; margin-top: 12px;
  border-radius: 999px; border: 3px solid var(--tinta); background: #fff; box-shadow: 3px 5px 0 var(--tinta); font-family: var(--titulo);
  font-size: 18px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
.segurar .enche { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: #b7db47 repeating-linear-gradient(-45deg, #c8e86a 0 10px, transparent 10px 20px); }
.segurar span { position: relative; }
.segurar:active { translate: 2px 3px; box-shadow: 1px 2px 0 var(--tinta); }
.carimbo {
  position: absolute; z-index: 3; left: 50%; top: 46%; padding: 4px 16px; border: 5px solid var(--vermelho); border-radius: 12px; background: #fff;
  color: var(--vermelho); font-family: var(--titulo); font-size: 34px; box-shadow: 0 0 0 4px #fff, 3px 6px 0 4px var(--tinta); pointer-events: none;
}

/* Controles e fila. */
.controles { position: fixed; z-index: 20; right: 14px; top: calc(var(--topo) + 110px); display: grid; gap: 10px; }
.ctl {
  width: 44px; height: 44px; border-radius: 14px; border: 3px solid var(--tinta); background: var(--papel); box-shadow: 2px 4px 0 var(--tinta);
  font-family: var(--titulo); font-size: 22px; line-height: 1;
}
.ctl:active { translate: 1px 2px; box-shadow: 1px 2px 0 var(--tinta); }
.ctl.mudo { text-decoration: line-through; background: #ddd; }
.botao-fila {
  position: fixed; z-index: 20; right: 14px; bottom: calc(var(--base) + 20px); width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-content: center; justify-items: center; background: var(--vermelho); color: #fff; border: 3px solid var(--tinta);
  box-shadow: var(--adesivo); line-height: 1;
}
.botao-fila b { font-family: var(--titulo); font-size: 28px; -webkit-text-stroke: 3px var(--tinta); paint-order: stroke fill; }
.botao-fila small { font-size: 11px; }
.botao-fila.zero { background: #9ad07a; }
.botao-fila.pula { animation: pula 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pula { from { scale: 1.3; } }

/* Painel (conversa, fila, loja): lateral no computador, gaveta no celular. */
#camada { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#camada > * { pointer-events: auto; }
.veu { position: absolute; inset: 0; background: rgba(27, 31, 75, 0.35); }
.painel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--papel);
  border-left: 3px solid var(--tinta); box-shadow: -6px 0 0 rgba(28, 26, 31, 0.18);
}
.p-cab { display: flex; align-items: center; gap: 10px; padding: calc(var(--topo) + 14px) 16px 12px; border-bottom: 3px solid var(--tinta); background: #fff; }
.p-cab h3 { margin: 0; font-family: var(--titulo); font-size: 19px; line-height: 1.1; }
.p-cab small { display: block; color: var(--cinza); font-size: 12px; }
.p-fecha { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 2.5px solid var(--tinta); background: var(--papel); font-size: 20px; }
.p-corpo { flex: 1; overflow-y: auto; padding: 14px 16px 18px; }
.av { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--tinta); font-family: var(--titulo); font-size: 18px; color: #fff; -webkit-text-stroke: 3px var(--tinta); paint-order: stroke fill; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pri { padding: 2px 8px; border-radius: 6px; border: 2px solid var(--tinta); font-size: 12px; font-weight: 900; }
.pri.P1 { background: var(--vermelho); color: #fff; }
.pri.P2 { background: var(--laranja); }
.pri.P3 { background: #fff; }
.quem { padding: 2px 9px; border-radius: 999px; border: 2px solid var(--tinta); font-size: 12px; color: #fff; }
.item-fila { display: flex; gap: 10px; width: 100%; padding: 12px; margin-bottom: 12px; text-align: left; border-radius: 16px; background: #fff; border: 3px solid var(--tinta); box-shadow: 2px 4px 0 var(--tinta); }
.item-fila p { margin: 4px 0 6px; font-weight: 700; color: #3b3640; }
.item-fila b { font-family: var(--titulo); }
.item-fila small { color: var(--cinza); }

/* WhatsApp Web simulado + cartão da extensão Atende 99 (cópia do visual real). */
.wa { display: flex; flex-direction: column; height: 100%; background: #efeae2; background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1.2px); background-size: 16px 16px; }
.wa-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; font-family: 'Segoe UI', system-ui, sans-serif; font-weight: 400; }
.wa-msg { max-width: 86%; padding: 7px 10px 8px; border-radius: 8px; background: #fff; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); font-size: 14.2px; line-height: 1.35; }
.wa-msg.eu { align-self: flex-end; background: #d9fdd3; animation: wa-entra 0.25s cubic-bezier(0.3, 1.3, 0.5, 1); transform-origin: 100% 100%; }
@keyframes wa-entra { from { scale: 0.6; } }
.wa-msg small { display: block; text-align: right; color: #667781; font-size: 11px; margin-top: 2px; }
.wa-pe { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px calc(var(--base) + 10px); background: #f0f2f5; }
.wa-caixa { flex: 1; min-height: 42px; max-height: 130px; overflow-y: auto; padding: 10px 12px; border-radius: 10px; background: #fff; font: 400 14.5px/1.35 'Segoe UI', system-ui, sans-serif; color: #111b21; }
.wa-caixa:empty::before { content: 'Digite uma mensagem'; color: #8696a0; }
.wa-enviar { width: 40px; height: 40px; border: 0; background: none; color: #54656f; font-size: 20px; }
.botao-99 { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #ffcc00; border: 2px solid #16130f; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); font: 800 15px 'Segoe UI', system-ui, sans-serif; color: #16130f; }
.botao-99.pisca { animation: pisca-99 1.1s ease-in-out infinite; }
@keyframes pisca-99 { 50% { scale: 1.14; } }
.botao-99.girando::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent; border-top-color: #ffcc00; border-right-color: #ffcc00; animation: gira 0.8s linear infinite; }
@keyframes gira { to { rotate: 360deg; } }
.card-99 {
  position: absolute; right: 10px; bottom: calc(100% + 8px); width: min(340px, calc(100% - 20px)); max-height: 60vh; overflow-y: auto; padding: 12px 14px 14px;
  border-radius: 12px; background: #16130f; color: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); font: 500 13.5px/1.4 'Segoe UI', system-ui, sans-serif;
  transform-origin: 100% 100%; animation: card-entra 0.28s cubic-bezier(0.3, 1.3, 0.5, 1);
}
@keyframes card-entra { from { scale: 0.5; translate: 0 20px; } }
.c99-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.c99-selo { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ffcc00; color: #16130f; font-weight: 800; font-size: 11px; border: 2px solid #16130f; }
.c99-fecha { margin-left: auto; background: none; border: 0; color: #cfc7b8; font-size: 18px; }
.c99-passo { display: flex; align-items: center; gap: 8px; color: #f2ebdd; white-space: nowrap; }
.c99-passo .spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #4a4237; border-top-color: #ffcc00; animation: gira 0.8s linear infinite; }
.c99-passo.ok .spin { animation: none; background: #ffcc00; border-color: #ffcc00; }
.c99-h { margin: 10px 0 4px; color: #ffcc00; font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.c99-fonte { display: block; color: #ffe27a; text-decoration: underline; font-size: 12.5px; }
.c99-task { margin-top: 6px; padding: 9px 10px; border-radius: 10px; background: #1b1c21; border: 1px solid #2e3038; }
.c99-task b { display: block; }
.c99-task .prazo { color: #ffb25c; font-size: 12.5px; }
.c99-pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.c99-pill.alta { background: #3a1612; color: #ff8a7a; }
.c99-pill.media { background: #3a3210; color: #ffd54a; }
.c99-pill.baixa { background: #122233; color: #8ec5ff; }
.c99-botoes { display: flex; gap: 8px; margin-top: 12px; }
.c99-botao { flex: 1; height: 36px; border-radius: 9px; border: 1px solid #4a4237; background: #2a251f; color: #fff; font: 800 13px 'Segoe UI', system-ui, sans-serif; }
.c99-botao.prim { background: #ffcc00; color: #16130f; border-color: #16130f; }
.c99-ok { color: #8fe3a8; font-weight: 700; }
.c99-mut { color: #b8ae9c; font-size: 12.5px; }

/* Cartãozinho de uma loja. */
.pop-loja { position: absolute; left: 50%; bottom: calc(var(--base) + 24px); width: min(420px, calc(100vw - 28px)); translate: -50% 0; padding: 14px 16px; border-radius: 18px; background: var(--papel); border: 3px solid var(--tinta); box-shadow: var(--adesivo); }
.pop-loja h3 { margin: 0 0 8px; font-family: var(--titulo); }
.vitrine { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 2px dashed rgba(28, 26, 31, 0.2); }
.vitrine .marca { padding: 2px 8px; border-radius: 6px; color: #fff; border: 2px solid var(--tinta); font-family: var(--titulo); font-size: 12px; }
.vitrine .st { margin-left: auto; font-size: 12.5px; white-space: nowrap; }

/* Fim do turno. */
.fim {
  position: absolute; left: 50%; top: 50%; width: min(360px, calc(100vw - 32px)); translate: -50% -50%; padding: 20px 18px; text-align: center;
  border-radius: 24px; background: var(--papel); border: 3px solid var(--tinta); box-shadow: var(--adesivo);
}
.fim h2 { margin: 0; font-family: var(--titulo); font-size: 34px; color: var(--amarelo); -webkit-text-stroke: 6px var(--tinta); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--tinta); }
.fim .bobo-fim { position: relative; width: 170px; margin: 10px auto 0; }
.fim .bobo-fim img { width: 170px; }
.fim .bobo-fim .cracha { position: absolute; left: 38%; top: 34%; width: 26%; }
.carimbo-fim { position: absolute; right: -30px; bottom: 10px; padding: 4px 10px; border: 5px solid #2e8b4f; border-radius: 12px; background: #fff; color: #2e8b4f; font-family: var(--titulo); font-size: 20px; line-height: 1.05; rotate: -10deg; }
.fim .linhas { display: grid; gap: 4px; margin: 10px 0 16px; font-size: 15px; }
.botao { height: 50px; padding: 0 22px; border-radius: 999px; border: 3px solid var(--tinta); background: #b7db47; box-shadow: 3px 5px 0 var(--tinta); font-family: var(--titulo); font-size: 17px; }
.fogos { position: fixed; inset: 0; pointer-events: none; }
.fim { z-index: 1; }
.missao:empty { display: none; }

#carregando { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 10px; background: #ffd9a8; }
#carregando img { width: 130px; animation: corre 0.5s ease-in-out infinite alternate; }
#carregando span { font-family: var(--titulo); font-size: 20px; }
@keyframes corre { to { translate: 0 -10px; rotate: -4deg; } }
#carregando.sai { animation: sai 0.45s cubic-bezier(0.5, 0, 0.9, 0.5) forwards; }
@keyframes sai { to { translate: 0 -105%; } }

/* Celular: relógio em linha própria, placa compacta. */
@media (max-width: 900px) {
  .hud-topo { grid-template-columns: 1fr auto; gap: 8px 10px; }
  .relogio { grid-column: 1 / -1; grid-row: 2; margin: 2px 6px 0; }
  .rel-bandeira span { display: none; }
  .rel-bandeira.agora span { display: block; }
  .placar { grid-auto-flow: column; }
  .placar-rede small, .placar-pts small { display: none; }
  .placar-pts, .placar-rede { height: 36px; padding: 0 10px 0 6px; font-size: 15px; gap: 4px; }
  .placar-pts img { width: 24px; height: 24px; }
  .cracha-chip { padding-right: 10px; }
  .controles { top: auto; bottom: calc(var(--base) + 250px); }
  #zoom-mais, #zoom-menos { display: none; }
  .missao { left: 10px; right: 10px; width: auto; bottom: calc(var(--base) + 10px); padding: 14px 14px 12px; }
  .m-titulo { font-size: 21px; }
  .m-sub { font-size: 13px; }
  .botao-fila { width: 62px; height: 62px; bottom: auto; top: calc(var(--topo) + 170px); }
  .cracha-chip { justify-self: start; }
  .cracha-chip b { font-size: 13px; white-space: nowrap; }
  .painel { width: 100%; }
  .cracha-chip small { white-space: nowrap; }
  .pop-loja { bottom: calc(var(--base) + 12px); }
  .botao-fila b { font-size: 24px; }
  .painel { top: auto; height: 86%; border-left: 0; border-top: 3px solid var(--tinta); border-radius: 22px 22px 0 0; overflow: hidden; }
  .p-cab { padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

/* Extras da cidade. */
.bobo-vira { position: relative; width: 100%; height: 100%; }
.fala-bobo {
  position: absolute; left: 10%; bottom: 85%; width: max-content; max-width: 210px; padding: 8px 12px; border-radius: 14px;
  background: #fff; border: 2.5px solid var(--tinta); box-shadow: 2px 3px 0 var(--tinta); font-size: 14px; line-height: 1.2; transform: translate(-90%, 0); transform-origin: 88% 100%;
}
.fala-bobo:empty { display: none; }
.fala-bobo .rabo { position: absolute; left: calc(100% - 30px); top: 100%; overflow: visible; transform: scaleX(-1); }
.selo-no-ar {
  position: absolute; padding: 4px 14px; border-radius: 12px; background: #2fd16f; color: #fff; border: 3px solid var(--tinta); box-shadow: 0 0 0 4px #fff, 3px 5px 0 4px var(--tinta);
  font-family: var(--titulo); font-size: 22px; -webkit-text-stroke: 4px var(--tinta); paint-order: stroke fill; white-space: nowrap; pointer-events: none;
}
.cidade-svg .loja.acesa > polygon:not(.janela) { animation: pisca-loja 0.5s steps(2) 3; }
@keyframes pisca-loja { 50% { fill: #fff6c2; } }
.cidade-svg .loja, .cidade-svg .especial { outline: none; }
body[data-hora='noite'] .cidade-svg .mar { fill: #23406a; }
body[data-hora='noite'] .cidade-svg pattern path { stroke: #3b5f8e; }
body[data-hora='noite'] .cidade-svg polygon[fill='#dff0b8'] { fill: #93ad7e; }
body[data-hora='noite'] .cidade-svg polygon[fill='#6b6772'] { fill: #3f3a4a; }
body[data-hora='noite'] .cidade-svg .acesa .janela { fill: #ffd75e; }
.wa-dia { align-self: center; padding: 3px 10px; border-radius: 8px; background: #fff; color: #54656f; font-size: 12px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
.painel.conversa .wa { flex: 1; min-height: 0; height: auto; }
.dica-99 {
  position: absolute; right: 30px; bottom: calc(100% + 8px); padding: 6px 10px; border-radius: 10px; background: #16130f; color: #ffcc00;
  font: 700 12.5px 'Segoe UI', system-ui, sans-serif; white-space: nowrap; animation: flutua 1.8s ease-in-out infinite;
}
.dica-99::after { content: ''; position: absolute; right: 22px; top: 100%; border: 7px solid transparent; border-top-color: #16130f; }
.wa-enviar.pisca { color: #00a884; animation: pisca-99 1.1s ease-in-out infinite; }
.veu.leve { background: transparent; }
.pop-loja .p-fecha { position: absolute; right: 10px; top: 10px; }
.pop-loja .botao { width: 100%; margin-top: 10px; }
.botao.vermelho { background: var(--vermelho); color: #fff; }
.item-fila.feita { opacity: 0.6; }
.placar-pts small { font-family: var(--texto); font-size: 11.5px; color: var(--cinza); }
.rel-sol { filter: drop-shadow(2px 3px 0 rgba(28, 26, 31, 0.35)); }
