/* v0.26.9 — unified quest / achievement reward-ready indicator.
   Eliminates the old yellow ellipse and mobile full-width badge regression.
   Both buttons use a compact green check/count marker anchored inside the
   same top-right corner.  The count/hidden state remains driven by game.js.
*/
#gameQuestsBtn,
#achievementBtn {
  position: relative!important;
  isolation: isolate;
}

/* Override both unrelated legacy yellow highlight/animation implementations. */
#gameQuestsBtn.quest-ready,
#achievementBtn.achievement-ready {
  border-color: #62cfa5!important;
  box-shadow: inset 3px 0 0 #50d9a7!important;
  animation: none!important;
}

/* Direct child, not inside .utility-button-label: mobile CSS previously gave
   every nested span width:100%, creating the mismatched yellow ovals. */
#gameQuestsBtn > #questCountBadge,
#achievementBtn > #achievementCountBadge {
  position: absolute!important;
  inset: 2px 3px auto auto!important;
  box-sizing: border-box!important;
  display: inline-flex!important;
  flex: 0 0 auto!important;
  align-items: center!important;
  justify-content: center!important;
  gap: 2px!important;
  width: 26px!important;
  min-width: 26px!important;
  max-width: 26px!important;
  height: 16px!important;
  min-height: 16px!important;
  max-height: 16px!important;
  padding: 0 2px!important;
  margin: 0!important;
  border: 1px solid #89efd0!important;
  border-radius: 3px!important;
  background: #216b57!important;
  color: #f5fff9!important;
  font-size: 9px!important;
  font-weight: 900!important;
  line-height: 1!important;
  white-space: nowrap!important;
  letter-spacing: 0!important;
  text-align: center!important;
  box-shadow: none!important;
  transform: none!important;
  transition: none!important;
  z-index: 2!important;
  pointer-events: none!important;
}
#gameQuestsBtn > #questCountBadge::before,
#achievementBtn > #achievementCountBadge::before {
  content: '✓';
  display: inline-block;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 900;
}
#gameQuestsBtn > #questCountBadge[hidden],
#achievementBtn > #achievementCountBadge[hidden] {
  display: none!important;
}

/* The label stays centered and only reserves space when a mark is visible. */
#gameQuestsBtn.quest-ready > .utility-button-label,
#achievementBtn.achievement-ready > .utility-button-label {
  padding-left: 3px!important;
  padding-right: 14px!important;
  box-sizing: border-box!important;
}
@media (pointer:coarse), (max-width:760px) {
  body > .app-shell .battle-utility-panel > #gameQuestsBtn > #questCountBadge,
  body > .app-shell .battle-utility-panel > #achievementBtn > #achievementCountBadge {
    inset: 2px 2px auto auto!important;
    width: 23px!important;
    min-width: 23px!important;
    max-width: 23px!important;
    height: 14px!important;
    min-height: 14px!important;
    max-height: 14px!important;
    font-size: 8px!important;
  }
  body > .app-shell .battle-utility-panel > #gameQuestsBtn > #questCountBadge::before,
  body > .app-shell .battle-utility-panel > #achievementBtn > #achievementCountBadge::before {
    font-size: 8px!important;
  }
}
