.bdg--bronze {
  --tier: #d39463;
  --tier-dim: rgba(211, 148, 99, .14);
}

.bdg--silber {
  --tier: #c6d2dd;
  --tier-dim: rgba(198, 210, 221, .11);
}

.bdg--gold {
  --tier: #f5c518;
  --tier-dim: rgba(245, 197, 24, .14);
}

.bdg--platin {
  --tier: #9ff3e8;
  --tier-dim: rgba(159, 243, 232, .13);
}

.bdg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bdg-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.bdg-mini {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 20px;
  color: var(--tier, var(--muted));
  background: var(--tier-dim, transparent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.bdg-mini .icon,
.cm-line__name .bdg-mini .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.1;
  color: inherit;
  vertical-align: 0;
}

.bdg-more {
  padding-left: 2px;
  font: .66rem var(--font-mono);
  color: var(--muted);
}

.bdg-panel__count {
  font: .72rem var(--font-mono);
  letter-spacing: .08em;
  color: var(--muted);
}

.bdg-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 10px;
}

.bdg-tile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .2);
}

.bdg-tile h3 {
  margin: 3px 0 2px;
  font-size: .98rem;
}

.bdg-tile p {
  margin: 0 0 6px;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--text-2);
}

.bdg-tile__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font: .68rem var(--font-mono);
  letter-spacing: .05em;
  color: var(--muted);
}

.bdg-tile__meta code {
  font-size: .66rem;
}

.bdg-tier {
  color: var(--tier);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.bdg-tile.is-locked {
  border-style: dashed;
}

.bdg-tile.is-locked .bdg-tile__text {
  opacity: .6;
}

.bdg-medal {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--tier);
}

.bdg-medal__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bdg-medal__frame path:first-child {
  fill: var(--tier-dim);
  stroke: var(--tier);
  stroke-width: 1.6;
}

.bdg-medal__frame .bdg-medal__inner {
  fill: none;
  stroke: var(--tier);
  stroke-opacity: .4;
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.bdg-medal .icon {
  position: relative;
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}

.bdg-medal.is-locked {
  --tier: var(--line-3);
  --tier-dim: rgba(255, 255, 255, .02);
  color: var(--muted);
}

.bdg-open {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}

.bdg-open summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font: .74rem var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}

.bdg-open summary::-webkit-details-marker {
  display: none;
}

.bdg-open summary .icon {
  transition: transform .2s var(--ease);
}

.bdg-open[open] summary .icon {
  transform: rotate(180deg);
}

.bdg-helpful {
  height: 20px;
  padding: 0 6px;
  gap: 4px;
  font-size: .62rem;
}

.bdg-helpful .icon {
  width: 11px;
  height: 11px;
}

.cm-act.is-on {
  color: var(--ok);
}

.bdg-grid--admin .bdg-tile h3 .muted {
  font-weight: 400;
}

@media (max-width: 520px) {
  .bdg-tile {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .bdg-medal {
    width: 46px;
    height: 46px;
  }

  .bdg-medal .icon {
    width: 20px;
    height: 20px;
  }
}
