/* V118 — layout limpo e único para Assombrar.
   Esta folha é a única responsável pelos cards de distribuição. */

#fun-votes .haunt-modern-card{
  display:grid!important;
  grid-template-columns:minmax(120px,38%) minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  padding:9px!important;
  min-height:0!important;
  border-radius:16px!important;
  overflow:hidden!important;
}

#fun-votes .haunt-modern-card>.visual{
  grid-column:1!important;
  grid-row:1!important;
  position:relative!important;
  width:100%!important;
  aspect-ratio:4/5!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border-radius:13px!important;
  overflow:hidden!important;
}

#fun-votes .haunt-modern-card>.visual .vote-photo-gallery,
#fun-votes .haunt-modern-card>.visual .vote-main-photo-btn,
#fun-votes .haunt-modern-card>.visual .vote-main-photo{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  object-fit:cover!important;
}

#fun-votes .haunt-card-copy{
  grid-column:2!important;
  grid-row:1!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  gap:7px!important;
  padding:2px 0!important;
}

#fun-votes .haunt-card-title{
  display:flex!important;
  align-items:flex-start!important;
  gap:6px!important;
  min-width:0!important;
  margin:0!important;
}
#fun-votes .haunt-card-title h4{
  flex:1 1 auto!important;
  min-width:0!important;
  margin:0!important;
  font-size:.88rem!important;
  line-height:1.1!important;
  white-space:normal!important;
}
#fun-votes .haunt-kind-tag{
  flex:0 0 auto!important;
  padding:3px 6px!important;
  border-radius:999px!important;
  font-size:.43rem!important;
  line-height:1!important;
  white-space:nowrap!important;
}

#fun-votes .haunt-info-row{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:5px!important;
  margin:0!important;
  min-width:0!important;
}
#fun-votes .haunt-info-chip{
  display:inline-flex!important;
  align-items:center!important;
  gap:3px!important;
  min-width:0!important;
  min-height:23px!important;
  margin:0!important;
  padding:4px 7px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.035)!important;
  color:#cdd8e2!important;
  font-size:.50rem!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#fun-votes .haunt-info-chip.address,
#fun-votes .haunt-info-chip.costume{
  flex:1 0 100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#fun-votes .haunt-info-chip.ok{
  color:#bfffd0!important;
  border-color:rgba(87,220,125,.22)!important;
}
#fun-votes .haunt-info-chip.muted{
  color:#aab5bf!important;
}
#fun-votes .haunt-info-chip.received-total{
  color:#f3f7fb!important;
}
#fun-votes .haunt-info-chip .inline-token{
  width:15px!important;
  height:15px!important;
  object-fit:contain!important;
}

/* Estado bloqueado (QR não lido / própria casa). */
#fun-votes .own-block{
  margin-top:3px!important;
  min-height:40px!important;
  padding:7px 9px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:11px!important;
  font-size:.54rem!important;
  line-height:1.18!important;
  text-align:center!important;
}

/* Linha de ação compacta. */
#fun-votes .haunt-action-shell{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 58px!important;
  align-items:stretch!important;
  gap:6px!important;
  width:100%!important;
  margin-top:3px!important;
  padding:0!important;
}

#fun-votes .haunt-primary-btn{
  appearance:none!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  width:100%!important;
  min-width:0!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  margin:0!important;
  padding:0 9px!important;
  border:1px solid rgba(255,146,52,.58)!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#ffa536,#ef7a0c)!important;
  color:#0b1620!important;
  box-shadow:0 4px 13px rgba(255,128,25,.17)!important;
  font:900 .66rem/1 system-ui,-apple-system,sans-serif!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
#fun-votes .haunt-primary-btn img{
  flex:0 0 24px!important;
  width:24px!important;
  height:24px!important;
  object-fit:contain!important;
}
#fun-votes .haunt-primary-btn b{
  flex:0 0 auto!important;
  padding:3px 5px!important;
  border-radius:999px!important;
  background:rgba(0,0,0,.12)!important;
  font-size:.55rem!important;
}
#fun-votes .haunt-primary-btn:active:not(:disabled){
  transform:scale(.98)!important;
}
#fun-votes .haunt-primary-btn:disabled{
  opacity:.42!important;
  box-shadow:none!important;
}

/* Ícone + quantidade. O próprio chip recolhe 1 ao toque. */
#fun-votes .haunt-sent-chip{
  appearance:none!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  width:58px!important;
  min-width:58px!important;
  max-width:58px!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  margin:0!important;
  padding:0 5px!important;
  border:1px solid rgba(255,196,96,.30)!important;
  border-radius:12px!important;
  background:rgba(255,174,64,.07)!important;
  color:#fff!important;
  box-shadow:none!important;
  font-family:system-ui,-apple-system,sans-serif!important;
  cursor:pointer!important;
  overflow:hidden!important;
}
#fun-votes .haunt-sent-chip>img{
  flex:0 0 21px!important;
  width:21px!important;
  height:21px!important;
  object-fit:contain!important;
}
#fun-votes .haunt-sent-chip>b{
  margin:0!important;
  padding:0!important;
  font-size:.73rem!important;
  line-height:1!important;
  color:#fff!important;
}
#fun-votes .haunt-sent-chip:active:not(:disabled){
  transform:scale(.96)!important;
  background:rgba(255,174,64,.14)!important;
}
#fun-votes .haunt-sent-chip:disabled{
  cursor:default!important;
  opacity:.42!important;
}

/* Nenhum controle antigo deve reaparecer. */
#fun-votes .haunt-adjust,
#fun-votes .haunt-control,
#fun-votes .haunt-photo-overlay,
.haunt-flying-token{
  display:none!important;
}

/* Fantasma HQ exatamente sobre o retângulo real da foto. */
.haunt-photo-stage{
  position:fixed!important;
  z-index:2147483646!important;
  display:grid!important;
  place-items:center!important;
  pointer-events:none!important;
  overflow:hidden!important;
  border-radius:13px!important;
  background:radial-gradient(circle at center,rgba(255,255,255,.12),rgba(255,255,255,0) 70%)!important;
}
.haunt-photo-stage img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:88%!important;
  max-height:91%!important;
  object-fit:contain!important;
  opacity:0!important;
  transform:translateY(12px) scale(.34) rotate(-7deg)!important;
  filter:drop-shadow(0 9px 18px rgba(0,0,0,.48))!important;
  transition:opacity .30s ease,transform .42s cubic-bezier(.18,.8,.22,1)!important;
}
.haunt-photo-stage.show img{
  opacity:.98!important;
  transform:translateY(0) scale(1) rotate(0)!important;
}
.haunt-photo-stage.fade img{
  opacity:0!important;
  transform:translateY(-10px) scale(1.10) rotate(3deg)!important;
}
.haunt-photo-stage.fantasy img{
  max-width:78%!important;
  max-height:85%!important;
}

#fun-votes .vote-card.haunt-hit>.visual{
  animation:hauntV118Pulse .55s ease!important;
}
@keyframes hauntV118Pulse{
  0%{box-shadow:0 0 0 rgba(255,151,49,0)}
  40%{box-shadow:0 0 0 3px rgba(255,151,49,.32),0 0 19px rgba(255,151,49,.25)}
  100%{box-shadow:0 0 0 rgba(255,151,49,0)}
}

@media(max-width:620px){
  #fun-votes .haunt-modern-card{
    grid-template-columns:minmax(112px,39%) minmax(0,1fr)!important;
    gap:8px!important;
    padding:7px!important;
  }
  #fun-votes .haunt-card-copy{
    gap:5px!important;
    padding-top:1px!important;
  }
  #fun-votes .haunt-card-title h4{
    font-size:.74rem!important;
  }
  #fun-votes .haunt-kind-tag{
    display:none!important;
  }
  #fun-votes .haunt-info-row{
    gap:4px!important;
  }
  #fun-votes .haunt-info-chip{
    min-height:20px!important;
    padding:3px 5px!important;
    font-size:.43rem!important;
  }
  #fun-votes .haunt-info-chip .inline-token{
    width:14px!important;
    height:14px!important;
  }
  #fun-votes .own-block{
    min-height:36px!important;
    padding:6px 7px!important;
    font-size:.48rem!important;
  }
  #fun-votes .haunt-action-shell{
    grid-template-columns:minmax(0,1fr) 52px!important;
    gap:5px!important;
  }
  #fun-votes .haunt-primary-btn{
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    padding:0 7px!important;
    gap:4px!important;
    font-size:.59rem!important;
  }
  #fun-votes .haunt-primary-btn img{
    width:21px!important;
    height:21px!important;
    flex-basis:21px!important;
  }
  #fun-votes .haunt-primary-btn b{
    font-size:.50rem!important;
  }
  #fun-votes .haunt-sent-chip{
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    gap:3px!important;
  }
  #fun-votes .haunt-sent-chip>img{
    width:18px!important;
    height:18px!important;
    flex-basis:18px!important;
  }
  #fun-votes .haunt-sent-chip>b{
    font-size:.65rem!important;
  }
}

@media(max-width:390px){
  #fun-votes .haunt-modern-card{
    grid-template-columns:minmax(104px,38%) minmax(0,1fr)!important;
    gap:6px!important;
  }
  #fun-votes .haunt-info-row{
    gap:3px!important;
  }
  #fun-votes .haunt-action-shell{
    grid-template-columns:minmax(0,1fr) 48px!important;
  }
  #fun-votes .haunt-sent-chip{
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
  }
}


/* V119/V137 — cards sem foto usam a mesma geometria dos cards com foto */
#fun-votes .haunt-modern-card.no-photo>.visual{
  background:
    radial-gradient(circle at 50% 35%,rgba(255,255,255,.05),transparent 55%),
    #090b14!important;
  border:1px solid rgba(255,255,255,.08)!important;
}
#fun-votes .haunt-modern-card.no-photo>.visual .vote-photo-fallback{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  display:grid!important;
  place-items:center!important;
  font-size:2.45rem!important;
  line-height:1!important;
  opacity:.86!important;
}
@media(max-width:620px){
  #fun-votes .haunt-modern-card.no-photo>.visual .vote-photo-fallback{
    font-size:2rem!important;
  }
}

/* O Gasparzinho é mais estreito: ganha um pouco mais de presença sem cortar. */
.haunt-photo-stage.fantasy img{
  max-width:86%!important;
  max-height:90%!important;
}


/* V120 — status QR padronizado com o marcador do mapa */
#fun-votes .haunt-info-chip.haunt-qr-status{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  min-height:28px!important;
  padding:3px 7px 3px 4px!important;
  white-space:normal!important;
}
#fun-votes .haunt-qr-icon{
  flex:0 0 22px!important;
  width:22px!important;
  height:22px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  border:2px solid #102233!important;
  background:#fff!important;
  color:#07131f!important;
  font-size:.48rem!important;
  font-weight:950!important;
  line-height:1!important;
}
#fun-votes .haunt-qr-icon.visited{
  background:#6cdb51!important;
  color:#07131f!important;
  border-color:#153b1d!important;
  font-size:.62rem!important;
}
#fun-votes .haunt-qr-copy{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  gap:1px!important;
}
#fun-votes .haunt-qr-copy b{
  margin:0!important;
  padding:0!important;
  font-size:.49rem!important;
  line-height:1.05!important;
  color:inherit!important;
  white-space:nowrap!important;
}
#fun-votes .haunt-qr-copy small{
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:.36rem!important;
  line-height:1.05!important;
  color:#8fa0ae!important;
  white-space:nowrap!important;
}
@media(max-width:620px){
  #fun-votes .haunt-info-chip.haunt-qr-status{
    min-height:25px!important;
    padding:2px 6px 2px 3px!important;
    gap:4px!important;
  }
  #fun-votes .haunt-qr-icon{
    flex-basis:19px!important;
    width:19px!important;
    height:19px!important;
    font-size:.42rem!important;
  }
  #fun-votes .haunt-qr-icon.visited{
    font-size:.55rem!important;
  }
  #fun-votes .haunt-qr-copy b{
    font-size:.43rem!important;
  }
  #fun-votes .haunt-qr-copy small{
    font-size:.32rem!important;
  }
}


/* V122 — QR status em uma linha, sem descrição redundante */
#fun-votes .haunt-info-chip.haunt-qr-status{
  min-height:24px!important;
  padding:3px 7px 3px 4px!important;
}
#fun-votes .haunt-qr-copy{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:0!important;
}
#fun-votes .haunt-qr-copy b{
  font-size:.48rem!important;
  line-height:1!important;
}
#fun-votes .haunt-qr-copy small{
  display:none!important;
}
@media(max-width:620px){
  #fun-votes .haunt-info-chip.haunt-qr-status{
    min-height:22px!important;
    padding:2px 6px 2px 3px!important;
  }
  #fun-votes .haunt-qr-copy b{
    font-size:.42rem!important;
  }
}


/* V125 — saldo zero continua clicável para explicar o motivo */
#fun-votes .haunt-primary-btn.no-credit{
  opacity:.58!important;
  filter:saturate(.6)!important;
  box-shadow:none!important;
}
#fun-votes .haunt-primary-btn.no-credit-pulse{
  animation:noCreditPulse .5s ease!important;
}
@keyframes noCreditPulse{
  0%{transform:scale(1)}
  45%{transform:scale(.96);box-shadow:0 0 0 3px rgba(255,120,40,.22)}
  100%{transform:scale(1)}
}


/* V126 — restaura pulso laranja sobre a foto ao assombrar */
#fun-votes .vote-card.haunt-hit>.visual{
  animation:hauntOrangeGlow .85s cubic-bezier(.18,.78,.22,1)!important;
  position:relative!important;
  z-index:2!important;
}
@keyframes hauntOrangeGlow{
  0%{
    box-shadow:0 0 0 0 rgba(255,145,38,0),0 0 0 rgba(255,145,38,0)!important;
    filter:brightness(1) saturate(1)!important;
  }
  38%{
    box-shadow:0 0 0 4px rgba(255,145,38,.48),0 0 28px 10px rgba(255,112,18,.34)!important;
    filter:brightness(1.13) saturate(1.12)!important;
  }
  68%{
    box-shadow:0 0 0 3px rgba(255,145,38,.26),0 0 18px 6px rgba(255,112,18,.18)!important;
    filter:brightness(1.07) saturate(1.06)!important;
  }
  100%{
    box-shadow:0 0 0 0 rgba(255,145,38,0),0 0 0 rgba(255,145,38,0)!important;
    filter:brightness(1) saturate(1)!important;
  }
}


/* V137 — mantém o frame compacto; mídia inteira e mesma geometria com/sem foto */
#fun-votes .haunt-modern-card.has-photo,
#fun-votes .haunt-modern-card.no-photo{
  align-items:stretch!important;
  min-height:0!important;
}

#fun-votes .haunt-modern-card.has-photo>.visual,
#fun-votes .haunt-modern-card.no-photo>.visual{
  position:relative!important;
  align-self:stretch!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  overflow:hidden!important;
  background:#081522!important;
}

/* A galeria fica fora do cálculo de altura:
   quem define a altura do card é a coluna de informações/ação. */
#fun-votes .haunt-modern-card.has-photo>.visual>.vote-photo-gallery{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
}

#fun-votes .haunt-modern-card.has-photo>.visual .vote-main-photo-btn{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}

#fun-votes .haunt-modern-card.has-photo>.visual .vote-main-photo{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:center center!important;
}

/* A coluna de texto usa toda a altura útil e mantém a ação encostada embaixo. */
#fun-votes .haunt-modern-card.has-photo .haunt-card-copy,
#fun-votes .haunt-modern-card.no-photo .haunt-card-copy{
  align-self:stretch!important;
  justify-content:flex-start!important;
  min-height:0!important;
  height:auto!important;
}

#fun-votes .haunt-modern-card.has-photo .haunt-action-shell,
#fun-votes .haunt-modern-card.has-photo .own-block,
#fun-votes .haunt-modern-card.no-photo .haunt-action-shell,
#fun-votes .haunt-modern-card.no-photo .own-block{
  margin-top:auto!important;
}

/* Mantém navegação/contador da galeria dentro do novo frame reduzido. */
#fun-votes .haunt-modern-card.has-photo .vote-gallery-nav{
  top:50%!important;
  transform:translateY(-50%)!important;
}
#fun-votes .haunt-modern-card.has-photo .vote-gallery-count{
  bottom:7px!important;
}

/* Garante um mínimo apenas para evitar cards excessivamente achatados;
   acima disso a própria coluna direita define a altura real. */
#fun-votes .haunt-modern-card.has-photo,
#fun-votes .haunt-modern-card.no-photo{
  min-height:138px!important;
}
#fun-votes .haunt-modern-card.has-photo>.visual,
#fun-votes .haunt-modern-card.no-photo>.visual{
  min-height:120px!important;
}

@media(max-width:620px){
  #fun-votes .haunt-modern-card.has-photo,
  #fun-votes .haunt-modern-card.no-photo{
    min-height:126px!important;
  }
  #fun-votes .haunt-modern-card.has-photo>.visual,
  #fun-votes .haunt-modern-card.no-photo>.visual{
    min-height:112px!important;
  }
}

@media(max-width:390px){
  #fun-votes .haunt-modern-card.has-photo,
  #fun-votes .haunt-modern-card.no-photo{
    min-height:122px!important;
  }
  #fun-votes .haunt-modern-card.has-photo>.visual,
  #fun-votes .haunt-modern-card.no-photo>.visual{
    min-height:108px!important;
  }
}
