/* ═══ badge.css ═══ */
body { padding-top: calc(var(--hh) + env(safe-area-inset-top,0)); }

.bdg-back {
  font-size: .85rem; font-weight: 700;
  color: rgba(255,255,255,.5); transition: color .15s;
  flex-shrink: 0;
}
.bdg-back:hover { color: var(--text); }
.bdg-header-title {
  font-family: var(--font-d); font-size: 1.1rem;
  letter-spacing: .08em; color: rgba(255,255,255,.55);
}

.bdg-page {
  max-width: var(--max-w); margin: 0 auto;
  padding: 24px 20px 48px;
}
.bdg-no-session { text-align: center; padding: 48px 0; color: var(--muted); }
.bdg-no-session a { color: var(--primary); text-decoration: underline; }

.bdg-img {
  display: block; width: 100%; max-width: var(--max-w);
  border-radius: var(--radius); margin: 0 auto 20px;
  box-shadow: var(--shadow);
}

.bdg-animal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  text-align: center; margin-bottom: 20px;
}
.bdg-animal-name {
  font-family: var(--font-d); font-size: 1.6rem;
  color: var(--primary); letter-spacing: .05em; margin-bottom: 8px;
}
.bdg-animal-desc {
  font-size: .85rem; color: rgba(255,255,255,.65);
  line-height: 1.65; font-style: italic;
}

.bdg-counter {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 28px 20px;
  text-align: center; margin-bottom: 22px;
}
.bdg-counter-num {
  font-size: clamp(3.5rem, 15vw, 5.5rem); font-weight: 900;
  color: var(--primary); line-height: 1; margin-bottom: 8px;
  transition: transform .3s ease;
}
.bdg-counter-label { font-size: .88rem; color: var(--muted); }

.bdg-share-cta {
  font-size: .9rem; font-weight: 700; text-align: center;
  margin-bottom: 16px; line-height: 1.5;
}

.bdg-circles {
  display: flex;
  justify-content: center;
  gap: 12px; 
  flex-wrap: nowrap; 
  margin-bottom: 20px;
}

.bdg-circles .circle-icon { 
  width: 50px; 
  height: 50px; 
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Ensures the official vectors resize smoothly and inherit button text color */
.bdg-circles .circle-icon svg {
  width: 22px;
  height: 22px;
  fill: #ffffff; /* Or currentColor if handled by text style */
  display: block;
}

@media(min-width:768px){ .bdg-page { padding-left: 0; padding-right: 0; } }

/* ── Level progression track ── */
.levels-track {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.level-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
}
.level-card.level-current {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.level-card-img-wrap {
  position: relative;
  line-height: 0;
}
.level-card-img {
  display: block;
  width: 100%;
  height: auto;
}
.level-card.level-locked .level-card-img {
  filter: grayscale(1) brightness(0.25);
}

.level-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.level-lock-overlay svg {
  width: 48px;
  height: 48px;
  color: rgba(255,255,255,.35);
  stroke: rgba(255,255,255,.35);
}

.level-current-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #000;
  font-family: var(--font-d);
  font-size: .8rem;
  letter-spacing: .1em;
  padding: 4px 12px;
  border-radius: 999px;
}

.level-card-info {
  padding: 14px 20px 18px;
}
.level-card-name {
  font-family: var(--font-d);
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: .05em;
  margin-bottom: 6px;
}
.level-card-desc {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  line-height: 1.65;
  font-style: italic;
}
.level-card.level-locked .level-card-name,
.level-card.level-locked .level-card-desc {
  opacity: 0.3;
}