/* Estilos novos (jogo: prévia da horda, chamar mais cedo, barra da cidade, dica; personalização: editor do boneco e da casa) */

/* ---------- jogo ---------- */
#j-chamar { position: absolute; left: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2; border-radius: 14px;
  border: 1px solid rgba(255, 211, 107, 0.5); background: rgba(11, 17, 32, 0.86); color: var(--luz); font: 900 15px var(--fonte);
  padding: 9px 14px; text-align: left; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); touch-action: manipulation; }
#j-chamar small { display: block; font-size: 10.5px; font-weight: 700; color: var(--apagado); }
#j-chamar.some, #jogo.no-painel #j-chamar { display: none; }
#j-chamar:active { transform: scale(0.95); }

.j-previa { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.j-pv { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px 2px 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--borda); font-weight: 800; font-size: 13px; }
.j-pv img { height: 28px; width: 28px; object-fit: cover; object-position: top; border-radius: 50%; background: rgba(0, 0, 0, 0.35); }
.j-pv.novo { border-color: #ff9f5a; color: #ffbf8a; }
.j-pv.chefe { border-color: #ff6b6b; color: #ff9a9a; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }

.j-cidade-barra { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--borda); font-size: 14px; line-height: 1.35; }
.j-cidade-barra b { color: var(--luz); }
.j-cidade-barra .j-barra { height: 8px; margin: 8px 0 4px; display: block; }
.j-cidade-barra small { color: var(--apagado); font-size: 12px; }
.j-cidade-barra.ordem { border-color: rgba(255, 211, 107, 0.45); }
.j-ajuda { border-left: 3px solid #7cc4ff; }
[data-postar] { margin-top: 6px; }

/* ---------- personalização: editor ---------- */
#visual { position: fixed; inset: 0; z-index: 30; background: rgba(5, 8, 16, 0.82); display: flex; justify-content: center; }
#visual.some { display: none; }
.v-caixa { width: 100%; max-width: 540px; height: 100%; display: flex; flex-direction: column; background: var(--painel); border-left: 1px solid var(--borda); border-right: 1px solid var(--borda); }
.v-topo { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--borda); }
.v-topo b { font-size: 17px; font-weight: 900; }
.v-voltar { border-radius: 10px; border: 1px solid var(--borda); background: transparent; padding: 7px 10px; font-weight: 800; }
.v-salvo { margin-left: auto; font-size: 12.5px; color: var(--apagado); text-align: right; }
.v-previa { flex: none; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 30vh; min-height: 170px; padding: 8px 8px 4px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 211, 107, 0.16), transparent 70%); }
.v-pb { position: relative; height: 100%; display: flex; align-items: flex-end; flex: none; }
.v-pb-boneco { height: 94%; width: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.6)); }
.v-pb-pet { position: absolute; left: 70%; bottom: 0; height: 30%; width: auto; }
.v-pc { height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.v-pc-casa { height: 86%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.6)); }
.v-previa.so-boneco .v-pc { opacity: 0.45; }
.v-previa.so-casa .v-pb { opacity: 0.45; }
.v-abas { margin: 8px 12px 0; }
.v-lista { flex: 1; overflow-y: auto; padding: 2px 12px 12px; -webkit-overflow-scrolling: touch; }
.v-secao { margin: 12px 0 2px; }
.v-tit { margin: 0 0 6px; font-weight: 900; font-size: 14px; }
.v-tit small { margin-left: 8px; color: var(--apagado); font-weight: 600; font-size: 11.5px; }
.v-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v-chip { display: inline-block; border-radius: 14px; border: 1px solid var(--borda); background: rgba(255, 255, 255, 0.05); padding: 6px 11px; font-weight: 700; font-size: 13px; text-align: left; line-height: 1.25; }
.v-chip i { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.55); vertical-align: -3px; margin-right: 6px; }
.v-chip small { display: block; font-size: 10.5px; color: var(--apagado); font-weight: 600; }
.v-chip.on { border-color: var(--luz); background: rgba(255, 211, 107, 0.16); }
.v-chip.trancado { opacity: 0.5; cursor: default; }
.v-chip.v-pegar { border-color: #7cc4ff; color: #bfe3ff; }
.v-rodape { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--borda); }

/* ---------- personalização: cidade, rua e card ---------- */
.pessoa .v-pet { position: absolute; left: 0; bottom: 0; transform: translateX(28%); height: calc(var(--h) * 0.3); width: auto; pointer-events: none; }
.pessoa.virado .v-pet { transform: translateX(-128%) scaleX(-1); }
.lote .v-pet { position: absolute; left: 0; bottom: -7vh; transform: translateX(95%); height: 5vh; width: auto; pointer-events: none; }
.v-obra { margin: 6px 0 0; padding: 5px 9px 6px; border-radius: 10px; background: rgba(5, 8, 16, 0.62); border: 1px solid var(--borda); font-size: 11.5px; line-height: 1.3; max-width: 320px; }
.v-obra b { color: var(--luz); }
.v-obra .j-barra { display: block; margin: 4px 0 0; height: 5px; }
.v-obra small { color: var(--apagado); font-size: 11.5px; }
.v-figs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.v-fig { border-radius: 999px; background: rgba(255, 211, 107, 0.12); border: 1px solid rgba(255, 211, 107, 0.35); padding: 4px 10px; font-size: 12.5px; font-weight: 700; }
.v-fig b { color: var(--luz); }
.v-dar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.v-dar button { border-radius: 999px; border: 1px solid var(--borda); background: rgba(255, 255, 255, 0.06); padding: 7px 11px; font-weight: 700; font-size: 13px; }
.v-semana { color: var(--luz); font-weight: 900; margin: 8px 0; }
.v-ruinas .lote .dono { filter: brightness(0.6) saturate(0.5); }
.v-miniatura { display: flex; align-items: flex-end; justify-content: center; gap: 10px; height: 130px; margin: 2px 0 12px; }
.v-miniatura img { height: 100%; width: auto; max-width: 60%; object-fit: contain; object-position: bottom; }
.v-miniatura img.v-mb { height: 92%; }
.rank .v-casa-mini { height: 34px; width: auto; vertical-align: middle; margin-right: 6px; }

/* missão do dia */
.j-missao { margin: 8px 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(124, 196, 255, 0.08); border: 1px solid rgba(124, 196, 255, 0.35); font-size: 14px; line-height: 1.35; }
.j-missao b { color: #bfe3ff; }
.j-missao small { display: block; margin-top: 4px; color: var(--apagado); font-size: 12px; }
.j-missao .j-dias { display: inline-block; margin-left: 6px; font-weight: 800; color: #ffb03a; }
.j-missao.pronta { border-color: var(--luz); background: rgba(255, 211, 107, 0.1); }
.j-missao .principal { margin-top: 8px; }

/* loja da personalização: experimentar tudo, salvar só o que é seu */
.v-chip.a-venda { border-color: rgba(255, 211, 107, 0.5); }
.v-chip.a-venda small { color: var(--luz); }
.v-chip.trancado { opacity: 0.62; cursor: pointer; }
.v-chip.trancado.on, .v-chip.a-venda.on { opacity: 1; box-shadow: 0 0 0 2px rgba(255, 211, 107, 0.35) inset; }
.v-chip[disabled] { cursor: default; }
.v-saldo { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.v-ouro { color: #ffcf4a; }
.v-dica { margin: 8px 0 0; font-size: 12.5px; }
.v-compra { flex: none; max-height: 52vh; overflow-y: auto; padding: 12px; border-top: 1px solid var(--borda); background: rgba(5, 8, 16, 0.96); }
.v-compra.some { display: none; }
.v-compra .secundario, .v-compra .principal { margin-top: 8px; }
.v-falta { list-style: none; margin: 0 0 8px; padding: 0; }
.v-falta li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--borda); font-size: 14px; }
.v-falta li span { color: var(--luz); font-weight: 800; text-align: right; }

/* ---------- luta nova (2026-11-06): botão do poder da profissão (enche matando; cheio, pulsa) ---------- */
#j-poder { position: absolute; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 211, 107, 0.5); background: rgba(11, 17, 32, 0.86); color: var(--luz); font: 900 15px var(--fonte);
  padding: 9px 14px 13px; text-align: left; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); touch-action: manipulation; min-width: 118px; }
#j-poder small { display: block; font-size: 10.5px; font-weight: 700; color: var(--apagado); }
#j-poder::after { content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: var(--p, 0%); background: #ffd36b; transition: width 0.2s; }
#j-poder.cheio { border-color: #ffd36b; background: linear-gradient(180deg, #7a3200, #2a1200); color: #ffe27a; animation: j-poder-pulsa 0.8s ease-in-out infinite; }
#j-poder.cheio small { color: #ffe9b0; }
#j-poder.some, #jogo.no-painel #j-poder { display: none; }
#j-poder:active { transform: scale(0.95); }
@keyframes j-poder-pulsa {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 211, 107, 0.75), 0 6px 16px rgba(0, 0, 0, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255, 211, 107, 0), 0 6px 16px rgba(0, 0, 0, 0.5); }
}

/* ---------- visual novo (2026-11-06): arma num botão redondo, barra de "faltam", mapa que clareia, gente da cidade, placa de rua ---------- */
#j-arma-botao { position: absolute; z-index: 3; right: 10px; top: calc(max(78px, 11vh) + 24px); width: 62px; height: 62px; border-radius: 50%;
  border: 2px solid var(--luz); background: rgba(11, 17, 32, 0.88); color: var(--luz); display: grid; place-items: center; align-content: center;
  gap: 1px; padding: 0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); touch-action: manipulation; font: 800 9px var(--fonte); }
#j-arma-botao .ic { display: grid; place-items: center; min-height: 28px; font-size: 24px; line-height: 1; }
#j-arma-botao .ic img { max-width: 40px; max-height: 28px; display: block; }
#j-arma-botao.aberto { background: rgba(255, 211, 107, 0.25); }
#j-arma-botao:active { transform: scale(0.94); }
#j-arma-botao.some, #jogo.no-painel #j-arma-botao { display: none; }
#jogo.armas-redondas #j-armas-barra { top: calc(max(78px, 11vh) + 94px); }
#jogo.armas-redondas #j-armas-barra:not(.aberto) { display: none; }

#j-falta { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
#j-falta b { font: 900 12px var(--fonte); color: #ffb3b3; text-shadow: 0 1px 3px #000; min-width: 64px; }
#j-falta .j-barra { height: 6px; }
#j-falta .j-barra i { background: linear-gradient(90deg, #8bd34a, #c7f08a); }
#j-falta.some { display: none; }

.j-banda.fechada { filter: brightness(0.42) saturate(0.35); }
.j-banda.aberta { filter: brightness(1.12) saturate(1.15); }
.j-banda.aberta::after { opacity: 0.55; }
.j-nevoa { position: absolute; left: 0; right: 0; top: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(10, 12, 22, 0.78), rgba(18, 22, 36, 0.62) 80%, rgba(18, 22, 36, 0));
  -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent); }
.j-nevoa::before { content: ""; position: absolute; inset: 0; opacity: 0.5; animation: j-nevoa-anda 14s linear infinite alternate;
  background: radial-gradient(ellipse 40% 12% at 30% 70%, rgba(160, 170, 205, 0.35), transparent 70%),
              radial-gradient(ellipse 45% 10% at 75% 40%, rgba(160, 170, 205, 0.3), transparent 70%); }
@keyframes j-nevoa-anda { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
.j-caminho polyline.aceso { stroke: #ffd36b; stroke-width: 5; stroke-dasharray: none; opacity: 0.85; filter: drop-shadow(0 0 6px rgba(255, 190, 80, 0.9)); }
.j-no.vencida { box-shadow: 0 0 14px rgba(139, 211, 74, 0.55), 0 4px 10px rgba(0, 0, 0, 0.6); }

.j-no-zumbi { position: absolute; z-index: 2; height: 46px; width: auto; transform: translate(30%, -88%); pointer-events: none;
  filter: brightness(0.6) saturate(0.7) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.6)); transform-origin: 50% 100%;
  animation: j-zumbi-balanca 1.4s ease-in-out infinite alternate; }
.j-no-zumbi.perto { filter: brightness(0.85) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.6)); }
.j-no-zumbi.cai { animation: j-zumbi-cai 0.9s ease-in forwards; }
@keyframes j-zumbi-balanca { from { rotate: -4deg; } to { rotate: 4deg; } }
@keyframes j-zumbi-cai { 0% { rotate: 0deg; opacity: 1; } 60% { rotate: -88deg; opacity: 1; } 100% { rotate: -90deg; opacity: 0; } }

#j-pet-mapa { position: absolute; z-index: 3; height: 34px; width: auto; transform: translate(30%, -100%); pointer-events: none;
  transition: left 0.9s ease-in-out, top 0.9s ease-in-out; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6)); }
.j-poeira { position: absolute; z-index: 2; width: 18px; height: 8px; margin: 0 0 0 -9px; border-radius: 50%; pointer-events: none;
  background: rgba(210, 190, 150, 0.55); animation: j-poeira 0.65s ease-out forwards; }
@keyframes j-poeira { to { transform: scale(2.4) translateY(-6px); opacity: 0; } }

.j-vizinho { position: absolute; z-index: 2; transform: translate(-50%, -100%); display: grid; justify-items: center; pointer-events: none; }
.j-vizinho img { height: 40px; width: auto; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.6)); }
.j-vizinho span { margin-top: -2px; padding: 0 4px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #cfe8ff; font: 800 9px var(--fonte); white-space: nowrap; }
.j-vizinho.lider::before { content: "👑"; font-size: 16px; line-height: 1; margin-bottom: -4px; }
.j-vizinho.lider span { color: var(--luz); }

.j-placa { position: absolute; z-index: 8; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translate(-50%, -140%);
  padding: 8px 18px 7px; border-radius: 8px; background: #1d4fa0; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  color: #fff; text-align: center; white-space: nowrap; animation: j-placa-desce 0.5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.j-placa b { display: block; font: 900 20px var(--fonte); letter-spacing: 0.5px; text-transform: uppercase; }
.j-placa small { display: block; font: 700 11px var(--fonte); opacity: 0.85; }
.j-placa.vai { animation: j-placa-sobe 0.5s ease-in forwards; }
@keyframes j-placa-desce { to { transform: translate(-50%, 0); } }
@keyframes j-placa-sobe { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -140%); opacity: 0; } }

/* ---------- mapa desenhado (2026-11-06): um desenho por lugar, as fases em cima do caminho, o chefe na fase 10 ---------- */
.j-banda.desenhada { background-size: 100% 100%; background-position: center; }
.j-banda.desenhada::after { background: linear-gradient(rgba(5, 7, 13, 0.6), rgba(5, 7, 13, 0) 8%, rgba(5, 7, 13, 0) 92%, rgba(5, 7, 13, 0.6)); }
.j-banda.desenhada.aberta::after { opacity: 1; }
.j-banda.desenhada.fechada { filter: brightness(0.5) saturate(0.45); }
.j-caminho polyline:not(.aceso) { opacity: 0.4; }
.j-no-chefe { position: absolute; z-index: 2; height: 74px; width: auto; transform: translate(-118%, -90%); pointer-events: none; transform-origin: 50% 100%;
  filter: brightness(0.8) drop-shadow(0 4px 4px rgba(0, 0, 0, 0.7)); animation: j-zumbi-balanca 1.8s ease-in-out infinite alternate; }
.j-no-chefe.tinta { filter: brightness(0.8) sepia(0.6) hue-rotate(-30deg) saturate(2.2) drop-shadow(0 4px 4px rgba(0, 0, 0, 0.7)); }
