/* =====================================================
   BADGE SHELF LAYOUT
   ===================================================== */

.badge-shelf {
  border-top: 1px solid var(--grid-line);
  padding: 24px;
}

.badge-shelf-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.38;
  filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s;
}

.badge-item.earned {
  opacity: 1;
  filter: none;
}

.badge-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  max-width: 60px;
  line-height: 1.4;
}

/* =====================================================
   BASE BADGE WRAPPER
   ===================================================== */

.badge {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
}

/* =====================================================
   1. FOUND IT FIRST
   Dark circle, red dashed outer ring, "1ST" stamp
   ===================================================== */

.badge-found-it-first {
  border-radius: 50%;
  background: var(--ink);
  border: 2.5px dashed var(--red);
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 5.5px var(--red);
  flex-direction: column;
  gap: 0;
}

.badge-found-it-first .b-main {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--paper);
  line-height: 1;
}

.badge-found-it-first .b-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6px;
  letter-spacing: 0.22em;
  color: var(--red);
  text-transform: uppercase;
}

/* =====================================================
   2. CENTURY CLUB
   Bold red square, "100" front and center
   ===================================================== */

.badge-century-club {
  background: var(--red);
}

.badge-century-club .b-main {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--paper);
  line-height: 1;
}

/* =====================================================
   3. PIONEER
   Hexagon, muted/rare-feeling
   ===================================================== */

.badge-pioneer {
  width: 52px;
  height: 60px;
  background: #8a9090;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  flex-direction: column;
  gap: 0;
}

.badge-pioneer .b-main {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--paper);
  line-height: 1;
}

.badge-pioneer .b-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
}

/* =====================================================
   4. 7-DAY STREAK
   Circular progress ring with inner circle
   ===================================================== */

.badge-seven-day-streak {
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--red);
}

.badge-seven-day-streak .b-inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
}

.badge-seven-day-streak .b-main {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--ink);
  line-height: 1;
}

.badge-seven-day-streak .b-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 5.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1;
}

/* =====================================================
   5. NOMAD
   Grid map background, three dots connected by lines
   ===================================================== */

.badge-nomad {
  background: var(--paper);
  border: 1.5px solid var(--grid-line);
  overflow: hidden;
  align-items: flex-start;
  justify-content: flex-start;
}

.badge-nomad::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% 15px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 15px 100%;
  opacity: 0.5;
  pointer-events: none;
}

/* Three city dots */
.badge-nomad .nomad-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  z-index: 2;
}

.badge-nomad .nomad-dot:nth-child(1) { top: 11px; left: 13px; }
.badge-nomad .nomad-dot:nth-child(2) { top: 22px; left: 36px; }
.badge-nomad .nomad-dot:nth-child(3) { top: 38px; left: 20px; }

/* Connecting lines between dots */
.badge-nomad .nomad-line {
  position: absolute;
  background: var(--ink);
  z-index: 1;
  opacity: 0.5;
  transform-origin: 0 50%;
}

/* Line 1→2: roughly 24px wide, angled ~27° */
.badge-nomad .nomad-line:nth-child(4) {
  width: 26px;
  height: 1px;
  top: 13px;
  left: 16px;
  transform: rotate(25deg);
}

/* Line 2→3: roughly 18px wide, angled ~120° */
.badge-nomad .nomad-line:nth-child(5) {
  width: 22px;
  height: 1px;
  top: 27px;
  left: 22px;
  transform: rotate(118deg);
}

/* =====================================================
   6. IRON HUNTER
   Steel gray square, "30" large and minimal
   ===================================================== */

.badge-iron-hunter {
  background: #6b7280;
}

.badge-iron-hunter .b-main {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: #e5e7eb;
  line-height: 1;
}

/* =====================================================
   7. HIGH ROLLER
   Cream circle, "90–100" callout
   ===================================================== */

.badge-high-roller {
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  flex-direction: column;
  gap: 2px;
}

.badge-high-roller .b-main {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1;
}

.badge-high-roller .b-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 6.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

/* =====================================================
   8. GALLERY STAR
   Red background, 3×3 photo grid overlay
   ===================================================== */

.badge-gallery-star {
  background: var(--red);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 6px;
  align-items: stretch;
  justify-items: stretch;
}

.badge-gallery-star .gs-cell {
  background: rgba(255, 255, 255, 0.22);
  aspect-ratio: 1;
}

.badge-gallery-star .gs-cell.center {
  background: rgba(255, 255, 255, 0.7);
}
