/* V38 — organização da aba Ranking em Diversão.
   Escopo restrito à aba Ranking; não altera cabeçalho, mapa ou navegação principal. */

.ranking-section-card{
  margin-top:14px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:16px;
  padding:14px;
  background:rgba(255,255,255,.025);
}

#fun-ranking .ranking-section-card:first-child{margin-top:0}

.participant-list-legend{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 12px;
  font-size:.72rem;
  color:var(--muted);
}
.participant-list-legend span{
  padding:5px 8px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:999px;
  background:rgba(255,255,255,.025);
}

.participant-house-directory{
  display:grid;
  gap:14px;
}
.participant-street-group{
  border:1px solid rgba(255,255,255,.09);
  border-radius:14px;
  overflow:hidden;
  background:rgba(8,6,13,.24);
}
.participant-street-group h4{
  margin:0;
  padding:10px 12px;
  font-size:.93rem;
  background:rgba(142,92,255,.1);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.participant-street-table{
  display:grid;
}
.participant-house-row{
  display:grid;
  grid-template-columns:60px minmax(120px,1fr) minmax(112px,auto) minmax(96px,auto);
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.07);
}
.participant-house-row:last-child{border-bottom:0}
.participant-number{
  font-size:.95rem;
  color:#fff;
}
.participant-name{
  min-width:0;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
}
.participant-candy,
.participant-visit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  padding:5px 8px;
  border-radius:999px;
  font-size:.7rem;
  font-weight:850;
  white-space:nowrap;
}
.participant-candy.available{background:rgba(88,214,141,.13);color:#b9f7cf}
.participant-candy.low{background:rgba(255,209,102,.13);color:#ffe8a3}
.participant-candy.soldout{background:rgba(255,95,109,.13);color:#ffd1d6}
.participant-candy.paused{background:rgba(255,255,255,.07);color:#d4c8d8}
.participant-visit.visited{background:rgba(88,214,141,.12);color:#b9f7cf}
.participant-visit.unvisited{background:rgba(255,255,255,.06);color:#cbbfd0}
.participant-visit.own{background:rgba(142,92,255,.14);color:#e1d6ff}

@media(max-width:700px){
  .fun-tabs button{padding-left:6px;padding-right:6px}
  .participant-house-row{
    grid-template-columns:48px minmax(0,1fr);
    gap:6px 10px;
    padding:10px;
  }
  .participant-number{grid-column:1;grid-row:1 / span 2;align-self:center}
  .participant-name{grid-column:2;grid-row:1;font-size:.86rem}
  .participant-candy,
  .participant-visit{
    font-size:.66rem;
    padding:4px 7px;
  }
  .participant-candy{grid-column:2;grid-row:2;justify-self:start}
  .participant-visit{grid-column:2;grid-row:3;justify-self:start}
  .participant-street-group h4{font-size:.88rem}
  .ranking-section-card{padding:11px}
  #fun-ranking .compact-head{align-items:flex-start}
  #fun-ranking .token-reward{max-width:120px;white-space:normal;text-align:center}
}
