/* Achievements metal coin badges + hub */

.ach-coin-link {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 0;
  margin: 0 4px;
  text-decoration: none !important;
}

.ach-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  position: relative;
  border-radius: 50%;
  box-sizing: border-box;
  margin: 1px 2px;
  flex-shrink: 0;
  overflow: visible;
}

.ach-coin__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ach-coin__rim {
  fill: none;
  stroke-width: 3.5;
}

.ach-coin__face {
  stroke-width: 0.75;
}

.ach-coin__emblem,
.ach-coin__house {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(0, 0, 0, 0.18);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

/* Checkbox checkmark — brightens at higher milestones */
.ach-coin__check-mark {
  stroke: none;
  opacity: 0.88;
}
.ach-coin--silver .ach-coin__check-mark,
.ach-coin--gold .ach-coin__check-mark,
.ach-coin--platinum .ach-coin__check-mark,
.ach-coin--diamond .ach-coin__check-mark,
.ach-coin--radiant .ach-coin__check-mark {
  opacity: 1;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.85));
}
.ach-coin--diamond .ach-coin__check-mark,
.ach-coin--radiant .ach-coin__check-mark {
  filter: drop-shadow(0 0 2.5px rgba(255, 255, 255, 1));
}

/* Tasks checkbox: stronger sparkle on silver+ (reuse ::after, amp glow) */
.ach-coin--emblem-checkbox.ach-coin--silver::after,
.ach-coin--emblem-checkbox.ach-coin--gold::after,
.ach-coin--emblem-checkbox.ach-coin--platinum::after,
.ach-coin--emblem-checkbox.ach-coin--diamond::after,
.ach-coin--emblem-checkbox.ach-coin--radiant::after {
  width: 42%;
  height: 32%;
  animation-duration: 2s;
}
.ach-coin--emblem-checkbox.ach-coin--diamond::after,
.ach-coin--emblem-checkbox.ach-coin--radiant::after {
  animation-duration: 1.2s;
}

/* Speedster bolt: slight extra punch on high ranks */
.ach-coin--emblem-bolt.ach-coin--gold,
.ach-coin--emblem-bolt.ach-coin--platinum,
.ach-coin--emblem-bolt.ach-coin--diamond,
.ach-coin--emblem-bolt.ach-coin--radiant {
  filter: saturate(1.08);
}


/* Sizes: lists ~28–36px; top nav ~22–26px */
.ach-coin--nav { width: 24px; height: 24px; }
.ach-coin--sm  { width: 28px; height: 28px; }
.ach-coin--md  { width: 32px; height: 32px; }
.ach-coin--lg  { width: 36px; height: 36px; }

.navbar-user .ach-coin,
.navbar-user .ach-coin-link {
  margin-left: 6px;
  margin-right: 0;
}

.ach-coin-with-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 6px 2px 0;
  vertical-align: middle;
}

.ach-coin-track-label {
  font-size: 11px;
  font-weight: 600;
  color: #546e7a;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* --- Unranked / empty rim --- */
.ach-coin--empty .ach-coin__rim {
  stroke: #b0bec5;
  stroke-dasharray: 3 2.5;
}
.ach-coin--empty .ach-coin__face {
  fill: #eceff1;
  stroke: #cfd8dc;
}
.ach-coin--empty .ach-coin__emblem,
.ach-coin--empty .ach-coin__house {
  fill: #90a4ae;
  opacity: 0.55;
}
.ach-coin--empty {
  box-shadow: 0 0 0 1px rgba(176, 190, 197, 0.35);
  opacity: 0.85;
}

/* --- Metal ranks --- */
.ach-coin--wood .ach-coin__rim { stroke: #4e342e; }
.ach-coin--wood .ach-coin__face { fill: transparent; }
.ach-coin--wood {
  background: linear-gradient(145deg, #a1887f 0%, #6d4c41 55%, #5d4037 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.ach-coin--wood .ach-coin__face { fill: transparent; }
.ach-coin--wood .ach-coin__rim { stroke: #3e2723; }
.ach-coin--wood .ach-coin__emblem,
.ach-coin--wood .ach-coin__house { fill: #efebe9; }

.ach-coin--copper {
  background: linear-gradient(145deg, #e0a070 0%, #c06a3a 50%, #8d4a28 100%);
  box-shadow: 0 0 6px rgba(192, 106, 58, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.ach-coin--copper .ach-coin__face { fill: transparent; }
.ach-coin--copper .ach-coin__rim { stroke: #6d3118; }
.ach-coin--copper .ach-coin__emblem,
.ach-coin--copper .ach-coin__house { fill: #fff3e0; }

.ach-coin--bronze {
  background: linear-gradient(145deg, #d4a574 0%, #b87333 45%, #8b5a2b 100%);
  box-shadow: 0 0 8px rgba(184, 115, 51, 0.45), 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.ach-coin--bronze .ach-coin__face { fill: transparent; }
.ach-coin--bronze .ach-coin__rim { stroke: #5d3a1a; }
.ach-coin--bronze .ach-coin__emblem,
.ach-coin--bronze .ach-coin__house { fill: #fff8e1; }

.ach-coin--silver {
  background: linear-gradient(145deg, #f5f7fa 0%, #c3cfe2 40%, #8e9eab 100%);
  box-shadow: 0 0 10px rgba(142, 158, 171, 0.55), 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: ach-coin-glow-silver 2.4s ease-in-out infinite alternate;
}
.ach-coin--silver .ach-coin__face { fill: transparent; }
.ach-coin--silver .ach-coin__rim { stroke: #607d8b; }
.ach-coin--silver .ach-coin__emblem,
.ach-coin--silver .ach-coin__house { fill: #37474f; }

.ach-coin--gold {
  background: linear-gradient(145deg, #ffe082 0%, #ffc107 35%, #ff8f00 100%);
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.65), 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: ach-coin-glow-gold 2s ease-in-out infinite alternate;
}
.ach-coin--gold .ach-coin__face { fill: transparent; }
.ach-coin--gold .ach-coin__rim { stroke: #e65100; }
.ach-coin--gold .ach-coin__emblem,
.ach-coin--gold .ach-coin__house { fill: #4e342e; }

.ach-coin--platinum {
  background: linear-gradient(145deg, #ffffff 0%, #e8eaf6 40%, #90a4ae 100%);
  box-shadow: 0 0 14px rgba(144, 164, 174, 0.75), 0 0 4px rgba(255, 255, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  animation: ach-coin-glow-platinum 1.8s ease-in-out infinite alternate;
}
.ach-coin--platinum .ach-coin__face { fill: transparent; }
.ach-coin--platinum .ach-coin__rim { stroke: #546e7a; }
.ach-coin--platinum .ach-coin__emblem,
.ach-coin--platinum .ach-coin__house { fill: #263238; }

.ach-coin--diamond {
  background: linear-gradient(145deg, #e3f2fd 0%, #81d4fa 35%, #4fc3f7 70%, #0277bd 100%);
  box-shadow: 0 0 16px rgba(79, 195, 247, 0.85), 0 0 6px rgba(255, 255, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: ach-coin-glow-diamond 1.5s ease-in-out infinite alternate;
}
.ach-coin--diamond .ach-coin__face { fill: transparent; }
.ach-coin--diamond .ach-coin__rim { stroke: #01579b; }
.ach-coin--diamond .ach-coin__emblem,
.ach-coin--diamond .ach-coin__house { fill: #01579b; }

.ach-coin--radiant {
  background: linear-gradient(120deg, #ff6ec7 0%, #ffd54f 25%, #69f0ae 50%, #40c4ff 75%, #b388ff 100%);
  background-size: 200% 200%;
  box-shadow: 0 0 18px rgba(255, 110, 199, 0.8), 0 0 8px rgba(64, 196, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  animation: ach-coin-radiant-shift 2.5s linear infinite, ach-coin-glow-radiant 1.2s ease-in-out infinite alternate;
}
.ach-coin--radiant .ach-coin__face { fill: transparent; }
.ach-coin--radiant .ach-coin__rim { stroke: #7c4dff; }
.ach-coin--radiant .ach-coin__emblem,
.ach-coin--radiant .ach-coin__house { fill: #1a237e; }


/* --- Owner VIP coin (Radiant-tier+ iridescent, throne emblem; permanent identity) --- */
.ach-coin--owner {
  background: linear-gradient(120deg, #ffd54f 0%, #ff6ec7 18%, #ffd54f 36%, #69f0ae 54%, #40c4ff 72%, #b388ff 88%, #ffd54f 100%);
  background-size: 280% 280%;
  box-shadow:
    0 0 22px rgba(255, 213, 79, 0.95),
    0 0 16px rgba(255, 110, 199, 0.85),
    0 0 10px rgba(64, 196, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  animation: ach-coin-radiant-shift 2.2s linear infinite, ach-coin-glow-owner 1.05s ease-in-out infinite alternate;
}
.ach-coin--owner .ach-coin__face { fill: transparent; }
.ach-coin--owner .ach-coin__rim {
  stroke: #ffd54f;
  stroke-width: 4;
  filter: drop-shadow(0 0 2px rgba(255, 213, 79, 0.9));
}
.ach-coin--owner .ach-coin__emblem,
.ach-coin--owner .ach-coin__house {
  fill: #1a237e;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.85));
}
.ach-coin--owner::after {
  content: "";
  position: absolute;
  top: 6%;
  left: 10%;
  width: 44%;
  height: 34%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 213, 79, 0.35) 40%, rgba(255, 255, 255, 0) 75%);
  pointer-events: none;
  animation: ach-coin-sparkle 1.35s ease-in-out infinite;
}
.ach-coin--emblem-throne.ach-coin--owner {
  filter: saturate(1.12);
}

@keyframes ach-coin-glow-owner {
  from {
    box-shadow:
      0 0 14px rgba(255, 213, 79, 0.55),
      0 0 10px rgba(255, 110, 199, 0.5),
      0 0 6px rgba(64, 196, 255, 0.45);
  }
  to {
    box-shadow:
      0 0 28px rgba(255, 213, 79, 1),
      0 0 20px rgba(255, 110, 199, 1),
      0 0 14px rgba(105, 240, 174, 0.95);
  }
}


/* --- Lead Dev VIP (terminal cyan / matrix shimmer + </> emblem) --- */
.ach-coin--lead_dev {
  background: linear-gradient(135deg, #00e5ff 0%, #1de9b6 25%, #00e5ff 50%, #76ff03 75%, #00b0ff 100%);
  background-size: 260% 260%;
  box-shadow:
    0 0 18px rgba(0, 229, 255, 0.9),
    0 0 12px rgba(118, 255, 3, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  animation: ach-coin-radiant-shift 2.4s linear infinite, ach-coin-glow-leaddev 1.2s ease-in-out infinite alternate;
}
.ach-coin--lead_dev .ach-coin__face { fill: transparent; }
.ach-coin--lead_dev .ach-coin__rim {
  stroke: #00e5ff;
  stroke-width: 3.5;
}
.ach-coin--lead_dev .ach-coin__emblem,
.ach-coin--lead_dev .ach-coin__house {
  fill: #00363a;
}
.ach-coin--lead_dev::after {
  content: "";
  position: absolute;
  top: 8%;
  left: 12%;
  width: 40%;
  height: 30%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(0,229,255,0.25) 50%, rgba(255,255,255,0) 80%);
  pointer-events: none;
}
@keyframes ach-coin-glow-leaddev {
  from { box-shadow: 0 0 10px rgba(0,229,255,0.5), 0 0 6px rgba(118,255,3,0.35); }
  to   { box-shadow: 0 0 24px rgba(0,229,255,1), 0 0 14px rgba(118,255,3,0.85); }
}
.ach-coin-stack--nav .ach-coin--lead_dev {
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.7) !important;
  animation: none !important;
  filter: none !important;
}
.ach-coin-stack--nav .ach-coin--lead_dev::after { display: none !important; }

/* Flame inner (streak) — brighter core */
.ach-coin__flame-inner {
  fill: rgba(255, 255, 255, 0.55);
  stroke: none;
  opacity: 0.9;
}
.ach-coin--gold .ach-coin__flame-inner,
.ach-coin--platinum .ach-coin__flame-inner,
.ach-coin--diamond .ach-coin__flame-inner,
.ach-coin--radiant .ach-coin__flame-inner {
  fill: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 0 2px rgba(255, 224, 130, 0.95));
}

/* Document / clipboard line strokes inherit emblem fill via stroke currentColor workaround — use face stroke */
.ach-coin--emblem-document .ach-coin__emblem[fill="none"],
.ach-coin--emblem-clipboard .ach-coin__emblem[fill="none"] {
  stroke: rgba(255, 255, 255, 0.92);
}
.ach-coin--silver.ach-coin--emblem-document .ach-coin__emblem[fill="none"],
.ach-coin--silver.ach-coin--emblem-clipboard .ach-coin__emblem[fill="none"],
.ach-coin--platinum.ach-coin--emblem-document .ach-coin__emblem[fill="none"],
.ach-coin--platinum.ach-coin--emblem-clipboard .ach-coin__emblem[fill="none"] {
  stroke: #263238;
}
.ach-coin--gold.ach-coin--emblem-document .ach-coin__emblem[fill="none"],
.ach-coin--gold.ach-coin--emblem-clipboard .ach-coin__emblem[fill="none"] {
  stroke: #4e342e;
}
.ach-coin--diamond.ach-coin--emblem-document .ach-coin__emblem[fill="none"],
.ach-coin--diamond.ach-coin--emblem-clipboard .ach-coin__emblem[fill="none"],
.ach-coin--radiant.ach-coin--emblem-document .ach-coin__emblem[fill="none"],
.ach-coin--radiant.ach-coin--emblem-clipboard .ach-coin__emblem[fill="none"] {
  stroke: #1a237e;
}


/* Specular shimmer overlay for higher ranks */
.ach-coin--silver::after,
.ach-coin--gold::after,
.ach-coin--platinum::after,
.ach-coin--diamond::after,
.ach-coin--radiant::after {
  content: "";
  position: absolute;
  top: 8%;
  left: 12%;
  width: 38%;
  height: 28%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  animation: ach-coin-sparkle 2.8s ease-in-out infinite;
}

.ach-coin--diamond::after,
.ach-coin--radiant::after {
  animation-duration: 1.6s;
}

@keyframes ach-coin-sparkle {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

@keyframes ach-coin-glow-silver {
  from { box-shadow: 0 0 6px rgba(142, 158, 171, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
  to   { box-shadow: 0 0 14px rgba(142, 158, 171, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
}

@keyframes ach-coin-glow-gold {
  from { box-shadow: 0 0 8px rgba(255, 193, 7, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
  to   { box-shadow: 0 0 18px rgba(255, 193, 7, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.65); }
}

@keyframes ach-coin-glow-platinum {
  from { box-shadow: 0 0 8px rgba(144, 164, 174, 0.45), 0 0 2px rgba(255, 255, 255, 0.5); }
  to   { box-shadow: 0 0 20px rgba(207, 216, 220, 1), 0 0 6px rgba(255, 255, 255, 0.95); }
}

@keyframes ach-coin-glow-diamond {
  from { box-shadow: 0 0 10px rgba(79, 195, 247, 0.5), 0 0 3px rgba(255, 255, 255, 0.6); }
  to   { box-shadow: 0 0 22px rgba(3, 169, 244, 1), 0 0 8px rgba(255, 255, 255, 1); }
}

@keyframes ach-coin-glow-radiant {
  from { box-shadow: 0 0 12px rgba(255, 110, 199, 0.5), 0 0 6px rgba(64, 196, 255, 0.45); }
  to   { box-shadow: 0 0 24px rgba(255, 110, 199, 1), 0 0 14px rgba(105, 240, 174, 0.9); }
}

@keyframes ach-coin-radiant-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .ach-coin--silver,
  .ach-coin--gold,
  .ach-coin--platinum,
  .ach-coin--diamond,
  .ach-coin--radiant,
  .ach-coin--owner,
  .ach-coin--silver::after,
  .ach-coin--gold::after,
  .ach-coin--platinum::after,
  .ach-coin--diamond::after,
  .ach-coin--radiant::after,
  .ach-coin--owner::after {
    animation: none !important;
  }
}


/* --- Overlapping earned-coin stack (nav / name / team) --- */
.ach-coin-stack {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  vertical-align: middle;
  line-height: 0;
  position: relative;
}
.ach-coin-stack__item {
  display: inline-flex;
  position: relative;
  line-height: 0;
}
.ach-coin-stack .ach-coin-link,
.ach-coin-stack .ach-coin {
  margin: 0;
}
.ach-coin-stack__item + .ach-coin-stack__item {
  /* ~35% overlap — tuned per size below */
  margin-left: -10px;
}
.ach-coin-stack--nav .ach-coin-stack__item + .ach-coin-stack__item { margin-left: -9px; }
.ach-coin-stack--sm  .ach-coin-stack__item + .ach-coin-stack__item { margin-left: -10px; }
.ach-coin-stack--md  .ach-coin-stack__item + .ach-coin-stack__item { margin-left: -12px; }
.ach-coin-stack--lg  .ach-coin-stack__item + .ach-coin-stack__item { margin-left: -13px; }

.navbar-user .ach-coin-stack {
  margin-left: 6px;
  margin-right: 0;
}
.navbar-user .ach-coin-stack .ach-coin,
.navbar-user .ach-coin-stack .ach-coin-link {
  margin-left: 0;
  margin-right: 0;
}


/* Rank-up celebration modal */
.ach-rankup-modal .modal-content {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}
.ach-rankup-modal .modal-header {
  border-bottom: none;
  background: linear-gradient(135deg, #eceff1 0%, #fff 100%);
  padding: 18px 20px 8px;
}
.ach-rankup-modal .modal-title {
  font-weight: 700;
  color: #263238;
}
.ach-rankup-modal .modal-body {
  text-align: center;
  padding: 8px 24px 20px;
}
.ach-rankup-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.ach-rankup-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #eceff1;
}
.ach-rankup-list li:first-child { border-top: none; }
.ach-rankup-copy {
  text-align: left;
}
.ach-rankup-copy .rank {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #37474f;
}
.ach-rankup-copy .track {
  display: block;
  font-size: 0.9rem;
  color: #607d8b;
}
.ach-rankup-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2100;
}

/* Legacy pill class kept as no-op alias so old markup does not explode */
.ach-badge {
  display: inline-block;
  vertical-align: middle;
}

.ach-progress {
  position: relative;
  height: 18px;
  background: #eceff1;
  border-radius: 9px;
  overflow: hidden;
}

.ach-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #42a5f5, #7e57c2);
  border-radius: 9px;
  transition: width 0.35s ease;
}

.ach-progress__label {
  position: absolute;
  right: 8px;
  top: 0;
  line-height: 18px;
  font-size: 11px;
  color: #37474f;
  font-weight: 600;
}

.ach-track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.ach-counter-card .ach-counter-number {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.25rem 0;
  color: #37474f;
}

.ach-threshold-chip {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 2px;
  border-radius: 4px;
  background: #eceff1;
  color: #607d8b;
}

.ach-threshold-chip.is-earned {
  background: #e8f5e9;
  color: #2e7d32;
}

.ach-team-badges {
  margin-top: 4px;
  line-height: 1.8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
}

.ach-profile-toggle {
  margin: 0.75rem 0 1rem;
  padding: 12px 14px;
  background: #f5f7fa;
  border-radius: 8px;
  border: 1px solid #e0e6ed;
}

.ach-profile-toggle label {
  font-weight: 600;
  margin-bottom: 0;
  cursor: pointer;
}

.ach-profile-toggle .help-block {
  margin: 6px 0 0;
  color: #607d8b;
  font-size: 13px;
}

/* Keep Bootstrap tooltips for nav coins above header chrome */
body > .tooltip {
  z-index: 2000;
}


/* --- Nav / stack: force identical coin box height (glow must not shift baseline) --- */
.navbar-user {
  display: inline-flex !important;
  align-items: center !important;
}
.ach-coin-stack--nav {
  height: 24px;
  align-items: center;
}
.ach-coin-stack--nav .ach-coin-stack__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  line-height: 0;
}
.ach-coin-stack--nav .ach-coin-link,
.ach-coin-stack--nav .ach-coin--nav {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  flex: 0 0 24px;
}
.ach-coin-stack--nav .ach-coin__svg {
  width: 24px;
  height: 24px;
  overflow: hidden; /* keep optical size even with thick strokes/filters */
}
/* Owner thicker rim was making it look taller in the stack */
.ach-coin--nav.ach-coin--owner .ach-coin__rim {
  stroke-width: 3.5;
}
.ach-coin-stack--sm {
  height: 28px;
  align-items: center;
}
.ach-coin-stack--sm .ach-coin-stack__item {
  display: flex;
  align-items: center;
  height: 28px;
}
.ach-coin-stack--sm .ach-coin-link,
.ach-coin-stack--sm .ach-coin--sm {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  flex: 0 0 28px;
}


/* Profile name + badge stack side by side (coins NOT inside the <a>) */
.navbar-user-wrap {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center !important;
  gap: 6px;
}
.navbar-user-wrap > .navbar-user {
  display: inline-flex !important;
  align-items: center !important;
}
.navbar-user-wrap > .ach-coin-stack {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center !important;
  height: 24px;
  margin: 0;
  position: relative;
  z-index: 5;
}

/* Identical coin boxes in nav */
.ach-coin-stack--nav {
  height: 24px !important;
  align-items: center !important;
}
.ach-coin-stack--nav .ach-coin-stack__item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px;
  height: 24px !important;
  position: relative;
  line-height: 0;
  flex: 0 0 24px;
}
.ach-coin-stack--nav .ach-coin-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
}
.ach-coin-stack--nav .ach-coin--nav {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  box-shadow: none !important; /* glow was optically shifting heights */
  filter: none !important;
  animation: none !important;
}
.ach-coin-stack--nav .ach-coin--owner {
  /* keep color, drop size-shifting glow in the tiny nav */
  box-shadow: 0 0 0 1px rgba(255, 213, 79, 0.65) !important;
  animation: none !important;
  filter: none !important;
}
.ach-coin-stack--nav .ach-coin--owner::after,
.ach-coin-stack--nav .ach-coin--silver::after,
.ach-coin-stack--nav .ach-coin--gold::after,
.ach-coin-stack--nav .ach-coin--platinum::after,
.ach-coin-stack--nav .ach-coin--diamond::after,
.ach-coin-stack--nav .ach-coin--radiant::after {
  display: none !important;
}
.ach-coin-stack--nav .ach-coin__rim {
  stroke-width: 3.5 !important;
}
.ach-coin-stack--nav .ach-coin__svg {
  width: 24px !important;
  height: 24px !important;
  overflow: hidden;
  display: block;
}

/* Hover labels BELOW each nav coin (never clipped by header) */
.ach-coin-stack--nav .ach-coin-stack__item[data-ach-label]:hover::after,
.ach-coin-stack--nav .ach-coin-stack__item[data-ach-label]:focus-within::after {
  content: attr(data-ach-label);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #263238;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 5000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.ach-coin-stack--nav .ach-coin-stack__item[data-ach-label]:hover::before,
.ach-coin-stack--nav .ach-coin-stack__item[data-ach-label]:focus-within::before {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #263238;
  z-index: 5001;
  pointer-events: none;
}


/* Overall callout layout (uses same .ach-track-card chrome as track sections) */
.ach-overall-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ach-overall-box__coin {
  text-align: center;
  min-width: 72px;
}
.ach-overall-weights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.75rem;
}
.ach-overall-weight {
  background: rgba(255,255,255,0.85);
  border: 1px solid #9fa8da;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 1.3;
}
.ach-overall-weight__w {
  display: inline-block;
  font-weight: 700;
  color: #3949ab;
  margin-right: 4px;
  min-width: 1.6em;
}




/* --- OG Badge: tooth-shaped (not circular) with diamond grillz --- */
.ach-coin--og,
.ach-coin--shape-tooth {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.ach-coin--og::after,
.ach-coin--shape-tooth::after {
  display: none !important;
}
.ach-coin--og .ach-coin__svg--tooth,
.ach-coin--shape-tooth .ach-coin__svg--tooth {
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(64, 196, 255, 0.85)) drop-shadow(0 0 3px rgba(234, 128, 252, 0.7));
  animation: ach-og-tooth-glow 1.2s ease-in-out infinite alternate;
}
.ach-coin--og .ach-coin__og-body {
  fill: #81d4fa;
  stroke: #29b6f6;
  stroke-width: 2.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ach-coin--og .ach-coin__og-shine {
  fill: rgba(255, 255, 255, 0.7);
  stroke: none;
}
.ach-coin--og .ach-coin__tooth-diamond--top {
  fill: #f3e5f5;
  stroke: #ffffff;
  stroke-width: 0.7;
}
.ach-coin--og .ach-coin__tooth-diamond--left {
  fill: #ea80fc;
  stroke: #ffffff;
  stroke-width: 0.5;
}
.ach-coin--og .ach-coin__tooth-diamond--right {
  fill: #40c4ff;
  stroke: #ffffff;
  stroke-width: 0.5;
}
.ach-coin--og .ach-coin__tooth-diamond--bottom {
  fill: #7c4dff;
  stroke: #ffffff;
  stroke-width: 0.5;
}
@keyframes ach-og-tooth-glow {
  from {
    filter: drop-shadow(0 0 3px rgba(64, 196, 255, 0.55)) drop-shadow(0 0 2px rgba(234, 128, 252, 0.4));
  }
  to {
    filter: drop-shadow(0 0 10px rgba(64, 196, 255, 1)) drop-shadow(0 0 6px rgba(234, 128, 252, 0.95));
  }
}
/* Nav: quieter glow so the tooth still reads at 24px */
.ach-coin-stack--nav .ach-coin--og .ach-coin__svg--tooth {
  animation: none !important;
  filter: drop-shadow(0 0 2px rgba(64, 196, 255, 0.9));
}
@media (prefers-reduced-motion: reduce) {
  .ach-coin--og .ach-coin__svg--tooth {
    animation: none !important;
  }
}


/* My Team: space coins off the name */
.table .ach-coin-stack {
  margin-left: 10px;
  vertical-align: middle;
}
